File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/compas/datastructures/mesh Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,10 @@ def is_line(self):
7474 @property
7575 def is_polygon (self ):
7676 return len (self .intersections ) >= 3
77+
78+ @property
79+ def is_closed (self ):
80+ return self .mesh .is_closed ()
7781
7882 @property
7983 def positive (self ):
@@ -90,7 +94,8 @@ def positive(self):
9094 vdict = {key : self .mesh .vertex_coordinates (key ) for key in vertices + self .intersections }
9195 fdict = [self .mesh .face_vertices (fkey ) for fkey in faces ]
9296 mesh = self .meshtype .from_vertices_and_faces (vdict , fdict )
93- mesh .add_face (mesh .vertices_on_boundary ())
97+ if self .is_closed :
98+ mesh .add_face (mesh .vertices_on_boundary ())
9499 return mesh
95100
96101 def is_positive (self , key ):
@@ -119,7 +124,8 @@ def negative(self):
119124 vdict = {key : self .mesh .vertex_coordinates (key ) for key in vertices + self .intersections }
120125 fdict = [self .mesh .face_vertices (fkey ) for fkey in faces ]
121126 mesh = self .meshtype .from_vertices_and_faces (vdict , fdict )
122- mesh .add_face (mesh .vertices_on_boundary ())
127+ if self .is_closed :
128+ mesh .add_face (mesh .vertices_on_boundary ())
123129 return mesh
124130
125131 def is_negative (self , key ):
You can’t perform that action at this time.
0 commit comments