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

How to build a closed wire from an opened planar wire and its offset?

Petr Matousek's picture
Forums: 

Hello,

I have a planar polygon wire:

TopoDS_Wire wire;

and I create its offset:

BRepOffsetAPI_MakeOffset aOffAlgo (theWire, GeomAbs_Intersection);
aOffAlgo.Perform (0.2);
TopoDS_Shape aOffShape = aOffAlgo.Shape();

As a result I get another opened wire. What I want is to build a closed wire using the original one and the offset result. To use the standard BRepBuilderAPI_MakeWire I need two additional edges: one connecting the heads of the wires (headEdge) and the other connecting the tails of the wires (tailEdge).

BRepBuilderAPI_MakeWire aWMaker;
aWMaker.Add(wire);
aWMaker.Add(headEdge);
aWMaker.Add(aOffShape);
aWMaker.Add(tailEdge);

Is there any API allowing to get these two edges (headEdge, tailEdge), or simply to build the closed wire just from the base wire and its offset?

Looking forward to your hints and tips.

Petr