original_docstring: Finds the closest point to another point on a line segment.
  
      Points are represented as (x, y, z) triples.
  
      Args:
          pt1: First point defining the line segment.
          pt2: Second point defining the line segment.
          pt: Point used to find closest point on the segment.
          tol: Tolerance. If omitted, uses global tolerance according to get_tol_2d().
  
      Returns:
          A tuple of (value, point).
          value is the parametric value along the line segment that is the location of point.
          point is an (x, y, z) tuple describing the closest point on the line segment to the parameter pt.
      
docstring: Finds the closest point to another point on a line segment.
  Points are represented as (x, y, z) triples.
docstring_tokens: Finds the closest point to another point on a line segment . Points are represented as ( x y z ) triples .
code: def find_closest_pt_on_segment_2d(pt1, pt2, pt, tol=None):
      """Finds the closest point to another point on a line segment.
  
      Points are represented as (x, y, z) triples.
  
      Args:
          pt1: First point defining the line segment.
          pt2: Second point defining the line segment.
          pt: Point used to find closest point on the segment.
          tol: Tolerance. If omitted, uses global tolerance according to get_tol_2d().
  
      Returns:
          A tuple of (value, point).
          value is the parametric value along the line segment that is the location of point.
          point is an (x, y, z) tuple describing the closest point on the line segment to the parameter pt.
      """
      if tol is None:
          tol = get_tol_2d()
      return geometry.gmFindClosestPtOnSegment(pt1, pt2, pt, tol)
code_tokens: def find_closest_pt_on_segment_2d ( pt1 , pt2 , pt , tol = None ) : if tol is None : tol = get_tol_2d ( ) return geometry . gmFindClosestPtOnSegment ( pt1 , pt2 , pt , tol )
short_docstring: Finds the closest point to another point on a line segment.
short_docstring_tokens: Finds the closest point to another point on a line segment .
comment: """Finds the closest point to another point on a line segment.
  
      Points are represented as (x, y, z) triples.
  
      Args:
          pt1: First point defining the line segment.
          pt2: Second point defining the line segment.
          pt: Point used to find closest point on the segment.
          tol: Tolerance. If omitted, uses global tolerance according to get_tol_2d().
  
      Returns:
          A tuple of (value, point).
          value is the parametric value along the line segment that is the location of point.
          point is an (x, y, z) tuple describing the closest point on the line segment to the parameter pt.
      """