yoyoho 发表于 2010-4-26 06:57:00

求助如何用LISP求得3DSOLID物件之边界下限及边界上限座标?

<font color="#000000"><p>指令: LIST<br/>选取物件: 找到 1 个</p><p>选取物件:</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3DSOLID&nbsp;&nbsp; 图层:“H300X300”<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 空间: 模型空间<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 处理码 = b3202<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 历程 = 无<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 显示历程 = 否<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 边界框:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#f70938"><strong>边界下限 X = 1339962.9, Y = 47795.7&nbsp; , Z = 100045.0</strong></font><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#ff0033"><strong>边界上限 X = 1339992.9, Y = 47825.7&nbsp; , Z = 101024.3</strong></font></p><p><font color="#000000">请教诸位网友红色标示之 "边界下限及边界上限座标" 如何用LISP求得</font></p></font>

yoyoho 发表于 2010-4-27 14:42:00

<p>自己顶一下!</p><p>恳请高手帮忙!</p>

danxingpen 发表于 2010-4-28 10:43:00

<p class="Heading-2">Signature </p><p class="syntax">object.GetBoundingBox MinPoint, MaxPoint </p><p class="element">Object</p><p class="element-desc"><a href="mk:@MSITStore:D:\AutoCAD%202002\help\acadauto.chm::/all_drawing_objects.htm">All Drawing Objects</a>, <a href="mk:@MSITStore:D:\AutoCAD%202002\help\acadauto.chm::/idh_attributeref_object.htm">AttributeReference</a><br/>The object or objects this method applies to. </p><p class="element">MinPoint</p><p class="element-desc">Variant (three-element array of doubles); output-only<br/>The 3D WCS coordinates specifying the minimum point of the object's bounding box. </p><p class="element">MaxPoint</p><p class="element-desc">Variant (three-element array of doubles); output-only<br/>The 3D WCS coordinates specifying the maximum point of the object's bounding box. </p><p class="Heading-2">Remarks </p><p class="body">The corners are returned in WCS coordinates with the box edges parallel to the WCS X, Y, and Z axes.</p><table class="Simple"><tbody><tr valign="top"><td><p class="body">&nbsp;</p></td><td><p class="italic"><i>MaxPoint&nbsp;</p></td></tr><tr valign="top"><td><p class="body">MinPoint&nbsp;</p></td><td>&nbsp;</td></tr></tbody></table>

sailorcwx 发表于 2010-4-28 13:13:00

(vla-getboundingbox (vlax-ename-&gt;vla-object (car (entsel))) 'maxpt 'minpt)(vlax-safearray-&gt;list maxpt)(vlax-safearray-&gt;list minpt)

yoyoho 发表于 2010-4-28 16:52:00

<p><strong>感谢 <font face="Verdana" color="#61b713">danxingpen 及 sailorcwx <font color="#000000">两位帮忙,谢谢!</font></font></strong></p>
页: [1]
查看完整版本: 求助如何用LISP求得3DSOLID物件之边界下限及边界上限座标?