parameters: (vec, ref)
return_statement: return angle
docstring: Takes a vector and a reference axis (refAxis) vector. Calculates the
      relative angle.  The result is returned in degrees (plus or minus)
docstring_summary: Takes a vector and a reference axis (refAxis) vector. Calculates the
      relative angle.  The result is returned in degrees (plus or minus)
docstring_tokens: Takes a vector and a reference axis ( refAxis ) vector . Calculates the relative angle . The result is returned in degrees ( plus or minus )
function: def relAngle(vec, ref):
      """
      Takes a vector and a reference axis (refAxis) vector. Calculates the
      relative angle.  The result is returned in degrees (plus or minus)
      """
  
      PathLog.debug("vec: {}  ref: {}".format(vec, ref))
      norm = vec * 1  # copy vec so we don't alter original
  
      if ref == refAxis.x:
          plane = refAxis.y.value
      elif ref == refAxis.y:
          plane = refAxis.z.value
      else:
          plane = refAxis.x.value
  
      norm.projectToPlane(FreeCAD.Vector(0, 0, 0), plane)
  
      ref = ref.value
      rot = FreeCAD.Rotation(norm, ref)
      ang = math.degrees(rot.Angle)
      angle = ang * plane.dot(rot.Axis)
      PathLog.debug("relative ang: {}".format(angle))
  
      return angle
function_tokens: def relAngle ( vec , ref ) : PathLog . debug ( "vec: {}  ref: {}" . format ( vec , ref ) ) norm = vec * 1 # copy vec so we don't alter original if ref == refAxis . x : plane = refAxis . y . value elif ref == refAxis . y : plane = refAxis . z . value else : plane = refAxis . x . value norm . projectToPlane ( FreeCAD . Vector ( 0 , 0 , 0 ) , plane ) ref = ref . value rot = FreeCAD . Rotation ( norm , ref ) ang = math . degrees ( rot . Angle ) angle = ang * plane . dot ( rot . Axis ) PathLog . debug ( "relative ang: {}" . format ( angle ) ) return angle