hexagon logo

Measure a rubber band or O-ring

My name is Lars Engstrup and from Denmark.

I have a task where I need to measure a diameter on a thin part made of rubber (like a rubber band or O-ring).

But when the part is made of rubber and deformed (not round) will calculation of the diameter not be possible by using the normal circle calculation program in PC-DMIS. But I need a method to calculate the circumference/length of the surface/contour on the diameter.

The diameter will be measured with optical scan at a Mycrona CMM.

What opportunities are there in PC-DMIS CAD + + (version 4.2) to calculating the circumference / length of the contour of a curve.
Parents
  • Circumference

    Here is some code that I use to measure the circumference of some out of round parts.
    If you can create a scan with a high density of points, then take the points of the scan and calculate the distance between the points ( circumference in this case )


    SCN1       =BASICSCAN/CIRCLE,SHOW HITS=NO,SHOWALLPARAMS=YES
                <0,0,0>,CutVec=0,0,1,IN
                InitVec=-1,0,0,DIAM=D1,ANG=0,ANG=360,DEPTH=0,THICKNESS=0,PROBECOMP=YES,AVOIDANCE MOVE=NO,DISTANCE=0
                FILTER/NULLFILTER,
                EXEC MODE=FEATURE,USEHSSDAT=YES,USEDELAYPNTS=NO
                BOUNDARY/
                HITTYPE/VECTOR
                NOMS MODE=MASTER
                ENDSCAN
    $$ NO,+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                ASSIGN/NUM_SCN_HITS=SCN1.NUMHITS
                ASSIGN/COUNT=1
                ASSIGN/CIRCUM=0
                ASSIGN/COOR=0
                WHILE/COUNT<NUM_SCN_HITS
                ASSIGN/CORDX=(SCN1.HIT[COUNT].X-SCN1.HIT[COUNT+1].X)^2
                ASSIGN/CORDY=(SCN1.HIT[COUNT].Y-SCN1.HIT[COUNT+1].Y)^2
                ASSIGN/COOR=COOR+SQRT(CORDX+CORDY)
                ASSIGN/COUNT=COUNT+1
                END_WHILE/
                IF/COUNT==NUM_SCN_HITS
                ASSIGN/CORDX=(SCN1.HIT[COUNT].X-SCN1.HIT[1].X)^2
                ASSIGN/CORDY=(SCN1.HIT[COUNT].Y-SCN1.HIT[1].Y)^2
                ASSIGN/COOR=COOR+SQRT(CORDX+CORDY)
                ASSIGN/COUNT=COUNT+1
                END_IF/
    $$ NO,+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                ASSIGN/D2=COOR/3.14159265358
                COMMENT/OPER,NO,"DIAMETER is " + D2


    This is not the most accurate way of calculating the diameter, but I use it for now. The denser the scan points that you have, the better the measurement.
    I use a SP25 with a density of 20 and it takes PCDMIS a while to go through the loop after the scan.

    It would be better to have this as VB script, maybe with some of the gurus help it can be turned into a decent subroutine.
    If anyone has suggestions or help, please let me know. This is one of projects I haven't had much time to work on.

    HTH
Reply
  • Circumference

    Here is some code that I use to measure the circumference of some out of round parts.
    If you can create a scan with a high density of points, then take the points of the scan and calculate the distance between the points ( circumference in this case )


    SCN1       =BASICSCAN/CIRCLE,SHOW HITS=NO,SHOWALLPARAMS=YES
                <0,0,0>,CutVec=0,0,1,IN
                InitVec=-1,0,0,DIAM=D1,ANG=0,ANG=360,DEPTH=0,THICKNESS=0,PROBECOMP=YES,AVOIDANCE MOVE=NO,DISTANCE=0
                FILTER/NULLFILTER,
                EXEC MODE=FEATURE,USEHSSDAT=YES,USEDELAYPNTS=NO
                BOUNDARY/
                HITTYPE/VECTOR
                NOMS MODE=MASTER
                ENDSCAN
    $$ NO,+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                ASSIGN/NUM_SCN_HITS=SCN1.NUMHITS
                ASSIGN/COUNT=1
                ASSIGN/CIRCUM=0
                ASSIGN/COOR=0
                WHILE/COUNT<NUM_SCN_HITS
                ASSIGN/CORDX=(SCN1.HIT[COUNT].X-SCN1.HIT[COUNT+1].X)^2
                ASSIGN/CORDY=(SCN1.HIT[COUNT].Y-SCN1.HIT[COUNT+1].Y)^2
                ASSIGN/COOR=COOR+SQRT(CORDX+CORDY)
                ASSIGN/COUNT=COUNT+1
                END_WHILE/
                IF/COUNT==NUM_SCN_HITS
                ASSIGN/CORDX=(SCN1.HIT[COUNT].X-SCN1.HIT[1].X)^2
                ASSIGN/CORDY=(SCN1.HIT[COUNT].Y-SCN1.HIT[1].Y)^2
                ASSIGN/COOR=COOR+SQRT(CORDX+CORDY)
                ASSIGN/COUNT=COUNT+1
                END_IF/
    $$ NO,+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                ASSIGN/D2=COOR/3.14159265358
                COMMENT/OPER,NO,"DIAMETER is " + D2


    This is not the most accurate way of calculating the diameter, but I use it for now. The denser the scan points that you have, the better the measurement.
    I use a SP25 with a density of 20 and it takes PCDMIS a while to go through the loop after the scan.

    It would be better to have this as VB script, maybe with some of the gurus help it can be turned into a decent subroutine.
    If anyone has suggestions or help, please let me know. This is one of projects I haven't had much time to work on.

    HTH
Children
No Data