hexagon logo

[2023.2 SP3] Looping breaks evaluations using child ITEMS[]?

Program uses cylinders measured as concentric circles.
Roundness evaluation is done on the circles in the cylinders (child items).
This works fine when running one execution, but doesn't work when looping several iterations, instead they all share the exact same result:

The total runout is two separate planes so no issues there, but the circles from the two cylinders (CYLVÄ75 & CYLHÖ75) share the same roundness result per circle in the cylinder.

Opening the program after a looped run and no values:

Example of a single run (no looping):

Any ideas how to make the ITEMS[] work when looping? Are the ITEMS[] clashing with the loop counter [x]?

  • What does the command .item do? I have never seen it and I can't find it in the help center. In the loops I have seen in the past it goes like

    CIRCLE0[1], CIRCLE1[1], CIRCLE2[1], CIRCLE3[1] or something if it's from the first loop.

    Does item make it so you don't need that?

  • The ITEM refers to the child items in that feature. For a cylinder that has been measured using concentric circles, the ITEM[Circle0] refers to Circle0 which was measured to construct the cylinder. In the examples above, I measure a cylinder using a total of four concentric circles (ITEM[Circle0] to ITEM[Circle3]). These ITEMS is what the cylinder consist of.

  • With "ITEMS[]" you can access the elements of a cylinder when it is scanned with concentric circles.

    These child circles are always called circle0 to circleN

  • " Are the ITEMS[] clashing with the loop counter [x]? "

    Yes, that's exactly why it doesn't work that way.

    You have to access the main element with the loop index and then call the items

      DIM LOC1= LOCATION OF  CYL_22[LOOPINDEX].ITEM[CIRCLE0]  UNITS=MM ,$
      GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH  HALF ANGLE=NO
      AX    NOMINAL       MEAS       +TOL       -TOL        DEV     OUTTOL
      X      140.500    140.500      0.020     -0.020      0.000      0.000
      Y        0.000      0.000      0.010     -0.010      0.000      0.000
      Z        0.000      0.000      0.010     -0.010      0.000      0.000
      D      122.000    122.000      0.010     -0.010      0.000      0.000
      END OF DIMENSION LOC1

    (At least it worked for me in a test)

  • Have you added a print command at the end of the loop, but within the loop with a DELETE_INSTANCES? I have had to do that with Geo Tol....

  • Will try this, at run number one the program was ~10 MB, after 30 runs, the program was at 540 MB (!)... Maybe this will help it keep the weight Slight smile

  • I'd be curious if this works for you. I have had instances where if I do not do this, PC-DMIS wants to use the first part's datum setup rather than the loop count's part datums. It's been an odd ride...print commands seem to do the trick for me, especially with FCFs. 

  • No, it didn't help. It still presents the same result over all child items.

    Ping  

  • As it says in the help file, we do not fully support looping geometric tolerance commands.  I suspect you are trying to use the built-in LOOP, END/LOOP method which, as you are finding, has limitations.  I was able to get it to work using a DO/UNTIL block - see below...

    CODE...

                DO/
                  ASSIGN/V1=V1+1
    CYL1         =FEAT/CONTACT/CYLINDER/ADAPTIVE_CYLINDER_CONCENTRIC_CIRCLE_SCAN,CARTESIAN,IN,LEAST_SQR
                  THEO/<20.5*COS(DEG2RAD(90*V1)),20.5*SIN(DEG2RAD(90*V1)),0>,<0,0,1>,8.2,10
                  ACTL/<20.5,0,0>,<0,0,1>,8.2,10
                  TARG/<20.5*COS(DEG2RAD(90*V1)),20.5*SIN(DEG2RAD(90*V1)),0>,<0,0,1>
                  START ANG=0,END ANG=360
                  ANGLE VEC=<1,0,0>
                  DIRECTION=CCW
                  SHOW FEATURE PARAMETERS=NO
                  SHOW CONTACT PARAMETERS=YES
                    NUMHITS=220,NUMLEVELS=5,DEPTH=2,END OFFSET=2,PITCH=0
                    SAMPLE METHOD=SAMPLE_HITS
                    SAMPLE HITS=0,SPACER=0
                    AVOIDANCE MOVE=BOTH,DISTANCE BEFORE=10,DISTANCE AFTER=10,DIRECTION=ALONG FEATURE VECTOR
                    FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
                  SHOW HITS=NO
    CIR0         =FEAT/CIRCLE,CARTESIAN,IN,LEAST_SQR,YES
                  THEO/<20.5*COS(DEG2RAD(90*V1)),20.5*SIN(DEG2RAD(90*V1)),-2>,<0,0,1>,8.2
                  ACTL/<20.5,0,-2>,<0,0,1>,8.2
                  CONSTR/CIRCLE,BFRE,2D,CYL1.ITEM[CIRCLE0].HIT[..],,
                  OUTLIER_REMOVAL/OFF,3
                  FILTER/OFF,UPR=0
    CIR1         =FEAT/CIRCLE,CARTESIAN,IN,LEAST_SQR,YES
                  THEO/<20.5*COS(DEG2RAD(90*V1)),20.5*SIN(DEG2RAD(90*V1)),-3.5>,<0,0,1>,8.2
                  ACTL/<20.5,0,-3.5>,<0,0,1>,8.2
                  CONSTR/CIRCLE,BFRE,2D,CYL1.ITEM[CIRCLE1].HIT[..],,
                  OUTLIER_REMOVAL/OFF,3
                  FILTER/OFF,UPR=0
    CIR2         =FEAT/CIRCLE,CARTESIAN,IN,LEAST_SQR,YES
                  THEO/<20.5*COS(DEG2RAD(90*V1)),20.5*SIN(DEG2RAD(90*V1)),-5>,<0,0,1>,8.2
                  ACTL/<20.5,0,-5>,<0,0,1>,8.2
                  CONSTR/CIRCLE,BFRE,2D,CYL1.ITEM[CIRCLE2].HIT[..],,
                  OUTLIER_REMOVAL/OFF,3
                  FILTER/OFF,UPR=0
    CIR3         =FEAT/CIRCLE,CARTESIAN,IN,LEAST_SQR,YES
                  THEO/<20.5*COS(DEG2RAD(90*V1)),20.5*SIN(DEG2RAD(90*V1)),-6.5>,<0,0,1>,8.2
                  ACTL/<20.5,0,-6.5>,<0,0,1>,8.2
                  CONSTR/CIRCLE,BFRE,2D,CYL1.ITEM[CIRCLE3].HIT[..],,
                  OUTLIER_REMOVAL/OFF,3
                  FILTER/OFF,UPR=0
    CIR4         =FEAT/CIRCLE,CARTESIAN,IN,LEAST_SQR,YES
                  THEO/<20.5*COS(DEG2RAD(90*V1)),20.5*SIN(DEG2RAD(90*V1)),-8>,<0,0,1>,8.2
                  ACTL/<20.5,0,-8>,<0,0,1>,8.2
                  CONSTR/CIRCLE,BFRE,2D,CYL1.ITEM[CIRCLE4].HIT[..],,
                  OUTLIER_REMOVAL/OFF,3
                  FILTER/OFF,UPR=0
    FCFCIRTY1    =GEOMETRIC_TOLERANCE/STANDARD=ISO 1101,SHOWEXPANDED=YES,
                  DESCRIPTION=ON,,
                  FEATURE_MATH=DEFAULT,
                  UNITS=MM,OUTPUT=BOTH,ARROWDENSITY=100,
                  SEGMENT_1,CIRCULARITY,0.01,TOL_ZONE_MATH=DEFAULT,
                  TEXT=OFF,CADGRAPH=OFF,REPORTGRAPH=OFF,MULT=10,
                    MEASURED:
                      CIR0[V1]:0.000,
                      CIR1[V1]:0.000,
                      CIR2[V1]:0.000,
                      CIR3[V1]:0.000,
                      CIR4[V1]:0.000,
                  FEATURES/CIR0[V1],CIR1[V1],CIR2[V1],CIR3[V1],CIR4[V1],,
                UNTIL/V1==4

  • Thanks  

    The program keeps crashing after a while, perhaps this could be a reason for the crashing? The crash reporter creates a 2GB report file, on a program with a small CAD and PRG is 15 MB...

    I have updated to 2023.2 SP4 now to see if that changes anything. If not, I'll try with DO/UNTIL.