The Spline Groove
For unusual groove types, one may define the shape directly as a linear spline curve by giving a sequence of \((y, z)\) points. To classify the groove for the need of some model approaches, one must also provide a tuple of type classifiers (see Profile Classifiers).
- class SplineGroove(contour_points: Iterable[Tuple[float, float]] | ndarray, classifiers: Iterable[str], usable_width: float | None = None)
Represents a groove defined by a linear spline contour.
- Parameters:
contour_points – an iterable of contour points to be used for the spline
classifiers – an iterable of string keys used as type classifiers
usable_width – the usable width to assume for this instance, if None, the maximum width will be used
- classmethod from_dxf_drawing(filepath: str, classifiers: Iterable[str], usable_width: float | None = None, arc_discretization: int = 1000) SplineGroove
Creates a spline groove with a given contour line as defined inside the .dxf drawing.
- Parameters:
filepath – the filepath to the drawing
classifiers – an iterable of string keys used as type classifiers
usable_width – the usable width to assume for this instance, if None, the maximum width will be used
arc_discretization – discretization of arcs of the dxf drawing, default is 1000.
- local_depth(z) float | ndarray
Function of the local groove depth in dependence on the z-coordinate.
- property classifiers: Tuple[str, ...]
A tuple of keywords to specify the type classifiers of this groove.
- property contour_line: LineString
A line representing the geometry of the groove contour.
- property contour_points
An array of the contour line’s points of shape (n, 2).
- property cross_section: Polygon
A polygon representing the cross-section of this groove limited by the contour line and y=0.
- property depth: float
The maximum depth of the groove.
- property usable_width: float
The usable width of the groove, meaning the width of ideal filling.
- property width: float
The maximum width of the groove representing the definition region in z-direction.