File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
src/compas_rhino/geometry/brep Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 99from compas .geometry import Brep
1010from compas .geometry import BrepError
1111from compas .geometry import BrepFilletError
12+ from compas .geometry import BrepInvalidError
1213from compas .geometry import BrepTrimmingError
1314from compas .geometry import Frame
1415from compas .geometry import Plane
@@ -674,3 +675,18 @@ def flip(self):
674675
675676 """
676677 self ._brep .Flip ()
678+
679+ def make_solid (self ):
680+ """Convert the current shape to a solid if it is a shell.
681+
682+ Returns
683+ -------
684+ None
685+
686+ """
687+ if not self ._brep .IsSolid :
688+ capped_brep = self ._brep .CapPlanarHoles (TOL .absolute )
689+ if capped_brep :
690+ self ._brep = capped_brep
691+ else :
692+ raise BrepInvalidError ("Failed to convert Brep to solid" )
You can’t perform that action at this time.
0 commit comments