def addSparseEndpoints(doubleExtrusionWidth, endpoints, fillLine, horizontalSegmentLists, infillSolidity, removedEndpoints, solidSurfaceThickness, surroundingXIntersections):
 horizontalEndpoints = horizontalSegmentLists[fillLine]
 for segment in horizontalEndpoints:
  addSparseEndpointsFromSegment(doubleExtrusionWidth, endpoints, fillLine, horizontalSegmentLists, infillSolidity, removedEndpoints, segment, solidSurfaceThickness, surroundingXIntersections)

def addSparseEndpoints ( doubleExtrusionWidth , endpoints , fillLine , horizontalSegmentLists , infillSolidity , removedEndpoints , solidSurfaceThickness , surroundingXIntersections ) : horizontalEndpoints = horizontalSegmentLists [ fillLine ] for segment in horizontalEndpoints : addSparseEndpointsFromSegment ( doubleExtrusionWidth , endpoints , fillLine , horizontalSegmentLists , infillSolidity , removedEndpoints , segment , solidSurfaceThickness , surroundingXIntersections )
add sparse endpoints .