fibomat.curve_tools.intersections module¶
Provide the self_intersections() and curve_intersections() function.
- fibomat.curve_tools.intersections.self_intersections(curve: fibomat.shapes.arc_spline.ArcSpline) Dict[str, List[Dict[str, Any]]][source]¶
Self intersections of curve.
- Args:
curve (ArcSpline): curve
- Returns:
- Dict[str, List[Dict[str, Any]]]:
dict with key ‘intersections’. ‘intersections’ contains list where each element is a dict with keys ‘seg_1’, ‘seg_2’, and ‘pos’ where the former two elements contain the indices of the segments where the intersection occurs and the latter the position of the intersection.
- fibomat.curve_tools.intersections.curve_intersections(curve_1: fibomat.shapes.arc_spline.ArcSpline, curve_2: fibomat.shapes.arc_spline.ArcSpline) Dict[str, List[Dict[str, Any]]][source]¶
Intersections between curves.
- Args:
curve_1 (ArcSpline): first curve curve_2 (ArcSpline): second curve
Todo
what is seg_1, seg_2 in coincidences?
- Returns:
- Dict[str, List[Dict[str, Any]]]:
dict with key ‘intersections’ and ‘coincidences’. ‘intersections’ contains list where each element is a dict with keys ‘seg_1’, ‘seg_2’, and ‘pos’ where the former two elements contain the indices of the segments where the intersection occurs and the latter the position of the intersection. ‘coincidences’ contains a list where each element is a dict with keys ‘seg_1’, ‘seg_2’, ‘start_pos’ and ‘end_pos’. ‘start_pos’ and ‘end_pos’ indicate the range where the two curves lie on each other.