raygeo.cnc.tool

Side profiles of the three common cutting-tool categories, built as ToolModel parameter bags. CNC tool model.
Provides ToolModel (a parametric geometry parameter bag), the ToolCategory enum (type-safe tool classification for compatibility checks), the ToolMaterial enum, and the Tool composite. All types are implemented in Rust and consumed by the CNC layer's signatures.
Tool
A physical cutting tool.
Combines a parametric ToolModel (measurements), a ToolCategory (type-safe classification), a ToolMaterial, and setup parameters:
tool = Tool(
label="6mm EM",
category=ToolCategory.END_MILL,
model=ToolModel(diameter=6.0, ...),
material=ToolMaterial.CARBIDE,
stickout=15.0,
)
category
category: ToolCategory
coating
coating: Optional[str]
label
label: str
material
material: ToolMaterial
model
model: ToolModel
The tool's parametric geometry model.
stickout
stickout: float
default_stickout()
default_stickout() -> float
Default stickout = cutting edge height + 3 mm safety.
| Parameter | Type | Description |
|---|---|---|
| Returns | float |
diameter()
diameter() -> float
Cutting diameter (mm).
| Parameter | Type | Description |
|---|---|---|
| Returns | float |
ToolCategory
Type-safe classification of a tool, for operation-compatibility checks (e.g. chamfering requires
Chamfer/Vbit, slotting rejects Probe).
Values:
BALL_NOSEBULL_NOSECHAMFERDOVETAILDRILLEND_MILLPROBEREAMERSLITTING_SAWTAPTHREAD_MILLVBIT
ToolMaterial
Tool substrate material.
Values:
CARBIDECBNCERAMICDIAMONDHSSHSSE
ToolModel
Parametric model describing a tool's geometry.
A single, hierarchy-free class: a bag of named parameters. Construct with keyword arguments for each parameter:
model = ToolModel(
diameter=6.0,
shank_diameter=6.0,
cutting_edge_height=15.0,
flute_count=3.0,
overall_length=50.0,
)
The type-safe tool classification (end-mill vs. probe vs. ...) lives on Tool as the
ToolCategory enum; a ToolModel only carries measurements. New geometries are created by
constructing a ToolModel with new parameters -- no raygeo change required.
corner_radius()
corner_radius() -> float
Corner radius (mm); 0.0 if unspecified.
| Parameter | Type | Description |
|---|---|---|
| Returns | float |
cutting_edge_height()
cutting_edge_height() -> float
Cutting-edge height (mm); 0.0 if unspecified.
| Parameter | Type | Description |
|---|---|---|
| Returns | float |
diameter()
diameter() -> float
Cutting diameter (mm); 0.0 if unspecified.
| Parameter | Type | Description |
|---|---|---|
| Returns | float |
get_parameter()
get_parameter(name: str) -> Optional[float]
Read a named parameter, or None if absent.
| Parameter | Type | Description |
|---|---|---|
name | str | |
| Returns | Optional[float] |
get_parameters()
get_parameters() -> dict[str, float]
All parameters as a {name: value} dict.
| Parameter | Type | Description |
|---|---|---|
| Returns | dict[str, float] |