明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2192|回复: 5

[讨论]如何获得一个对象其正确的在UCS中的边界坐标?

[复制链接]
发表于 2004-8-19 09:41:00 | 显示全部楼层 |阅读模式
[讨论]如何获得一个对象其正确的在UCS中的边界坐标?

例如一个矩形(Lwpolyline),现在的情况是: 这个矩形不平行与WCS的X,Y ,而是平行与当前UCS(已经plan显示了),用vla-GetBoundingBox返回的还是WCS中的边界的MinPoint和 MaxPoint.这显然不是我们想要得到的结果.

请教各位大虾,有没有什么办法获得正确的边界最大最下值的坐标?


"觉得好,就打赏"
还没有人打赏,支持一下
 楼主| 发表于 2004-8-23 14:46:00 | 显示全部楼层
每人顶?沉了,,,,唉....
发表于 2004-8-23 14:54:00 | 显示全部楼层

Signature

RetVal = object.TranslateCoordinates(OriginalPoint, From, To, Disp[, OCSNormal])

Object

MSITStore:D:\Program%20Files\AutoCAD%202005\help\acadauto.chm::/idh_utility_object.htm" target="_blank" >Utility
The object or objects this method applies to.

OriginalPoint

Variant (three-element array of doubles); input-only
The 3D WCS coordinates specifying the original coordinates to be translated. This parameter can be treated as a point or a displacement vector depending on the value of Disp.

From

AcCoordinateSystem enum; input-only
The coordinate system from which the point originates.

acWorld

acUCS

acOCS

acDisplayDCS

acPaperSpaceDCS

To

AcCoordinateSystem enum; input-only
The coordinate system to which the point will be converted.

acWorld

acUCS

acOCS

acDisplayDCS

acPaperSpaceDCS

Disp

Integer; input-only
A displacement vector flag.

TRUE: OriginalPoint is treated as a displacement vector.

FALSE: OriginalPoint is treated as a point.

OCSNormal

Variant (three-element array of doubles); input-only;optional
The normal for the OCS.

RetVal

Variant (three-element array of doubles)
The translated 3D coordinate.

发表于 2004-8-23 21:04:00 | 显示全部楼层
将矩形变换到WCS,应用Getboundingbox方法,在变换回去。
 楼主| 发表于 2004-8-25 10:25:00 | 显示全部楼层
alin发表于2004-8-23 21:04:00将矩形变换到WCS,应用Getboundingbox方法,在变换回去。
想来想去可能只有这个办法了,但是如果当前UCS是一个任意的,没一个面平行于WCS,如何?
发表于 2004-8-25 15:17:00 | 显示全部楼层
Set a temporary Object UCS
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-9-30 18:32 , Processed in 0.161895 second(s), 27 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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