Pular para o conteúdo principal

raygeo.ops.assembly.frame

FrameSpec

Parameters for the frame assembler.

Construct with FrameSpec(offset_mm, cut_side). Wrap in an ~raygeo.ops.assembly.Assembler instance to drive the Assembler trait.

cut_side

cut_side: str

"centerline", "outside", or "inside".

offset_mm

offset_mm: float

Total path offset distance in mm.

Functions

frame()

frame(
part: ops.part.Part,
offset_mm: float = 0,
cut_side: str = 'centerline',
) -> ops.assembly.AssemblyResult

Generate a rectangular frame around the part boundary.

Creates a rectangle matching part.size_mm, computes the total offset from offset / cut-side, applies it, and returns the frame as an AssemblyResult.

Raises: ValueError — If the part has no size information.

ParameterTypeDescription
partops.part.PartThe part whose size defines the frame.
offset_mmfloat = 0Total path offset distance in mm (default 0.0).
cut_sidestr = 'centerline'"centerline", "outside", or "inside" (default "centerline").
Returnsops.assembly.AssemblyResultAn AssemblyResult with the frame path.