首页/文章/ 详情

RationalDMIS7.1三点拟合坐标系(3个中心点)

1年前浏览4503

3 点拟合坐标系是用来实现数模对齐操作或建立图纸零件坐标系操作的。




RationalDMIS 7.1向量创建测量圆(样例点测量)


RationalDMIS 7.0 一点建坐标系




三点拟合坐标系是创建一个新坐标系,使得可简化为点的元素在这个新坐标系中的位置值, 与理论位置输入窗口中的数值相同或最接近。也常用于建立检具的坐标系。


可简化为点元素包括:圆、球、 键槽


比如:3 个球、 3 个圆、 2 个球 1 个圆、 1 个球 2 个圆„„ 








 主要应用在三点确定工件位置的情况,三个点必须是空间的非矢量元素,能确定准确的位置。元素包括点、圆、椭圆、球、方槽、圆槽,但是点必须采点位置准确,圆、椭圆、方槽、圆槽必须投影才可建立坐标系。


此法通常用在以下场合:


当实际零件上有三个点简化元素, 同时在 CAD 模型数据上有相匹配的三个点简化名义元素的时候。本方法中, 不一定要有 CAD文件, 但是必须要有相应的名义元素数据。按此法建立的基准坐标系勿需迭代。


必须满足两个条件:


第一, 测量3个点简化元素;


第二, 在零件的 CAD 线框模型上依次创建相应的三个点简化名义元素(或者键盘输入理论值)。



 操作步骤:


(1)导入CAD



第二步:用CAD线型定义工具,选取基准元素(在数模上选择三个可简化为点的理论元素)。如下图以三个圆为例


在数模中需要的圆边框上用鼠标左键点击一次,即可选取圆。




