For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages


K.H.K. Anding's picture

Hello everyone,

I've got a problem while working with the BRepOffsetAPI_Makeoffset, trying to offset a plane wire. The following test-code crashes at the last line:

////////////////////////////////////////////////////////////////////////// Handle(TColgp_HArray1OfPnt2d) harray = new TColgp_HArray1OfPnt2d (1,4);

harray->SetValue(1,gp_Pnt2d (0, 99));

harray->SetValue(2,gp_Pnt2d (29,100));

harray->SetValue(3,gp_Pnt2d (60, 199));

harray->SetValue(4,gp_Pnt2d (90, 230));

Geom2dAPI_Interpolate anInterpolation(harray,Standard_False,0.01);


Handle(Geom2d_BSplineCurve) SPL = anInterpolation.Curve();

Handle(Geom_Plane) P = new Geom_Plane(gp::XOY());

Handle(Geom_Curve) C= GeomAPI::To3d(SPL,P->Pln());

TopoDS_Edge edge;

if (!C.IsNull()) edge = BRepBuilderAPI_MakeEdge(C);

TopoDS_Wire wire;

wire = BRepBuilderAPI_MakeWire(edge);

BRepOffsetAPI_MakeOffset aOffs;


aOffs.Perform(1.0); .... //////////////////////////////////////////////////////////////////////////

The code works fine if I use only an interpolated Curve through 3 Points. Has anyone got the same problems and does know a workaround here?

Thanks in advance for any ideas


Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.