pub fn make_polygon(
model: &mut Model,
points: &[Point],
closed: bool,
tol: Tolerances,
) -> OgeomResult<Built>Expand description
Build a wire of straight segments through a sequence of points.
closed adds a final segment back to the first point, and does it by
naming the first vertex again rather than making a coincident second one,
which is what keeps the wire closed under is_wire_closed rather than
merely looking closed.
§Errors
OgeomError::Construction if there are fewer
than two points, fewer than three for a closed polygon, if consecutive
points coincide within tolerance (a zero-length edge is not an edge), or if
a closed polygon’s ends do not meet.