首页/文章/ 详情

RationalDMIS赋值功能的应用

17小时前浏览4

提示:

      主要用于无3D数模坐标系精建!

DMISMN/'Created by [天永智能装备股份有限公司] on 星期六, 十月 14, 2017', 4.0

UNITS/MM, ANGDEC

WKPLAN/XYPLAN

PRCOMP/ON

TECOMP/ON

FLY/1.0

MODE/PROG, MAN

SNSET/APPRCH, 4.000000

SNSET/RETRCT, 4.000000

SNSET/DEPTH, 0.000000

SNSET/SEARCH, 10.000000

SNSET/CLRSRF, 50.000000

RECALL/D(MCS)

SNSLCT/S(20-30X2)

GEOALG/CIRCLE, LSTSQR

GEOALG/ARC, LSTSQR

GEOALG/PLANE, LSTSQR

$$

$$

MODE/MAN

TEXT/OPER, '在上平面采集四点,找正Z正!!'

F(PLN1) = FEAT/PLANE,CART, 469.8149, -828.6828, -662.4612, 0.000334,$

-0.000261, 1.000000

$$ Measurement points are created through actual points

MEAS/PLANE, F(PLN1), 4

  PTMEAS/CART,  369.124445, -774.559622, -662.413453,  0.000334, -0.000261,$

1.000000

  PTMEAS/CART,  524.398856, -774.559523, -662.465283,  0.000334, -0.000261,$

1.000000

  PTMEAS/CART,  552.834482, -881.677754, -662.502735,  0.000334, -0.000261,$

1.000000

  PTMEAS/CART,  432.901843, -883.934375, -662.463291,  0.000334, -0.000261,$

1.000000

ENDMES

D(CRD1) = DATSET/FA(PLN1), ZDIR

D(CRD1) = TRANS/ZORIG, FA(PLN1)

WKPLAN/XYPLAN

TEXT/OPER, '采集基准B圆孔,均布测量四点!'

F(B) = FEAT/CIRCLE,INNER,CART, 497.3239, -833.5793, -4.7095, 0.000000,$

0.000000, 1.000000, 30.0750

$$ Measurement points are created through actual points

MEAS/CIRCLE, F(B), 4

  PTMEAS/CART,  493.642119, -818.999558, -4.709443,  0.244841, -0.969563,$

-0.000000

  PTMEAS/CART,  511.325452, -828.094532, -4.709443,  -0.931108, -0.364743,$

-0.000000

  PTMEAS/CART,  500.241992, -848.331009, -4.709443,  -0.194053, 0.980991,$

-0.000000

  PTMEAS/CART,  482.296989, -833.015731, -4.709443,  0.999297, -0.037482,$

-0.000000

ENDMES

F(C) = FEAT/CIRCLE,INNER,CART, 523.1353, -925.0164, -3.7967, 0.000000,$

0.000000, 1.000000, 30.0617

$$ Measurement points are created through actual points

MEAS/CIRCLE, F(C), 4

  PTMEAS/CART,  520.865981, -910.157759, -3.796714,  0.150977, -0.988537,$

-0.000000

  PTMEAS/CART,  538.022795, -922.945290, -3.796714,  -0.990462, -0.137786,$

-0.000000

  PTMEAS/CART,  523.341353, -940.045779, -3.796714,  -0.013709, 0.999906,$

-0.000000

  PTMEAS/CART,  508.279604, -927.304407, -3.796714,  0.988346, 0.152225,$

-0.000000

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),(B),(C),(BFLN1), -0.000334, 0.000261, 1.000000

CONST/LINE,F(BFLN1),BF,FA(B),FA(C)

D(CRD2) = ROTATE/ZAXIS, FA(BFLN1), -XDIR

D(CRD3) = TRANS/XORIG, FA(B), YORIG, FA(B)

$$

TEXT/OPER, '精建坐标系!!'

$$

MODE/AUTO,PROG,MAN

$$ This sample DMIS Macro is provided by External-Array Software, Inc.

$$ It should be modified for your own use. There is no guarantee for

