
Mon, 04/25/2005 - 13:41
Forums:
Is there a similar way to get the segmentation of an edge, like for the faces (BRepTools::Triangulation)? I've check the source of BRep_TEdge but it contains a list of CurveRepresentation. Is one of the representation a segmented one? Or there is no such tools?
Thanks
Mon, 04/25/2005 - 15:02
Try BRep_Tool::PolygonOnTriangulation
Mon, 04/25/2005 - 18:26
It seem as if the shape had to be triangulated. But i need no tirangulation, only the segmentation (triangulation is really slow, so sometimes wireframe is used instead).
I'v tried Brep_Tool::Polygon3D but it returns null all the time:
BRepPrimAPI_MakeSphere S(gp_Pnt(0,300,0), 100.);
TopoDS_Shape s = S.Shape();
TopExp_Explorer ex;
for( ex.Init(s, TopAbs_EDGE); ex.More(); ex.Next() )
{
const Handle_Poly_Polygon3D& seg = BRep_Tool::
Polygon3D(TopoDS_Edge(ex.Current()), l);
if(seg.IsNull()) {
//always
}
....
}
Is there a similar function like BRepMesh::Mesh(...) for the edges???
Mon, 04/25/2005 - 19:23
Polygon3D works off the mesh created by BRepMesh. You might want to look at GCPnts_UniformDeflection. GCPnts_QuasiUniformDeflection, and GCPnts_UniformAbscissa. You can use BRep_Tool::Curve to get the curve and parameters on the edge for these functions.
Thu, 04/28/2005 - 10:55
Thanks. It solved my problem.