solid.Shape

Methods

Method Reference: solid.Shape.faces

solid.Shape: F = faces (S)

solid.Shape: F = faces (S, Name, Value, …)

Choose faces of a shape, to open when hollowing it or to inspect.

F = faces (S) returns the indices of the faces of S as a row vector, in the order solid.Shape.numfaces counts them. The indices belong to S alone: every operation that makes a new shape numbers its faces afresh, so choose faces from the shape the feature is applied to, immediately before applying it.

Name/Value pairs narrow the choice, and a face is returned only when it meets all of them:

'Type'
The kind of surface the face lies on: 'plane', 'cylinder', 'cone', 'sphere', 'torus', 'revolution', 'extrusion', 'bspline' or 'other', or a cell array of several.
'Normal'
A nonzero 3-element vector. A flat face is chosen when its outward normal points the same way, so [0, 0, 1] picks faces looking up and not those looking down. Curved faces are never chosen.
'Axis'
A nonzero 3-element vector. A face on a cylinder, cone, torus or other surface of revolution is chosen when its axis runs parallel to it, either way.
'Within'
A box [xmin, ymin, zmin, xmax, ymax, zmax], as solid.Shape.bbox returns one. A face is chosen when it lies wholly inside, to within 1e-6 millimetres.

The empty shape has no faces.

 
 ## The bore of a block, its edges chamfered 1 x 45
 S = subtract (solid.box (40, 30, 10), ...
               translate (solid.cylinder (5, 10), [20, 15, 0]));
 bore = faces (S, 'Type', 'cylinder');
 S = chamfer (S, edges (S, 'Face', bore), 1);

See also: solid.Shape.edges, solid.Shape.shell

Source Code: solid.Shape