hexagon logo

Polar Points, Vectors and Variables

Hey gurus,

I must measure impeller blades (9) and have been given a chart of X, Y, Z locations for points. The chart is only for the points on one blade. In my code below I have an example of how I am maintaining the nominals and expanding the points to the other blades.

What I am having a problem with is having the I, J, K vectors adjust along the same lines as X, Y, Z. Can anyone help me figure this out?
Or let me know of another way?
MOVE/CLEARPLANE
$$ NO,
            POINT #1
            ASSIGN/1X=0.04263
            ASSIGN/1Y=-1.14652
            ASSIGN/1Z=1.35958
            ASSIGN/1I=0.7967637
            ASSIGN/1J=0.288486
            ASSIGN/1K=0.5309835
            ASSIGN/1PR=SQRT(((1X)^(2))+((1Y)^(2)))
            ASSIGN/1PA=RAD2DEG(ATAN((1Y)/(1X)))
            ASSIGN/1XT=(1PR)*(COS(DEG2RAD(1PA)))
            ASSIGN/1YT=(1PR)*(SIN(DEG2RAD(1PA)))
A_1        =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
            THEO/<1X,1Y,1Z>,<1I,1J,1K>
            ACTL/<0.04263,-1.14652,1.35958>,<0.7967637,0.288486,0.5309835>
            TARG/<1X,1Y,1Z>,<1I,1J,1K>
            SNAP=NO
            SHOW FEATURE PARAMETERS=YES
              SURFACE=THEO_THICKNESS,0
              MEASURE MODE=NOMINALS
              RMEAS=NONE,NONE,NONE
              AUTO WRIST=NO
              GRAPHICAL ANALYSIS=NO
              FEATURE LOCATOR=NO,NO,""
            SHOW CONTACT PARAMETERS=YES
              AVOIDANCE MOVE=NO,DISTANCE=0.3
            SHOW HITS=NO
A_1T       =FEAT/CONTACT/VECTOR POINT/DEFAULT,POLAR
            THEO/<1PR,1PA,1Z>,<1I,1J,1K>
            ACTL/<1.147312,272.129395,1.35958>,<0.7967637,0.288486,0.5309835>
            TARG/<1PR,1PA,1Z>,<1I,1J,1K>
            SNAP=NO
            SHOW FEATURE PARAMETERS=YES
              SURFACE=THEO_THICKNESS,0
              MEASURE MODE=NOMINALS
              RMEAS=NONE,NONE,NONE
              AUTO WRIST=NO
              GRAPHICAL ANALYSIS=NO
              FEATURE LOCATOR=NO,NO,""
            SHOW CONTACT PARAMETERS=YES
              AVOIDANCE MOVE=NO,DISTANCE=0.3
            SHOW HITS=NO
B_1T       =FEAT/CONTACT/VECTOR POINT/DEFAULT,POLAR
            THEO/<1PR,1PA+40,1Z>,<0.404144,0.7478488,0.5266781>
            ACTL/<1.147312,312.129395,1.35958>,<0.404144,0.7478488,0.5266781>
            TARG/<1PR,1PA+40,1Z>,<0.404144,0.7478488,0.5266781>
            SNAP=NO
            SHOW FEATURE PARAMETERS=YES
              SURFACE=THEO_THICKNESS,0
              MEASURE MODE=NOMINALS
              RMEAS=NONE,NONE,NONE
              AUTO WRIST=NO
              GRAPHICAL ANALYSIS=NO
              FEATURE LOCATOR=NO,NO,""
            SHOW CONTACT PARAMETERS=YES
              AVOIDANCE MOVE=NO,DISTANCE=0.3
            SHOW HITS=NO
C_1T       =FEAT/CONTACT/VECTOR POINT/DEFAULT,POLAR
            THEO/<1PR,1PA+80,1Z>,<-0.1597835,0.8232927,0.5446635>
            ACTL/<1.147312,352.129395,1.35958>,<-0.1597835,0.8232927,0.5446635>
            TARG/<1PR,1PA+80,1Z>,<-0.1597835,0.8232927,0.5446635>
            SNAP=NO
            SHOW FEATURE PARAMETERS=YES
              SURFACE=THEO_THICKNESS,0
              MEASURE MODE=NOMINALS
              RMEAS=NONE,NONE,NONE
              AUTO WRIST=NO
              GRAPHICAL ANALYSIS=NO
              FEATURE LOCATOR=NO,NO,""
            SHOW CONTACT PARAMETERS=YES
              AVOIDANCE MOVE=NO,DISTANCE=0.3
            SHOW HITS=NO
            MOVE/CLEARPLANE
