Aller au contenu principal

raygeo.ops.assembly.contour

Functions

contour()

contour(
part: ops.part.Part,
kerf_mm: float = 0,
path_offset_mm: float = 0,
cut_side: str = 'centerline',
overcut: float = 0,
cut_order: str = 'inside_outside',
remove_inner: bool = False,
arc_tolerance: float = 0,
allow_arcs: bool = True,
supports_curves: bool = False,
) -> ops.assembly.result.AssemblyResult

Trace contours from the part geometry.

Extracts the vector geometry from part, computes the total offset from kerf / path-offset / cut-side, applies it with winding-order normalisation and offset fallback, orders inner/outer contours, applies overcut, optionally fits arcs and curves, and returns the result as an AssemblyResult.

Raises: ValueError — If the part has no geometry.

ParameterTypeDescription
partops.part.PartThe part whose geometry defines the contours.
kerf_mmfloat = 0Tool kerf width in mm (default 0.0).
path_offset_mmfloat = 0Additional offset distance in mm (default 0.0).
cut_sidestr = 'centerline'"centerline", "outside", or "inside" (default "centerline").
overcutfloat = 0Distance to extend closed contours past their start point (mm, default 0.0).
cut_orderstr = 'inside_outside'"inside_outside" or "outside_inside" (default "inside_outside").
remove_innerbool = FalseRemove inner (hole) contours (default False).
arc_tolerancefloat = 0Curve fitting tolerance in mm; when > 0 arcs/beziers are fitted (default 0.0).
allow_arcsbool = TrueFit arcs when arc_tolerance > 0 (default True).
supports_curvesbool = FalseKeep Bézier curves when arc_tolerance > 0 (default False).
Returnsops.assembly.result.AssemblyResultAn AssemblyResult with the contour path.