solid.extrude
drafting: S = solid.extrude (R, H)
drafting: S = solid.extrude (R, H, Name, Value, …)
A solid extruded from a region.
S = solid.extrude (R, H) returns a
solid.Shape whose section is the geom.Region R,
extruded from the region’s plane square to it. This is how a plate of any
outline, a bracket or a key is modelled: draw its outline, then give it a
thickness. The holes of the region go right through, and its arcs become
true circular edges and cylindrical faces.
H says how far, in millimetres, and which way:
geom.UCS;[H1, H2], both positive[5, 5] is centred on the plane.A region in the default xy plane rises along +z; a region on the plane of a sloping face rises square to the face.
Name/Value pairs:
'Taper'[A1, A2] for the two sides of an extrusion to
both sides, each in the range (-90, 90). A negative angle leans
the walls outwards. The holes lean with the walls, so they open up as the
outline closes in. Corners stay sharp and walls stay flat or conical, as a
drafted wall is; a taper that closes a hole or the outline before the full
height cannot be built. The heights are true heights, square to the plane.
A region with splines takes no taper: Open CASCADE cannot offset a spline
faithfully.'Twist''Scale'Twist and scale apply to an extrusion to one side and cannot be combined with a taper. A scaled extrusion without twist is exact. A twisted one passes exactly through the region turned every 10 degrees, with a smooth surface between.
## A flange 3 thick: rounded ends, a bore of 20 and two holes of 6
R = geom.Region ([-20, -20, 0; 20, -20, 1; 20, 20, 0; -20, 20, 1], ...
{[10, 0, 1; -10, 0, 1], [-22, 0, 1; -28, 0, 1], ...
[28, 0, 1; 22, 0, 1]});
S = solid.extrude (R, 3);
## A block 10 high centred on the plane, its walls drafted 3 degrees
S = solid.extrude (geom.Region ([0, 0; 40, 0; 40, 20; 0, 20]), [5, 5], ...
'Taper', 3);
|
See also: geom.Region, solid.revolve, solid.loft, solid.sweep
Source Code: solid.extrude