![]() |
Dear Robin, which body type need add a call to GetTessellation?
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;
}// while (dFace) Yogy |
回复: Dear Robin, which body type need add a call to GetTessellation?
R:
Hello, I am a tad confused by your request. The GetTessellation object should work on either part bodies or temporary bodies. For your second request, you might have a look at Body2.EnumBodies as an alternative. This may give you the added performance that you are looking for. Regards, -Earl |
所有的时间均为北京时间。 现在的时间是 09:57 AM. |