概述
演示如何通过给定角度旋转坐标系,如何在笛卡尔坐标系中进行平移。
主基准(空转轴):立方体前表面
第二基准(面转轴):
通过直径15mm孔和直径12mm孔的轴线
然后按照第二步逆时针旋转
X零点(原点):直径15mm孔
Y零点(原点):平面
Z零点(原点):直径15mm孔
平/旋 按照图纸给定值操作
1.第一步:
如图对主基准,X,Y,Z原点进行设置。
不设置第二基准
Y轴平行于平面法向
F(PLN1)=FEAT/PLANE,CART,27.5264,0.0000,10.2336,0.0000,-1.0000,0.0000
$$ Measurement points are created through nominal points
MEAS/PLANE, F(PLN1), 4
PTMEAS/CART, -7.6391, 0.0000, 25.4170, 0.0000, -1.0000, 0.0000
PTMEAS/CART, -10.2665, 0.0000, -11.2614, 0.0000, -1.0000, 0.0000
PTMEAS/CART, 63.1667, 0.0000, -13.0719, 0.0000, -1.0000, 0.0000
PTMEAS/CART, 64.8444, 0.0000, 39.8506, 0.0000, -1.0000, 0.0000
ENDMES
D(CRD1) = DATSET/FA(PLN1), -YDIR
D(CRD1) = TRANS/YORIG, FA(PLN1)
2,第二步:旋转轴向,平移三轴原点。
测量两圆,最佳拟合直线。
前面设定的坐标系绕Y轴,绕15mm孔圆心旋转,使X轴通过直径12mm圆的加以,原点位置保持不变
$$ CREATED BY : External-Array Software, Inc
$$ DATE : Jan 19, 2009
$$ DISLAIMER:
$$ This Macro has been tested internally but not been tested with
$$ other DMIS compatible software. This Macro is provided as sample
$$ and can be modifed for your own use. External-Array doesn't not
$$ guarantee the quality of this Macro.
$$ FUNCION: Create a nominal line using two actual features
$$ DI, DJ, DK are the normal vector of the plane that the line lies on
M(EASI_2PT_TO_LINE) = Macro/'FEAT1', 'FEAT2', 'FEATLINE', DI, DJ, DK
DECL/LOCAL,DOUBLE,DVALUE[6]
DECL/LOCAL,INTGR, INDEX1, INDEX2
CALL/M(EASI_GETX_INDEX), FEAT1, INDEX1
CALL/M(EASI_GETX_INDEX), FEAT2, INDEX2
DVALUE[1] = OBTAIN/FA(@FEAT1),INDEX1
DVALUE[2] = OBTAIN/FA(@FEAT1),INDEX1+1
DVALUE[3] = OBTAIN/FA(@FEAT1),INDEX1+2
DVALUE[4] = OBTAIN/FA(@FEAT2),INDEX2
DVALUE[5] = OBTAIN/FA(@FEAT2),INDEX2+1
DVALUE[6] = OBTAIN/FA(@FEAT2),INDEX2+2
F(@FEATLINE) = FEAT/LINE,BND,CART,DVALUE[1],DVALUE[2],DVALUE[3],$
DVALUE[4],DVALUE[5],DVALUE[6],$
DI, DJ, DK
ENDMAC
CALL/M(EASI_2PT_TO_LINE),(CIR1),(CIR2),(LN_BF1), 0.0000, -1.0000, 0.0000
CONST/LINE,F(LN_BF1),BF,FA(CIR1),FA(CIR2)
D(CRD2) = ROTATE/YAXIS, FA(LN_BF1), XDIR
D(CRD3) = TRANS/XORIG, FA(CIR1), YORIG, FA(PLN1), ZORIG, FA(CIR1)
3.第三步:
通过输入角度绕Y轴做附加旋转。
通过输入图纸上的角度进行坐标系旋转。这个角度可以通过正切函数计算。
绕Y轴旋转。
输入29.25
RTOD(ATAN2(28,50))
4,第四步:
将坐标系平移到两个孔中间:
X=25 Z=14
$$/* Header
DMISMN/'Created by [爱科腾瑞科技(北京)有限公司-091521-DEMO-11022(华清)] on 星期四, 七月 29, 2021', 4.0
UNITS/MM, ANGDEC, MMPS
WKPLAN/XYPLAN
PRCOMP/ON
TECOMP/ON
FLY/1.0000
MODE/PROG, MAN
SNSET/APPRCH, 2.0000
SNSET/RETRCT, 2.0000
SNSET/DEPTH, 0.0000
SNSET/SEARCH, 10.0000
SNSET/CLRSRF, 35.0000
RECALL/D(MCS)
SNSLCT/S(D2-L40_A90_B180)
GEOALG/BF, LSTSQR
GEOALG/ANGLB, DEFALT
GEOALG/CIRCLE, LSTSQR
GEOALG/ARC, LSTSQR
GEOALG/PLANE, LSTSQR
$$
$$
$$*/
MODE/MAN
F(PLN1)=FEAT/PLANE,CART,27.5264,0.0000,10.2336,0.0000,-1.0000,0.0000
$$ Measurement points are created through nominal points
MEAS/PLANE, F(PLN1), 4
PTMEAS/CART, -7.6391, 0.0000, 25.4170, 0.0000, -1.0000, 0.0000
PTMEAS/CART, -10.2665, 0.0000, -11.2614, 0.0000, -1.0000, 0.0000
PTMEAS/CART, 63.1667, 0.0000, -13.0719, 0.0000, -1.0000, 0.0000
PTMEAS/CART, 64.8444, 0.0000, 39.8506, 0.0000, -1.0000, 0.0000
ENDMES
D(CRD1) = DATSET/FA(PLN1), -YDIR
D(CRD1) = TRANS/YORIG, FA(PLN1)
F(CIR1)=FEAT/CIRCLE,INNER,CART,0.0000,3.0000,-0.0000,-0.0000,-1.0000,-0.0000, 15.0000
$$ Empty Meas Block
MEAS/CIRCLE, F(CIR1), 4
ENDMES
F(CIR2)=FEAT/CIRCLE,INNER,CART,50.0000,3.0000,28.0000,-0.0000,-1.0000,-0.0000, 12.0000
$$ Empty Meas Block
MEAS/CIRCLE, F(CIR2), 4
ENDMES
$$ CREATED BY : External-Array Software, Inc
$$ DATE : Jan 19, 2009
$$ DISLAIMER:
$$ This Macro has been tested internally but not been tested with
$$ other DMIS compatible software. This Macro is provided as sample
$$ and can be modifed for your own use. External-Array doesn't not
$$ guarantee the quality of this Macro.
$$ FUNCION: Create a nominal line using two actual features
$$ DI, DJ, DK are the normal vector of the plane that the line lies on
M(EASI_2PT_TO_LINE) = Macro/'FEAT1', 'FEAT2', 'FEATLINE', DI, DJ, DK
DECL/LOCAL,DOUBLE,DVALUE[6]
DECL/LOCAL,INTGR, INDEX1, INDEX2
CALL/M(EASI_GETX_INDEX), FEAT1, INDEX1
CALL/M(EASI_GETX_INDEX), FEAT2, INDEX2
DVALUE[1] = OBTAIN/FA(@FEAT1),INDEX1
DVALUE[2] = OBTAIN/FA(@FEAT1),INDEX1+1
DVALUE[3] = OBTAIN/FA(@FEAT1),INDEX1+2
DVALUE[4] = OBTAIN/FA(@FEAT2),INDEX2
DVALUE[5] = OBTAIN/FA(@FEAT2),INDEX2+1
DVALUE[6] = OBTAIN/FA(@FEAT2),INDEX2+2
F(@FEATLINE) = FEAT/LINE,BND,CART,DVALUE[1],DVALUE[2],DVALUE[3],$
DVALUE[4],DVALUE[5],DVALUE[6],$
DI, DJ, DK
ENDMAC
CALL/M(EASI_2PT_TO_LINE),(CIR1),(CIR2),(LN_BF1), 0.0000, -1.0000, 0.0000
CONST/LINE,F(LN_BF1),BF,FA(CIR1),FA(CIR2)
D(CRD2) = ROTATE/YAXIS, FA(LN_BF1), XDIR
D(CRD3) = TRANS/XORIG, FA(CIR1), YORIG, FA(PLN1), ZORIG, FA(CIR1)
D(CRD4) = ROTATE/YAXIS, RTOD(ATAN2(28,50))
D(CRD5) = TRANS/XORIG, 25, YORIG, 0, ZORIG, 14
最后
以上就是超级白开水为你收集整理的RationalDMIS 2020旋转和平移基本坐标系的全部内容,希望文章能够帮你解决RationalDMIS 2020旋转和平移基本坐标系所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复