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
  • Do the one blade that you have good data for then copy and paste with pattern.

    Mike
  • 1) I do not like your variable names. It has been said NOT to start with a number, start with a letter, and you are using things the software recognizes (X, Y, J, PA) which seems to me like you are begging pcdmis to evaluate some Polar Radius in there. I use the letters, sure, but my variables are combinations of letters that would never be mistaken by PCDmis. The second half, is just me, do what you want, but don't start with a number.

    2) are you trying to do this in a loop? If not, the variables are a waste of your time.

    2.5) Is there a reason you don't key the points in on one vein and copy then Paste With Pattern? A reason other than you don't know what that is.

    2.5.5) If you just don't know how, put the points on one vein. Set the center of the pattern as 0,0 and workplane looking down on the patter. Right click copy the stuff. On the edit menu, select Pattern and set the rotation with the number of times. Then on the Edit menu, select Paste With Pattern.

    4) if you are looping, you need your I, J and K to be variables, which you only did on A_1T, B_1T and on is just numbers.

    4.5) If you are asking how to convert the I, J and K to variables, I'm going to question what you did above, where you have an I, J and K all non-zero, meaning you are moving in three axes, but you are only using X and Y in your PR and PA calculations. If it is a 3 axis move, you need to evaluating on all three axes.
  • If your using assignments then I don't think pasting with pattern would work because its going to keep those nominal locked. You could copy the code, go into edit pattern, tell it to copy one time at 0 degrees, paste with pattern, then stick an alignment rotating 40° and tell it "NO". That should move everything over to the next blade and retain your nominals. If you don't use the assignments and just key in the nominals you could pattern it all the way around and it would work just fine but your noms at all the other blades would be whacky looking.
  • You could write the matrix of rotation with assignments, then use them in a loop :
    Something like :
     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/ *9
    ASSIGN/V1=COS(DEG2RAD(ANGLE1))
    ASSIGN/V2=SIN(DEG2RAD(ANGLE1))
    [COLOR=#FF0000]ASSIGN/MTX1=MPOINT(V1,-V2,0)
    ASSIGN/MTX2=MPOINT(V2,V1,0)[/COLOR]
    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)
    ASSIGN/K2=DOT(V1,MTX3)  
     A_1        =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN            
    THEO/<X2,Y2,Z2>,<I2,J2,K2>            
    ACTL/<0.04263,-1.14652,1.35958>,<0.7967637,0.288486,0.5309835>            
    TARG/<X2,Y2,Z2>,<I2,J2,K2>
    ASSIGN/ANGLE1=ANGLE1+40
    Loop/end


    ​​​​​​​I'm not at the cmm to check, it should work...
  • I think my head just exploded.

    Good work JEFMAN. It will take a little effort to understand exactly what the code is doing.
  • Thank you all who have weighed in so far. I am currently working offline and the model I am using is the original. The part has had about 10 revs and engineering deemed it was easier to have charts for inspection points (orangeish points in pic) and update these than changing the model. There about 60 points on the green surface and 40 on the brown, about 100 points per blade which makes about 900 total. The greenish pt A_1 is X, Y, Z from the chart, and its not on the surface anymore, so I'm not sure if the vectors are actually right (so good data is an issue at this point).

    Currently this is proto code, as such the naming is temporary, I believe this is the first time hearing not to start names with numbers. My goal it to make sure all the points on the the blades correspond to each other before expanding it. The point in using the variables the way I am is so that because I'm not sure what the proper vectors are or in the future when/if engineering changes the noms on the chart again, all it will take is a few keystrokes to change the variable and 9 points will be updated at a time.

    I wish I could Loop, but the powers that be don't like it because it creates "virtual data and features". They want if they need to, to be able to open a program and to scroll thru the edit window to the features in question. So that means in this case they want to be able to see all 900 points for all the blades. But since they sign my checks which allow me to have a roof over my head, food on my plate, and alcohol in my glass to deal with decisions like that, I'm going with it . . . for now. Hopefully in the future I can convince them otherwise.

    And that's why it sucks that I wont be able to use 's code for the final program. But I did try it, the yellow points in the pic where created by it. The issue I am having with it is that the I, J, K vectors are 0, 0, 1 so the probe is not approaching nominally to the surface.

    How do I get the image to a viewable size?

    Attached Files

  • And that's why it sucks that I wont be able to use 's code for the final program. But I did try it, the yellow points in the pic where created by it. The issue I am having with it is that the I, J, K vectors are 0, 0, 1 so the probe is not approaching nominally to the surface.


    If I1, J1 and K1 are different of zero, you shouldn't obtain (0,0,1) as vector.
    I tested it offline and it works fine.
    Maybe there's a mistake in an assignment... I can understand it, there are far too many Disappointed !!!!!
    Can you post the code which doesn't work?
  • 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)
                  ASSIGN/K2=DOT(V1,MTX2)
                  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
    
  • In my opinion, an Impeller is a part with a very complex geometry you should demand the latest 3D model to generate the correct vectors.
    If you keep the origin in the center you just need to program one blade and do copy & paste w/pattern 9 times.