Variable for working out angle created by 2 circles

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

  • Variable for working out angle created by 2 circles

    I'm looking for a way to work out the taper on an outer cone feature by using 2 gauge circles created on the cone at given heights.

    These are the XY diameters of the circles are below, I can trig out the angle and it should be 4 degrees, just need a way to do it with a variable. TIA

    Code:
    DIM INFO_CIR1= LOCATION OF CIRCLE CIRCLE1 UNITS=MM ,$
    GRAPH=OFF TEXT=OFF MULT=1.00 OUTPUT=BOTH HALF ANGLE=NO
    AX MEAS
    X 2.101 ----#----
    Y -60.163 ----#----
    D 14.203 ----#----
    END OF DIMENSION INFO_CIR1
    DIM INFO_CIR2= LOCATION OF CIRCLE CIRCLE2 UNITS=MM ,$
    GRAPH=OFF TEXT=OFF MULT=1.00 OUTPUT=BOTH HALF ANGLE=NO
    AX MEAS
    X 0.705 ----#----
    Y -20.188 ----#----
    D 19.797 ----#----
    END OF DIMENSION INFO_CIR2
    3.7mr3CAD++ / 2011mr1CAD++/2012mr1CAD++/QUINDOS7

  • #2
    Since you already know how to trig it out, are you just asking how to extract the values? If you hit the F2 button, you can create variables and figure out how to extract values fairly easily. Is there a reason why there isn't at least 1 number for both circles that are not the same. Are the 2 circles not concentric? If the cone is at an angle, I would level to a constructed cone prior to the extraction to make the trig easier. This would be how you extract the heights assuming the cone axis is along the Z axis...
    Assign/VHeight=DIM INFO_CIR2.Z.Meas - DIM INFO_CIR1.Z.Meas
    Could you instead construct a cone from the 2 circles and dimension the Angle of it in the location dimension?

    Comment


    • #3
      How are the two circles made are they measured or constructed from points. I f measured then you will have cosine error and if from points why not create the cone from them to get the angle.

      Comment


      • #4
        You just have to calculate the dot product between two vectors (assuming you're in Z=0)
        ASSIGN/V1=UNIT(CIR1.XYZ-CIR2.XYZ)
        ASSIGN/V2=UNIT((CIR1.XYZ+MPOINT(CIR1.R,0,0))-(CIR2.XYZ+MPOINT(CIR2.R,0,0)))
        ASSIGN/V3=DOT(V1,V2)
        ASSIGN/V4=RAD2DEG(ACOS(V3)).........................becau se DOT=length V1 * length V2 * cos (angle between V1 and V2) here, length V1=length V2 = 1 because of UNIT function.

        Excel gives 4.007278627°.

        Warning : V2 is a vector which doesn't represent a vector between two points of the cone (because x values are different), but a vector is parallel to itself everywhere, so offseting the center of each circle of its own radius create the right vector, but wrong points .
        It's late, on sunday evening, I'm really not sure to be clear enough... sorry !
        Last edited by JEFMAN; 02-16-2020, 02:55 PM.

        Comment

        Related Topics

        Collapse

        Working...
        X