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

Search the Forums
See All Topics

getting points of a intersection curve

getting points of a intersection curve
Marco 2012/09/26 23:17

I use BRepAlgoAPI_Section to calculate the intersection curve of two solids.

auto endContur = BRepAlgoAPI_Section(tube,cutShape);     
auto conturShape = endContur.Shape();

The class returns a compound object. I need to get the points of the intersection curve, How can I do this? I looked into the documentation of TopoDS_Compound but there are no usefukl methods?

Best regards

jelle 2012/09/26 23:53
topology traversal is implemented with the TopExplorer class, that way you can get the vertices.
use BRep_Tool's Pnt method to get the values of the TopoDS_Vertex instances.
Marco 2012/09/30 22:54
Hello jelle,

at first thanks for your hint. I used

TopExp_Explorer ex;
for (ex.Init(conturShape,TopAbs_EDGE); ex.More(); ex.Next())

to get the edges.
It it possible to get the points of a curve with a self choosen parametrization?
E.g. I have a cutting curve. The curve is not linear, some kind of b spline or something ... . Now it is a difference if I approximate the curve with 10 points or with 100 points.

Best regards

You have to be logged in to download the attached file
Mauro Mariotti 2012/10/01 11:55
From the edge, you can get the 3d curve by BRep_Tool::Curve.

To get the points with an arc-length parametrization, you can use GCPnts_AbscissaPoint.
I don't know about a user-defined parametrization.

Jan Brüninghaus 2012/10/01 22:11
Have a look at the classes in toolkit "TKGeomBase" package "GCPnts", like i.e. GCPnts_UniformDeflection.
Latest news
  • Open CASCADE CAD Assistant for iOS platform is available!
  • Open CASCADE Technology 6.9.0 is available for download!
  • JT Assistant for Android

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