Hi Rob
Thanx for being for so helpful and replying promptly.
Your opinion of using GCPnts_UniformAbscissa for getting the points on loop seems to be useful but there is a small problem.
The loop which am intended to work upon is obtained from BRepAlgo_Section.So there is some problem with the 'type' of the loop.
The following error is occuring;
--------------------Configuration: box - Win32 Debug--------------------
Compiling...
boxDoc.cpp
D:\naga\CODE\siddhartha\box\boxDoc.cpp(353) : error C2665: 'GCPnts_UniformAbscissa::GCPnts_UniformAbscissa' : none of the 10 overloads can convert parameter 1 from type 'class BRepAlgo_Section'
Error executing cl.exe.
box.exe - 1 error(s), 0 warning(s)
Please guide me to some way to do a type cast or another function which can give the ouput in a desired type.
TIA
According to the documentation, GCPnts_UniformAbscissa takes an Adaptor3d_Curve (or 2D) which can be created from a Geom_Curve. BRepAlgo_Section (by the way, you should use BRepAlgoAPI_Section) creates a TopoDS_Shape. This shape could contain many edges, each of which contains a curve. You would need to iterate through all the edges of the shape (TopExp_Explorer), get the curve from each edge (BRep_Tool::Curve), create an Adaptor3d_Curve from the resulting curve, and then call GCPnts_UniformAbscissa. If you need to get the points in order around the loop, you could use TopExp_Explorer to explore the wires of the section shape and then either use a BRepTools_WireExplorer or traverse the wire manually to get the edges in order and use the process above. If your uniform distance needs to nicely transition from edge to edge, you may need to ignore GCPnts_UniformAbscissa and do it all manually.
Wed, 07/27/2005 - 14:03
Check out GCPnts_UniformAbscissa
Wed, 07/27/2005 - 21:16
Hi Rob
Thanx for being for so helpful and replying promptly.
Your opinion of using GCPnts_UniformAbscissa for getting the points on loop seems to be useful but there is a small problem.
The loop which am intended to work upon is obtained from BRepAlgo_Section.So there is some problem with the 'type' of the loop.
The following error is occuring;
--------------------Configuration: box - Win32 Debug--------------------
Compiling...
boxDoc.cpp
D:\naga\CODE\siddhartha\box\boxDoc.cpp(353) : error C2665: 'GCPnts_UniformAbscissa::GCPnts_UniformAbscissa' : none of the 10 overloads can convert parameter 1 from type 'class BRepAlgo_Section'
Error executing cl.exe.
box.exe - 1 error(s), 0 warning(s)
Please guide me to some way to do a type cast or another function which can give the ouput in a desired type.
TIA
Thu, 07/28/2005 - 13:28
According to the documentation, GCPnts_UniformAbscissa takes an Adaptor3d_Curve (or 2D) which can be created from a Geom_Curve. BRepAlgo_Section (by the way, you should use BRepAlgoAPI_Section) creates a TopoDS_Shape. This shape could contain many edges, each of which contains a curve. You would need to iterate through all the edges of the shape (TopExp_Explorer), get the curve from each edge (BRep_Tool::Curve), create an Adaptor3d_Curve from the resulting curve, and then call GCPnts_UniformAbscissa. If you need to get the points in order around the loop, you could use TopExp_Explorer to explore the wires of the section shape and then either use a BRepTools_WireExplorer or traverse the wire manually to get the edges in order and use the process above. If your uniform distance needs to nicely transition from edge to edge, you may need to ignore GCPnts_UniformAbscissa and do it all manually.