首页/文章/ 详情

RationalDMIS最佳拟合坐标系

16小时前浏览5

最佳拟合法和3

最佳拟合法拟合坐标系:

 

      这种方法适用于零件有特征可以测量或构造,零件的评价方法要在原始数模坐标系下,或数模坐标系比较复杂,直接用3-2-1法拟合难度大。


    由于零件本身是存在有制造误差的,在实际拟合过程中这些误差是平均分配在每一个元素的坐标拟合中所以这些元素在与数模拟合过程中的误差是平均分配的。所以拟合后会发现这些参与拟合的元素实测值与理论值都有偏差,这是正常的。

最佳拟合法一般会平分这些误差,常规3-2-1法操作如下:


  由于坐标系原点不在两个圆孔的任何一个,两点偏移队列坐标系一般误差计算结果在第二元素的单个方向,可以从第二元素的下拉框里面选择方向,指定方向的参数会包括所有误差,第一第二元素的另外三个坐标会没有误差;这个和实际不多相符,常规方法需要两孔连线,两孔中分点为坐标系原点,旋转角度,平移!

DMISMN/'Created by [山涧果子] on 星期四, 三月 15, 2018', 4.0

UNITS/MM, ANGDEC

WKPLAN/XYPLAN

PRCOMP/ON

TECOMP/ON

FLY/1.0

MODE/PROG, MAN

SNSET/APPRCH, 3.000000

SNSET/RETRCT, 3.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

F(PLN1) = FEAT/PLANE,CART, 486.0224, -642.3089, -625.3113, -0.000189,$

0.000549, 1.000000

$$ Measurement points are created through actual points

MEAS/PLANE, F(PLN1), 4

  PTMEAS/CART,  638.799166, -742.685150, -625.227220,  -0.000189, 0.000549,$

1.000000

  PTMEAS/CART,  567.211586, -592.458027, -625.323311,  -0.000189, 0.000549,$

1.000000

  PTMEAS/CART,  429.261550, -559.235412, -625.367682,  -0.000189, 0.000549,$

1.000000

  PTMEAS/CART,  308.817401, -674.856913, -625.326961,  -0.000189, 0.000549,$

1.000000

ENDMES

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

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

WKPLAN/XYPLAN

F(CIR1) = FEAT/CIRCLE,OUTER,CART, 331.4403, -606.3965, 2.8957, -0.000000,$

0.000000, 1.000000, 18.3865

$$ Measurement points are created through actual points

MEAS/CIRCLE, F(CIR1), 4

  PTMEAS/CART,  340.561970, -605.251761, 2.895749,  0.992217, 0.124517, 0.000000

  PTMEAS/CART,  330.257044, -597.279694, 2.895749,  -0.128706, 0.991683,$

0.000000

  PTMEAS/CART,  322.384588, -604.812029, 2.895749,  -0.985036, 0.172350,$

0.000000

  PTMEAS/CART,  330.368842, -615.527082, 2.895749,  -0.116545, -0.993185,$

0.000000

ENDMES

F(CIR2) = FEAT/CIRCLE,OUTER,CART, 621.1683, -762.5868, 2.0847, -0.000000,$

0.000000, 1.000000, 14.8570

$$ Measurement points are created through actual points

MEAS/CIRCLE, F(CIR2), 4

  PTMEAS/CART,  620.597379, -769.993280, 2.084635,  -0.076855, -0.997042,$

0.000000

  PTMEAS/CART,  619.163963, -769.739741, 2.084635,  -0.269817, -0.962912,$

0.000000

  PTMEAS/CART,  621.989434, -755.203817, 2.084635,  0.110540, 0.993872, 0.000000

  PTMEAS/CART,  623.369025, -755.491769, 2.084635,  0.296256, 0.955108, 0.000000

ENDMES

F(PROJPT1) = FEAT/POINT,CART, 331.4403, -606.3965, -0.0000, -0.000000,$

-0.000000, 1.000000

CONST/POINT,F(PROJPT1),PROJPT,FA(CIR1),FA(PLN1)

F(PROJPT2) = FEAT/POINT,CART, 621.1683, -762.5868, -0.0000, 0.000000,$

0.000000, 1.000000

CONST/POINT,F(PROJPT2),PROJPT,FA(CIR2),FA(PLN1)

$$ 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),(PROJPT1),(PROJPT2),(BFLN1), 0.000189, -0.000549,$

1.000000

CONST/LINE,F(BFLN1),BF,FA(PROJPT1),FA(PROJPT2)

F(MIDPT1) = FEAT/POINT,CART, 476.3043, -684.4917, -0.0000, 0.000189,$

-0.000549, 1.000000

CONST/POINT, F(MIDPT1), MIDPT, FA(PROJPT1), FA(PROJPT2)

D(CRD2) = DATSET/FA(PLN1), ZDIR, ZORIG, FA(BFLN1), XDIR, FA(MIDPT1), XORIG

D(CRD2) = TRANS/ZORIG, -0, YORIG, FA(MIDPT1), XORIG, -0

