首页/文章/ 详情

RationalDMIS赋值功能的应用

1年前浏览2212

提示:

      主要用于无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)


来源:RationalDMIS测量技术
3DEC
著作权归作者所有,欢迎分享,未经许可,不得转载
首次发布时间:2023-07-01
最近编辑:1年前
山涧果子
大专 签名征集中
获赞 203粉丝 48文章 1203课程 0
点赞
收藏
未登录
还没有评论
课程
培训
服务
行家
VIP会员 学习 福利任务 兑换礼品
下载APP
联系我们
帮助与反馈