Zum Hauptinhalt springen

raygeo.ops.assembly.thread_mill

ThreadMillSpec​

Parameters for the thread_mill assembler: one internal thread.

center​

center: tuple[float, float]

handedness​

handedness: str

"RH" or "LH".

nominal_diameter​

nominal_diameter: float

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

pitch​

pitch: float

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

safe_z​

safe_z: float

tool_diameter​

tool_diameter: float

Diameter of the thread mill cutter (mm).

z_bottom​

z_bottom: float

Z of the bottom end of the thread.

z_top​

z_top: float

Z of the top end of the thread (milling runs bottom-up).

Functions​

generate_thread_mill()​

generate_thread_mill(
part: ops.part.Part,
center: tuple[float, float],
nominal_diameter: float,
pitch: float,
tool_diameter: float,
z_top: float,
z_bottom: float,
handedness: str = 'RH',
safe_z: float = 5,
state: ops.state.State | None = None,
) -> ops.assembly.AssemblyResult

Generate one internal thread-milling cycle.

The tool plunges at the bore center to z_bottom (the pilot bore is assumed pre-drilled), swings out on a 180° tangential lead-in arc to the orbit radius, climbs the thread as a helical interpolation (one pitch per revolution), and swings back to the center on a lead-out arc. The thread length must be an integer multiple of the pitch. A right-hand thread climbs counter-clockwise, a left-hand thread clockwise.

ParameterTypeDescription
partops.part.Partpart owning the face the cycle is assembled on.
centertuple[float, float](x, y) of the bore.
nominal_diameterfloatnominal (major) thread diameter (mm).
pitchfloatthread pitch (lead) (mm).
tool_diameterfloatthread mill cutter diameter (mm).
z_topfloatZ of the top end of the thread.
z_bottomfloatZ of the bottom end of the thread.
handednessstr = 'RH'"RH" (default) or "LH".
safe_zfloat = 5safe rapid height (default 5).
stateops.state.State | None = Noneoptional machine state (feeds, spindle, coolant).
Returnsops.assembly.AssemblyResultAn AssemblyResult with the cycle's moves.

Thread-milling cycle: tangential lead-in, helical interpolation at one pitch per revolution.

Thread-milling cycle: tangential lead-in, helical interpolation at one pitch per revolution.