D(CRD3) = ROTATE/ZAXIS, RTOD(ATAN2(119.9+35,140.5+150))

D(CRD4) = TRANS/XORIG, -(140.5+150)/2, YORIG, (119.9+35)/2

D(CRD5) = TRANS/XORIG, 140.5, YORIG, -119.9

$$

TEXT/OPER, '请将测头移动到安全位置,DCC测量开始!!'

$$

MODE/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, 3.0000

SNSET/RETRCT, 3.0000

SNSET/DEPTH, 0.0000

SNSET/SEARCH, 10.0000

SNSET/CLRSRF, 50.0000

GOTO/52.281195, 52.781717, 180.296564

GOTO/-140.542113, 30.928417, 60.122964

F(PLN2) = FEAT/PLANE,CART, 26.5108, 76.9185, 0.0005, -0.000013, -0.000055,$

1.000000

$$ Measurement points are created through actual points

MEAS/PLANE, F(PLN2), 4

  PTMEAS/CART,  -162.140109, 50.907571, -0.003525,  -0.000013, -0.000055,$

1.000000

  GOTO/CART,  -162.127170, 50.871843, 56.515012

  GOTO/CART,  -15.336534, 161.474131, 56.546023

  PTMEAS/CART,  -17.823063, 165.565714, 0.004738,  -0.000013, -0.000055,$

1.000000

  GOTO/CART,  -17.816652, 165.546735, 31.656004

  GOTO/CART,  118.131993, 103.794164, 31.590550

  PTMEAS/CART,  117.664092, 103.810998, 0.003141,  -0.000013, -0.000055,$

1.000000

  GOTO/CART,  117.673443, 103.792854, 33.509655

  GOTO/CART,  167.877916, -12.339184, 33.434820

  PTMEAS/CART,  168.342415, -12.609932, -0.002611,  -0.000013, -0.000055,$

1.000000

  GOTO/CART,  168.377198, -12.696555, 138.458991

  GOTO/CART,  -136.195883, 118.859236, 138.596584

ENDMES

GOTO/-140.500000, 119.900000, 150.000000

F(CIR3) = FEAT/CIRCLE,OUTER,CART, -140.5000, 119.9000, 2.8000, 0.000000,$

0.000000, 1.000000, 18.4000

$$ Measurement points are created through nominal points

MEAS/CIRCLE, F(CIR3), 4

  GOTO/CART,  -127.615068, 122.732841, 53.792667

  GOTO/CART,  -127.615068, 122.732841, 52.800000

  PTMEAS/CART,  -131.514601, 121.875502, 2.800000,  0.976681, 0.214696,$

-0.000000

  GOTO/CART,  -127.511793, 117.586354, 2.800000

  GOTO/CART,  -129.385856, 112.792098, 2.800000

  GOTO/CART,  -132.951946, 109.079956, 2.800000

  PTMEAS/CART,  -138.524498, 110.914601, 2.800000,  0.214696, -0.976681,$

-0.000000

  GOTO/CART,  -142.813646, 106.911793, 2.800000

  GOTO/CART,  -147.607902, 108.785856, 2.800000

  GOTO/CART,  -151.320044, 112.351946, 2.800000

  PTMEAS/CART,  -149.485399, 117.924498, 2.800000,  -0.976681, -0.214696,$

0.000000

  GOTO/CART,  -153.488207, 122.213646, 2.800000

  GOTO/CART,  -151.614144, 127.007902, 2.800000

  GOTO/CART,  -148.048054, 130.720044, 2.800000

  PTMEAS/CART,  -142.475502, 128.885399, 2.800000,  -0.214696, 0.976681,$

0.000000

  GOTO/CART,  -143.332841, 132.784932, 52.800000

ENDMES

GOTO/150.000000, -35.000000, 150.000000

GOTO/156.436269, -17.252947, 9.635601

F(CIR4) = FEAT/CIRCLE,OUTER,CART, 150, -35, 2.4339, 0.000000,$

0.000000, 1.000000, 14.9

$$ Measurement points are created through actual points

MEAS/CIRCLE, F(CIR4), 4

  PTMEAS/CART,  151.645854, -27.759575, 2.433926,  0.226903, 0.973917, 0.000000

  PTMEAS/CART,  150.454534, -27.582380, 2.433926,  0.066366, 0.997795, 0.000000

  GOTO/CART,  142.957924, -21.486019, 2.442799

  GOTO/CART,  133.999321, -33.143763, 2.437123

  GOTO/CART,  135.953164, -43.287164, 2.431184

  GOTO/CART,  145.178435, -45.801646, 2.428035

  PTMEAS/CART,  148.307722, -42.220885, 2.433926,  -0.222931, -0.974834,$

0.000000

  PTMEAS/CART,  149.402427, -42.386504, 2.433926,  -0.075412, -0.997152,$

0.000000

  GOTO/CART,  149.347831, -49.365732, 2.425780

  GOTO/CART,  149.376228, -49.456664, 108.899701

  GOTO/CART,  149.374722, -49.455172, 108.901202

