首页/文章/ 详情

RationalDMIS选择性测量

15小时前浏览1

 


   根据图纸,构建坐标系。在测量圆孔之前,首先触测圆心点,设置圆心点Z轴坐标值为0。设置“搜索距离”为5,自动测量点取点Z实测值。


      点Z向实测值与搜索距离5 做比较,如果小于5,表示圆孔未加工或加工没完成,直接跳到一个孔的判断和测量!


DMISMN/'Created by 山涧果子] on 星期日, 十月 29, 2017', 4.0

UNITS/MM, ANGDEC

WKPLAN/XYPLAN

PRCOMP/ON

TECOMP/ON

FLY/1.000

MODE/PROG, MAN

SNSET/APPRCH, 3.000

SNSET/RETRCT, 3.000

SNSET/DEPTH, 0.000

SNSET/SEARCH, 10.000

SNSET/CLRSRF, 30.000

RECALL/D(MCS)

SNSLCT/S(LENOVO)

GEOALG/CIRCLE, LSTSQR

GEOALG/ARC, LSTSQR

GEOALG/PLANE, LSTSQR

$$

$$

MODE/PROG,MAN

F(PLN1) = FEAT/PLANE,CART, 31.250, 46.788, 35.000, 0.000, 0.000, 1.000

$$ Measurement points are created through nominal points

MEAS/PLANE, F(PLN1), 4

  GOTO/CART,  117.282, 60.869, 66.000

  GOTO/CART,  5.922, 83.570, 66.000

  PTMEAS/CART,  5.922, 83.570, 35.000, 0.000, 0.000, 1.000

  PTMEAS/CART,  7.738, 20.403, 35.000, 0.000, 0.000, 1.000

  PTMEAS/CART,  86.688, 17.792, 35.000, 0.000, 0.000, 1.000

  PTMEAS/CART,  119.416, 59.003, 35.000, 0.000, 0.000, 1.000

ENDMES

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

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

F(LN1) = FEAT/LINE,BND,CART, 13.179, 0.000, -18.130, 64.140, 0.000, -19.469,$

0.000, -1.000, 0.000

$$ Measurement points are created through actual points

MEAS/LINE, F(LN1), 2

  PTMEAS/CART,  13.179, 0.000, -18.130, 0.000, -1.000, 0.000

  PTMEAS/CART,  64.140, 0.000, -19.469, 0.000, -1.000, 0.000

ENDMES

F(LN2) = FEAT/LINE,BND,CART, 0.000, 19.485, -5.550, 0.000, 71.624, -8.905,$

-1.000, 0.000, 0.000

$$ Measurement points are created through actual points

MEAS/LINE, F(LN2), 2

  PTMEAS/CART,  0.000, 19.485, -5.550, -1.000, 0.000, 0.000

  PTMEAS/CART,  0.000, 71.624, -8.905, -1.000, 0.000, 0.000

ENDMES

F(PT_INTER1) = FEAT/POINT,CART, -0.176, 0.432, -11.063, 0.026, 0.064, 0.998

CONST/POINT, F(PT_INTER1), INTOF, FA(LN1), FA(LN2)

D(CRD2) = ROTATE/ZAXIS, FA(LN1), XDIR

D(CRD3) = TRANS/XORIG, FA(PT_INTER1), YORIG, FA(PT_INTER1), ZORIG, -35

$$ Set.CAD2PCS.CADM_1

$$ Set.CADViewCenter.CADM_1

MODE/PROG,MAN

SNSET/APPRCH, 3.0000

SNSET/RETRCT, 3.0000

SNSET/DEPTH, 0.0000

SNSET/SEARCH, 5

SNSET/CLRSRF, 30.0000

F(CIR1) = FEAT/CIRCLE,INNER,CART, 72.000, 55.000, 33.000, 0.000, 0.000,$

1.000, 10.000

F(PT1) = FEAT/POINT,CART, 72.000000,55.000000,35.000000, 0,0,1

MEAS/POINT, F(PT1), 1

  PTMEAS/CART,  72.000, 55.000, 35.000, 0.000, 0.000, 1.000

ENDMES

DECL/COMMON,REAL,PT1_Z

PT1_Z = OBTAIN/FA(PT1),5

IF/(PT1_Z .LT.-5)

SNSET/APPRCH, 2

SNSET/RETRCT, 2

SNSET/DEPTH, 0.0000

SNSET/SEARCH, 10

SNSET/CLRSRF, 30.0000

$$ Measurement points are created through nominal points

MEAS/CIRCLE, F(CIR1), 4

  PTMEAS/CART,  72.000, 60.000, 33.000, 0.000, -1.000, 0.000

  PTMEAS/CART,  67.000, 55.000, 33.000, 1.000, 0.000, 0.000

  PTMEAS/CART,  72.000, 50.000, 33.000, 0.000, 1.000, -0.000

  PTMEAS/CART,  77.000, 55.000, 33.000, -1.000, 0.000, 0.000

