XDSoft 发表于 2014-12-5 20:41:14

(4)获得准确的AcDb3dSolid的包围盒

Calculating Tight Bounding Box Around A Solid

问题:
When I calculate the box of a solid, or any other AcDbEntity, this box is
aligned with the x,y,z axes. This box might be much larger than the smallest box
which could contain the solid.To take an extreme example, consider the cylinder
with radius 1, height 100, aligned with the vector 1,1,1. The box returned by
AutoCAD for this entity has the volume 2.092463E+005. The optimal box (not
aligned with the x,y,z axes) has the volume 400. How can I obtain this box?

解决方案:

An exact answer for this problem is not simple, but a good approximation is
possible. One can calculate the principal axes from the solid, and align the box
with these axes. This gives the perfect answer in this case, and will generally
produce a much better answer than doing nothing at all. The attached code shows
an approach where the user can select a solid, and then create a box that is the
calculated tight box around the solid.

**** Hidden Message *****

st788796 发表于 2014-12-5 21:28:58

呵呵,这个虽然是桌子后养的,后来也没让长大

st788796 发表于 2014-12-5 22:06:00

看了下还是autodesk自己的跟着别人有,拉人家下水

sanqima 发表于 2014-12-17 20:15:12

看看,也不错。{:soso_e100:}

cxjzxf 发表于 2015-1-17 20:00:49

好东西要学习下。

llq_78 发表于 2015-5-10 15:24:06

获得准确的AcDb3dSolid的包围盒

1425361224 发表于 2017-2-28 11:22:41

我也来学习学习是怎么回事

lionguns 发表于 2017-3-1 22:35:38

啥也不说了,感谢楼主分享哇!

URD911 发表于 2017-3-19 08:32:15

收藏备用 谢过

革天明 发表于 2017-3-27 10:09:03

谢谢楼主分享

a871352 发表于 2017-6-5 13:08:28

學習中..謝謝分享

xinxirong 发表于 2017-6-5 23:30:33

jgggh小米 手机:02083074480

leslie110 发表于 2017-6-16 14:56:36

好帖,要支持一下

zdarc 发表于 2017-8-17 10:28:37

我来测试一下,行不行”

scnjlwb 发表于 2018-5-15 22:11:13

多谢分享!
页: [1] 2 3
查看完整版本: (4)获得准确的AcDb3dSolid的包围盒