Skip to content

Commit

Permalink
fix tessellation face transformation
Browse files Browse the repository at this point in the history
  • Loading branch information
Licini committed Mar 21, 2023
1 parent 6855ec0 commit a96ff37
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/compas_occ/brep/brep.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,9 +872,12 @@ def to_tesselation(self, linear_deflection: float = 1e-3) -> Mesh:
for face in self.faces:
location = TopLoc_Location()
triangulation = bt.Triangulation(face.occ_face, location)
if triangulation is None:
continue
nodes = []
trsf = location.Transformation()
for i in range(1, triangulation.NbNodes() + 1):
nodes.append(triangulation.Node(i))
nodes.append(triangulation.Node(i).Transformed(trsf))
vertices = points1_from_array1(nodes)
faces = []
triangles = triangulation.Triangles()
Expand Down

0 comments on commit a96ff37

Please sign in to comment.