hexagon logo

Looping: Feature and Alignment Creation

I have a program that has many repeating features. Some are x20, some are x40, and so forth. I strategically named the features in which I can run the feature names through a variable within a loop to construct features to measure. This is a round ring that has slots along the outside, in which PC-DMIS needs to see the features in the XPLUS direction in order to construct them correctly. With the many different tip angles, points taken, and to eliminate any shanking, a simple paste with pattern / dimension as you go would not work. So I had to create all the points, then construct the features later. Below is an example of how I tackled it:

ASSIGN/CNT_ALN1=0
ALN18 =ALIGNMENT/START,RECALL:A_OFFSETALN,LIST=YES
ALIGNMENT/ROTATE_OFFSET,11.056,ABOUT,ZPLUS
ALIGNMENT/END
DIM29_LOOP =LOOP/START,ID=YES,NUMBER=40,START=1,SKIP=,
OFFSET:XAXIS=0,YAXIS=0,ZAXIS=0,ANGLE=0
ASSIGN/CNT_ALN1=CNT_ALN1+8.5715
ALN16 =ALIGNMENT/START,RECALL:ALN18,LIST=YES
ALIGNMENT/ROTATE_OFFSET,CNT_ALN1,ABOUT,ZPLUS
ALIGNMENT/END
ASSIGN/P1A=STR("PNT1_")+DIM29_LOOP
ASSIGN/P2A=STR("PNT2_")+DIM29_LOOP
ASSIGN/P3A=STR("PNT3_")+DIM29_LOOP
ASSIGN/P4A=STR("PNT4_")+DIM29_LOOP
ASSIGN/SB=STR("SPNTB_")+DIM29_LOOP
WORKPLANE/XPLUS
ANGLE2_LINE1 =FEAT/LINE,CARTESIAN,UNBOUNDED,NO
THEO/<2.651,-0.087,-0.416>,<0,-0.0349047,0.9993906>
ACTL/<2.651,-0.087,-0.416>,<0,-0.0349047,0.9993906>
CONSTR/LINE,BF,2D,P1A,P2A,,
OUTLIER_REMOVAL/OFF,3
FILTER/OFF,WAVELENGTH=0
ANGLE2_LINE2 =FEAT/LINE,CARTESIAN,UNBOUNDED,NO
THEO/<2.648,0.086,-0.432>,<0,0.034896,0.999391>
ACTL/<2.648,0.086,-0.432>,<0,0.034896,0.999391>
CONSTR/LINE,BF,2D,P4A,P3A,,
OUTLIER_REMOVAL/OFF,3
FILTER/OFF,WAVELENGTH=0
PLN2 =FEAT/PLANE,CARTESIAN,TRIANGLE,NO
THEO/<2.64,0,-0.52>,<0,0,1>
ACTL/<2.64,0,-0.52>,<0,0,1>
CONSTR/PLANE,CAST,SB
TSC1 =FEAT/POINT,CARTESIAN,NO
THEO/<2.424,1.074,-0.505>,<0.0151417,-0.031446,0.9993908>
ACTL/<2.651,-0.084,-0.52>,<0,-0.0349047,0.9993906>
CONSTR/POINT,PIERCE,ANGLE2_LINE1,PLN2
TSC2 =FEAT/POINT,CARTESIAN,NO
THEO/<2.648,0.083,-0.52>,<0,-0.034896,-0.999391>
ACTL/<2.648,0.083,-0.52>,<0,0.034896,0.999391>
CONSTR/POINT,PIERCE,ANGLE2_LINE2,PLN2
WORKPLANE/ZPLUS
DIM 29= 2D DISTANCE FROM POINT TSC1 TO POINT TSC2 (CENTER TO CENTER),NO_RADIUS UNITS=IN,$
GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
AX NOMINAL MEAS +TOL -TOL DEV OUTTOL
M 0.167 0.167 0.005 0.005 0.000 0.000 ----#---
WORKPLANE/XPLUS
DIM 34_1= 2D ANGLE TO LINE ANGLE2_LINE1 FROM ZAXIS ,$
GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=NONE
AX NOMINAL MEAS +TOL -TOL DEV OUTTOL
A 2.000 2.000 0.500 0.500 0.000 0.000 ----#---
DIM 34_2= 2D ANGLE FROM LINE ANGLE2_LINE2 TO ZAXIS ,$
GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=NONE
AX NOMINAL MEAS +TOL -TOL DEV OUTTOL
A 2.000 2.000 0.500 0.500 0.000 0.000 ---#----
DIM 41= LOCATION OF POINT SPNTB_1 UNITS=IN ,$
GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH HALF ANGLE=NO
AX NOMINAL MEAS +TOL -TOL DEV OUTTOL
Z 0.505 0.505 0.021 0.008 0.000 0.000 --#-----
END OF DIMENSION 41
COMMENT/REPT,
.
ASSIGN/CNT_ALN1=CNT_ALN1
LOOP/END