bfieldtools.contour.simplify_contour¶
-
bfieldtools.contour.
simplify_contour
(c, min_edge=0.001, angle_threshold=0.02, smooth=True)¶ Simplifies contours by merging small (short) segments and with only a small angle difference.
Optionally applies smoothing to contour shape.
- Parameters
- c: list
List of polygons describing closed loops.
- min_edge: float
Minimum edge length. Edges shorter than this are merged.
- angle_threshold: float
Minimum angle. Edges with smaller angle differences are merged.
- smooth: bool
If True, apply smoothing to the polygon shapes.
- Returns
- c: list
Modified list of polygons