Hello people,
I need some help
I try to achieve a valid closed Mesh without clashing Faces.
I wrote a little PY-Script to get the appropriate indices and culled them in Grasshopper and it works.
buuuut I also want a single Blackbox-Solution with repair for this Problem, so I tried to get the mesh with the culled Faces inside the ghpy-comp, but there is the problem.
Every time I try to make the “new mesh” with “CreateFromFilteredFaceList”, Rhino closes and shows an error. You can find this command in the last comment in the ghpy-comp.
Can you make me understand what exactly my mistake is?
Any help is appreciated.
Greetings
import Rhino as rh
b= x.Faces
c=b.GetClashingFacePairs(0)
i_p=[]
j_p=[]
IndList=[]
for i,pairs in enumerate(c):
i_p.append(pairs.I)
j_p.append(pairs.J)
IndList.append(rh.IndexPair.I.GetValue(pairs))
IndList.append(rh.IndexPair.J.GetValue(pairs))
IndList=list(dict.fromkeys(IndList))
l=[]
for i,k in enumerate(b):
if i in IndList:
l.append(False)
else:
l.append(True)
# Here comes the error
#a=rh.Geometry.Mesh.CreateFromFilteredFaceList(x,l)
Before:
After:
cull_clashing_mesh_faces_Discourse.gh (170.3 KB)