def addLineXSegmentIntersection(lineLoopsIntersections, segmentFirstX, segmentSecondX, vector3First, vector3Second, y):
 xIntersection = euclidean.getXIntersectionIfExists(vector3First, vector3Second, y)
 if (xIntersection == None):
  return
 if (xIntersection < min(segmentFirstX, segmentSecondX)):
  return
 if (xIntersection <= max(segmentFirstX, segmentSecondX)):
  lineLoopsIntersections.append(xIntersection)

def addLineXSegmentIntersection ( lineLoopsIntersections , segmentFirstX , segmentSecondX , vector3First , vector3Second , y ) : xIntersection = euclidean . getXIntersectionIfExists ( vector3First , vector3Second , y ) if ( xIntersection == None ) : return if ( xIntersection < min ( segmentFirstX , segmentSecondX ) ) : return if ( xIntersection <= max ( segmentFirstX , segmentSecondX ) ) : lineLoopsIntersections . append ( xIntersection )
add intersections of the line with the x segment .