Expand description
Offset / buffer geometry operations.
Provides algorithms for:
- Polygon offset via Minkowski sum approach (inward/outward)
- Curve offset (equidistant curves for polylines)
- Fillet (rounding interior corners)
- Chamfer (beveling corners)
- Rounded rectangles generation
- Minkowski sum / difference for convex 2-D shapes
- Morphological operations (erosion, dilation, opening, closing)
- Tubular neighborhoods (thickening of curves/surfaces)
Structs§
- Point2
- A 2-D point / vector.
Functions§
- chamfer_
polygon - Apply a chamfer (bevel) at each vertex of a polygon.
- ensure_
ccw - Ensure polygon is in CCW order.
- fillet_
polygon - Apply a fillet (arc rounding) at each vertex of a polygon.
- is_
convex - Check if a polygon is convex.
- minkowski_
difference_ convex - Minkowski difference of two convex polygons.
- minkowski_
sum_ convex - Minkowski sum of two convex polygons (both assumed CCW).
- morphological_
closing - Morphological closing: dilation followed by erosion.
- morphological_
dilation - Dilate a polygon by
radius(outward offset). - morphological_
erosion - Erode a polygon by
radius(inward offset). - morphological_
opening - Morphological opening: erosion followed by dilation.
- point_
in_ polygon - Point-in-polygon test (ray casting).
- point_
in_ tubular - Check if a point is within distance
dof a polyline. - point_
to_ segment_ distance - Compute the distance from a point to a line segment.
- polygon_
area - Absolute area.
- polygon_
centroid - Centroid of a simple polygon.
- polygon_
offset - Offset a simple polygon by
distance. - polygon_
offset_ 3d - Offset a 3-D polygon (planar) by
distancealong edge normals. - polygon_
offset_ round - Polygon offset with arc joins at convex corners.
- polygon_
perimeter - Perimeter of a polygon.
- polyline_
offset - Offset an open polyline by
distance. - rounded_
rectangle - Generate a rounded rectangle polygon.
- signed_
area - Signed area of a simple polygon (positive = CCW).
- tubular_
neighborhood - Generate a tubular neighborhood (thickened polyline).