ENDMES

F(PROJPT3) = FEAT/POINT,CART, -140.5000, 119.9002, 0.0006, -0.000013,$

-0.000055, 1.000000

CONST/POINT,F(PROJPT3),PROJPT,FA(CIR3),FA(PLN2)

F(PROJPT4) = FEAT/POINT,CART, 150.0000, -34.9999, -0.0041, -0.000013,$

-0.000055, 1.000000

CONST/POINT,F(PROJPT4),PROJPT,FA(CIR4),FA(PLN2)

CALL/M(EASI_2PT_TO_LINE),(PROJPT3),(PROJPT4),(BFLN2), 0.000192, -0.000549,$

1.000000

CONST/LINE,F(BFLN2),BF,FA(PROJPT3),FA(PROJPT4)

F(MIDPT2) = FEAT/POINT,CART, 4.7500, 42.4501, -0.0017, 0.000192, -0.000549,$

1.000000

CONST/POINT, F(MIDPT2), MIDPT, FA(PROJPT3), FA(PROJPT4)

D(CRD6) = DATSET/FA(PLN2), ZDIR, ZORIG, FA(BFLN2), XDIR, FA(MIDPT2), XORIG

D(CRD6) = TRANS/ZORIG, -0, YORIG, FA(MIDPT2), XORIG, -0

D(CRD7) = ROTATE/ZAXIS, RTOD(ATAN2(119.9+35,140.5+150))

D(CRD8) = TRANS/XORIG, -(140.5+150)/2, YORIG, (119.9+35)/2

D(CRD9) = TRANS/XORIG, 140.5, YORIG, -119.9

RECALL/D(CRD9)

MODE/PROG,MAN

GOTO/-140.500000, 119.900000, 150.000000

F(J-1) = FEAT/CIRCLE,OUTER,CART, -140.5000, 119.9000, 2.8000, -0.000000,$

-0.000000, 1.000000, 18.4000

$$ Measurement points are created through nominal points

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

  GOTO/CART,  -128.329960, 124.992799, 53.792667

  GOTO/CART,  -128.329960, 124.992799, 52.800000

  PTMEAS/CART,  -132.013136, 123.451499, 2.800000,  0.922499, 0.386000,$

-0.000000

  GOTO/CART,  -127.307420, 119.947860, 2.800000

  GOTO/CART,  -128.293330, 114.895635, 2.800000

  GOTO/CART,  -131.137595, 110.605279, 2.800000

  PTMEAS/CART,  -136.948501, 111.413136, 2.800000,  0.386000, -0.922499,$

0.000000

  GOTO/CART,  -140.452140, 106.707420, 2.800000

  GOTO/CART,  -145.504365, 107.693330, 2.800000

  GOTO/CART,  -149.794721, 110.537595, 2.800000

  PTMEAS/CART,  -148.986864, 116.348501, 2.800000,  -0.922499, -0.386000,$

0.000000

  GOTO/CART,  -153.692580, 119.852140, 2.800000

  GOTO/CART,  -152.706670, 124.904365, 2.800000

  GOTO/CART,  -149.862405, 129.194721, 2.800000

  PTMEAS/CART,  -144.051499, 128.386864, 2.800000,  -0.386000, 0.922499,$

-0.000000

  GOTO/CART,  -145.592799, 132.070040, 52.800000

ENDMES

GOTO/-140.500000, 119.900000, 150.000000

GOTO/150.000000, -35.000000, 150.000000

GOTO/154.826612, -16.147063, 8.730493

F(J-2) = FEAT/CIRCLE,OUTER,CART, 150, -35, 2.2195, -0.000000,$

-0.000000, 1.000000, 14.8541

$$ Measurement points are created through actual points

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

  PTMEAS/CART,  152.027880, -27.844046, 2.219498,  0.277537, 0.960715, 0.000000

  PTMEAS/CART,  150.592037, -27.578655, 2.219498,  0.084211, 0.996448, 0.000000

  GOTO/CART,  144.281290, -23.599383, 2.225922

  GOTO/CART,  137.560233, -23.634701, 2.225784

  GOTO/CART,  137.677814, -46.663385, 2.214399

  GOTO/CART,  147.998456, -46.621060, 2.212302

  PTMEAS/CART,  147.966814, -42.132080, 2.219498,  -0.269257, -0.963068,$

0.000000

  PTMEAS/CART,  149.522122, -42.393062, 2.219498,  -0.059846, -0.998208,$

0.000000

  GOTO/CART,  148.776049, -48.817064, 2.212059

  GOTO/CART,  148.817950, -53.735968, 128.112775

ENDMES

GOTO/150, -35, 150.000000

GOTO/-82.000000, 157.000000, 150.000000

F(J-3) = FEAT/CIRCLE,INNER,CART, -82.0000, 157.0000, -1.3000, -0.000000,$

-0.000000, 1.000000, 15.0000

