RationalDMIS 7.1 评定槽的位置度
(1)上平面(基准A)测量4点,找正第一轴。
找正(确定坐标系第一轴)
注意:可以用来找正的元素:平面、圆柱、圆锥。
(2)测量中心孔(基准B)4个点
(3)基准C槽对称测点,构造中分点。
(4)中心孔和槽对称点最佳拟合直线
(5)旋转(确定坐标系第二轴)
可以用来旋转的元素:直线、 圆柱、圆锥等。可简化为线元素或者构造为线元素的线性元素。
(6)平移(确定坐标系原点)
可以平移的元素 一般为点元素或者圆等可以简化为点元素的点形元素。
(7)槽的两侧各测量平面,构造中分面。
(8)评价位置度
2个平面构造的中分平面支持位置度评价
至少其中-一个平面是测量过的平面,构造结果平面将会是有边界的平面;构造结果平面可以用来进行位置度评价;
如果想更精确,检测,在槽两侧对称4个点,然后构造中分点,计算中分点单个轴向的位置度公差。
$$/* Header
DMISMN/'Created by [爱科腾瑞科技(北京)有限公司-091520-DEMO] on Monday, April 20, 2020', 4.0
UNITS/MM, ANGDEC, MMPS
WKPLAN/XYPLAN
PRCOMP/ON
TECOMP/ON
FLY/1.0000
MODE/MAN
SNSET/APPRCH, 2.0000
SNSET/RETRCT, 2.0000
SNSET/DEPTH, 0.0000
SNSET/SEARCH, 10.0000
SNSET/CLRSRF, 15.0000
RECALL/D(MCS)
SNSLCT/S(L20-D2.0)
GEOALG/BF, LSTSQR
GEOALG/ANGLB, DEFALT
GEOALG/CIRCLE, LSTSQR
GEOALG/ARC, LSTSQR
GEOALG/PLANE, LSTSQR
$$
$$
$$*/
MODE/MAN
F(PLN1)=FEAT/PLANE,CART,-0.9941,-1.7409,0.0000,0.0000,0.0000,1.0000
$$ Measurement points are created through actual points
MEAS/PLANE, F(PLN1), 4
PTMEAS/CART, -33.5816, 15.1094, -0.0000, 0.0000, 0.0000, 1.0000
PTMEAS/CART, -25.7022, -24.9962, -0.0000, 0.0000, 0.0000, 1.0000
PTMEAS/CART, 28.0695, -21.5138, -0.0000, 0.0000, 0.0000, 1.0000
PTMEAS/CART, 27.2378, 24.4369, -0.0000, 0.0000, 0.0000, 1.0000
ENDMES
D(CRD1) = DATSET/FA(PLN1), ZDIR
F(CIR1)=FEAT/CIRCLE,OUTER,CART,0.0000,0.0000,31.1973,0.0000,0.0000,1.0000, 30.0000
$$ Measurement points are created through actual points
MEAS/CIRCLE, F(CIR1), 4
PTMEAS/CART, 1.5769, -14.9169, 31.1973, 0.1051, -0.9945, 0.0000
PTMEAS/CART, 14.9700, -0.9489, 31.1973, 0.9980, -0.0633, 0.0000
PTMEAS/CART, -1.6868, 14.9048, 31.1973, -0.1125, 0.9937, 0.0000
PTMEAS/CART, -14.7351, 2.8065, 31.1973, -0.9823, 0.1871, 0.0000
ENDMES
F(PT1)=FEAT/POINT,CART,36.7045,4.0000,-3.3548,-0.0000,-1.0000,-0.0000
MEAS/POINT, F(PT1), 1
PTMEAS/CART, 36.7045,4.0000,-3.3548,-0.0000,-1.0000,-0.0000
ENDMES
F(PT2)=FEAT/POINT,CART,36.1219,-4.0000,-4.5685,0.0000,1.0000,0.0000
MEAS/POINT, F(PT2), 1
PTMEAS/CART, 36.1219,-4.0000,-4.5685,0.0000,1.0000,0.0000
ENDMES
F(PT_MID1)=FEAT/POINT,CART,36.4132,0.0000,-3.9617,0.0000,0.0000,1.0000
CONST/POINT, F(PT_MID1), MIDPT, FA(PT1), FA(PT2), PTPT
$$ 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),(PT_MID1),(LN_BF1), 0.0000, 0.0000, 1.0000
CONST/LINE,F(LN_BF1),BF,FA(CIR1),FA(PT_MID1)
D(CRD2) = ROTATE/ZAXIS, FA(LN_BF1), XDIR
D(CRD3) = TRANS/XORIG, FA(CIR1), YORIG, FA(CIR1), ZORIG, FA(PLN1)
$$ Set.CAD2PCS.CADM_1
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, 2.0000
SNSET/RETRCT, 2.0000
SNSET/DEPTH, 0.0000
SNSET/SEARCH, 10.0000
SNSET/CLRSRF, FA(PLN1), 50
F(槽1左)=FEAT/PLANE,CART,30.5471,-4.0000,-7.6424,0.0000,1.0000,0.0000
$$ Measurement points are created through nominal points
$$ CALL/M(EASI_CLEARPLN_GOTO), 1, 36.1219, -1.0000, 51.0000
MEAS/PLANE, F(槽1左), 4
GOTO/CART, 36.1219, -1.0000, 51.0000
GOTO/CART, 38.3091, -1.0000, 51.0000
PTMEAS/CART, 38.3091, -4.0000, -2.1013, 0.0000, 1.0000, 0.0000
PTMEAS/CART, 37.2870, -4.0000, -12.8396, 0.0000, 1.0000, 0.0000
PTMEAS/CART, 22.3412, -4.0000, -13.4677, 0.0000, 1.0000, 0.0000
PTMEAS/CART, 24.2510, -4.0000, -2.1612, 0.0000, 1.0000, 0.0000
ENDMES
F(槽1右)=FEAT/PLANE,CART,30.7915,4.0000,-7.6180,0.0000,-1.0000,0.0000
$$ Measurement points are created through nominal points
$$ CALL/M(EASI_CLEARPLN_GOTO), 1, 24.2510, -1.0000, 51.0000
MEAS/PLANE, F(槽1右), 4
GOTO/CART, 24.2510, -1.0000, 51.0000
GOTO/CART, 23.5055, 1.0000, 51.0000
PTMEAS/CART, 23.5055, 4.0000, -2.7272, -0.0000, -1.0000, -0.0000
PTMEAS/CART, 24.1111, 4.0000, -12.6689, -0.0000, -1.0000, -0.0000
PTMEAS/CART, 37.3701, 4.0000, -12.7175, -0.0000, -1.0000, -0.0000
PTMEAS/CART, 38.1792, 4.0000, -2.3584, -0.0000, -1.0000, -0.0000
ENDMES
F(槽2左)=FEAT/PLANE,CART,-6.1325,31.8181,-6.7769,-0.9511,-0.3090,-0.0000
$$ Measurement points are created through nominal points
$$ CALL/M(EASI_CLEARPLN_GOTO), 1, 38.1792, 1.0000, 51.0000
MEAS/PLANE, F(槽2左), 4
GOTO/CART, 38.1792, 1.0000, 51.0000
GOTO/CART, -10.7925, 36.4519, 51.0000
PTMEAS/CART, -7.9393, 37.3789, -1.5429, -0.9511, -0.3090, -0.0000
PTMEAS/CART, -7.7343, 36.7478, -11.9607, -0.9511, -0.3090, -0.0000
PTMEAS/CART, -3.9194, 25.0069, -11.9590, -0.9511, -0.3090, -0.0000
PTMEAS/CART, -4.9370, 28.1387, -1.6449, -0.9511, -0.3090, -0.0000
ENDMES
F(槽2右)=FEAT/PLANE,CART,-13.4914,28.5779,-7.2514,0.9511,0.3090,0.0000
$$ Measurement points are created through nominal points
$$ CALL/M(EASI_CLEARPLN_GOTO), 1, -7.7902, 27.2118, 51.0000
MEAS/PLANE, F(槽2右), 4
GOTO/CART, -7.7902, 27.2118, 51.0000
GOTO/CART, -9.2142, 25.1223, 51.0000
PTMEAS/CART, -12.0674, 24.1952, -1.2503, 0.9511, 0.3090, 0.0000
PTMEAS/CART, -10.9852, 20.8646, -13.2106, 0.9511, 0.3090, 0.0000
PTMEAS/CART, -15.3938, 34.4330, -13.1497, 0.9511, 0.3090, 0.0000
PTMEAS/CART, -15.5193, 34.8191, -1.3950, 0.9511, 0.3090, 0.0000
ENDMES
GOTO/-12.6660, 35.7461, 148.6050
F(PLN_MID1)=FEAT/PLANE,CART,30.7915,-0.0000,-7.6180,0.0000,1.0000,0.0000
CONST/PLANE, F(PLN_MID1), MIDPL, FA(槽1左), FA(槽1右), PLPLP
F(PLN_MID2)=FEAT/PLANE,CART,-9.6871,29.8139,-7.2514,0.9511,0.3090,0.0000
CONST/PLANE, F(PLN_MID2), MIDPL, FA(槽2左), FA(槽2右), PLPLPR
T(TP3D1)=TOL/POS,3D,0.1000,FA(PLN1),FA(CIR1),FA(PT_MID1)
OUTPUT/FA(PLN_MID1),TA(TP3D1)
T(TP3D2)=TOL/POS,3D,0.1000,FA(PLN1),FA(CIR1),FA(PT_MID1)
OUTPUT/FA(PLN_MID2),TA(TP3D2)