$$ the quality of this Macro. November, 2003

$$ FUNCION: Move machine CLEAR DIST above the current clear surface 

$$ plane and then move machine parallel to the clear surface

$$ plane to the project point of POINT(TARX, TARY, TARZ) on 

$$ the clear surface plane but CLEAR DIST above the plane

$$ ALL Macro parameters are in PCS and Current UNITS

$$ Last update: 3-1-04 Add mode checking. only works in PROG MODE

$$ Last update: 8-24-04 Clear position is based on the surface of

$$ ruby ball instead of the center of it.

M(EASI_CLEARPLN_GOTO) = MACRO/ISNOM, TARX, TARY, TARZ

DECL/LOCAL, REAL, CCX, CCY, CCZ, CCI, CCJ, CCK

DECL/LOCAL, REAL, CURX, CURY, CURZ, TD, CLRDIST, SDIAM

DECL/LOCAL, CHAR, 255, CLRLABEL, FLABEL, MMODE, SNAME

MMODE = VALUE/MODE

CLRLABEL = VALUE/SNSET, CLRSRF

IF/ ( (LEN(CLRLABEL) .GT. 0) .AND. (MMODE .EQ. 'PROG,MAN') )

CLRDIST = VALUE/SNSET, CLRSRF, DIST

FLABEL = ASSIGN/'FA'

IF/ ISNOM .EQ. 0

FLABEL = ASSIGN/'F'

ENDIF

CCX = OBTAIN/FLABEL(@CLRLABEL), 3

CCY = OBTAIN/FLABEL(@CLRLABEL), 4

CCZ = OBTAIN/FLABEL(@CLRLABEL), 5

CCI = OBTAIN/FLABEL(@CLRLABEL), 6

CCJ = OBTAIN/FLABEL(@CLRLABEL), 7

CCK = OBTAIN/FLABEL(@CLRLABEL), 8

SNAME = VALUE/SNSLCT

SDIAM = OBTAIN/SS(SNAME), 8

CCX = ASSIGN/CCX + CCI * SDIAM/2

CCY = ASSIGN/CCY + CCJ * SDIAM/2

CCZ = ASSIGN/CCZ + CCK * SDIAM/2

CURX = VALUE/GOTO, XAXIS

CURY = VALUE/GOTO, YAXIS

CURZ = VALUE/GOTO, ZAXIS

TD = ASSIGN/(CURX - CCX) * CCI + (CURY - CCY) * CCJ + (CURZ - CCZ) * CCK

IF/ TD .LT. CLRDIST

TD = ASSIGN/(CLRDIST - TD)

GOTO/CURX+CCI*TD, CURY+CCJ*TD, CURZ+CCK*TD

ENDIF

TD = ASSIGN/(TARX - CCX) * CCI + (TARY - CCY) * CCJ + (TARZ - CCZ) * CCK

IF/ TD .LT. CLRDIST

TD = ASSIGN/(CLRDIST - TD)

GOTO/TARX+CCI*TD, TARY+CCJ*TD, TARZ+CCK*TD

ENDIF

ENDIF

ENDMAC

SNSET/APPRCH, 4

SNSET/RETRCT, 4

SNSET/DEPTH, 0.0000

SNSET/SEARCH, 10.0000

SNSET/CLRSRF, FA(PLN1), 50

DECL/COMMON,REAL,PLN1_1_AX,PLN1_1_AY,PLN1_1_AZ

PLN1_1_AX = OBTAIN/FA(PLN1)[1],2

PLN1_1_AY = OBTAIN/FA(PLN1)[1],3

DECL/COMMON,REAL,PLN1_2_AX,PLN1_2_AY

PLN1_2_AX = OBTAIN/FA(PLN1)[2],2

PLN1_2_AY = OBTAIN/FA(PLN1)[2],3

DECL/COMMON,REAL,PLN1_3_AX,PLN1_3_AY

PLN1_3_AX = OBTAIN/FA(PLN1)[3],2

PLN1_3_AY = OBTAIN/FA(PLN1)[3],3

