$$/* Header
DMISMN/'Created by [山涧果子] on 星期二, 五月 16, 2023', 4.0
UNITS/MM, ANGDEC, MMPS
WKPLAN/XYPLAN
PRCOMP/ON
TECOMP/ON
FLY/1.0000
MODE/MAN
SNSET/APPRCH, 3.0000
SNSET/RETRCT, 3.0000
SNSET/DEPTH, 0.0000
SNSET/SEARCH, 10.0000
SNSET/CLRSRF, 25.0000
RECALL/D(MCS)
SNSLCT/S(10-D1.0L20)
GEOALG/BF, LSTSQR
GEOALG/ANGLB, DEFALT
GEOALG/CIRCLE, LSTSQR
GEOALG/ARC, LSTSQR
GEOALG/PLANE, LSTSQR
$$
$$
$$*/
MODE/MAN
F(M1)=FEAT/PLANE,CART,20.0000,3.2500,-0.0000,0.0000,0.0000,1.0000
$$ Measurement points are created through nominal points
MEAS/PLANE, F(M1), 4
GOTO/CART, 124.9000, 741.3000, 25.4974
GOTO/CART, 39.5000, 11.5000, 25.4974
PTMEAS/CART, 39.5000, 11.5000, 0.0000, 0.0000, 0.0000, 1.0000
PTMEAS/CART, 39.5000, 0.5000, 0.0000, 0.0000, 0.0000, 1.0000
PTMEAS/CART, 0.5000, 0.5000, 0.0000, 0.0000, 0.0000, 1.0000
PTMEAS/CART, 0.5000, 11.5000, 0.0000, 0.0000, 0.0000, 1.0000
ENDMES
F(L1)=FEAT/LINE,BND,CART,351.9487,253.9079,10.9484,385.5873,253.8838,10.9514,-0.0007,-1.0000,0.0000
$$ Measurement points are created through actual points
MEAS/LINE, F(L1), 2
PTMEAS/CART, 351.9487, 253.9079, 10.9484, -0.0007, -1.0000, 0.0000
PTMEAS/CART, 385.5873, 253.8838, 10.9514, -0.0007, -1.0000, 0.0000
ENDMES
F(P1)=FEAT/POINT,CART,349.1362,261.3643,11.1556,-1.0000,0.0000,0.0000
MEAS/POINT, F(P1), 1
PTMEAS/CART, 349.1362,261.3643,11.1556,-1.0000,0.0000,0.0000
ENDMES
D(CRD1) = DATSET/FA(M1), ZDIR, ZORIG, FA(L1), XDIR, YORIG, FA(P1), XORIG
D(CRD1) = TRANS/ZORIG, -0, YORIG, -0, XORIG, -0
SNSLCT/S(10-D1.0L20)
MODE/PROG,MAN
$$ MACRO: EASI_CLEARPLN_GOTO
$$ FUNCTION: CLEARANCE SURFACE IMPLEMENTATION
$$ Move machine CLEAR SURFACE DIST above the current clear surface
$$ plane and then move machine parallel to the clear surface 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
$$
$$ 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
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/GOTOM, XAXIS
CURY = VALUE/GOTOM, YAXIS
CURZ = VALUE/GOTOM, 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, 3.0000
SNSET/RETRCT, 3.0000
SNSET/DEPTH, 0.0000
SNSET/SEARCH, 10.0000
SNSET/CLRSRF, FA(M1), 25.0000
F(M2)=FEAT/PLANE,CART,15.7213,3.8552,-0.0004,0.0000,-0.0005,1.0000
$$ Measurement points are created through actual points
$$ CALL/M(EASI_CLEARPLN_GOTO), 1, 2.0983, 5.8021, 3.9962
MEAS/PLANE, F(M2), 4
PTMEAS/CART, 2.1001, 5.8200, 0.0009, 0.0000, -0.0005, 1.0000
PTMEAS/CART, 8.5674, 2.1048, -0.0012, 0.0000, -0.0005, 1.0000
PTMEAS/CART, 21.9187, 4.6785, -0.0001, 0.0000, -0.0005, 1.0000
PTMEAS/CART, 30.2991, 2.8177, -0.0013, 0.0000, -0.0005, 1.0000
ENDMES
D(CRD2) = DATSET/FA(M2), ZDIR, ZORIG
D(CRD2) = TRANS/ZORIG, -0
F(L2)=FEAT/LINE,BND,CART,3.4448,-0.0014,-3.2330,36.3146,-0.0041,-3.2130,-0.0001,-1.0000,0.0000
$$ Measurement points are created through actual points
$$ CALL/M(EASI_CLEARPLN_GOTO), 1, 3.4445, -3.9962, -3.2330
MEAS/LINE, F(L2), 2
PTMEAS/CART, 3.4448, -0.0014, -3.2330, -0.0001, -1.0000, 0.0000
PTMEAS/CART, 36.3146, -0.0042, -3.2131, -0.0001, -1.0000, 0.0000
ENDMES
F(P2)=FEAT/POINT,CART,-0.0010,7.6630,-6.1572,-1.0000,0.0000,0.0000
$$ CALL/M(EASI_CLEARPLN_GOTO), 1, -3.4984, 7.6630, -6.1572
MEAS/POINT, F(P2), 1
PTMEAS/CART, -0.0010,7.6630,-6.1572,-1.0000,0.0000,0.0000
ENDMES
D(CRD3) = DATSET/FA(M2), ZDIR, ZORIG, FA(L2), XDIR, YORIG, FA(P2), XORIG
D(CRD3) = TRANS/ZORIG, -0, YORIG, -0, XORIG, -0
$$ Set.CAD2PCS.CADM_1
GOTO/8.7446, 27.1483, 153.8805
SNSLCT/S(10-D1.0L20_A90_B0)
SNSET/APPRCH, 3.0000
SNSET/RETRCT, 3.0000
SNSET/DEPTH, 0.0000
SNSET/SEARCH, 10.0000
SNSET/CLRSRF, OFF
GOTO/-1.0486, 156.8071, 252.4719
GOTO/-2.7304, 135.0311, 18.3863
GOTO/14.9203, 30.2424, -2.0629
$$ Measurement points are created through actual points
F(基准B)=FEAT/CYLNDR,OUTER,CART,20.0527,23.2215,-20.0172,-0.0021,-1.0000,0.0021, 15.9130, 14.0986
MEAS/CYLNDR, F(基准B), 16
PTMEAS/CART, 16.4228, 30.2928, -12.9590, -0.4580, 0.0028, 0.8889
GOTO/CART, 16.1845, 37.7719, -6.5008
GOTO/CART, 7.4525, 36.3580, -6.5113
PTMEAS/CART, 13.3957, 30.1604, -15.6957, -0.8385, 0.0028, 0.5449
GOTO/CART, 6.9930, 30.1637, -15.4450
PTMEAS/CART, 12.1123, 30.1690, -20.1978, -0.9998, 0.0020, -0.0209
GOTO/CART, 3.3736, 30.1737, -20.2167
GOTO/CART, 3.3833, 30.1867, -26.8430
PTMEAS/CART, 15.3197, 30.1532, -26.4166, -0.5967, -0.0004, -0.8025
GOTO/CART, -5.6866, 30.1661, -26.8474
GOTO/CART, -5.7316, 30.0576, 24.3273
GOTO/CART, 31.9953, 31.6873, 24.3648
PTMEAS/CART, 26.2287, 29.4403, -14.9980, 0.7746, -0.0003, 0.6324
GOTO/CART, 26.6144, 29.4186, -5.7036
GOTO/CART, 35.8923, 29.4116, -5.6991
GOTO/CART, 32.1212, 29.4391, -16.8480
PTMEAS/CART, 27.4367, 29.4414, -17.0347, 0.9264, -0.0011, 0.3765
PTMEAS/CART, 27.7552, 29.4499, -22.0735, 0.9665, -0.0025, -0.2568
GOTO/CART, 34.2094, 29.4415, -22.1923
GOTO/CART, 34.2137, 29.4527, -27.3509
PTMEAS/CART, 24.0337, 29.4382, -26.9264, 0.4987, -0.0028, -0.8668
GOTO/CART, 51.3738, 29.4145, -27.3319
GOTO/CART, 51.2468, 29.1288, 107.6847
SNSLCT/S(10-D1.0L20_A90_NB90)
GOTO/CART, 29.4948, 28.2050, 59.5272
GOTO/CART, 26.9202, 17.0517, -11.1927
PTMEAS/CART, 26.5260, 17.0573, -15.3961, 0.8152, -0.0005, 0.5792
GOTO/CART, 39.6363, 17.0361, -9.1002
PTMEAS/CART, 27.4302, 17.0586, -17.0563, 0.9288, -0.0011, 0.3705
GOTO/CART, 38.2971, 17.0535, -17.5694
PTMEAS/CART, 27.2839, 17.0713, -23.2960, 0.9104, -0.0027, -0.4137
GOTO/CART, 40.8706, 17.0622, -23.4891
GOTO/CART, 40.8785, 17.0830, -33.4671
PTMEAS/CART, 24.9776, 16.4570, -26.2414, 0.6207, -0.0029, -0.7840
GOTO/CART, 25.2907, 16.4690, -32.6395
GOTO/CART, 70.9118, 16.4357, -32.5959
SNSLCT/S(10-D1.0L20_A90_B90)
GOTO/216.0929, 11.9318, 116.9974
GOTO/-44.5647, 48.8594, 113.3921
GOTO/CART, -28.5284, 11.4924, 100.4605
GOTO/CART, -28.4652, 11.6520, 24.8304
GOTO/CART, 15.0654, 16.2231, -8.4315
PTMEAS/CART, 15.3696, 16.2320, -13.5601, -0.5868, 0.0029, 0.8097
GOTO/CART, 1.4430, 16.2237, -7.1652
PTMEAS/CART, 13.1008, 16.2328, -16.1071, -0.8719, 0.0028, 0.4896
GOTO/CART, 6.6646, 16.2312, -15.8767
PTMEAS/CART, 13.1677, 16.2449, -24.0152, -0.8635, 0.0007, -0.5043
GOTO/CART, 6.4659, 16.2426, -24.2746
PTMEAS/CART, 16.1536, 16.1659, -26.9464, -0.4882, -0.0008, -0.8727
GOTO/CART, 9.9046, 16.1660, -27.3873
GOTO/CART, -44.1853, 16.2076, -27.4375
GOTO/CART, -44.3906, 15.7521, 188.4821
ENDMES
SNSLCT/S(10-D1.0L20_A90_B180)
GOTO/16.8694, -54.8401, 121.9588
GOTO/25.0111, -18.5547, 2.3374
F(PLN3)=FEAT/PLANE,CART,20.5669,-11.0249,-12.0660,0.0000,-1.0000,0.0000
SNSET/APPRCH, 3.0000
SNSET/RETRCT, 6
SNSET/DEPTH, 0.0000
SNSET/SEARCH, 10.0000
SNSET/CLRSRF, F(PLN3), 10
F(YUAN1)=FEAT/POINT,CART,20.5489,-9.8943,-11.8184,0.0669,0.0000,0.9978
F(YUAN2)=FEAT/POINT,CART,16.4220,-9.8943,-12.6218,-0.4363,-0.0000,0.8998
F(YUAN3)=FEAT/POINT,CART,13.1729,-9.8943,-15.4579,-0.8326,-0.0000,0.5539
F(YUAN4)=FEAT/POINT,CART,11.8178,-9.8943,-19.4596,-0.9978,-0.0000,0.0659
F(YUAN5)=FEAT/POINT,CART,12.6965,-9.8943,-23.7282,-0.8907,-0.0000,-0.4547
F(YUAN6)=FEAT/POINT,CART,15.3823,-9.8943,-26.7762,-0.5631,-0.0000,-0.8264
F(YUAN7)=FEAT/POINT,CART,19.3405,-9.8943,-28.1734,-0.0804,0.0000,-0.9968
F(YUAN8)=FEAT/POINT,CART,23.8816,-9.8943,-27.2231,0.4734,0.0000,-0.8809
F(YUAN9)=FEAT/POINT,CART,27.0211,-9.8943,-24.2361,0.8562,0.0000,-0.5166
F(YUAN10)=FEAT/POINT,CART,28.2000,-9.8943,-20.0022,1.0000,0.0000,-0.0003
F(YUAN11)=FEAT/POINT,CART,27.0508,-9.8943,-15.8136,0.8599,0.0000,0.5105
F(YUAN12)=FEAT/POINT,CART,23.4327,-9.8943,-12.5531,0.4186,-0.0000,0.9082
$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 20.7829, -9.8943, -8.3287
MEAS/POINT, F(YUAN1), 1
GOTO/CART, 20.7830,-21.5217,-8.3294
PTMEAS/CART, 20.5489,-9.8943,-11.8184,0.0669,0.0000,0.9978
ENDMES
$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 14.8960, -9.8943, -9.4747
MEAS/POINT, F(YUAN2), 1
GOTO/CART, 14.8961,-21.5217,-9.4754
PTMEAS/CART, 16.4220,-9.8943,-12.6218,-0.4363,-0.0000,0.8998
ENDMES
$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 10.2609, -9.8943, -13.5206
MEAS/POINT, F(YUAN3), 1
GOTO/CART, 10.2615,-21.5217,-13.5210
PTMEAS/CART, 13.1729,-9.8943,-15.4579,-0.8326,-0.0000,0.5539
ENDMES
$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 8.3278, -9.8943, -19.2291
MEAS/POINT, F(YUAN4), 1
GOTO/CART, 8.3286,-21.5217,-19.2291
PTMEAS/CART, 11.8178,-9.8943,-19.4596,-0.9978,-0.0000,0.0659
ENDMES
$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 9.5814, -9.8943, -25.3185
MEAS/POINT, F(YUAN5), 1
GOTO/CART, 9.5820,-21.5217,-25.3180
PTMEAS/CART, 12.6965,-9.8943,-23.7282,-0.8907,-0.0000,-0.4547
ENDMES
$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 13.4128, -9.8943, -29.6666
MEAS/POINT, F(YUAN6), 1
GOTO/CART, 13.4132,-21.5217,-29.6659
PTMEAS/CART, 15.3823,-9.8943,-26.7762,-0.5631,-0.0000,-0.8264
ENDMES
$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 19.0593, -9.8943, -31.6597
MEAS/POINT, F(YUAN7), 1
GOTO/CART, 19.0593,-21.5217,-31.6589
PTMEAS/CART, 19.3405,-9.8943,-28.1734,-0.0804,0.0000,-0.9968
ENDMES
$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 25.5373, -9.8943, -30.3040
MEAS/POINT, F(YUAN8), 1
GOTO/CART, 25.5369,-21.5217,-30.3033
PTMEAS/CART, 23.8816,-9.8943,-27.2231,0.4734,0.0000,-0.8809
ENDMES
$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 30.0158, -9.8943, -26.0430
MEAS/POINT, F(YUAN9), 1
GOTO/CART, 30.0152,-21.5217,-26.0426
PTMEAS/CART, 27.0211,-9.8943,-24.2361,0.8562,0.0000,-0.5166
ENDMES
$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 31.6976, -9.8943, -20.0032
MEAS/POINT, F(YUAN10), 1
GOTO/CART, 31.6968,-21.5217,-20.0031
PTMEAS/CART, 28.2000,-9.8943,-20.0022,1.0000,0.0000,-0.0003
ENDMES
$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 30.0583, -9.8943, -14.0281
MEAS/POINT, F(YUAN11), 1
GOTO/CART, 30.0576,-21.5217,-14.0284
PTMEAS/CART, 27.0508,-9.8943,-15.8136,0.8599,0.0000,0.5105
ENDMES
$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 24.8967, -9.8943, -9.3767
MEAS/POINT, F(YUAN12), 1
GOTO/CART, 24.8965,-21.5217,-9.3774
PTMEAS/CART, 23.4327,-9.8943,-12.5531,0.4186,-0.0000,0.9082
ENDMES
F(CIR_BF16.4)=FEAT/CIRCLE,OUTER,CART,20.0000,-9.8943,-20.0000,0.0000,-1.0000,-0.0000, 16.4000
CONST/CIRCLE,F(CIR_BF16.4),BF,FA(YUAN1),FA(YUAN2),FA(YUAN3),FA(YUAN4),FA(YUAN5),FA(YUAN6),FA(YUAN7),FA(YUAN8),FA(YUAN9),FA(YUAN10),FA(YUAN11),FA(YUAN12)
DATDEF/F(基准B), DAT(A)
DATDEF/FA(基准B), DAT(A)
DATDEF/FA(基准B), DAT(B)
T(TCRO2)=TOL/CRNOUT,0.1000,DAT(B)
OUTPUT/FA(CIR_BF16.4),TA(TCRO2)
GOTO/9.3919, 13.6012, 261.7784
SNSLCT/S(10-D1.0L20_A90_B0)
GOTO/-25.5564, 144.7277, 329.7268