मुख्य सामग्री पर जाएँ

raygeo.ops.assembly.drill

CountersinkSpec​

Parameters for the countersink assembler: one conical plunge at one hole.

center​

center: tuple[float, float]

dwell_ms​

dwell_ms: float

rapid_z​

rapid_z: float

safe_z​

safe_z: float

target_diameter​

target_diameter: float

Chamfer diameter produced at the surface (mm).

tip_angle​

tip_angle: float

Included angle of the countersink cone in degrees.

z_surface​

z_surface: float

DrillSpec​

Parameters for the drill assembler: one cycle at one hole.

center​

center: tuple[float, float]

diameter​

diameter: float

Drill (and hole) diameter (mm).

dwell_ms​

dwell_ms: float

Dwell at the bottom of every plunge (ms).

peck​

peck: Optional[PeckParams]

rapid_z​

rapid_z: float

Rapid plane just above the surface.

safe_z​

safe_z: float

Safe rapid height.

spot​

spot: bool

Marks the cycle as a spot drill.

target_z​

target_z: float

Full-diameter depth of the hole (mm).

tip_angle​

tip_angle: float

Drill point angle in degrees (tip compensation).

tip_compensate​

tip_compensate: bool

When true (default), target_z is the full-diameter depth and the tip descends deeper by the tip compensation. When false, target_z is the depth the tip reaches.

z_surface​

z_surface: float

Surface Z the hole starts at.

PeckParams​

Peck cycle parameters.

increment​

increment: float

Axial depth per peck, measured from the surface (mm).

mode​

mode: str

"FULL_RETRACT" (clear the flutes from the hole, G83) or "CHIP_BREAK" (small retract, G73).

retract_amount​

retract_amount: float

Chip-break retract distance above the current depth (mm); only used with "CHIP_BREAK".

Functions​

generate_countersink()​

generate_countersink(
part: ops.part.Part,
center: tuple[float, float],
tip_angle: float,
target_diameter: float,
z_surface: float = 0,
rapid_z: float = 1,
safe_z: float = 5,
dwell_ms: float = 0,
state: ops.state.State | None = None,
) -> ops.assembly.AssemblyResult

Generate one countersink cycle as explicit moves.

Plunges a conical countersink tool to the depth that produces target_diameter at the surface with the given cone angle. The cycle is wrapped in a DRILL_CYCLE section.

ParameterTypeDescription
partops.part.Partpart owning the face the cycle is assembled on.
centertuple[float, float](x, y) of the hole.
tip_anglefloatincluded angle of the countersink cone in degrees (e.g. 90).
target_diameterfloatchamfer diameter at the surface (mm).
z_surfacefloat = 0surface Z (default 0).
rapid_zfloat = 1rapid plane above the surface (default 1).
safe_zfloat = 5safe rapid height (default 5).
dwell_msfloat = 0dwell at the bottom (ms).
stateops.state.State | None = Noneoptional machine state (feeds, spindle, coolant).
Returnsops.assembly.AssemblyResultAn AssemblyResult with the cycle's moves.

Countersink cross-section: the cone meets the surface exactly at the target diameter.

Countersink cross-section: the cone meets the surface exactly at the target diameter.

generate_drill()​

generate_drill(
part: ops.part.Part,
center: tuple[float, float],
diameter: float,
target_z: float,
tip_angle: float = 118,
z_surface: float = 0,
rapid_z: float = 1,
safe_z: float = 5,
peck: ops.assembly.drill.PeckParams | None = None,
dwell_ms: float = 0,
spot: bool = False,
state: ops.state.State | None = None,
) -> ops.assembly.AssemblyResult

Generate one drilling cycle as explicit moves.

Rapids to the safe plane and the rapid plane, plunges at the plunge feed (with dwell), retracts per the peck mode, and retracts to the safe plane. target_z is the full-diameter depth; the tip descends deeper by the tip compensation (diameter / 2) / tan(tip_angle / 2). The whole cycle is wrapped in a DRILL_CYCLE section so encoders can substitute a canned cycle.

ParameterTypeDescription
partops.part.Partpart owning the face the cycle is assembled on.
centertuple[float, float](x, y) of the hole.
diameterfloatdrill (and hole) diameter (mm).
target_zfloatfull-diameter depth (mm).
tip_anglefloat = 118drill point angle in degrees (default 118).
z_surfacefloat = 0surface Z the hole starts at (default 0).
rapid_zfloat = 1rapid plane above the surface (default 1).
safe_zfloat = 5safe rapid height (default 5).
peckops.assembly.drill.PeckParams | None = Nonepeck parameters; None drills in a single plunge.
dwell_msfloat = 0dwell at the bottom of every plunge (ms).
spotbool = Falsemarks the cycle as a spot drill.
stateops.state.State | None = Noneoptional machine state (feeds, spindle, coolant).
Returnsops.assembly.AssemblyResultAn AssemblyResult with the cycle's moves.

Peck cycle: emitted plunge/retract profile (left) and cross-section with tool ghosts (right).

Peck cycle: emitted plunge/retract profile (left) and cross-section with tool ghosts (right).

Chip-break cycle: profile and cross-section; the tool never leaves the hole between pecks.

Chip-break cycle: profile and cross-section; the tool never leaves the hole between pecks.