DECL/COMMON,REAL,PLN1_4_AX,PLN1_4_AY

PLN1_4_AX = OBTAIN/FA(PLN1)[4],2

PLN1_4_AY = OBTAIN/FA(PLN1)[4],3

DECL/COMMON,VECTOR,PLN1_V

KNPTR1 = OBTAIN/FA(PLN1),6

KNPTR2 = OBTAIN/FA(PLN1),7

KNPTR3 = OBTAIN/FA(PLN1),8

PLN1_V = ASSIGN/VCART(KNPTR1,KNPTR2,KNPTR3)

F(PT1) = FEAT/POINT,CART, PLN1_1_AX,PLN1_1_AY,0, KNPTR1,KNPTR2,KNPTR3

$$ Empty Meas Block

MEAS/POINT, F(PT1), 1

ENDMES

F(PT2) = FEAT/POINT,CART, PLN1_2_AX,PLN1_2_AY,0, KNPTR1,KNPTR2,KNPTR3

$$ Empty Meas Block

MEAS/POINT, F(PT2), 1

ENDMES

F(PT3) = FEAT/POINT,CART, PLN1_3_AX,PLN1_3_AY,0, KNPTR1,KNPTR2,KNPTR3

$$ Empty Meas Block

MEAS/POINT, F(PT3), 1

ENDMES

F(PT4) = FEAT/POINT,CART, PLN1_4_AX,PLN1_4_AY,0, KNPTR1,KNPTR2,KNPTR3

$$ Empty Meas Block

MEAS/POINT, F(PT4), 1

ENDMES

F(PLN_A) = FEAT/PLANE,CART, 11.9593, 24.9784, 0.0000, -0.000000, -0.000000,$

1.000000

CONST/PLANE,F(PLN_A),BF,FA(PT1),FA(PT2),FA(PT3),FA(PT4)

F(DCC_B) = FEAT/CIRCLE,INNER,CART, 0,0,-4, 0,0,1, 30

$$ Empty Meas Block

MEAS/CIRCLE, F(DCC_B), 4

ENDMES

F(DCC_C) = FEAT/CIRCLE,INNER,CART, -95,0,-4, 0,0,1, 30

$$ Empty Meas Block

MEAS/CIRCLE, F(DCC_C), 4

ENDMES

CALL/M(EASI_2PT_TO_LINE),(DCC_B),(DCC_C),(BFLN2), 0.000342, 0.000250, 1.000000

CONST/LINE,F(BFLN2),BF,FA(DCC_B),FA(DCC_C)

D(CRD4) = DATSET/FA(PLN_A), ZDIR, FA(BFLN2), -XDIR, FA(DCC_B), XORIG

D(CRD4) = TRANS/ZORIG, FA(PLN_A), YORIG, FA(DCC_B), XORIG, -0

$$

$$

TEXT/OPER, 'DCC测量正式开始!!'

$$

$$

MODE/AUTO,PROG,MAN

SNSET/APPRCH, 4.0000

SNSET/RETRCT, 4.0000

SNSET/DEPTH, 0.0000

SNSET/SEARCH, 10.0000

SNSET/CLRSRF, FA(PLN_A), 50.0000

F(J-1) = FEAT/CIRCLE,INNER,CART, 0.0000, 0.0000, -4.0000, -0.000000,$

-0.000000, 1.000000, 30.0000

$$ Empty Meas Block

MEAS/CIRCLE, F(J-1), 4

ENDMES

F(J-2) = FEAT/CIRCLE,INNER,CART, -95.0000, 0.0000, -4.0000, -0.000000,$

-0.000000, 1.000000, 30.0000

$$ Empty Meas Block

MEAS/CIRCLE, F(J-2), 4

ENDMES

F(J-3) = FEAT/CIRCLE,INNER,CART, 35.0000, -88.0000, -4.0000, -0.000000,$

-0.000000, 1.000000, 30.0000

$$ Empty Meas Block

MEAS/CIRCLE, F(J-3), 4

ENDMES