第三步:实际测量这三个圆元素。(手动测量基准元素


    使用“向量创建法”分别测量三个圆



将三个基准圆拖放到DMIS程序区,在弹出的菜单上选择“空VECBLD”块。



运行测量程序,手动测量这3个参考圆。



第四步:三点拟合坐标系


   切换到三点啮合生成坐标系窗口


   


将实际测量得到的三个圆分别拖放到“三点拟合坐标系”的三个对应的选项框中。框中显示的理论值是之前定义好的,用户也可以自己输入对应的理论值。




当一个可简化为点的元素拖放到元素输入窗口后,它的理论位置值会自动填写到相应的输入窗口。理论位置值以“理论坐标系”为基准,理论位置值也可以通过键盘输入来修改。


“平均误差”复选框提供两种可选择算法。一般来说,通过在“理论坐标系”中实际元素值与理论元素值几乎相同的元素计算出精确的新坐标系不是总能成功的。默认情况下。在不选中平均误差复选框时,RationalDMIS会以点1的数值优先,点2次之,点3的数值最后。但当选中平均误差复选框时,所有三个点的数值同等重要。


第五步:模型对齐


  在数模上右键点击实现数模对齐,或将新建的坐标系拖放到数模上实现数模对齐。


RationalDMIS三点啮合生成坐标系编程问题(联机)

三点啮合的原理

RationalDMIS   三点啮合生成坐标系


第六步:精建坐标系(DCC测量基准元素)


$$/*  Header

DMISMN/'Created by [爱科腾瑞科技(北京)有限公司-091520-DEMO-11023(力合)] on Tuesday, March 24, 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, 20.0000

RECALL/D(MCS)

SNSLCT/S(L20-D3.0)

GEOALG/BF, LSTSQR

GEOALG/ANGLB, DEFALT

GEOALG/CIRCLE, LSTSQR

GEOALG/ARC, LSTSQR

GEOALG/PLANE, LSTSQR

$$

$$

$$*/

MODE/MAN

F(CIR1)=FEAT/CIRCLE,INNER,CART,15.9115,40.5000,0.0000,0.0000,0.0000,1.0000, 10.0000

F(CIR2)=FEAT/CIRCLE,INNER,CART,47.0885,40.5000,0.0000,0.0000,0.0000,1.0000, 10.0000

F(CIR3)=FEAT/CIRCLE,INNER,CART,31.5000,13.5000,0.0000,0.0000,0.0000,1.0000, 10.0000




$$ Empty VECBLD Block

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


ENDMES


$$ Empty VECBLD Block

RMEAS/CIRCLE, F(CIR2), 4, VECBLD, 3.0000, 3


ENDMES


$$ Empty VECBLD Block

RMEAS/CIRCLE, F(CIR3), 4, VECBLD, 3.0000, 3


ENDMES

F(CIR1)=FEAT/CIRCLE,INNER,CART,15.9115,40.5000,0.0000,0.0000,0.0000,1.0000, 10.0000

F(CIR2)=FEAT/CIRCLE,INNER,CART,47.0885,40.5000,0.0000,0.0000,0.0000,1.0000, 10.0000

F(CIR3)=FEAT/CIRCLE,INNER,CART,31.5000,13.5000,0.0000,0.0000,0.0000,1.0000, 10.0000


DMESW/COMAND,'3PtsCRDBestfitAveErr/OFF'

D(CRD1) = LOCATE/FA(CIR1), FA(CIR2), FA(CIR3)

$$ Set.CAD2PCS.CADM_1

MODE/PROG,MAN

F(PLN1)=FEAT/PLANE,CART,32.2525,74.2477,0.0000,0.0000,0.0000,1.0000

$$ 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, 3.0000

SNSET/SEARCH, 10.0000

SNSET/CLRSRF, F(PLN1), 20.0000

F(CIR1)=FEAT/CIRCLE,INNER,CART,15.9115,40.5000,0.0000,0.0000,0.0000,1.0000, 10.0000

$$ Measurement points are created through nominal points

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 23.9115, 40.5000, 21.5000

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

  GOTO/CART,   23.9115, 40.5000, 21.5000

  RPTMEAS/CART, 23.9115, 40.5000, 0.0000, 0.0000, 0.0000, 1.0000

  RPTMEAS/CART, 11.9115, 47.4282, 0.0000, 0.0000, 0.0000, 1.0000

  RPTMEAS/CART, 11.9115, 33.5718, 0.0000, 0.0000, 0.0000, 1.0000

  GOTO/CART,   16.6615, 39.2010,  6.5000

  PTMEAS/CART, 18.4115, 36.1699, -3.0000, -0.5000,  0.8660, -0.0000

  PTMEAS/CART, 20.2417, 43.0000, -3.0000, -0.8660, -0.5000, -0.0000

  PTMEAS/CART, 13.4115, 44.8301, -3.0000,  0.5000, -0.8660, -0.0000

  PTMEAS/CART, 11.5814, 38.0000, -3.0000,  0.8660,  0.5000, -0.0000

ENDMES

 

GOTO/47.0885, 40.5000, 20.0000

F(CIR2)=FEAT/CIRCLE,INNER,CART,47.0885,40.5000,0.0000,0.0000,0.0000,1.0000, 10.0000

$$ Measurement points are created through nominal points

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 55.0885, 40.5000, 0.0000

RMEAS/CIRCLE, F(CIR2), 4, VECBLD, 3.0000, 3

  RPTMEAS/CART, 55.0885, 40.5000, 0.0000, 0.0000, 0.0000, 1.0000

  RPTMEAS/CART, 43.0885, 47.4282, 0.0000, 0.0000, 0.0000, 1.0000

  RPTMEAS/CART, 43.0885, 33.5718, 0.0000, 0.0000, 0.0000, 1.0000

  GOTO/CART,   48.5885, 40.5000,  6.5000

  PTMEAS/CART, 52.0885, 40.5000, -3.0000, -1.0000, -0.0000, -0.0000

  PTMEAS/CART, 47.0885, 45.5000, -3.0000, -0.0000, -1.0000, -0.0000

  PTMEAS/CART, 42.0885, 40.5000, -3.0000,  1.0000, -0.0000, -0.0000

  PTMEAS/CART, 47.0885, 35.5000, -3.0000, -0.0000,  1.0000, -0.0000

ENDMES

GOTO/31.5000, 13.5000, 20.0000

F(CIR3)=FEAT/CIRCLE,INNER,CART,31.5000,13.5000,0.0000,0.0000,0.0000,1.0000, 10.0000

$$ Measurement points are created through nominal points

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 39.5000, 13.5000, 0.0000

RMEAS/CIRCLE, F(CIR3), 4, VECBLD, 3.0000, 3

  RPTMEAS/CART, 39.5000, 13.5000, 0.0000, 0.0000, 0.0000, 1.0000

  RPTMEAS/CART, 27.5000, 20.4282, 0.0000, 0.0000, 0.0000, 1.0000

  RPTMEAS/CART, 27.5000,  6.5718, 0.0000, 0.0000, 0.0000, 1.0000

  GOTO/CART,   33.0000, 13.5000,  6.5000

  PTMEAS/CART, 36.5000, 13.5000, -3.0000, -1.0000, -0.0000, -0.0000

  PTMEAS/CART, 31.5000, 18.5000, -3.0000, -0.0000, -1.0000, -0.0000

  PTMEAS/CART, 26.5000, 13.5000, -3.0000,  1.0000, -0.0000, -0.0000

  PTMEAS/CART, 31.5000,  8.5000, -3.0000, -0.0000,  1.0000, -0.0000

ENDMES

$$ Set.CAD2PCS.CADM_1.D(MCS)

F(CIR1)=FEAT/CIRCLE,INNER,CART,15.9115,40.5000,0.0000,0.0000,0.0000,1.0000, 10.0000

F(CIR2)=FEAT/CIRCLE,INNER,CART,47.0885,40.5000,0.0000,0.0000,0.0000,1.0000, 10.0000

F(CIR3)=FEAT/CIRCLE,INNER,CART,31.5000,13.5000,0.0000,0.0000,0.0000,1.0000, 10.0000

DMESW/COMAND,'3PtsCRDBestfitAveErr/OFF'

D(CRD2) = LOCATE/FA(CIR1), FA(CIR2), FA(CIR3)

$$ Set.CAD2PCS.CADM_1


拓展知识:


方法一:


实际测量基准元素,将实际基准元素拖放到三个对应的窗口,然后在理论窗口填写图纸给定的理论值,然后添加/激活坐标系。


方法二:


导入数模后,从数模选取基准的理论元素,然后拖放到测量面板,手动测量。对于键槽或圆,需要用向量创建法来测量,具体参照软件帮助文档(测量圆元素)。然后将实际测量得到的元素拖放到对应得窗口,并添加/激活坐标系,实现数模对齐。

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