hexagon logo

Vector Calculation

Hello everyone,
I need to calculate the resultant vector as shown in image attached
Is there a way to do this kind of calculation in PC-DMIS?
  • The resultant of a set of vectors is basically the sum of the vectors (ie : <0,1,0> +<,1,0,0> gives <1,1,0>.
    The problem with "Figure 11 : Vector math illustration" is that you don't explain what is known (datas) and what you're looking for...
    So if you have some vectors, you just have to add them in an assignment.
    If you have unit vectors, just use ".ijk", if it's a set of bipoints, then construct vectors as PT2.XYZ-PT1.XYZ (remember that the direction of the vector is done by end point minus start point)
    If you want to calculate the resultant from devoations of features, then calculate them from difference between actual and theo.

    ASSIGN/V1=LN1.IJK
    ASSIGN/V2=PL1.IJK
    ASSIGN/RESULTANT=V1+V2

    ASSIGN/V1=PT2.XYZ-PT1.XYZ
    ASSIGN/V2=PT4.XYZ-PT3.XYZ
    ASSIGN/RESULTANT=V1+V2

    ASSIGN/V1=CE1.XYZ-CE1.TXYZ
    ASSIGN/V2=CE2.XYZ-CE2.TXYZ
    ASSIGN/RESULTANT=V1+V2

    Hope this helps
  • The resultant of a set of vectors is basically the sum of the vectors (ie : <0,1,0> +<,1,0,0> gives <1,1,0>.
    The problem with "Figure 11 : Vector math illustration" is that you don't explain what is known (datas) and what you're looking for...
    So if you have some vectors, you just have to add them in an assignment.
    If you have unit vectors, just use ".ijk", if it's a set of bipoints, then construct vectors as PT2.XYZ-PT1.XYZ (remember that the direction of the vector is done by end point minus start point)
    If you want to calculate the resultant from devoations of features, then calculate them from difference between actual and theo.

    ASSIGN/V1=LN1.IJK
    ASSIGN/V2=PL1.IJK
    ASSIGN/RESULTANT=V1+V2

    ASSIGN/V1=PT2.XYZ-PT1.XYZ
    ASSIGN/V2=PT4.XYZ-PT3.XYZ
    ASSIGN/RESULTANT=V1+V2

    ASSIGN/V1=CE1.XYZ-CE1.TXYZ
    ASSIGN/V2=CE2.XYZ-CE2.TXYZ
    ASSIGN/RESULTANT=V1+V2

    Hope this helps


    *In Robot Voice* Beep Boop Beep. Computation is Complete


  • *In Robot Voice* Beep Boop Beep. Computation is Complete


    shazbot nanunanu
  • I checked with shared method bus was not able to obtain
    0.0004<137-0.0016<62=0.00155<227
    "<" = Angle
  • I was in talk with my manager regarding how it can be checked
    and he suggested to go old school and do something like i have attached
    1. consider the vectors as V1, V2 and Vr
    2. change the vector to be substracted as shown in 2nd diagram i.e V2+(-V1)=Vr
    3. by joining tip of V1 & starting point of V2 we'll get Vr (sry i mentioned opposite in pdf)
    4. use tribometry or other laws of triangle to find the unknown details of Vr

    now the issue here is; vectors will vary from part to part and i need to create a program or excel to solve this Neutral face
  • I finally decided to do it on design software
    a snap of result is attached

    Attached Files
  • Thanks for sharing this scheme, it helped me understanding what are datas Slight smile !
    I wrote this code line by line to be more explicit...

    ASSIGN/P0=0.0004
    ASSIGN/P1=137
    ASSIGN/P2=0.0016
    ASSIGN/P3=62
    ASSIGN/PROJ_X1=P0*COS(DEG2RAD(90-P1)
    ASSIGN/PROJ_X2=P2*COS(DEG2RAD(90-P3)
    ASSIGN/PROJ_Y1=P0*SIN(DEG2RAD(90-P1)
    ASSIGN/PROJ_Y2=P2*SIN(DEG2RAD(90-P3)
    ASSIGN/PROJ_X2M=-P2*COS(DEG2RAD(90-P3)
    ASSIGN/PROJ_Y2M=-P2*SIN(DEG2RAD(90-P3)
    ASSIGN/PROJ_X=PROJ_X1+PROJ_X2M
    ASSIGN/PROJ_Y=PROJ_Y1+PROJ_Y2M
    ASSIGN/LENGTH_R=SQRT(PROJ_X^2+PROJ_Y^2)
    ASSIGN/ANGLE_R=RAD2DEG(ATAN(PROJ_X/PROJ_Y)+180
    
    or directly
    ASSIGN/LENGTH_R=SQRT((P0*COS(DEG2RAD(90-P1)-P2*COS(DEG2RAD(90-P3))^2+(P0*SIN(DEG2RAD(90-P1)-P2*SIN(DEG2RAD(90-P3))^2)
    ASSIGN/ANGLE_R=RAD2DEG(ATAN((P0*COS(DEG2RAD(90-P1)-P2*COS(DEG2RAD(90-P3))/(P0*SIN(DEG2RAD(90-P1)-P2*SIN(DEG2RAD(90-P3)))+180


  • Thanks for sharing this scheme, it helped me understanding what are datas Slight smile !
    I wrote this code line by line to be more explicit...

    ASSIGN/P0=0.0004
    ASSIGN/P1=137
    ASSIGN/P2=0.0016
    ASSIGN/P3=62
    ASSIGN/PROJ_X1=P0*COS(DEG2RAD(90-P1)
    ASSIGN/PROJ_X2=P2*COS(DEG2RAD(90-P3)
    ASSIGN/PROJ_Y1=P0*SIN(DEG2RAD(90-P1)
    ASSIGN/PROJ_Y2=P2*SIN(DEG2RAD(90-P3)
    ASSIGN/PROJ_X2M=-P2*COS(DEG2RAD(90-P3)
    ASSIGN/PROJ_Y2M=-P2*SIN(DEG2RAD(90-P3)
    ASSIGN/PROJ_X=PROJ_X1+PROJ_X2M
    ASSIGN/PROJ_Y=PROJ_Y1+PROJ_Y2M
    ASSIGN/LENGTH_R=SQRT(PROJ_X^2+PROJ_Y^2)
    ASSIGN/ANGLE_R=RAD2DEG(ATAN(PROJ_X/PROJ_Y)+180
    
    or directly
    ASSIGN/LENGTH_R=SQRT((P0*COS(DEG2RAD(90-P1)-P2*COS(DEG2RAD(90-P3))^2+(P0*SIN(DEG2RAD(90-P1)-P2*SIN(DEG2RAD(90-P3))^2)
    ASSIGN/ANGLE_R=RAD2DEG(ATAN((P0*COS(DEG2RAD(90-P1)-P2*COS(DEG2RAD(90-P3))/(P0*SIN(DEG2RAD(90-P1)-P2*SIN(DEG2RAD(90-P3)))+180


    {"data-align":"none","data-size":"large","data-attachmentid":514241}


    how the actual f*ck does your brain do this ? i am always in awe of the stuff you come up with
  • I might need to do some meditation before to understand this; I'll look into it tomorrow after refueling.. Slight smile