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?

Appreciate!
Shu-Fang Fan 2012/11/15 23:28
I don't want(not get) another derived curve.
     
 
 
Latest news
  • OCCT Applications
  • Open CASCADE Technology 6.8.0 is available for download!
  • New features to enhance the development process

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