首页/文章/ 详情

迭代对齐拟合坐标系

1年前浏览174

   迭代对齐”CAD找正法,为多曲面或纯曲面CAD图形找正提供更准确快捷的途径.

    在工件上基准很少或者没有基准时,客户可以用“跌代对齐”操作,实现数模对齐。

   尤其适用了多曲面或纯曲面类CAD图形的找正,例如叶片、叶轮、凸轮等工件。只需在CAD图形和工件对应位置附近取几个点元素,通过软件的自动迭代计算,快速准确地实现CAD图形找正。 


对于初始坐标系的建立,下面是使用迭代对齐的一个步骤:

(1)导入一个IGES,STEP文件;

(2)选择点元素拾取在CAD上拾取一系列理论点(使用"CAD模型点定义工具”,在数模上拾取理论点。)

(3如果有类似“参考园”等元素,可使用"CAD线性图形定义”在数模上拾取“圆1"和“圆2”。(使用"向量创建方法”测量"圆1"和“圆2")。

注:如果选取的元素包含圆等可简化为点的元素时,最多不能超过两个。

(4)选择“点1-9","圆1"拖放到迭代对齐窗口。

(5)拖放"CAD模型”到迭代对齐的"CAD模型”窗口、设置最大迭代次数、设置精度然后选择"迭代”,迭代完成后选择“添加并激活坐标系”。




注意事项:

(1)手动测量这些理论点。注意:对于没有完成的坐标系,不正确的测头半径补偿将不参与跌代对齐的计算。

现在使用跌代对齐去建立一个工件坐标系。

(2)元素列表窗口接受点、圆、球、键槽和圆弧的拖放。  对于圆,键槽需要使用“向量创建测量”

(3)对于点,拖放的元素没有数量的限制。但是对于其它元素,则需要小于等于两个(也可以没有)当列表中没有其它元素时,跌代对齐将在6个自由度上进行拟合。

(4)当列表中有一个非点的其它元素,迭代将围绕这个元素特征点旋转进行拟合。

(5)当列表中有两个其它元素,迭代将沿着这两个元素特征点的连线进行旋转拟合。

DMISMN/'Created by [深圳力合精密装备科技有限公司-090118] on 星期六, 七月 14, 2018', 4.0

UNITS/MM, ANGDEC, MMPS

WKPLAN/XYPLAN

PRCOMP/ON

TECOMP/ON

FLY/1.000000

MODE/PROG, MAN

SNSET/APPRCH, 2.000000

SNSET/RETRCT, 2.000000

SNSET/DEPTH, 0.000000

SNSET/SEARCH, 10.000000

SNSET/CLRSRF, 30.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(PT1)=FEAT/POINT,CART,119.716049,96.362647,31.227365,0.000000,0.699642,0.714494

$$ Empty Meas Block

MEAS/POINT, F(PT1), 1

ENDMES

F(PT2)=FEAT/POINT,CART,119.409660,109.992203,24.175771,0.000000,0.362237,0.932086

$$ Empty Meas Block

MEAS/POINT, F(PT2), 1

ENDMES

F(PT3)=FEAT/POINT,CART,118.335388,120.876709,18.974460,0.000000,0.533761,0.845635

$$ Empty Meas Block

MEAS/POINT, F(PT3), 1

ENDMES

F(PT4)=FEAT/POINT,CART,94.790001,120.795716,19.025442,0.000000,0.531665,0.846955

$$ Empty Meas Block

MEAS/POINT, F(PT4), 1

ENDMES

F(PT5)=FEAT/POINT,CART,95.645172,108.839148,24.619965,0.000000,0.357124,0.934057

$$ Empty Meas Block

MEAS/POINT, F(PT5), 1

ENDMES

F(PT6)=FEAT/POINT,CART,95.498169,95.742831,31.872111,0.000000,0.741907,0.670503

$$ Empty Meas Block

MEAS/POINT, F(PT6), 1

ENDMES

F(PT7)=FEAT/POINT,CART,72.857132,96.655751,30.947873,0.000000,0.680539,0.732712

$$ Empty Meas Block

MEAS/POINT, F(PT7), 1

ENDMES

F(PT8)=FEAT/POINT,CART,71.596550,107.997055,24.941089,0.000000,0.356011,0.934482

$$ Empty Meas Block

MEAS/POINT, F(PT8), 1

ENDMES

F(PT9)=FEAT/POINT,CART,70.002357,120.222300,19.378571,0.000000,0.517138,0.855902

$$ Empty Meas Block

MEAS/POINT, F(PT9), 1

ENDMES

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

$$ Empty VECBLD Block

RMEAS/CIRCLE, F(CIR1), 4, VECBLD, 3.000000, 3

ENDMES

MA(MATDEF1) = MATDEF/F(CADM_1),FA(PT1),FA(PT2),FA(PT3),FA(PT4),FA(PT5),FA(PT6),FA(PT7),FA(PT8),FA(PT9),FA(CIR1)

DMESW/COMAND, 'ITERATION/100'

D(CRD1)=LOCATE/MA(MATDEF1)

$$ Set.CAD2PCS.CADM_1

$$ Set.CADViewCenter.CADM_1

MODE/PROG,MAN

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

$$ 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, F(PLN1), 30.0000

F(PT1)=FEAT/POINT,CART,119.716049,96.362647,31.227365,0.000000,0.699642,0.714494

F(PT2)=FEAT/POINT,CART,119.409660,109.992203,24.175771,0.000000,0.362237,0.932086

F(PT3)=FEAT/POINT,CART,118.335388,120.876709,18.974460,0.000000,0.533761,0.845635

F(PT4)=FEAT/POINT,CART,94.790001,120.795716,19.025442,0.000000,0.531665,0.846955

F(PT5)=FEAT/POINT,CART,95.645172,108.839148,24.619965,0.000000,0.357124,0.934057

F(PT6)=FEAT/POINT,CART,95.498169,95.742831,31.872111,0.000000,0.741907,0.670503

F(PT7)=FEAT/POINT,CART,72.857132,96.655751,30.947873,0.000000,0.680539,0.732712

F(PT8)=FEAT/POINT,CART,71.596550,107.997055,24.941089,0.000000,0.356011,0.934482

F(PT9)=FEAT/POINT,CART,70.002357,120.222300,19.378571,0.000000,0.517138,0.855902

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 119.716049, 99.159119, 34.083199

MEAS/POINT, F(PT1), 1

  GOTO/CART, 119.716049,99.159119,66.997004

  PTMEAS/CART, 119.716049,96.362647,31.227365,0.000000,0.699642,0.714494

ENDMES

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 119.409660, 111.440064, 27.901324

MEAS/POINT, F(PT2), 1

  GOTO/CART, 119.409660,111.440064,66.997004

  PTMEAS/CART, 119.409660,109.992203,24.175771,0.000000,0.362237,0.932086

ENDMES

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 118.335388, 123.010154, 22.354468

MEAS/POINT, F(PT3), 1

  GOTO/CART, 118.335388,123.010154,66.997004

  PTMEAS/CART, 118.335388,120.876709,18.974460,0.000000,0.533761,0.845635

ENDMES

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 94.790001, 122.920784, 22.410723

MEAS/POINT, F(PT4), 1

  GOTO/CART, 94.790001,122.920784,66.997004

  PTMEAS/CART, 94.790001,120.795716,19.025442,0.000000,0.531665,0.846955

ENDMES

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 95.645172, 110.266575, 28.353394

MEAS/POINT, F(PT5), 1

  GOTO/CART, 95.645172,110.266575,66.997004

  PTMEAS/CART, 95.645172,108.839148,24.619965,0.000000,0.357124,0.934057

ENDMES

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 95.498169, 98.708237, 34.552114

MEAS/POINT, F(PT6), 1

  GOTO/CART, 95.498169,98.708237,66.997004

  PTMEAS/CART, 95.498169,95.742831,31.872111,0.000000,0.741907,0.670503

ENDMES

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 72.857132, 99.375869, 33.876525

MEAS/POINT, F(PT7), 1

  GOTO/CART, 72.857132,99.375869,66.997004

  PTMEAS/CART, 72.857132,96.655751,30.947873,0.000000,0.680539,0.732712

ENDMES

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 71.596550, 109.420032, 28.676217

MEAS/POINT, F(PT8), 1

  GOTO/CART, 71.596550,109.420032,66.997004

  PTMEAS/CART, 71.596550,107.997055,24.941089,0.000000,0.356011,0.934482

ENDMES

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 70.002357, 122.289304, 22.799614

MEAS/POINT, F(PT9), 1

  GOTO/CART, 70.002357,122.289304,66.997004

  PTMEAS/CART, 70.002357,120.222300,19.378571,0.000000,0.517138,0.855902

ENDMES

SNSET/APPRCH, 2.0000

SNSET/RETRCT, 2.0000

SNSET/DEPTH, 2

SNSET/SEARCH, 10.0000

SNSET/CLRSRF, F(PLN1), 30.0000

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

$$ Measurement points are created through nominal points

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 65.500000, 55.000000, 66.997004

RMEAS/CIRCLE, F(CIR1), 4, VECBLD, 3.000000, 3

  GOTO/CART,   65.500000, 55.000000, 66.997004

  RPTMEAS/CART, 65.500000, 55.000000, 35.000000, 0.000000, 0.000000, 1.000000

  RPTMEAS/CART, 27.250000, 77.083648, 35.000000, 0.000000, 0.000000, 1.000000

  RPTMEAS/CART, 27.250000, 32.916352, 35.000000, 0.000000, 0.000000, 1.000000

  GOTO/CART,   48.141374, 71.615621, 40.997004

  PTMEAS/CART, 49.900068, 75.204916, 33.000000, -0.440003, -0.897996, -0.000000

  GOTO/CART,   41.163126, 73.466402, 33.000000

  GOTO/CART,   34.007802, 72.505839, 33.000000

  GOTO/CART,   27.764737, 68.880172, 33.000000

  PTMEAS/CART, 19.795084, 64.900068, 33.000000,  0.897996, -0.440003, -0.000000

  GOTO/CART,   21.533598, 56.163126, 33.000000

  GOTO/CART,   22.494161, 49.007802, 33.000000

  GOTO/CART,   26.119828, 42.764737, 33.000000

  PTMEAS/CART, 30.099932, 34.795084, 33.000000,  0.440003,  0.897996, -0.000000

  GOTO/CART,   38.836874, 36.533598, 33.000000

  GOTO/CART,   45.992198, 37.494161, 33.000000

  GOTO/CART,   52.235263, 41.119828, 33.000000

  PTMEAS/CART, 60.204916, 45.099932, 33.000000, -0.897996,  0.440003, -0.000000

ENDMES

MA(MATDEF1) = MATDEF/F(CADM_1),FA(PT1),FA(PT2),FA(PT3),FA(PT4),FA(PT5),FA(PT6),FA(PT7),FA(PT8),FA(PT9),FA(CIR1)

DMESW/COMAND, 'ITERATION/100'

D(CRD2)=LOCATE/MA(MATDEF1)

$$ Set.CAD2PCS.CADM_1

$$ Set.CADViewCenter.CADM_1

MODE/PROG,MAN

SNSET/APPRCH, 2.0000

SNSET/RETRCT, 2.0000

SNSET/DEPTH, 0

SNSET/SEARCH, 10.0000

SNSET/CLRSRF, F(PLN1), 30.0000

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

F(CIR3)=FEAT/CIRCLE,INNER,CART,24.000000,82.712813,32.000000,-0.000000,-0.000000,1.000000, 10.000000

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

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

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

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

$$ Measurement points are created through nominal points

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 8.564778, 55.828870, 66.997004

MEAS/CIRCLE, F(CIR2), 4

  GOTO/CART,    8.564778, 55.828870, 66.997004

  PTMEAS/CART, 10.815456, 59.131974, 32.000000, -0.563091, -0.826395,  0.000000

  PTMEAS/CART,  3.868026, 57.815456, 32.000000,  0.826395, -0.563091,  0.000000

  PTMEAS/CART,  5.184544, 50.868026, 32.000000,  0.563091,  0.826395, -0.000000

  PTMEAS/CART, 12.131974, 52.184544, 32.000000, -0.826395,  0.563091, -0.000000

  GOTO/CART,    8.828870, 54.435222, 66.997004

ENDMES

$$ Measurement points are created through nominal points

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 24.576311, 83.533706, 66.997004

MEAS/CIRCLE, F(CIR3), 4

  GOTO/CART,   24.576311, 83.533706, 66.997004

  PTMEAS/CART, 26.872948, 86.805022, 32.000000, -0.574590, -0.818442, -0.000000

  PTMEAS/CART, 19.907791, 85.585761, 32.000000,  0.818442, -0.574590,  0.000000

  PTMEAS/CART, 21.127052, 78.620604, 32.000000,  0.574590,  0.818442,  0.000000

  PTMEAS/CART, 28.092209, 79.839865, 32.000000, -0.818442,  0.574590, -0.000000

  GOTO/CART,   24.820893, 82.136502, 66.997004

ENDMES

$$ Measurement points are created through nominal points

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 56.428583, 83.619630, 66.997004

MEAS/CIRCLE, F(CIR4), 4

  GOTO/CART,   56.428583, 83.619630, 66.997004

  PTMEAS/CART, 58.136517, 87.233355, 32.000000, -0.427303, -0.904108, -0.000000

  PTMEAS/CART, 51.479458, 84.849330, 32.000000,  0.904108, -0.427303,  0.000000

  PTMEAS/CART, 53.863483, 78.192271, 32.000000,  0.427303,  0.904108,  0.000000

  PTMEAS/CART, 60.520542, 80.576296, 32.000000, -0.904108,  0.427303, -0.000000

  GOTO/CART,   56.906817, 82.284230, 66.997004

ENDMES

$$ Measurement points are created through nominal points

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 72.286960, 55.961069, 66.997004

MEAS/CIRCLE, F(CIR5), 4

  GOTO/CART,   72.286960, 55.961069, 66.997004

  PTMEAS/CART, 73.430512, 59.790995, 32.000000, -0.286102, -0.958199,  0.000000

  PTMEAS/CART, 67.209005, 56.430512, 32.000000,  0.958199, -0.286102,  0.000000

  PTMEAS/CART, 70.569488, 50.209005, 32.000000,  0.286102,  0.958199, -0.000000

  PTMEAS/CART, 76.790995, 53.569488, 32.000000, -0.958199,  0.286102, -0.000000

  GOTO/CART,   72.961069, 54.713040, 66.997004

ENDMES

$$ Measurement points are created through nominal points

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 56.321351, 28.237310, 66.997004

MEAS/CIRCLE, F(CIR6), 4

  GOTO/CART,   56.321351, 28.237310, 66.997004

  PTMEAS/CART, 57.601958, 32.023613, 32.000000, -0.320392, -0.947285, -0.000000

  PTMEAS/CART, 51.263574, 28.889145, 32.000000,  0.947285, -0.320392,  0.000000

  PTMEAS/CART, 54.398042, 22.550761, 32.000000,  0.320392,  0.947285,  0.000000

  PTMEAS/CART, 60.736426, 25.685229, 32.000000, -0.947285,  0.320392, -0.000000

  GOTO/CART,   56.950123, 26.965836, 66.997004

ENDMES

$$ Measurement points are created through nominal points

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 24.450277, 28.183430, 66.997004

MEAS/CIRCLE, F(CIR7), 4

  GOTO/CART,   24.450277, 28.183430, 66.997004

  PTMEAS/CART, 26.244663, 31.755015, 32.000000, -0.448933, -0.893566,  0.000000

  PTMEAS/CART, 19.532172, 29.531850, 32.000000,  0.893566, -0.448933,  0.000000

  PTMEAS/CART, 21.755337, 22.819359, 32.000000,  0.448933,  0.893566, -0.000000

  PTMEAS/CART, 28.467828, 25.042525, 32.000000, -0.893566,  0.448933, -0.000000

  GOTO/CART,   24.896242, 26.836910, 66.997004

ENDMES


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