parameters: (edge, use_orientation = False)
docstring: Return a vector from an edge or a Part.LineSegment.
  
      If use_orientation is True, it takes into account the edges orientation.
      If edge is not straight, you'll get strange results!
docstring_summary: Return a vector from an edge or a Part.LineSegment.
docstring_tokens: Return a vector from an edge or a Part . LineSegment .
function: def vec(edge, use_orientation = False):
      """Return a vector from an edge or a Part.LineSegment.
  
      If use_orientation is True, it takes into account the edges orientation.
      If edge is not straight, you'll get strange results!
      """
      if isinstance(edge, Part.Shape):
          if use_orientation and isinstance(edge, Part.Edge) and edge.Orientation == "Reversed":
              return edge.Vertexes[0].Point.sub(edge.Vertexes[-1].Point)
          else:
              return edge.Vertexes[-1].Point.sub(edge.Vertexes[0].Point)
      elif isinstance(edge, Part.LineSegment):
          return edge.EndPoint.sub(edge.StartPoint)
      else:
          return None
function_tokens: def vec ( edge , use_orientation = False ) : if isinstance ( edge , Part . Shape ) : if use_orientation and isinstance ( edge , Part . Edge ) and edge . Orientation == "Reversed" : return edge . Vertexes [ 0 ] . Point . sub ( edge . Vertexes [ - 1 ] . Point ) else : return edge . Vertexes [ - 1 ] . Point . sub ( edge . Vertexes [ 0 ] . Point ) elif isinstance ( edge , Part . LineSegment ) : return edge . EndPoint . sub ( edge . StartPoint ) else : return None