D_1T       =FEAT/CONTACT/VECTOR POINT/DEFAULT,POLAR
            THEO/<1PR,1PA+120,1Z>,<-0.6607532,0.5295647,0.531946>
            ACTL/<1.144872,33.80409,1.390884>,<-0.6607532,0.5295647,0.531946>
            TARG/<1PR,1PA+120,1Z>,<-0.6607532,0.5295647,0.531946>
            SNAP=NO
            SHOW FEATURE PARAMETERS=YES
              SURFACE=THEO_THICKNESS,0
              MEASURE MODE=NOMINALS
              RMEAS=NONE,NONE,NONE
              AUTO WRIST=NO
              GRAPHICAL ANALYSIS=NO
              FEATURE LOCATOR=NO,NO,""
            SHOW CONTACT PARAMETERS=YES
              AVOIDANCE MOVE=NO,DISTANCE=0.3
            SHOW HITS=NO
E_1T       =FEAT/CONTACT/VECTOR POINT/DEFAULT,POLAR
            THEO/<1PR,1PA+160,1Z>,<-0.8423587,-0.0057732,0.5388863>
            ACTL/<1.147312,72.129395,1.35958>,<-0.8423587,-0.0057732,0.5388863>
            TARG/<1PR,1PA+160,1Z>,<-0.8423587,-0.0057732,0.5388863>
            SNAP=NO
            SHOW FEATURE PARAMETERS=YES
              SURFACE=THEO_THICKNESS,0
              MEASURE MODE=NOMINALS
              RMEAS=NONE,NONE,NONE
              AUTO WRIST=NO
              GRAPHICAL ANALYSIS=NO
              FEATURE LOCATOR=NO,NO,""
            SHOW CONTACT PARAMETERS=YES
              AVOIDANCE MOVE=NO,DISTANCE=0.3
            SHOW HITS=NO
F_1T       =FEAT/CONTACT/VECTOR POINT/DEFAULT,POLAR
            THEO/<1PR,1PA+200,1Z>,<-0.6463571,-0.550632,0.52823>
            ACTL/<1.147312,112.129395,1.35958>,<-0.6463571,-0.550632,0.52823>
            TARG/<1PR,1PA+200,1Z>,<-0.6463571,-0.550632,0.52823>
            SNAP=NO
            SHOW FEATURE PARAMETERS=YES
              SURFACE=THEO_THICKNESS,0
              MEASURE MODE=NOMINALS
              RMEAS=NONE,NONE,NONE
              AUTO WRIST=NO
              GRAPHICAL ANALYSIS=NO
              FEATURE LOCATOR=NO,NO,""
            SHOW CONTACT PARAMETERS=YES
              AVOIDANCE MOVE=NO,DISTANCE=0.3
            SHOW HITS=NO
