solid.Shape.section
solid.Shape: R = section (S, U)
Cut a shape with a plane.
R = section (S, U) cuts the shape S with
the plane of the geom.UCS U and returns the cut as a
1-by-N cell array of geom.Region objects in U, one
for each separate piece of it, largest first. A piece is an outline
with the holes in it; a piece standing in a hole of another is a piece
of its own. A face of S lying in the plane is part of the cut, so
a box cut in the plane of its base gives its base. Where the plane
only touches S, along an edge or at a point, or misses it, the cut
has no area and R is the empty cell (1, 0).
The cut is exact enough to build from again. Straight edges are
straight segments and circles are arcs, a whole circle two half arcs.
An ellipse or another conic, as a plane cuts from a cylinder or a cone at
a slant, is a rational geom.Spline that follows it exactly; any
other curve, as from a torus or a spline surface, is the B-spline Open
CASCADE computes for it.
## A plate with a bore, cut through the middle and made again
S = solid.extrude (geom.Region ([0, 0; 60, 0; 60, 40; 0, 40], ...
{[20, 20, 1; 40, 20, 1]}), 8);
R = section (S, geom.UCS ([0, 0, 1], [0, 0, 4]));
T = solid.extrude (R{1}, 2);
|
See also: geom.Region, geom.UCS, solid.extrude
Source Code: solid.Shape