Cavity problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cavity problem

    Hi.

    I was wondering how you'd go about measuring these 2 distances?
    It wouldn't have been a problem if the meeting circle had been centered but now that it isn't, how can I construct the 2 points needed to find out the distance?
    I've tried a few unsuccessful strategies but I find myself out of ideas...








    cavity.png

  • #2
    If the cylinder along Y is CYL1 and the cylinder along Z is CYL2, then :
    ASSIGN/V1=DOT((CYL1.XYZ-CYL2.XYZ),CROSS(CYL1.IJK,CYL2.IJK))....... gives the distance between both axes
    ASSIGN/V2=ACOS((V1-CYL1.R)/CYL2.R)......gives the angle of the intesect point
    ASSIGN/H25=ABS(CYL2.Y+CYL2.R*SIN(V2))
    ASSIGN/H19=ABS(CYL2.Y-CYL2.R*SIN(V2))
    This assuming that the Y0 is at the bottom of red arrows.

    Comment


    • pernilla
      pernilla commented
      Editing a comment
      This looks awesome, thanks!
      Y0 is not at the bottom of the red arrows because this is from the cavity drawing that the original drawing refers to. So either I'll add Y-3 in the code or I'll temporarily move the alignment to the spotface.
      But another question.. What will this code output? Will I get 2 constructed points that I can evaluate as any other point?
      I've not dealt with variables a lot but I do find it exciting.

    • vpt.se
      vpt.se commented
      Editing a comment
      Variable H25 will contain the value of the 25.78 dimension and variable H19 will contain the value of the 19.61 dimension.

      Create a generic feature and enter H25 as the measured X and H19 as the measured Y.
      Dimension (LOCation) the generic feature for X and Y to have it on the report.

  • #3
    What vpt.se said, this code gives only dimensions.
    If you want to create points, it's a little longer.
    You have to create a local alignment, for example :
    ASSIGN/L1=CROSS(CYL1.IJK,CYL2.IJK)
    IF/DOT(L1,CYL2.XYZ-CYL1.XYZ)<0
    ASSIGN/L1=-L1
    END IF
    F1 =GENERIC/LINE,DEPENDENT,CARTESIAN,$
    NOM/XYZ,<0,0,0>,$
    MEAS/XYZ,<0,0,0>,$
    NOM/IJK,<L1.I,L1.J,L1.K>,$
    MEAS/IJK,<L1.I,L1.J,L1.K>
    LENGTH/10,10
    ALN2 =ALIGNMENT/START,RECALL:ALN1,LIST=YES
    ALIGNMENT/LEVEL,YMINUS,CYL1
    ALIGNMENT/ROTATE,XPLUS,TO,F1,ABOUT,YMINUS
    ALIGNMENT/TRANS,YAXIS,CYL2
    ALIGNMENT/TRANS,XAXIS,CYL1
    ALIGNMENT/TRANS,ZAXIS,CYL1
    ALIGNMENT/END
    ASSIGN/V1=DOT((CYL1.XYZ-CYL2.XYZ),CROSS(CYL1.IJK,CYL2.IJK))
    ASSIGN/V2=ACOS((V1-CYL1.R)/CYL2.R)
    ASSIGN/H_POINT=CYL2.XYZ*MPOINT(1,1,0)+CYL2.R*MPOINT(-SIN(V2),-COS(V2),0)
    ASSIGN/L_POINT=CYL2.XYZ*MPOINT(1,1,0)+CYL2.R*MPOINT(-SIN(V2),COS(V2),0)
    F_HIGH =GENERIC/LINE,DEPENDENT,CARTESIAN,$
    NOM/XYZ,<H_POINT.X,H_POINT.Y,H_POINT.Z>,$
    MEAS/XYZ,<H_POINT.X,H_POINT.Y,H_POINT.Z>,$
    NOM/IJK,<L1.I,L1.J,L1.K>,$
    MEAS/IJK,<L1.I,L1.J,L1.K>
    F_LOW =GENERIC/LINE,DEPENDENT,CARTESIAN,$
    NOM/XYZ,<L_POINT.X,L_POINT.Y,L_POINT.Z>,$
    MEAS/XYZ,<L_POINT.X,L_POINT.Y,L_POINT.Z>,$
    NOM/IJK,<L1.I,L1.J,L1.K>,$
    MEAS/IJK,<L1.I,L1.J,L1.K>

    Comment


    • pernilla
      pernilla commented
      Editing a comment
      Great, thanks! But I think I'll stick to the shorter version for now, it'll be easier to translate into Swedish. And I'll definitely save this, we have a few similar pieces that I'm going to make programs for in the nearest future.

  • #4
    it'll be easier to translate into Swedish
    pernilla : Maybe vpt.se, AndersI or Michael_Swe could help you on this point ...

    Comment


    • #5
      For JEFMAN math stuff, there is no translation...

      Either you know it or you don't. I'm in the "don't"-crowd...
      PC-DMIS CAD++ 2o19 R1 SP10

      Comment

      Related Topics

      Collapse

      Working...
      X