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]=
![](assets.en/find-optimal-3d-print-orientations/O_27.png)
Each face of the convex hull represents a candidate orientation.
In[2]:=
![Click for copyable input](assets.en/find-optimal-3d-print-orientations/In_27.png)
convexHull = ConvexHullMesh[points];
orientations = MeshPrimitives[convexHull, 2];
highlight[convexHull, cover]
Out[2]=
![](assets.en/find-optimal-3d-print-orientations/O_28.png)
Use the orthogonal projection of the center of mass to further restrict candidate orientations.
In[3]:=
![Click for copyable input](assets.en/find-optimal-3d-print-orientations/In_28.png)
masscenter = RegionCentroid[cover];
projection[polygon_, p_] := RegionNearest[AffineSpace @@ polygon, p];
candidates =
Select[orientations, RegionMember[#, projection[#, masscenter]] &];
A candidate orientation.
In[4]:=
![Click for copyable input](assets.en/find-optimal-3d-print-orientations/In_29.png)
Show[ncover =
TransformedRegion[cover, transform[Last[SortBy[candidates, Area]]]],
Boxed -> True]
Out[4]=
![](assets.en/find-optimal-3d-print-orientations/O_29.png)
Print the model.
In[5]:=
![Click for copyable input](assets.en/find-optimal-3d-print-orientations/In_30.png)
Printout3D[ncover, "Shapeways"]
Out[5]=
![](assets.en/find-optimal-3d-print-orientations/O_30.png)