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

Search the Forums
See All Topics
Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Advantages
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
What's new
System requirements
Download Center
Public license
Documentation
Getting started
Forums
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
News
Home / Developer Corner / Forums / Usage issues / To reverse the curve orientation

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
  • Open CASCADE Technology 6.7.1 is available for download!
  • Open CASCADE Technology 6.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!

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