RationalDMIS 7.1 平面  圆  圆 构建坐标系_拟合

 

要点:在A孔,B孔的中点设定原点

 

 

 

1.测量平面,A孔,B孔。

 

RationalDMIS 7.1 平面  圆  圆 构建坐标系_ide_02

RationalDMIS 7.1 平面  圆  圆 构建坐标系_拟合_03

 

2.最佳拟合直线

 

   A孔,B孔构造最佳拟合直线

 

RationalDMIS 7.1 平面  圆  圆 构建坐标系_拟合_04

RationalDMIS 7.1 平面  圆  圆 构建坐标系_ide_05

 

3.构造中分点作为XY原点

 

RationalDMIS 7.1 平面  圆  圆 构建坐标系_ide_06

RationalDMIS 7.1 平面  圆  圆 构建坐标系_拟合_07

 

4.3-2-1法构建零件坐标系

 

找正:平面(PLN1)    Z+

旋转:直线(LN_BF1)  X+

平移(原点):

                     (X):点PT_MID1

                      (Y):点PT_MID1

                     (Z):PLN1

RationalDMIS 7.1 平面  圆  圆 构建坐标系_ide_08

RationalDMIS 7.1 平面  圆  圆 构建坐标系_拟合_09

RationalDMIS 7.1 平面  圆  圆 构建坐标系_拟合_10

RationalDMIS 7.1 平面  圆  圆 构建坐标系_拟合_11

$$/*  Header

DMISMN/'Created by [爱科腾瑞科技(北京)有限公司-091520-DEMO] on Friday, April 03, 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-D2.0)

GEOALG/BF, LSTSQR

GEOALG/ANGLB, DEFALT

GEOALG/CIRCLE, MAXINS

GEOALG/ARC, LSTSQR

GEOALG/PLANE, LSTSQR

$$

$$

$$*/

MODE/MAN

F(PLN1)=FEAT/PLANE,CART,-0.2338,6.2206,0.0000,-0.0000,0.0000,1.0000

$$ Measurement points are created through actual points

MEAS/PLANE, F(PLN1), 4

  PTMEAS/CART, -48.9087,  33.1050, -0.0000, -0.0000, 0.0000, 1.0000

  PTMEAS/CART, -50.9854, -17.9224, -0.0000, -0.0000, 0.0000, 1.0000

  PTMEAS/CART,  49.4508, -16.8336, -0.0000, -0.0000, 0.0000, 1.0000

  PTMEAS/CART,  49.5082,  26.5335, -0.0000, -0.0000, 0.0000, 1.0000

ENDMES

F(CIR1)=FEAT/CIRCLE,INNER,CART,-35.0000,0.0000,-5.0212,0.0000,0.0000,1.0000, 20.0000

$$ Measurement points are created through actual points

MEAS/CIRCLE, F(CIR1), 4

  PTMEAS/CART, -38.0943,  9.5092, -5.0212,  0.3094, -0.9509, -0.0000

  PTMEAS/CART, -25.3096,  2.4691, -5.0212, -0.9690, -0.2469, -0.0000

  PTMEAS/CART, -34.7662, -9.9973, -5.0212, -0.0234,  0.9997, -0.0000

  PTMEAS/CART, -44.9999,  0.0544, -5.0212,  1.0000, -0.0054, -0.0000

ENDMES

F(CIR2)=FEAT/CIRCLE,INNER,CART,35.0000,0.0000,-4.5379,0.0000,0.0000,1.0000, 20.0000

$$ Measurement points are created through actual points

MEAS/CIRCLE, F(CIR2), 4

  PTMEAS/CART, 34.2871,  9.9746, -4.5379,  0.0713, -0.9975, -0.0000

  PTMEAS/CART, 44.8815,  1.5350, -4.5379, -0.9881, -0.1535, -0.0000

  PTMEAS/CART, 34.9592, -9.9999, -4.5379,  0.0041,  1.0000, -0.0000

  PTMEAS/CART, 25.7356, -3.7644, -4.5379,  0.9264,  0.3764, -0.0000

ENDMES

 

$$ 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),(CIR2),(LN_BF1), 0.0000, 0.0000, 1.0000

CONST/LINE,F(LN_BF1),BF,FA(CIR1),FA(CIR2)

F(PT_MID1)=FEAT/POINT,CART,0.0000,0.0000,-4.7796,0.0000,0.0000,1.0000

CONST/POINT, F(PT_MID1), MIDPT, FA(CIR1), FA(CIR2), PTPT

D(CRD1) = DATSET/FA(PLN1), ZDIR, ZORIG, FA(LN_BF1), XDIR, FA(PT_MID1), XORIG

D(CRD1) = TRANS/ZORIG, -0, YORIG, FA(PT_MID1), XORIG, -0

RationalDMIS 7.1 平面  圆  圆 构建坐标系_ide_12

RationalDMIS 7.1 平面  圆  圆 构建坐标系_拟合_13

RationalDMIS 7.1 平面  圆  圆 构建坐标系_ide_14