
Thu, 11/23/2006 - 20:09
Forums:
Hello,
thanks to your help my first solid appears in a STEP file. It is created by a
Wire->Face->MakePrism.
Now I need to have holes in the plates. I have not found a way to substract these holes
as wire from the face, do I really need to make this on the solid level ?
Thanks Carsten
Fri, 11/24/2006 - 10:34
Hi,
you can add wires as holes when you create a face. Take a look at the doc for the "BRepBuilderAPI_MakeFace" class (esp. the "Add" method).
Patrik
Wed, 04/15/2009 - 15:24
Simpler (but not completely accurate) answer....
create your outer face with mFace = BRepBuilderAPI_MakeFace(Wire)..
then you can add inner faces with mFace.Add(wire)
Orientations determine whether the added face is a hole or an island.
Hope this gets people moving on this.
Stephen
Wed, 04/15/2009 - 15:33
If you're lazy you can also run ShapeFix_Shape to take care of orientation.
surf = BRep_Tool().Surface(_face)
pln = Handle_Geom_Plane().DownCast(surf).GetObject()
D2 = pln.Pln().Axis().Direction().Reversed()
MKF2 = BRepBuilderAPI_MakeFace()
MKF2.Init(surf,False)
MKF2.Add(_wire)
MKF2.Build()
FP = MKF2.Face()
BRepLib().BuildCurves3d(FP)
sfs = ShapeFix_Shape()
sfs.Init(FP)
sfs.Perform()
FP = TopoDS.TopoDS().Face(sfs.Shape())
MKP2 = BRepFeat_MakePrism(_shape,FP,_face,D2,0,True)
MKP2.PerformThruAll()