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

To reverse the curve orientation

SF. Fan's picture

What I want to do is I want to reverse the selected curve orientation.

The following is my code:

Handle(AIS_InteractiveContext) pAIS = GetDocument()->GetAISContext();
for (pAIS->InitSelected(); pAIS->MoreSelected(); pAIS->NextSelected())
if (pAIS->SelectedShape().ShapeType() == TopAbs_EDGE)
TopAbs_Orientation orient;
orient = pAIS->SelectedShape().Orientation(); // orient = TopAbs_FORWARD
pAIS->SelectedShape().Reverse(); //
orient = pAIS->SelectedShape().Orientation(); // orient is still TopAbs_FORWARD

TopoDS_Shape ashape = pAIS->SelectedShape().Reversed(); // I create another shape,
orient = ashape.Orientation(); // this time, orient = TopAbs_REVERSED

Actually, I would like to change the orientation of the original curve. I don't get another derived curve.

Can anybody give me hint to do it?


SF. Fan's picture

I don't want(not get) another derived curve.