Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Remove duplicated graphical elements from a polyhedron
ResourceFunction["PolyhedronChop"][poly] merges near-identical points in the polyhedron poly, and then re-indexes based on the new point set. |
Clean up a messy polyhedron:
| In[1]:= | ![]() |
| Out[1]= |
The returned object is now a simple polyhedron:
| In[2]:= |
| Out[2]= |
As an aid for 3D printing formats, all faces have the same orientation:
| In[3]:= |
| Out[3]= | ![]() |
Variations on 2 and -2 lead to a messy tetrahedron with 108 vertices and 78732 faces:
| In[4]:= | ![]() |
| Out[4]= |
PolyhedronChop cleans up the messiness:
| In[5]:= |
| Out[5]= |
Faces appear in counterclockwise orientation when viewed from the outside:
| In[6]:= |
| Out[6]= | ![]() |
A polyhedron with different face orientations often cannot be 3D printed:
| In[7]:= | ![]() |
| Out[7]= | ![]() |
PolyhedronChop returns consistent face orientations:
| In[8]:= |
| Out[8]= | ![]() |
Objects in PolyhedronData have consistent face orientations:
| In[9]:= |
| Out[9]= | ![]() |
PolyhedronChop may return faces in a different but equivalent form:
| In[10]:= |
| Out[10]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License