fromSegments
fun fromSegments(segments: List<Segment2D>, closed: Boolean, polarity: YPolarity = YPolarity.CW_NEGATIVE_Y, distanceTolerance: Double = 0.001): ShapeContour(source)
Creates a new ShapeContour object from a list of Segment2D objects.
Return
A ShapeContour object constructed from the provided segments, adhering to the closure and polarity settings.
Parameters
segments
A list of Segment2D objects representing the segments of the contour.
closed
A boolean indicating whether the contour is closed (true) or open (false).
polarity
The YPolarity of the contour, defaulting to YPolarity.CW_NEGATIVE_Y.
distanceTolerance
The maximum allowable distance between the end of one segment and the start of the next, defaulting to 1E-3.
Throws
If the distance between the end of one segment and the start of the next exceeds the distanceTolerance.