找回密码
 注册
Simdroid-非首页
查看: 208|回复: 7

[基础知识] 【求救】关于ADAMS里基于宏命令批量复制、旋转轴的问题

[复制链接]
发表于 2009-9-27 09:20:45 | 显示全部楼层 |阅读模式 来自 吉林长春
我在做PART批量“复制、旋转、平移”时,遇到这样一个问题:
1、在全局坐标系下是合适的。参图1和图2:



图1


图2

2、但,我是想其旋转轴并不是全局坐标的坐标轴,比如下图情况下,如何实现上述效

果?(参图3)


附上述简单宏命令:

variable set variable_name=$_self.num integer=2
for variable_name=aaa start=1 end=30
!interface dialog execute dialog=.gui.par_cop undisplay=yes
part copy  &
   part_name = .model_1.(eval("PART_"//$_self.num))  &
   new_part_name = .model_1.(eval("PART_"//$_self.num+1))  &
     &
     &
     &
     &
     &
     &
   
!interface dialog undisplay dialog=.gui.par_cop
!interface dialog execute dialog=.gui.mov_rot undisplay=yes
move rotation  &
   part_name = .model_1.(eval("PART_"//$_self.num+1))   &
     &
     &
     &
     &
     &
     &
     &
     &
   about = yes  &
   a1 = 0  &
   a2 = 0  &
   a3 = 12  &
     &
     &
     &
     &
   
!interface dialog undisplay dialog=.gui.mov_rot
!interface dialog execute dialog=.gui.mov_tra undisplay=yes
move translation  &
   part_name = .model_1.(eval("PART_"//$_self.num+1))   &
     &
     &
     &
     &
     &
     &
     &
     &
   c1 = 0  &
   c2 = 0  &
   c3 = 2  &
     &
     &
     &
     &
   
!interface dialog undisplay dialog=.gui.mov_tra
variable set variable_name=$_self.num integer=(eval($_self.num+1))
end
variable delete variable_name=$_self.num
 楼主| 发表于 2009-9-27 09:29:47 | 显示全部楼层 来自 吉林长春
Simdroid开发平台
或者,能不能在执行“Tools/Command Navigator/move/rotation时”,能设置旋转轴吗?About的yes和no分别代表什么?
我觉得是不是能修改全局坐标系原点,使全局坐标系原点移动到指定的位置,比如图3所示“局部坐标系原点”位置?
拜托了!!
回复 不支持

使用道具 举报

发表于 2009-9-27 10:57:59 | 显示全部楼层 来自 北京
marker create marker=.model_1.ground.CS__1 &
       location=100.0, 100.0, 0.0 &
       orientation=0.0, 0.0, 0.0
marker attributes marker=.model_1.ground.CS__1 visibility=off
move rotation group_name=SELECT_LIST a1=45.0 a2=0.0 a3=0.0 about=yes &
    csmarker_name=.model_1.ground.CS__1
marker delete marker =.model_1.ground.CS__1
回复 不支持

使用道具 举报

 楼主| 发表于 2009-9-27 12:38:05 | 显示全部楼层 来自 吉林长春
luckyli你好!感谢你的回复。
你是指建立一个参考点对吧?我试了一下,是可以通过移动对象,用"precision move”将图2用Macro做好的N个part(把N个part先作为一个GROUP)移动到指定点的位置,可以实现我的想法。
谢谢你!
我还在试验通过修改Macro的方法,就是在Rotation时,直接指定一个局部坐标轴的方法,达到这种效果,好像能成功,一会儿试验成功的话,再与大家分享。
回复 不支持

使用道具 举报

 楼主| 发表于 2009-9-27 13:32:00 | 显示全部楼层 来自 吉林长春
试验成功!
就是调整了Rotation部分的宏,加了一个参考。具体的看Macro。

回复 不支持

使用道具 举报

 楼主| 发表于 2009-9-27 13:34:25 | 显示全部楼层 来自 吉林长春
variable set variable_name=$_self.num integer=3
for variable_name=aaa start=1 end=30
!interface dialog execute dialog=.gui.par_cop undisplay=yes
part copy  &
   part_name = .model_1.(eval("PART_"//$_self.num))  &
   new_part_name = .model_1.(eval("PART_"//$_self.num+1))  &
     
!interface dialog undisplay dialog=.gui.par_cop

!interface dialog execute dialog=.gui.mov_rot undisplay=yes
!下述为增加了旋转轴,即相对于part_2的ENTITY,也就是"PART_2.CYLINDER_1"
     move rotation part = .model_1.(eval("PART_"//$_self.num+1))   &
     csentity = .model_1.PART_2.CYLINDER_1 &
     a1=0.0 a2=0.0 a3=12 about=yes
   
!interface dialog undisplay dialog=.gui.mov_rot

!interface dialog execute dialog=.gui.mov_tra undisplay=yes
   move translation  &
   part_name = .model_1.(eval("PART_"//$_self.num+1))   &
   c1 = 0  &
   c2 = 0  &
   c3 = 2  &
!interface dialog undisplay dialog=.gui.mov_tra

variable set variable_name=$_self.num integer=(eval($_self.num+1))
end
variable delete variable_name=$_self.num
回复 不支持

使用道具 举报

发表于 2014-5-25 12:30:26 | 显示全部楼层 来自 湖北咸宁
嗯,学习了,谢谢分享
回复 不支持

使用道具 举报

发表于 2014-5-29 20:47:44 | 显示全部楼层 来自 辽宁沈阳
TLAB神经网络超级学习手册  2本
回复 不支持

使用道具 举报

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

本版积分规则

Simapps系列直播

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-9-24 00:24 , Processed in 0.060260 second(s), 13 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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