hexagon logo

Extracting Values from 2D Contour

I'm looking to extract the maximum Z value and maximum ZX value from a scanned 2D curve. Attached is a screengrab of the curve. In this case, it would basically be the end-to-end points of the top line in the X direction. I've tried using FLEX2D, but get an error message 'Value too small (possibly two equal points) !' What's the best way to go about this ?

Attached Files
  • Lee,

    an alternative method.... use SLCPTS to pull points from the different sections and make specific geometries of them... for example pull the points circled orange into separate ELE's and build axes of them. Pull the points in the region circled blue and build a circle. Then intersect the two axes to get the point. Intersect the top axis and the circle to get the other point.

    below code ... the two intersection points are red.

    There is always more than one way to do something with Quindos..



    {"data-align":"none","data-size":"full","title":"image.png","data-attachmentid":524605}


    {"data-align":"none","data-size":"full","title":"image.png","data-attachmentid":524606}





    SLCPTS (SRC=T1_SCAN_RCOR, TRU=Top_Axis, STY=APT, DEL=Y, TYP=CSY, MIX=-13.8*INCH, MXX=-13.68*INCH, MIZ=2.06*INCH, DSC=X)
    BLDAXI (NAM=Top_Axis, CSY=Main_Datum, MOD=(NOM,NOE), ITY=GSS, PTY=ZX, CTY=NO)
    SLCPTS (SRC=T1_SCAN_RCOR, TRU=Side_Axis, STY=APT, DEL=Y, TYP=CSY, MIX=-13.81*INCH, MXX=-13.79*INCH, MIZ=2.03*INCH, MXZ=2.068*INCH, DSC=X)
    BLDAXI (NAM=Side_Axis, CSY=Main_Datum, MOD=(NOM,NOE), ITY=GSS, PTY=ZX, CTY=NO)
    SLCPTS (SRC=T1_SCAN_RCOR, TRU=Circle, STY=APT, DEL=Y, TYP=CSY, MIX=-13.68*INCH, MIZ=2.0*INCH, MXZ=2.06*INCH, DSC=X)
    BLDCIR (NAM=Circle, CSY=Main_Datum, MOD=(NOM,NOE), ITY=GSS, PTY=ZX, CTY=NO)

    INTPNT (NAM=PT1, CSY=Main_Datum, EL1=Top_Axis, EL2=Side_Axis, PPI=EX, PPL=Main_Datum.$ZX, MOD=NOE)
    INTPNT (NAM=(junk,PT2), CSY=Main_Datum, EL1=Circle, EL2=Top_Axis, PPI=EX, PPL=Main_Datum.$ZX, MOD=NOE)

    USEPLOFRM HP_A4Q
    DRWPLY (NAM=T1_SCAN_RCOR, ASC=Y, PEN=1, A_O=XZ, MRK=1, SFA=15)
    SETPSC (XAX=1.93, DRW=XY, PEN=1)
    DRWPLY (NAM=Top_Axis, PEN=7, A_O=XZ, MRK=1)
    DRWPLY (NAM=Side_Axis, PEN=7, A_O=XZ, MRK=1)
    DRWPLY (NAM=Circle, PEN=5, A_O=XZ, MRK=1)
    GETVALS (OBJ=Circle, TYP=ELE, RDS=(X,Z,A), REA=(X,Z,A))
    DRWCIR (XC =X/INCH, YC =Z/INCH, RAD=A/2/INCH, PEN=5)
    GETVALS (OBJ=PT1, TYP=ELE, RDS=(X,Z,A), REA=(X,Z,A))
    DRWPNT (X =X/INCH, Y =Z/INCH, MRK=1, PEN=3)
    GETVALS (OBJ=PT2, TYP=ELE, RDS=(X,Z,A), REA=(X,Z,A))
    DRWPNT (X =X/INCH, Y =Z/INCH, MRK=1, PEN=3)
    ​​​


    Steve,

    This is the way I would normally determine these distances. But Quindos has such a vast array of powerful scanning and programming tools, I want to utilize all of those I can before doing it the traditional way.


  • Alright - I'm back...

    I ran this code, and get a distance of .0447 between the ZMax and ZXMax along the X axis. Measured with a caliper, the distance should be around .130. Hmmm...


    What it looks like the loop is doing is removing the out of sequence points in front of the tooth instead of the rear, which is what I'm looking for.