Find Optimal 3D Print Orientations
With a broad support for mesh-based geometric regions, printability analysis from structural loads to upright orientation is easy to perform.
Find candidate orientations for placing the model on a flat surface.
show complete Wolfram Language input
Out[1]=
Each face of the convex hull represents a candidate orientation.
In[2]:=
convexHull = ConvexHullMesh[points];
orientations = MeshPrimitives[convexHull, 2];
highlight[convexHull, cover]
Out[2]=
Use the orthogonal projection of the center of mass to further restrict candidate orientations.
In[3]:=
masscenter = RegionCentroid[cover];
projection[polygon_, p_] := RegionNearest[AffineSpace @@ polygon, p];
candidates =
Select[orientations, RegionMember[#, projection[#, masscenter]] &];
A candidate orientation.
In[4]:=
Show[ncover =
TransformedRegion[cover, transform[Last[SortBy[candidates, Area]]]],
Boxed -> True]
Out[4]=
Print the model.
In[5]:=
Printout3D[ncover, "Shapeways"]
Out[5]=