几何尺寸与公差论坛

 找回密码
 注册
查看: 2492|回复: 1

Dear Robin, which body type need add a call to GetTessellation?

[复制链接]
发表于 2007-5-20 09:46:13 | 显示全部楼层 |阅读模式
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
 楼主| 发表于 2007-5-20 09:46:41 | 显示全部楼层

回复: 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
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-22 18:59 , Processed in 0.038538 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表