G_1T       =FEAT/CONTACT/VECTOR POINT/DEFAULT,POLAR
            THEO/<1PR,1PA+240,1Z>,<-0.8805625,0.4729703,0.0301458>
            ACTL/<1.147312,152.129395,1.35958>,<-0.8805625,0.4729703,0.0301458>
            TARG/<1PR,1PA+240,1Z>,<-0.8805625,0.4729703,0.0301458>
            SNAP=NO
            SHOW FEATURE PARAMETERS=YES
              SURFACE=THEO_THICKNESS,0
              MEASURE MODE=NOMINALS
              RMEAS=NONE,NONE,NONE
              AUTO WRIST=NO
              GRAPHICAL ANALYSIS=NO
              FEATURE LOCATOR=NO,NO,""
            SHOW CONTACT PARAMETERS=YES
              AVOIDANCE MOVE=NO,DISTANCE=0.3
            SHOW HITS=NO
  • I have been at this company for about 6 months now. The first week here I was told that Engineering's policy on 3D models is that they are all Reference Only. I started laughing because I thought they where joking. They weren't, and only a specific few are kept up to date and nominal. They believe the point charts are all that's needed and they don't need to waste Engineering resources to update the model.
  • I feel sorry for you. That is a very poor attitude your employer has.
  • Well yeah The CAD models are Reference only. You need it to Reference the parts, and when your done writing the program take the Model out of the program, because it becomes pretty much useless after that anyway, actually your engineers are correct, but it shouldn't stop them from giving you the CAD. They use the CAD model which is the perfect part, so they can try to make the perfect part(can come close but there is no such thing) you take the CAD model and check parts based on the perfect part(which doesn't exist) Your CMM never actually sees the CAD model. It just does what you tell it to do. Lets say you have a hole at an angle and you choose auto circle, DMIS is smart enough to take the correct vector hits BASED ON THE PERFECT MODEL. Making programing a little easier.
  • This is the code in the program. I created a separate program with just the alignment and this code.

    MOVE/CLEARPLANE
    A_1 =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
    THEO/<0.04263,-1.14652,1.35958>,<0.7967637,0.288486,0.5309835>
    ACTL/<0.04263,-1.14652,1.35958>,<0.7967637,0.288486,0.5309835>
    TARG/<0.04263,-1.14652,1.35958>,<0.7967637,0.288486,0.5309835>
    SNAP=NO
    SHOW FEATURE PARAMETERS=NO
    SHOW CONTACT PARAMETERS=NO
    MOVE/CLEARPLANE
    ASSIGN/X1=0.04263
    ASSIGN/Y1=-1.14652
    ASSIGN/Z1=1.35958
    ASSIGN/I1=0.7967637
    ASSIGN/J1=0.288486
    ASSIGN/K1=0.5309835
    ASSIGN/P1=MPOINT(X1,Y1,Z1)
    ASSIGN/V1=MPOINT(I1,J1,K1)
    ASSIGN/ANGLE1=0
    =LOOP/START,ID=YES,NUMBER=9,START=1,SKIP=,
    OFFSET:XAXIS=0,YAXIS=0,ZAXIS=0,ANGLE=0
    ASSIGN/V1=COS(DEG2RAD(ANGLE1))
    ASSIGN/V2=SIN(DEG2RAD(ANGLE1))
    ASSIGN/MTX1=MPOINT(V1,-V2,0)
    ASSIGN/MTX2=MPOINT(V2,V1,0)
    ASSIGN/MTX3=MPOINT(0,0,1)
    ASSIGN/X2=DOT(P1,MTX1)
    ASSIGN/Y2=DOT(P1,MTX2)
    ASSIGN/Z2=DOT(P1,MTX3)
    ASSIGN/I2=DOT(V1,MTX1)
    ASSIGN/J2=DOT(V1,MTX2)
    [COLOR=#FF0000]ASSIGN/K2=DOT(V1,MTX3)[/COLOR]
    MOVE/CLEARPLANE
    A_1T =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
    THEO/<X2,Y2,Z2>,<I2,J2,K2>
    ACTL/<-0.743338,-0.905687,1.398606>,<1,0,0>
    TARG/<X2,Y2,Z2>,<I2,J2,K2>
    SNAP=NO
    SHOW FEATURE PARAMETERS=NO
    SHOW CONTACT PARAMETERS=NO
    ASSIGN/ANGLE1=ANGLE1+40
    LOOP/END
    


    You can try with it (MTX3 instead of MTX2)...
  • I think my head just exploded.

    Good work JEFMAN. It will take a little effort to understand exactly what the code is doing.


    Thanks, DPH51 !
    Here a trying of explanation...
    Hope this helps !
  • One of these days gonna fly to France, just to pick your brain Jeffery
  • Are you sure that I got one ?
    If I think a little, a loop does the same !!!!!
    But you would welcome in France Slight smile
  • I cant believe i couldn't see that typo, something hot came in at the end of the day yesterday and needs to be done before I leave today so I wont be able to mess with this till Monday. Thank you all for helping me with this.
  • This is the most ridiculous thing I've read all day. I am sorry you have to work under these conditions.
  • The next step could be to read in a text file X1 Y Z1,I1 j1 k1 in a loop do/until EOF, inside a loop 1 to 9 !
    It should give a very nice program, with a little lines !
    Happy week-end, all, it's friday Slight smile !