首页/文章/ 详情

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

1年前浏览140

    一般对于平面,圆,圆,可以直接使用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.0

UNITS/MM, ANGDEC, MMPS

WKPLAN/XYPLAN

PRCOMP/ON

TECOMP/ON

FLY/1.000000

MODE/MAN

SNSET/APPRCH, 2.000000

SNSET/RETRCT, 2.000000

SNSET/DEPTH, 0.000000

SNSET/SEARCH, 10.000000

SNSET/CLRSRF, 50.000000

RECALL/D(MCS)

SNSLCT/S(ROOTSN1)

GEOALG/BF, LSTSQR

GEOALG/ANGLB, DEFALT

GEOALG/CIRCLE, LSTSQR

GEOALG/ARC, LSTSQR

GEOALG/PLANE, LSTSQR

$$

$$

MODE/MAN

F(PLN1)=FEAT/PLANE,CART,31.250000,46.787796,35.000000,0.000000,0.000000,1.000000

$$ Empty Meas Block

MEAS/PLANE, F(PLN1), 4

ENDMES

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

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

D(CRD2) = TRANS/ZORIG, -35

F(CIR1)=FEAT/CIRCLE,INNER,CART,40.000000,55.000000,35.000000,0.000000,0.000000,1.000000, 45.000000

$$ Empty Meas Block

MEAS/CIRCLE, F(CIR1), 4

ENDMES

F(CIR2)=FEAT/CIRCLE,INNER,CART,72.000000,55.000000,35.000000,0.000000,0.000000,1.000000, 10.000000

$$ Empty Meas Block

MEAS/CIRCLE, F(CIR2), 4

ENDMES

DMESW/COMAND,'D(CRD3) = LOCATE/XYDIR, ZAXIS, $

  FA(CIR1), XYZAXI, $

  FA(CIR2), XYZAXI'

$$ Set.CAD2PCS.CADM_1

$$ Set.CADViewCenter.CADM_1
RECALL/D(CRD3) 

$$

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

GOTO/14.911388, 36.296293, 186.104227

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

$$

MODE/PROG,MAN

F(PLN2) = FEAT/PLANE,CART, 31.250000,46.787796,35.000000, 0,0,1

$$ Measurement points are created through nominal points

MEAS/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.038027

ENDMES

D(CRD4) = DATSET/FA(PLN2), ZDIR

D(CRD4) = TRANS/ZORIG, FA(PLN2)

D(CRD5) = TRANS/ZORIG, -35

F(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 points

MEAS/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.000579

ENDMES

F(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 points

MEAS/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.000844

ENDMES

DMESW/COMAND,'D(CRD6) = LOCATE/XYDIR, ZAXIS, $

  FA(CIR3), XYZAXI, $

  FA(CIR4), XYZAXI'

$$ Set.CAD2PCS.CADM_1

$$ Set.CADViewCenter.CADM_1
RECALL/D(CRD6) 

$$

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

$$ Set.OutputCtrl.Circle(XYZDT)

$$

MODE/PROG,MAN

SNSET/APPRCH, 2.0000

SNSET/RETRCT, 2.0000

SNSET/DEPTH, 0.0000

SNSET/SEARCH, 10.0000

SNSET/CLRSRF, 50.0000

F(J-1)=FEAT/CIRCLE,INNER,CART,8.000000,55.000000,32.000000,0.000000,-0.000000,1.000000, 10.000000

F(J-2)=FEAT/CIRCLE,INNER,CART,24.000000,27.287187,32.000000,-0.000000,0.000000,1.000000, 10.000000

F(J-3)=FEAT/CIRCLE,INNER,CART,56.000000,27.287187,32.000000,-0.000000,-0.000000,1.000000, 10.000000

F(J-4)=FEAT/CIRCLE,INNER,CART,72.000000,55.000000,32.000000,0.000000,-0.000000,1.000000, 10.000000

F(J-5)=FEAT/CIRCLE,INNER,CART,56.000000,82.712813,32.000000,0.000000,-0.000000,1.000000, 10.000000

F(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 points

MEAS/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.995705

ENDMES

$$ Measurement points are created through nominal points

MEAS/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.995705

ENDMES

$$ Measurement points are created through nominal points

MEAS/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.995705

ENDMES

$$ Measurement points are created through nominal points

MEAS/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.995705

ENDMES

$$ Measurement points are created through nominal points

MEAS/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.995705

ENDMES

$$ Measurement points are created through nominal points

MEAS/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.995705

ENDMES

T(TCOR1)=TOL/CORTOL,XAXIS,-0.020000,0.020000

T(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 points

MEAS/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.000000

ENDMES

D(CRD7) = TRANS/XORIG, 40, YORIG, 55, ZORIG, 35
RECALL/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 points

MEAS/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.000000

ENDMES

F(P-3)=FEAT/CIRCLE,INNER,CART,16.000000,-27.712813,-3.000000,-0.000000,-0.000000,1.000000, 10.000000

F(P-4)=FEAT/CIRCLE,INNER,CART,-16.000000,-27.712813,-3.000000,-0.000000,0.000000,1.000000, 10.000000

F(P-5)=FEAT/CIRCLE,INNER,CART,-32.000000,0.000000,-3.000000,0.000000,-0.000000,1.000000, 10.000000

F(P-6)=FEAT/CIRCLE,INNER,CART,-16.000000,27.712813,-3.000000,-0.000000,-0.000000,1.000000, 10.000000

F(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 points

MEAS/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.995705

ENDMES

$$ Measurement points are created through nominal points

MEAS/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.995705

ENDMES

$$ Measurement points are created through nominal points

MEAS/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.995705

ENDMES

$$ Measurement points are created through nominal points

MEAS/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.995705

ENDMES

$$ Measurement points are created through nominal points

MEAS/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.995705

ENDMES

F(PLN3)=FEAT/PLANE,CART,-8.750000,-8.212204,0.000000,0.000000,0.000000,1.000000

$$ Measurement points are created through nominal points

MEAS/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.000000

ENDMES

GOTO/-25.493718, 0.825657, 54.007975


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