$$ Measurement points are created through nominal points

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

  GOTO/CART,  -78.497078, 156.824166, 49.692667

  GOTO/CART,  -78.497078, 156.824166, 48.700000

  PTMEAS/CART,  -74.509431, 156.624000, -1.300000,  -0.998744, 0.050102,$

0.000000

  GOTO/CART,  -78.831011, 155.497040, -1.300000

  GOTO/CART,  -79.647393, 154.398726, -1.300000

  GOTO/CART,  -80.821939, 153.696433, -1.300000

  PTMEAS/CART,  -82.376000, 149.509431, -1.300000,  0.050102, 0.998744,$

-0.000000

  GOTO/CART,  -83.502960, 153.831011, -1.300000

  GOTO/CART,  -84.601274, 154.647393, -1.300000

  GOTO/CART,  -85.303567, 155.821939, -1.300000

  PTMEAS/CART,  -89.490569, 157.376000, -1.300000,  0.998744, -0.050102,$

-0.000000

  GOTO/CART,  -85.168989, 158.502960, -1.300000

  GOTO/CART,  -84.352607, 159.601274, -1.300000

  GOTO/CART,  -83.178061, 160.303567, -1.300000

  PTMEAS/CART,  -81.624000, 164.490569, -1.300000,  -0.050102, -0.998744,$

0.000000

  GOTO/CART,  -81.824166, 160.502922, 48.700000

ENDMES

GOTO/175.200000, 32.600000, 150.000000

F(J-4) = FEAT/CIRCLE,INNER,CART, 175.2000, 32.6000, -1.3500, -0.000000,$

-0.000000, 1.000000, 18.4000

$$ Measurement points are created through nominal points

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

  GOTO/CART,  180.347235, 31.811146, 49.642667

  GOTO/CART,  180.347235, 31.811146, 48.650000

  PTMEAS/CART,  184.293822, 31.206301, -1.350000,  -0.988458, 0.151494, 0.000000

  GOTO/CART,  179.653543, 29.901433, -1.350000

  GOTO/CART,  178.281841, 28.402552, -1.350000

  GOTO/CART,  176.440955, 27.542694, -1.350000

  PTMEAS/CART,  173.806301, 23.506178, -1.350000,  0.151494, 0.988458, -0.000000

  GOTO/CART,  172.501433, 28.146457, -1.350000

  GOTO/CART,  171.002552, 29.518159, -1.350000

  GOTO/CART,  170.142694, 31.359045, -1.350000

  PTMEAS/CART,  166.106178, 33.993699, -1.350000,  0.988458, -0.151494,$

-0.000000

  GOTO/CART,  170.746457, 35.298567, -1.350000

  GOTO/CART,  172.118159, 36.797448, -1.350000

  GOTO/CART,  173.959045, 37.657306, -1.350000

  PTMEAS/CART,  176.593699, 41.693822, -1.350000,  -0.151494, -0.988458,$

0.000000

  GOTO/CART,  175.988854, 37.747235, 48.650000

ENDMES

GOTO/23.354863, 52.163612, 223.054633

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

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

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)


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

RatioanlDMIS平面,圆,圆多点拟合坐标系

