Thu, 09/27/2012 - 01:17
Forums:
Hello,
I use BRepAlgoAPI_Section to calculate the intersection curve of two solids.
auto endContur = BRepAlgoAPI_Section(tube,cutShape);
endContur.Build();
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
Marco
Thu, 09/27/2012 - 01: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.
Mon, 10/01/2012 - 00:54
Hello jelle,
at first thanks for your hint. I used
TopExp_Explorer ex;
for (ex.Init(conturShape,TopAbs_EDGE); ex.More(); ex.Next())
{
ex.Current();
}
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
Marco
Mon, 10/01/2012 - 13: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.
Ciao.
Mauro
Tue, 10/02/2012 - 00:11
Have a look at the classes in toolkit "TKGeomBase" package "GCPnts", like i.e. GCPnts_UniformDeflection.