Q:
Subject: Dear Robin, which body type need add a call to GetTessellation? SR:1-407938223
Dear Robin,
My goal is to get all faces from one body up to speed.
There are two questions by now.
1. I want to know which body type need add a call to GetTessellation, before iterate all faces from a body.
2. Could you help me find a better or rapid search method to get all faces from a body? In my following code, it takes about 20 seconds when I try to iterate 5000 faces via the following code.
My code as below:
swBody.GetTessellation (vEmptyFaceList);
//……..
// Get dispatch Ptr to first face
dFace = swBody.GetFirstFace();
while (dFace)
{
// get next face
IFACE swFace(dFace);
dNextFace = swFace.GetNextFace();
swFace.DetachDispatch();
// do something
if (dFace)
{
dFace->Release();
dFace = NULL;
}
dFace = dNextFace;
|