乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 85|回复: 5

[求助]用户坐标问题(不好意思,同样的问题问过一次)

[复制链接]

32

主题

73

帖子

3

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
201
发表于 2004-6-13 16:08:00 | 显示全部楼层 |阅读模式
大家都用代码画过这样的图吧,不知道如何做能方便些。
如果用转换矩阵的话,那还不如现在世界坐标下话,画完之后全部选择或者形成块,再move到合适的位置。
回复

使用道具 举报

32

主题

73

帖子

3

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
201
发表于 2004-6-13 17:11:00 | 显示全部楼层
问题时这样的:
我要画一个平面的三视图,为了画图方便,需要定义3个用户坐标。有没有方便的方法呢?就像转到一个用户坐标中后,直接可以在里面画?
回复

使用道具 举报

72

主题

2726

帖子

9

银币

社区元老

Rank: 75Rank: 75Rank: 75

铜币
3014
发表于 2004-6-13 17:16:00 | 显示全部楼层

用transformby方法

Signature
RetVal = object.TranslateCoordinates(OriginalPoint, From, To, Disp[, OCSNormal])
Object
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.
Remarks
You cannot directly translate a coordinate from one OCS to another OCS. To do this, first translate the coordinate from one OCS to an intermediary coordinate system such as the WCS. Then translate that coordinate into the second OCS.
To translate a point on a  or  object from OCS to WCS:
1. Get the X and Y coordinates of the OCS point from the  or  property.
2. Get the Z coordinate of the OCS point from the  property.
3. Get the Normal for the polyline from the  property.
4. Call TranslateCoordinates using the X, Y, Z coordinates and the Normal.
回复

使用道具 举报

32

主题

73

帖子

3

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
201
发表于 2004-6-15 08:30:00 | 显示全部楼层
谢谢飞狐兄弟。
我的意思是先转换到用户坐标,然后直接在里面作图。不是说先在世界坐标里把图做好,在转换到用户坐标里。如果这样的话,那还不如画好,再移动了。
回复

使用道具 举报

72

主题

2726

帖子

9

银币

社区元老

Rank: 75Rank: 75Rank: 75

铜币
3014
发表于 2004-6-15 12:43:00 | 显示全部楼层
转换到用户坐标,然后直接在里面作图,在VBA里是做不到的
回复

使用道具 举报

32

主题

73

帖子

3

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
201
发表于 2004-6-15 23:47:00 | 显示全部楼层
明白了。
多谢。
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-15 21:16 , Processed in 0.531908 second(s), 75 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表