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

raygeo.ops.assembly.tap

TapSpec​

Parameters for the tap assembler: one rigid-tapping cycle.

center​

center: tuple[float, float]

dwell_ms​

dwell_ms: float

Dwell at the bottom before the spindle reversal (ms).

handedness​

handedness: str

"RH" or "LH".

nominal_diameter​

nominal_diameter: float

Nominal (major) diameter of the thread (mm).

peck​

peck: Optional[float]

Peck increment (mm); None taps in a single pass.

pitch​

pitch: float

Thread pitch (lead): axial travel per spindle revolution (mm).

rapid_z​

rapid_z: float

Rapid plane just above the surface.

safe_z​

safe_z: float

target_z​

target_z: float

Depth of the thread.

z_surface​

z_surface: float

Surface Z the hole starts at.

Functions​

generate_tap()​

generate_tap(
part: ops.part.Part,
center: tuple[float, float],
nominal_diameter: float,
pitch: float,
target_z: float,
z_surface: float = 0,
rapid_z: float = 1,
safe_z: float = 5,
handedness: str = 'RH',
peck: float | None = None,
dwell_ms: float = 0,
state: ops.state.State | None = None,
) -> ops.assembly.AssemblyResult

Generate one rigid-tapping cycle.

The tap rapids to the pilot bore (assumed pre-drilled to the tap drill diameter) and descends with the spindle synchronized to the Z feed — the moves travel pitch mm per spindle revolution, i.e. at pitch * rpm mm/min, so state must set spindle_rpm. At the bottom the spindle reverses and the synchronized retract unscrews the tap. A right-hand thread taps clockwise (G84), a left-hand thread counter-clockwise (G74).

ParameterTypeDescription
partops.part.Partpart owning the face the cycle is assembled on.
centertuple[float, float](x, y) of the pilot bore.
nominal_diameterfloatnominal (major) thread diameter (mm).
pitchfloatthread pitch (lead) (mm).
target_zfloatdepth of the thread.
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).
handednessstr = 'RH'"RH" (default) or "LH".
peckfloat | None = Noneoptional peck increment; full synchronized retract to rapid_z between pecks (default None).
dwell_msfloat = 0dwell at the bottom before the reversal (default 0).
stateops.state.State | None = Noneoptional machine state; spindle_rpm is required for the synchronization.
Returnsops.assembly.AssemblyResultAn AssemblyResult with the cycle's moves.

Plain rigid cycle: synchronized profile and thread cross-section; reversal at the bottom.

Plain rigid cycle: synchronized profile and thread cross-section; reversal at the bottom.

Pecked cycle: full synchronized retracts between pecks clear the flutes.

Pecked cycle: full synchronized retracts between pecks clear the flutes.