hexagon logo

Some thoughts about vectors

PC-DMIS uses vectors in all features, and in some assignments.

1/ The extention for a vector is .IJK ; .I gives the first component, .J the second and .K the third.

2/ The length of a vector is 1 (1 mm in mm, 1 " in inches). It means that the sum of the squares of the components is 1.

3/ When you use "ANGLEBETWEEN", angle is calculated in degrees between 2 vectors.
Ex : ASSIGN/V1=ANGLEBETWEEN(PL1.IJK,LN1.IJK)
If PL1 and LN1 vectors are <0,0,1>,Anglebetween gives 0° (angle between vectors, not features !), but angle between the plane and the line is 90° !!!

4/ You can create vectors from hits.
Ex : ASSIGN/V1=PT2.XYZ-PT1.XYZ ; It gives the components of the vector PT1PT2 ; Its length is the 3D distance between PT1 and PT2 (ASSIGN/V2=DIST3D({PT1},{PT2}) or ASSIGn/V2=SQRT(DOT(PT2.XYZ-PT1.XYZ,PT2.XYZ-PT1.XYZ)), or ASSIGN/V2=SQRT(DOT(V1,V1))

5/ If you want a classical vector (length =1) along a line between PT1 and PT2, you don't need to create the line, you can use ASSIGN/V3=UNIT(PT2.XYZ-PT1.XYZ) or ASSIGN/V3=UNIT(V1).

6/ Alignment vectors ares calculated in the current alignment, with their name (ASSIGN/V4=AL1.ZAXIS in AL1 gives <0,0,1>, in AL2, it gives the rotation of Z axis between Al2 and Al1)

7/ Cross function (in PC-DMIS, not in the real life !!!) gives a unit vector, perp to the first and the second. ASSIGN/V5=CROSS(LN1.IJK,LN2.IJK) gives a vector perp to both lines. If you need to calculate the distance between 2 cylinders (non coplanar), then you can ASSIGN/V6=DOT(CYL1.XYZ-CYL2.XYZ,CROSS(CYL1.IJK,CYL2.IJK)), which gives directly the good result without any local alignment.

8/ Another way to create a vector, you can use MPOINT function : ASSIGN/V1=MPOINT(10,20,30) construct a point with coordinates <10,20,30> or a vector with the same components. Just to remember that coordinates of a point have the same values than components of a vector from origin to the point, so MPOINT can give a vector !!!

That's all for a monday morning, it's coffee time ! Slight smile
Parents
  • I don't think so... I hope some of guys here can do the same, or better, especially at Hexagon !!!!!! Slight smile


    Smiley Smiley Smiley

    Haha - very funny!


    I know if the UK at least the degree level CMM programmer is a rare thing indeed! Most come up through inspection or from apprenticeships.


    Although no longer at Hexagon I'll admit much of this is above me (CROSS and DOT etc), and blowing my own trumpet, I was probably one of the brighter ones there!


    To be honest I think I manage fine without it (but that doesn't mean I won't look into it, it might help me out on occasion).

    There are many ways to skin a cat - I'd guess you come from a more maths background - I'm more from a programming background.
Reply
  • I don't think so... I hope some of guys here can do the same, or better, especially at Hexagon !!!!!! Slight smile


    Smiley Smiley Smiley

    Haha - very funny!


    I know if the UK at least the degree level CMM programmer is a rare thing indeed! Most come up through inspection or from apprenticeships.


    Although no longer at Hexagon I'll admit much of this is above me (CROSS and DOT etc), and blowing my own trumpet, I was probably one of the brighter ones there!


    To be honest I think I manage fine without it (but that doesn't mean I won't look into it, it might help me out on occasion).

    There are many ways to skin a cat - I'd guess you come from a more maths background - I'm more from a programming background.
Children
No Data