-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
1,424 additions
and
994 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,21 @@ | ||
from OCC.Core.BRep import BRep_Builder | ||
from OCC.Core.TopoDS import TopoDS_Compound | ||
|
||
from OCC.Core.BRepBuilderAPI import BRepBuilderAPI_Sewing, BRepBuilderAPI_MakeSolid | ||
from OCC.Core.TopoDS import TopoDS_Shape, TopoDS_Wire, TopoDS_Shell | ||
def geometry_builder(*args): | ||
builder = BRep_Builder() | ||
obj = TopoDS_Compound() | ||
builder.MakeCompound(obj) | ||
for item in args[0]: builder.Add(obj, item) | ||
return obj | ||
return obj | ||
|
||
def sewer(*component) -> TopoDS_Shape: | ||
sewing = BRepBuilderAPI_Sewing() | ||
for i in range(len(component[0])): | ||
sewing.Add(component[0][i]) | ||
sewing.Perform() | ||
sewed_shape = sewing.SewedShape() | ||
return sewed_shape | ||
|
||
def solid_maker(item: TopoDS_Shape) -> TopoDS_Shape: | ||
return BRepBuilderAPI_MakeSolid(item).Shape() |
Oops, something went wrong.