solid.Shape.hull
solid.Shape: H = hull (A, B, …)
solid.Shape: H = hull (…, 'Tolerance', TOL)
The convex hull of shapes and points.
H = hull (A, B, …) returns the smallest
convex solid that holds every shape and point given, the shape a sheet
shrunk round them takes. Each argument is a solid.Shape or an
N-by-3 matrix of points. This is OpenSCAD’s hull of
solids: a slot from two cylinders, a rounded block from eight spheres
at its corners, a tapered arm from the bosses at its ends. Empty
shapes add nothing, and the hull of nothing is the empty shape.
The hull has flat faces. The surface of each shape is taken as the points of a triangulation that strays no further than TOL from it, 0.01 by default, so the hull lies inside the exact one by at most TOL; where the exact hull is flat, as between boxes, it is exact and its triangles meet as whole faces. Open CASCADE has no exact hull of curved faces.
## A slot 30 long and 10 wide, 4 deep, cut through a plate
C = solid.cylinder (5, 4);
slot = hull (C, translate (C, [20, 0, 0]));
plate = subtract (translate (solid.box (50, 30, 4), [-15, -15, 0]), ...
slot);
|
See also: geom.Region.hull, solid.polyhedron, solid.Shape.union
Source Code: solid.Shape