一般对于平面,圆,圆,可以直接使用3-2-1法,两点偏移队列坐标系。可以不使用多点拟合坐标系。多点拟合坐标系(RPS坐标系)法: 这种方法适用于零件有特征可以测量或构造,零件的评价方法要在原始数模坐标系下,或数模坐标系比较复杂,直接用3-2-1法拟合难度大。多点拟合坐标系,拟合算法:最小二乘法。 由于零件本身是存在有制造误差的,在实际拟合过程中这些误差是平均分配在每一个元素的坐标拟合中,所以这些元素在与数模拟合过程中的误差是平均分配的。所以拟合后会发现这些参与拟合的元素实测值与理论值都有偏差,这是正常的。坐标系选用原则: 3-2-1法用于坐标系比较简单,在零件上建立3-2-1坐标系容易和数模坐标系一致的情况。 多点拟合坐标系法适合于数模坐标系不在数模上,而零件上有明显的适合最佳拟合的特征元素的情况。 对于RatioanlDMIS软件,RatioanlDMIS6.8版本以下存在一个问题,平面,圆,圆使用多点拟合坐标系法编写的程序,在线测量程序只能用一次。如下图:对于RationalDMIS6.8版本,平面,圆圆,多点拟合坐标系法。脱机编程,测试,程序可以重复使用。实际联机,可以正常使用。DMIS程序如下:DMISMN/'Created by [山涧果子] on 星期五, 五月 25, 2018', 4.0UNITS/MM, ANGDEC, MMPSWKPLAN/XYPLANPRCOMP/ONTECOMP/ONFLY/1.000000MODE/MANSNSET/APPRCH, 2.000000SNSET/RETRCT, 2.000000SNSET/DEPTH, 0.000000SNSET/SEARCH, 10.000000SNSET/CLRSRF, 50.000000RECALL/D(MCS)SNSLCT/S(ROOTSN1)GEOALG/BF, LSTSQRGEOALG/ANGLB, DEFALTGEOALG/CIRCLE, LSTSQRGEOALG/ARC, LSTSQRGEOALG/PLANE, LSTSQR$$$$MODE/MANF(PLN1)=FEAT/PLANE,CART,31.250000,46.787796,35.000000,0.000000,0.000000,1.000000$$ Empty Meas BlockMEAS/PLANE, F(PLN1), 4ENDMESD(CRD1) = DATSET/FA(PLN1), ZDIRD(CRD1) = TRANS/ZORIG, FA(PLN1)D(CRD2) = TRANS/ZORIG, -35F(CIR1)=FEAT/CIRCLE,INNER,CART,40.000000,55.000000,35.000000,0.000000,0.000000,1.000000, 45.000000$$ Empty Meas BlockMEAS/CIRCLE, F(CIR1), 4ENDMESF(CIR2)=FEAT/CIRCLE,INNER,CART,72.000000,55.000000,35.000000,0.000000,0.000000,1.000000, 10.000000$$ Empty Meas BlockMEAS/CIRCLE, F(CIR2), 4ENDMESDMESW/COMAND,'D(CRD3) = LOCATE/XYDIR, ZAXIS, $ FA(CIR1), XYZAXI, $ FA(CIR2), XYZAXI'$$ Set.CAD2PCS.CADM_1$$ Set.CADViewCenter.CADM_1RECALL/D(CRD3) $$TEXT/OPER, '请将测头移动到安全位置!!!'GOTO/14.911388, 36.296293, 186.104227TEXT/OPER, '精建坐标系!!'$$MODE/PROG,MANF(PLN2) = FEAT/PLANE,CART, 31.250000,46.787796,35.000000, 0,0,1$$ Measurement points are created through nominal pointsMEAS/PLANE, F(PLN2), 4 GOTO/CART, 86.710542, 24.276517, 86.995705 PTMEAS/CART, 86.710542, 24.276517, 35.000000, 0.000000, 0.000000, 1.000000 PTMEAS/CART, 95.339790, 85.100271, 35.000000, 0.000000, 0.000000, 1.000000 PTMEAS/CART, 7.125045, 83.681479, 35.000000, 0.000000, 0.000000, 1.000000 PTMEAS/CART, 7.166105, 32.187330, 35.000000, 0.000000, 0.000000, 1.000000 GOTO/CART, 14.911224, 36.295591, 186.038027ENDMESD(CRD4) = DATSET/FA(PLN2), ZDIRD(CRD4) = TRANS/ZORIG, FA(PLN2)D(CRD5) = TRANS/ZORIG, -35F(CIR3)=FEAT/CIRCLE,INNER,CART,40.000182,54.999206,33.000997,0.000006,-0.000024,1.000000, 45.000000$$ Measurement points are created through nominal pointsMEAS/CIRCLE, F(CIR3), 4 GOTO/CART, 25.161246, 43.943255, 84.996517 GOTO/CART, 25.161235, 43.943303, 83.000813 PTMEAS/CART, 21.956668, 41.557421, 33.000773, 0.801928, 0.597421, 0.000000 GOTO/CART, 22.060077, 50.464720, 33.000987 GOTO/CART, 21.690413, 57.675268, 33.001162 GOTO/CART, 24.108246, 64.478410, 33.001313 PTMEAS/CART, 26.558397, 73.042721, 33.001505, 0.597421, -0.801928, 0.000000 GOTO/CART, 35.465696, 72.939311, 33.001453 GOTO/CART, 42.676244, 73.308975, 33.001422 GOTO/CART, 49.479386, 70.891142, 33.001327 PTMEAS/CART, 58.043697, 68.440991, 33.001220, -0.801928, -0.597421, -0.000000 GOTO/CART, 57.940288, 59.533692, 33.001007 GOTO/CART, 58.309951, 52.323144, 33.000831 GOTO/CART, 55.892119, 45.520002, 33.000681 PTMEAS/CART, 53.441967, 36.955691, 33.000488, -0.597421, 0.801928, -0.000000 GOTO/CART, 51.055159, 40.158780, 83.000579ENDMESF(CIR4)=FEAT/CIRCLE,INNER,CART,72.000182,54.999206,33.000820,0.000006,-0.000024,1.000000, 10.000000$$ Measurement points are created through nominal pointsMEAS/CIRCLE, F(CIR4), 4 GOTO/CART, 51.049359, 40.170254, 84.996283 GOTO/CART, 73.004765, 54.997955, 84.996519 GOTO/CART, 73.004754, 54.998003, 83.000814 PTMEAS/CART, 77.000182, 54.999206, 33.000792, -1.000000, -0.000000, -0.000000 PTMEAS/CART, 72.000182, 49.999206, 33.000700, -0.000000, 1.000000, 0.000000 PTMEAS/CART, 67.000182, 54.999206, 33.000847, 1.000000, 0.000000, 0.000000 PTMEAS/CART, 72.000182, 59.999206, 33.000940, 0.000000, -1.000000, -0.000000 GOTO/CART, 72.000459, 56.002298, 83.000844ENDMESDMESW/COMAND,'D(CRD6) = LOCATE/XYDIR, ZAXIS, $ FA(CIR3), XYZAXI, $ FA(CIR4), XYZAXI'$$ Set.CAD2PCS.CADM_1$$ Set.CADViewCenter.CADM_1RECALL/D(CRD6) $$TEXT/OUTFIL, 'DCC测量正式开始!!!'$$ Set.OutputCtrl.Circle(XYZDT)$$MODE/PROG,MANSNSET/APPRCH, 2.0000SNSET/RETRCT, 2.0000SNSET/DEPTH, 0.0000SNSET/SEARCH, 10.0000SNSET/CLRSRF, 50.0000F(J-1)=FEAT/CIRCLE,INNER,CART,8.000000,55.000000,32.000000,0.000000,-0.000000,1.000000, 10.000000F(J-2)=FEAT/CIRCLE,INNER,CART,24.000000,27.287187,32.000000,-0.000000,0.000000,1.000000, 10.000000F(J-3)=FEAT/CIRCLE,INNER,CART,56.000000,27.287187,32.000000,-0.000000,-0.000000,1.000000, 10.000000F(J-4)=FEAT/CIRCLE,INNER,CART,72.000000,55.000000,32.000000,0.000000,-0.000000,1.000000, 10.000000F(J-5)=FEAT/CIRCLE,INNER,CART,56.000000,82.712813,32.000000,0.000000,-0.000000,1.000000, 10.000000F(J-6)=FEAT/CIRCLE,INNER,CART,24.000000,82.712813,32.000000,-0.000000,-0.000000,1.000000, 10.000000$$ Measurement points are created through nominal pointsMEAS/CIRCLE, F(J-1), 4 GOTO/CART, 8.000000, 55.000000, 83.995705 PTMEAS/CART, 12.999370, 55.079339, 32.000000, -0.999874, -0.015868, -0.000000 PTMEAS/CART, 7.920661, 59.999370, 32.000000, 0.015868, -0.999874, -0.000000 PTMEAS/CART, 3.000630, 54.920661, 32.000000, 0.999874, 0.015868, 0.000000 PTMEAS/CART, 8.079339, 50.000630, 32.000000, -0.015868, 0.999874, 0.000000 GOTO/CART, 8.000000, 55.000000, 83.995705ENDMES$$ Measurement points are created through nominal pointsMEAS/CIRCLE, F(J-2), 4 GOTO/CART, 24.000000, 27.287187, 83.995705 PTMEAS/CART, 28.290137, 29.855206, 32.000000, -0.858027, -0.513604, -0.000000 PTMEAS/CART, 21.431981, 31.577324, 32.000000, 0.513604, -0.858027, 0.000000 PTMEAS/CART, 19.709863, 24.719168, 32.000000, 0.858027, 0.513604, 0.000000 PTMEAS/CART, 26.568019, 22.997050, 32.000000, -0.513604, 0.858027, -0.000000 GOTO/CART, 24.000000, 27.287187, 83.995705ENDMES$$ Measurement points are created through nominal pointsMEAS/CIRCLE, F(J-3), 4 GOTO/CART, 56.000000, 27.287187, 83.995705 PTMEAS/CART, 58.432103, 31.655811, 32.000000, -0.486421, -0.873725, -0.000000 PTMEAS/CART, 51.631376, 29.719290, 32.000000, 0.873725, -0.486421, 0.000000 PTMEAS/CART, 53.567897, 22.918563, 32.000000, 0.486421, 0.873725, 0.000000 PTMEAS/CART, 60.368624, 24.855084, 32.000000, -0.873725, 0.486421, -0.000000 GOTO/CART, 56.000000, 27.287187, 83.995705ENDMES$$ Measurement points are created through nominal pointsMEAS/CIRCLE, F(J-4), 4 GOTO/CART, 72.000000, 55.000000, 83.995705 PTMEAS/CART, 71.968892, 59.999903, 32.000000, 0.006222, -0.999981, -0.000000 PTMEAS/CART, 67.000097, 54.968892, 32.000000, 0.999981, 0.006222, 0.000000 PTMEAS/CART, 72.031108, 50.000097, 32.000000, -0.006222, 0.999981, 0.000000 PTMEAS/CART, 76.999903, 55.031108, 32.000000, -0.999981, -0.006222, -0.000000 GOTO/CART, 72.000000, 55.000000, 83.995705ENDMES$$ Measurement points are created through nominal pointsMEAS/CIRCLE, F(J-5), 4 GOTO/CART, 56.000000, 82.712813, 83.995705 PTMEAS/CART, 58.569564, 78.423601, 32.000000, -0.513913, 0.857842, 0.000000 PTMEAS/CART, 60.289212, 85.282377, 32.000000, -0.857842, -0.513913, 0.000000 PTMEAS/CART, 53.430436, 87.002025, 32.000000, 0.513913, -0.857842, -0.000000 PTMEAS/CART, 51.710788, 80.143249, 32.000000, 0.857842, 0.513913, -0.000000 GOTO/CART, 56.000000, 82.712813, 83.995705ENDMES$$ Measurement points are created through nominal pointsMEAS/CIRCLE, F(J-6), 4 GOTO/CART, 24.000000, 82.712813, 83.995705 PTMEAS/CART, 28.369468, 80.282227, 32.000000, -0.873894, 0.486117, -0.000000 PTMEAS/CART, 26.430586, 87.082281, 32.000000, -0.486117, -0.873894, -0.000000 PTMEAS/CART, 19.630532, 85.143399, 32.000000, 0.873894, -0.486117, 0.000000 PTMEAS/CART, 21.569414, 78.343345, 32.000000, 0.486117, 0.873894, 0.000000 GOTO/CART, 24.000000, 82.712813, 83.995705ENDMEST(TCOR1)=TOL/CORTOL,XAXIS,-0.020000,0.020000T(TCOR2)=TOL/CORTOL,YAXIS,-0.020000,0.020000$$ Set.OutputCtrl.Circle(XYDF)OUTPUT/FA(J-1)OUTPUT/FA(J-2)OUTPUT/FA(J-3)OUTPUT/FA(J-4)OUTPUT/FA(J-5)OUTPUT/FA(J-6)F(P-1)=FEAT/CIRCLE,INNER,CART,40.000000,55.000000,27.000000,0.000000,-0.000000,1.000000, 20.000000$$ Measurement points are created through nominal pointsMEAS/CIRCLE, F(P-1), 4 GOTO/CART, 46.004295, 55.000000, 78.995705 GOTO/CART, 46.004295, 55.000000, 77.000000 PTMEAS/CART, 50.000000, 55.000000, 27.000000, -1.000000, -0.000000, -0.000000 GOTO/CART, 45.547246, 52.702256, 27.000000 GOTO/CART, 44.245678, 50.754322, 27.000000 GOTO/CART, 42.297744, 49.452754, 27.000000 PTMEAS/CART, 40.000000, 45.000000, 27.000000, -0.000000, 1.000000, -0.000000 GOTO/CART, 37.702256, 49.452754, 27.000000 GOTO/CART, 35.754322, 50.754322, 27.000000 GOTO/CART, 34.452754, 52.702256, 27.000000 PTMEAS/CART, 30.000000, 55.000000, 27.000000, 1.000000, 0.000000, 0.000000 GOTO/CART, 34.452754, 57.297744, 27.000000 GOTO/CART, 35.754322, 59.245678, 27.000000 GOTO/CART, 37.702256, 60.547246, 27.000000 PTMEAS/CART, 40.000000, 65.000000, 27.000000, 0.000000, -1.000000, 0.000000 GOTO/CART, 40.000000, 61.004295, 77.000000ENDMESD(CRD7) = TRANS/XORIG, 40, YORIG, 55, ZORIG, 35RECALL/D(CRD7) F(P-2)=FEAT/CIRCLE,INNER,CART,32.000000,0.000000,-3.000000,0.000000,-0.000000,1.000000, 10.000000$$ Measurement points are created through nominal pointsMEAS/CIRCLE, F(P-2), 4 GOTO/CART, -0.008073, 6.014106, 48.995705 GOTO/CART, 33.004295, 0.000000, 48.995705 GOTO/CART, 33.004295, 0.000000, 47.000000 PTMEAS/CART, 37.000000, 0.000000, -3.000000, -1.000000, -0.000000, -0.000000 PTMEAS/CART, 32.000000, -5.000000, -3.000000, -0.000000, 1.000000, -0.000000 PTMEAS/CART, 27.000000, 0.000000, -3.000000, 1.000000, 0.000000, 0.000000 PTMEAS/CART, 32.000000, 5.000000, -3.000000, 0.000000, -1.000000, 0.000000 GOTO/CART, 32.000000, 1.004295, 47.000000ENDMESF(P-3)=FEAT/CIRCLE,INNER,CART,16.000000,-27.712813,-3.000000,-0.000000,-0.000000,1.000000, 10.000000F(P-4)=FEAT/CIRCLE,INNER,CART,-16.000000,-27.712813,-3.000000,-0.000000,0.000000,1.000000, 10.000000F(P-5)=FEAT/CIRCLE,INNER,CART,-32.000000,0.000000,-3.000000,0.000000,-0.000000,1.000000, 10.000000F(P-6)=FEAT/CIRCLE,INNER,CART,-16.000000,27.712813,-3.000000,-0.000000,-0.000000,1.000000, 10.000000F(P-7)=FEAT/CIRCLE,INNER,CART,16.000000,27.712813,-3.000000,0.000000,-0.000000,1.000000, 10.000000$$ Measurement points are created through nominal pointsMEAS/CIRCLE, F(P-3), 4 GOTO/CART, 16.000000, -27.712813, 48.995705 PTMEAS/CART, 18.431792, -23.344016, -3.000000, -0.486358, -0.873759, -0.000000 PTMEAS/CART, 11.631203, -25.281021, -3.000000, 0.873759, -0.486358, 0.000000 PTMEAS/CART, 13.568208, -32.081610, -3.000000, 0.486358, 0.873759, 0.000000 PTMEAS/CART, 20.368797, -30.144605, -3.000000, -0.873759, 0.486358, -0.000000 GOTO/CART, 16.000000, -27.712813, 48.995705ENDMES$$ Measurement points are created through nominal pointsMEAS/CIRCLE, F(P-4), 4 GOTO/CART, -16.000000, -27.712813, 48.995705 PTMEAS/CART, -11.709949, -25.144650, -3.000000, -0.858010, -0.513633, -0.000000 PTMEAS/CART, -18.568163, -23.422762, -3.000000, 0.513633, -0.858010, 0.000000 PTMEAS/CART, -20.290051, -30.280976, -3.000000, 0.858010, 0.513633, 0.000000 PTMEAS/CART, -13.431837, -32.002864, -3.000000, -0.513633, 0.858010, -0.000000 GOTO/CART, -16.000000, -27.712813, 48.995705ENDMES$$ Measurement points are created through nominal pointsMEAS/CIRCLE, F(P-5), 4 GOTO/CART, -32.000000, -0.000000, 48.995705 PTMEAS/CART, -27.000631, 0.079409, -3.000000, -0.999874, -0.015882, -0.000000 PTMEAS/CART, -32.079409, 4.999369, -3.000000, 0.015882, -0.999874, -0.000000 PTMEAS/CART, -36.999369, -0.079409, -3.000000, 0.999874, 0.015882, 0.000000 PTMEAS/CART, -31.920591, -4.999369, -3.000000, -0.015882, 0.999874, 0.000000 GOTO/CART, -32.000000, -0.000000, 48.995705ENDMES$$ Measurement points are created through nominal pointsMEAS/CIRCLE, F(P-6), 4 GOTO/CART, -16.000000, 27.712813, 48.995705 PTMEAS/CART, -11.630546, 25.282202, -3.000000, -0.873891, 0.486122, -0.000000 PTMEAS/CART, -13.569389, 32.082267, -3.000000, -0.486122, -0.873891, -0.000000 PTMEAS/CART, -20.369454, 30.143424, -3.000000, 0.873891, -0.486122, 0.000000 PTMEAS/CART, -18.430611, 23.343359, -3.000000, 0.486122, 0.873891, 0.000000 GOTO/CART, -16.000000, 27.712813, 48.995705ENDMES$$ Measurement points are created through nominal pointsMEAS/CIRCLE, F(P-7), 4 GOTO/CART, 16.000000, 27.712813, 48.995705 PTMEAS/CART, 18.569366, 23.423482, -3.000000, -0.513873, 0.857866, 0.000000 PTMEAS/CART, 20.289331, 30.282179, -3.000000, -0.857866, -0.513873, -0.000000 PTMEAS/CART, 13.430634, 32.002144, -3.000000, 0.513873, -0.857866, -0.000000 PTMEAS/CART, 11.710669, 25.143447, -3.000000, 0.857866, 0.513873, 0.000000 GOTO/CART, 16.000000, 27.712813, 48.995705ENDMESF(PLN3)=FEAT/PLANE,CART,-8.750000,-8.212204,0.000000,0.000000,0.000000,1.000000$$ Measurement points are created through nominal pointsMEAS/PLANE, F(PLN3), 10 GOTO/CART, 15.991227, 27.725206, 51.995705 GOTO/CART, -25.487044, 0.812766, 51.995705 PTMEAS/CART, -25.487044, 0.812766, 0.000000, 0.000000, -0.000000, 1.000000 PTMEAS/CART, -20.046645, -15.760141, 0.000000, 0.000000, -0.000000, 1.000000 PTMEAS/CART, -5.226197, -24.958703, 0.000000, 0.000000, -0.000000, 1.000000 PTMEAS/CART, 12.039646, -22.478811, 0.000000, 0.000000, -0.000000, 1.000000 PTMEAS/CART, 23.672005, -9.480833, 0.000000, 0.000000, -0.000000, 1.000000 PTMEAS/CART, 24.227970, 7.953332, 0.000000, 0.000000, -0.000000, 1.000000 PTMEAS/CART, 13.447398, 21.666044, 0.000000, 0.000000, -0.000000, 1.000000 PTMEAS/CART, -3.625360, 25.240974, 0.000000, 0.000000, -0.000000, 1.000000 PTMEAS/CART, -19.001772, 17.005371, 0.000000, 0.000000, -0.000000, 1.000000 PTMEAS/CART, -25.487044, 0.812766, 0.000000, 0.000000, -0.000000, 1.000000ENDMESGOTO/-25.493718, 0.825657, 54.007975来源:山涧果子

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