hexagon logo

Compensated points on a constructed cone

A little piece of code, for Christmas !
I had a cone, constructed from 2 circles hits, in a feature set.
I had to estimate the "real" points, so I used the "magic PC-DMIS tool box" !!!!!

Create a BFRE cone from 2 circles hits.

ASSIGN/V1=CO1.HIT[1..CO1.NUMHITS].XYZ........................coordinates of each hit of each circle (no compensated !)
ASSIGN/V2=CO1.A/2............................................half angle of the cone
ASSIGN/V3=UNIT(CO1.HIT[1..CO1.NUMHITS].XYZ*MPOINT(1,1,0))....compensation vector on circle measured in Z plane
ASSIGN/V4=PROBEDATA("DIAM")/2................................stylus radius
ASSIGN/V5=V1-(V4*V3).........................................center ball of each hit (inner circle, else use a "+") {=rawhit if it would work !}
ASSIGN/V6=UNIT(MPOINT(V3.I,V3.J,TAN(DEG2RAD(V2))))...........compensation vector on the cone
ASSIGN/V7=V5+(V4*V6).........................................array of compensated hits on the cone.


Look at the min and max of V7 to find the form...

I wrote it from my poor memory, I'm fortunately not at the cmm !!!!!

Merry Christmas to all Slight smile