F(J-4) = FEAT/CIRCLE,INNER,CART, 100.0000, 162.0000, -4.0000, -0.000000,$

-0.000000, 1.000000, 20.0000

$$ Empty Meas Block

MEAS/CIRCLE, F(J-4), 4

ENDMES

T(TFLAT1) = TOL/FLAT, 0.0300

OUTPUT/FA(PLN_A), TA(TFLAT1)

T(TCORTOL1) = TOL/CORTOL,XAXIS, -0.0500, 0.0500

T(TCORTOL2) = TOL/CORTOL,YAXIS, -0.0500, 0.0500

OUTPUT/FA(J-1),TA(TCORTOL1),TA(TCORTOL2)

OUTPUT/FA(J-2),TA(TCORTOL1),TA(TCORTOL2)

OUTPUT/FA(J-3),TA(TCORTOL1),TA(TCORTOL2)

OUTPUT/FA(J-4),TA(TCORTOL1),TA(TCORTOL2)


来源:山涧果子
ACTUG3DECPlant
著作权归作者所有,欢迎分享,未经许可,不得转载
首次发布时间:2024-12-27
最近编辑:17小时前
山涧果子
大专 签名征集中
获赞 204粉丝 51文章 194课程 0
点赞
收藏
作者推荐

RationalDMIS元素批量构造

在实际测量过程中,对于检具,夹具,汽车零部件一般有左右件之分,测量时需要将元素关于ZX平面镜像后再测量,但是当元素量很多的时候,一个一个元素拖放构造镜像效率太低。那软件中如何实现元素快速镜像呢? 提示: RationalDMIS快速完成元素批量镜像,移动和投影。主要利用“Rational快捷窗口”和构造区配合使用。当使用者运行RationalDmis软件后,连续按Ctrl键两下,就会打开显示Rational快捷窗口。其中,自定义快捷区是始终显示的,快捷拖放区和直接构造区在用户开始拖放元素时会显示并根据拖放的元素动态变化里面的图标。在Rational快捷窗口显示时再连续按Ctrl键两下,就会隐藏Rational快捷窗口。 自定义快捷区的功能是可以方便用户快速的切换到图标对应的操作面板。用户可以把自己常使用的操作面板的图标加到自定义快捷区,当用户点击某个图标时,RationalDmis就会自动切换出图标对应的操作面板。 快捷拖放区的功能主要是方便用户快捷的拖放元素到各个操作区面板中并自动在操作区面板中计算出操作结果。拖放元素到快捷拖放区的图标上相当于直接拖放元素到操作区面板接受元素拖放的编辑框或组合框中。测量组包括测量示意图图标和测量点管理图标。公差组包括所有可接受元素拖放的公差面板图标。构造组包括所有可接受元素拖放的构造面板图标。坐标系组包括所有可接受元素拖放的坐标系面板图标。快捷拖放区中显示的组和各组中显示的图标是随着拖放元素类型和数目而变化的。当用户在元素数据区开始拖放元素时,快捷拖放区中的图标就会变化显示,指示用户当前拖放的元素都可以快捷拖放到哪些操作区面板中并计算结果。 RationalDMIS快速完成元素批量镜像,移动和投影方法如下: 下面以批量镜像元素(以左右件为例)为例: 镜像元素有点,圆,键槽。。 对于不同类型的元素,批量镜像时,需要先镜像第一元素,在使用快捷区按SHIFT多选拖放,完成批量镜像。 对于点元素:将第一个点用构造的方法关于ZX平面镜像,然后双击“Ctrl”,在弹出的快捷窗口中,按下Shift将所有点选中,拖放到快速窗口中的镜像图标,实现选中元素的快速批量镜像。对于圆元素: 按SHIFT,选择圆元素,拖放到快捷区“镜像”图标上,无法镜像。因为圆和点属于不同类型的元素。需要先镜像第一圆元素,而后在批量镜像。来源:山涧果子

未登录
还没有评论
课程
培训
服务
行家
VIP会员 学习计划 福利任务
下载APP
联系我们
帮助与反馈