ENDMES

ELSE

TEXT/OPER, '此孔没有加工!!'

TEXT/OUTFIL, '此孔没有加工!'

ENDIF

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

RationalDMIS圆周均布孔直径大小排列

提示: 对于圆周均布或者不均布孔位置度检测,位置度大小排列操作类似!DMISMN/'Created by [山涧果子] on 星期三, 十一月 08, 2017', 4.0UNITS/MM, ANGDECWKPLAN/XYPLANPRCOMP/ONTECOMP/ONFLY/1.000MODE/AUTO, PROG, MANSNSET/APPRCH, 3.000SNSET/RETRCT, 3.000SNSET/DEPTH, 0.000SNSET/SEARCH, 10.000SNSET/CLRSRF, 50.000RECALL/D(MCS)SNSLCT/S(LENOVO)GEOALG/CIRCLE, LSTSQRGEOALG/ARC, LSTSQRGEOALG/PLANE, LSTSQR$$$$MODE/PROG,MANSNSET/APPRCH, 3.0000SNSET/RETRCT, 3.0000SNSET/DEPTH, 0.0000SNSET/SEARCH, 10.0000SNSET/CLRSRF, 50.0000F(CIR1) = FEAT/CIRCLE,INNER,CART, 24.000, 27.287, 35.000, -0.000, 0.000,$ 1.000, 10.000$$ Measurement points are created through nominal pointsMEAS/CIRCLE, F(CIR1), 4 PTMEAS/CART, 29.000, 27.287, 35.000, -1.000, 0.000, -0.000 PTMEAS/CART, 24.000, 32.287, 35.000, -0.000, -1.000, 0.000 PTMEAS/CART, 19.000, 27.287, 35.000, 1.000, -0.000, 0.000 PTMEAS/CART, 24.000, 22.287, 35.000, 0.000, 1.000, -0.000ENDMESF(CIR2) = FEAT/CIRCLE,INNER,CART, 56.000, 27.287, 35.000, 0.000, 0.000,$ 1.000, 10.000$$ Measurement points are created through nominal pointsMEAS/CIRCLE, F(CIR2), 4 PTMEAS/CART, 61.000, 27.287, 35.000, -1.000, 0.000, 0.000 PTMEAS/CART, 56.000, 32.287, 35.000, 0.000, -1.000, 0.000 PTMEAS/CART, 51.000, 27.287, 35.000, 1.000, 0.000, 0.000 PTMEAS/CART, 56.000, 22.287, 35.000, 0.000, 1.000, 0.000ENDMESF(CIR3) = FEAT/CIRCLE,INNER,CART, 72.000, 55.000, 35.000, 0.000, 0.000,$ 1.000, 10.000$$ Measurement points are created through nominal pointsMEAS/CIRCLE, F(CIR3), 4 PTMEAS/CART, 69.500, 50.670, 35.000, 0.500, 0.866, -0.000 PTMEAS/CART, 76.330, 52.500, 35.000, -0.866, 0.500, -0.000 PTMEAS/CART, 74.500, 59.330, 35.000, -0.500, -0.866, 0.000 PTMEAS/CART, 67.670, 57.500, 35.000, 0.866, -0.500, 0.000ENDMESF(CIR4) = FEAT/CIRCLE,INNER,CART, 56.000, 82.713, 35.000, 0.000, 0.000,$ 1.000, 10.000$$ Measurement points are created through nominal pointsMEAS/CIRCLE, F(CIR4), 4 PTMEAS/CART, 56.000, 77.713, 35.000, 0.000, 1.000, 0.000 PTMEAS/CART, 61.000, 82.713, 35.000, -1.000, 0.000, 0.000 PTMEAS/CART, 56.000, 87.713, 35.000, 0.000, -1.000, 0.000 PTMEAS/CART, 51.000, 82.713, 35.000, 1.000, 0.000, 0.000ENDMESF(CIR5) = FEAT/CIRCLE,INNER,CART, 24.000, 82.713, 35.000, 0.000, 0.000,$ 1.000, 10.000$$ Measurement points are created through nominal pointsMEAS/CIRCLE, F(CIR5), 4 PTMEAS/CART, 26.500, 78.383, 35.000, -0.500, 0.866, 0.000 PTMEAS/CART, 28.330, 85.213, 35.000, -0.866, -0.500, 0.000 PTMEAS/CART, 21.500, 87.043, 35.000, 0.500, -0.866, -0.000 PTMEAS/CART, 19.670, 80.213, 35.000, 0.866, 0.500, -0.000ENDMESF(CIR6) = FEAT/CIRCLE,INNER,CART, 8.000, 55.000, 35.000, 0.000, 0.000,$ 1.000, 10.000$$ Measurement points are created through nominal pointsMEAS/CIRCLE, F(CIR6), 4 PTMEAS/CART, 12.330, 52.500, 35.000, -0.866, 0.500, -0.000 PTMEAS/CART, 10.500, 59.330, 35.000, -0.500, -0.866, 0.000 PTMEAS/CART, 3.670, 57.500, 35.000, 0.866, -0.500, 0.000 PTMEAS/CART, 5.500, 50.670, 35.000, 0.500, 0.866, -0.000ENDMESF(CIR7) = FEAT/CIRCLE,INNER,CART, 40.000, 55.000, 30.000, -0.000, 0.000,$ 1.000, 20.000$$ Measurement points are created through nominal pointsMEAS/CIRCLE, F(CIR7), 4 PTMEAS/CART, 45.000, 46.340, 30.000, -0.500, 0.866, -0.000 GOTO/CART, 44.760, 51.347, 30.000 GOTO/CART, 45.796, 53.447, 30.000 GOTO/CART, 45.949, 55.783, 30.000 PTMEAS/CART, 48.660, 60.000, 30.000, -0.866, -0.500, -0.000 GOTO/CART, 43.653, 59.760, 30.000 GOTO/CART, 41.553, 60.796, 30.000 GOTO/CART, 39.217, 60.949, 30.000 PTMEAS/CART, 35.000, 63.660, 30.000, 0.500, -0.866, 0.000 GOTO/CART, 35.240, 58.653, 30.000 GOTO/CART, 34.204, 56.553, 30.000 GOTO/CART, 34.051, 54.217, 30.000 PTMEAS/CART, 31.340, 50.000, 30.000, 0.866, 0.500, 0.000ENDMESF(CIR8) = FEAT/CIRCLE,OUTER,CART, 40.000, 55.000, 30.000, 0.000, 0.000,$ 1.000, 30.000$$ Measurement points are created through nominal pointsMEAS/CIRCLE, F(CIR8), 4 PTMEAS/CART, 47.500, 42.010, 30.000, 0.500, -0.866, 0.000 GOTO/CART, 55.074, 43.434, 30.000 GOTO/CART, 58.353, 50.082, 30.000 GOTO/CART, 58.837, 57.480, 30.000 PTMEAS/CART, 52.990, 62.500, 30.000, 0.866, 0.500, 0.000 GOTO/CART, 51.566, 70.074, 30.000 GOTO/CART, 44.918, 73.353, 30.000 GOTO/CART, 37.520, 73.837, 30.000 PTMEAS/CART, 32.500, 67.990, 30.000, -0.500, 0.866, 0.000 GOTO/CART, 24.926, 66.566, 30.000 GOTO/CART, 21.647, 59.918, 30.000 GOTO/CART, 21.163, 52.520, 30.000 PTMEAS/CART, 27.010, 47.500, 30.000, -0.866, -0.500, 0.000ENDMESDECL/COMMON,INTGR,IDECL/COMMON,INTGR,JDECL/COMMON,DOUBLE,V1[8]DECL/COMMON,DOUBLE,L1V1[1] = OBTAIN/FA(CIR1),10V1[2] = OBTAIN/FA(CIR2),10V1[3] = OBTAIN/FA(CIR3),10V1[4] = OBTAIN/FA(CIR4),10V1[5] = OBTAIN/FA(CIR5),10V1[6] = OBTAIN/FA(CIR6),10V1[7] = OBTAIN/FA(CIR7),10V1[8] = OBTAIN/FA(CIR8),10$$ 升序排列!DO/I,1,8,1J = ASSIGN/I+1 DO/J,1,8,1IF/(V1[I].GT.V1[J])L1 = ASSIGN/V1[I]V1[I] = ASSIGN/V1[J]V1[J] = ASSIGN/L1ENDIF ENDDOENDDOTEXT/OUTFIL, CONCAT('RationalDMIS圆周均布孔直径大小排列:',STR(V1[1]),',',STR(V1[2]),',',STR(V1[3]),',',STR(V1[4]),',',STR(V1[5]),',',STR(V1[6]),',',STR(V1[6]),',',STR(V1[7]),',',STR(V1[8]))$$ 降序排列!DO/I,1,8,1J = ASSIGN/I+1 DO/J,1,8,1IF/(V1[I].LT.V1[J])L1 = ASSIGN/V1[I]V1[I] = ASSIGN/V1[J]V1[J] = ASSIGN/L1ENDIF ENDDOENDDOTEXT/OUTFIL, CONCAT('RationalDMIS圆周均布孔直径大小排列:',STR(V1[1]),',',STR(V1[2]),',',STR(V1[3]),',',STR(V1[4]),',',STR(V1[5]),',',STR(V1[6]),',',STR(V1[6]),',',STR(V1[7]),',',STR(V1[8]))来源:山涧果子

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