Fri, 03/23/2007 - 12:35
Hello,
I import an IGES file, take each face and save the vertices. How can I "transform" this vertices to the parametric space? What do I have to do to get the vertices of a face in parametric space? Or better the coordinates of the vertices?
This is how I save the vertices for each face:
void processFile(const TopoDS_Shape &shape)
{
TopExp_Explorer explorer;
for (explorer.Init(shape, TopAbs_FACE); explorer.More(); explorer.Next())
{
TopTools_IndexedMapOfShape verticesMap;
processFace(explorer.Current(), verticesMap);
cout
}
}
void processFace(const TopoDS_Shape &face, TopTools_IndexedMapOfShape &verticesMap)
{
TopExp_Explorer explorer;
for (explorer.Init(face, TopAbs_VERTEX); explorer.More(); explorer.Next())
{
TopoDS_Vertex vertex = TopoDS::Vertex(explorer.Current());
if (verticesMap.FindIndex(vertex)
{
verticesMap.Add(vertex);
}
}
}
Greets
Patrick
Mon, 03/26/2007 - 13:16
Hi Patrick,
use GeomAPI_ProjectPointOnSurf and the LowerDistanceParameters method.
Gerhard