Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics

To reverse the curve orientation

To reverse the curve orientation
Shu-Fang Fan 2012/11/15 23:27
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?

Shu-Fang Fan 2012/11/15 23:28
I don't want(not get) another derived curve.
Latest news
  • Open CASCADE Technology 6.9.0 is available for download!
  • JT Assistant for Android
  • Open CASCADE JT Assistant Sources

  • © OPEN CASCADE 2000 - 2015  |  Search  |  Contacts   |  Site map