wassimj / topologicpy

The python bindings for topologic
MIT License
73 stars 19 forks source link

Wire.Planarize and and error forming a face #49

Open martinvrielink opened 2 months ago

martinvrielink commented 2 months ago

Hi Wassim, I have studies the following BREP shape consisting of Wires: image The goal is tho go to a cell which later can be used. I did not have success thusfar.

Side note: Thinking the cause of not being able to form a cell might be that the Wires are not planar I went ahead using

pwires =[]
for i in wires:
    pnwire = Wire.Planarize(i)
    pwires.append(pnwire)

Here the controid of the plane did not read correctly as default. image

So I used: ctrd = Topology.Centroid(i) pnwire = Wire.Planarize(i,ctrd)

The cell is not formed because Face/Wire on index 6 is forming an incorrect face. It is not using the outer edges (in red): Maybe because the centre point of the face in not on the face? 12

Does this face need to be triangulated before going into Topologicpy or can Topologicpy handle this exception?

Kind regards, Martin Vrielink

BREPS: RevitJoinedMassWires.zip Notebook: Situation 02 - Face triangulate.zip

martinvrielink commented 2 months ago

Hi Wassim, I found a similar face as the previous which could not form a face: image See: Brep and notebook.zip Kind regards, Martin