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

raygeo.cnc.plan.clearing

CNC clearing plan builder.

Produces a ~raygeo.cnc.plan.Plan organised as a BFS traversal of the pocket's region/passage graph.

ClearingWorkplanOptions​

The tool and machining parameters plan_clearing plans from.

The pocket boundary and islands are read from the Part — this class carries only the tool and machining parameters.

angular_step​

angular_step: float

area_tolerance​

area_tolerance: float

cut_direction​

cut_direction: str

"cw" or "ccw": how passes walk their loops.

feed_rate​

feed_rate: Optional[float]

Cut feed rate (mm/min) the plan's moves carry; None leaves the cut state unset, for embedders that map feeds themselves.

finishing​

finishing: bool

max_deflection_deg​

max_deflection_deg: float

max_entry_angle_deg​

max_entry_angle_deg: float

Steepest entry descent in degrees; <= 0 keeps the planner's historical entry behaviour.

plunge_feed​

plunge_feed: Optional[float]

Vertical plunge feed (mm/min) for descents into material; None falls back to the cut feed.

plunge_pitch​

plunge_pitch: float

safe_margin​

safe_margin: float

safe_z​

safe_z: float

step_length​

step_length: float

step_over​

step_over: float

stock_to_leave​

stock_to_leave: float

target_z​

target_z: float

tool_radius​

tool_radius: float

travel_mode​

travel_mode: str

"cleared_area" or "safe_z": how travels are routed.

wall_margin​

wall_margin: float

for_tool()​

for_tool(
tool_radius: float,
step_over: float,
target_z: float,
safe_z: float,
) -> ClearingWorkplanOptions

Options carrying the planner's canonical scales for tool_radius: a fifth-of-a-radius step length, a fifth-of-a-radius safe margin, a plunge pitch of a third of the radius, and the planner's angular and area tuning (0.1 rad angular steps, a 1.0 mm² area tolerance, 30° max deflection). The per-operation fields keep their neutral defaults; set step_over, wall_margin, stock_to_leave, finishing, max_entry_angle_deg and the feeds on the result.

ParameterTypeDescription
tool_radiusfloatTool radius in mm.
step_overfloatRadial step-over between passes (mm).
target_zfloatCutting depth (Z).
safe_zfloatSafe (rapid) Z height.
ReturnsClearingWorkplanOptions

Functions​

plan_clearing()​

plan_clearing(
part: part.Part,
face_id: str = '',
tool_radius: float = 3.0,
step_over: float = 2.0,
step_length: float = 0.6,
target_z: float = -5.0,
safe_z: float = 2.0,
wall_margin: float = 0.0,
safe_margin: float = 1.0,
stock_to_leave: float = 0.0,
plunge_pitch: float = 1.0,
angular_step: float = 0.1,
area_tolerance: float = 1.0,
max_deflection_deg: float = 30.0,
finishing: bool = False,
feed_rate: Optional[float] = None,
plunge_feed: Optional[float] = None,
max_entry_angle_deg: float = 0.0,
cut_direction: str = 'ccw',
travel_mode: str = 'cleared_area',
) -> plan.Plan
ParameterTypeDescription
partpart.Part
face_idstr = ''
tool_radiusfloat = 3.0
step_overfloat = 2.0
step_lengthfloat = 0.6
target_zfloat = -5.0
safe_zfloat = 2.0
wall_marginfloat = 0.0
safe_marginfloat = 1.0
stock_to_leavefloat = 0.0
plunge_pitchfloat = 1.0
angular_stepfloat = 0.1
area_tolerancefloat = 1.0
max_deflection_degfloat = 30.0
finishingbool = False
feed_rateOptional[float] = None
plunge_feedOptional[float] = None
max_entry_angle_degfloat = 0.0
cut_directionstr = 'ccw'
travel_modestr = 'cleared_area'
Returnsplan.Plan

Clearing workplan: narrow passage (ToroidalClear), slot (Slot), dual-entry dumbbell (Unreachable).

Clearing workplan: narrow passage (ToroidalClear), slot (Slot), dual-entry dumbbell (Unreachable).

The same pockets with a 0.5 mm wall margin: too-narrow passages stay uncut.

The same pockets with a 0.5 mm wall margin: too-narrow passages stay uncut.

Cut direction: climb (&#39;ccw&#39;, left) vs conventional (&#39;cw&#39;, right) — arrows mark the walk.

Cut direction: climb ('ccw', left) vs conventional ('cw', right) — arrows mark the walk.