
Fri, 03/07/2008 - 19:06
Forums:
hello all,
I'm having a problem with BRepOffsetAPI_MakeOffset. Any ideas why this is crashing :
TopoDS_Wire *s2;
s2 = TopoDS::Wire(GetShape("Contour",ic));
BRepOffsetAPI_MakeOffset mkOffset(*s2)
mkOffset.Perform(dist);
GetShape returns a TopoDS_Shape (a wire) , dist is a real (0.001) an ic is an integer
It crashes, whatever I do. Please help
Jouke
Fri, 03/07/2008 - 19:11
forgot to say that ther error message is
terminate called after throwing an instance of 'StdFail_NotDone'
Mon, 03/10/2008 - 16:08
OK .. I figured out what the problem is. The wire consists of one single edge so the algorithm can not decide on what plane to use for the offset.
The question is now, how can I offset a single edge ?
Wed, 05/21/2008 - 06:42
Maybe you can try Geom_OffsetCurve
Mon, 09/21/2009 - 09:16
Hi,
You can specify a plane for offset, and then offset a single edge will OK.
The sample code is followed.
TopoDS_Face workingPlane = BRepBuilderAPI_MakeFace(gp_Pln(gp::Origin(),gp::DZ()));
BRepOffsetAPI_MakeOffset offset(workingPlane);
offset.AddWire(aWire);
offset.Perform(distance);
TopoDS_Shape newWire = offset.Shape();
Thanks!