User facing API
- class ocp_freecad_cam.api.Job(top_plane: cadquery.Workplane | cadquery.Plane | cadquery.Face | build123d.Plane | build123d.Face, model: OCP.TopoDS.TopoDS_Compound | cadquery.Compound | build123d.Compound | cadquery.Workplane | build123d.ShapeList | cadquery.Solid | build123d.Solid, post_processor: typing.Literal['KineticNCBeamicon2', 'centroid', 'comparams', 'dxf', 'dynapath', 'fablin', 'fangling', 'fanuc', 'grbl', 'heidenhain', 'jtech', 'linuxcnc', 'mach3_mach4', 'marlin', 'nccad', 'opensbp', 'philips', 'refactored_centroid', 'refactored_grbl', 'refactored_linuxcnc', 'refactored_mach3_mach4', 'refactored_test', 'rml', 'rrf', 'smoothie', 'uccnc'] = None, units: typing.Literal['metric', 'imperial'] = 'metric', geometry_tolerance=None, coolant: typing.Literal['None', 'Flood', 'Mist'] = 'None', final_depth_expression='OpFinalDepth', start_depth_expression='OpStartDepth', step_down_expression='OpToolDiameter', clearance_height_expression='OpStockZMax+SetupSheet.ClearanceHeightOffset', clearance_height_offset='5.00 mm', safe_height_expression='OpStockZMax+SetupSheet.SafeHeightOffset', safe_height_offset='3.00 mm', stock: ocp_freecad_cam.fc_impl.StockBase = <ocp_freecad_cam.fc_impl.Stock object>)
- adaptive(shapes: OCP.TopoDS.TopoDS_Face | OCP.TopoDS.TopoDS_Wire | OCP.TopoDS.TopoDS_Edge | OCP.TopoDS.TopoDS_Vertex | OCP.TopoDS.TopoDS_Compound | cadquery.Workplane | cadquery.Face | cadquery.Wire | cadquery.Edge | cadquery.Vertex | cadquery.Compound | build123d.ShapeList | build123d.Face | build123d.Wire | build123d.Edge | build123d.Vertex | build123d.Compound | build123d.Part | list[Union[OCP.TopoDS.TopoDS_Face, OCP.TopoDS.TopoDS_Wire, OCP.TopoDS.TopoDS_Edge, OCP.TopoDS.TopoDS_Vertex, OCP.TopoDS.TopoDS_Compound, cadquery.Workplane, cadquery.Face, cadquery.Wire, cadquery.Edge, cadquery.Vertex, cadquery.Compound, build123d.ShapeList, build123d.Face, build123d.Wire, build123d.Edge, build123d.Vertex, build123d.Compound, build123d.Part]] | None, tool: ocp_freecad_cam.api_tool.Toolbit, *, finishing_profile: bool = True, force_inside_cut: bool = False, helix_angle: float = 5, helix_cone_angle: float = 0, helix_diameter_limit: float | str = 0, keep_tool_down_ratio: float | str = '3.00 mm', lift_distance: float | str = 0, operation_type: Literal['clearing', 'profiling'] = 'clearing', side: Literal['in', 'out'] = 'in', step_over: float = 20, stock_to_leave: float | str = 0, tolerance: float = 0.1, use_helix_arcs: bool = False, use_outline: bool = False, clearance_height=None, final_depth=None, safe_height=None, start_depth=None, step_down=None, coolant: Literal['None', 'Flood', 'Mist'] = 'None')
Adaptive op generates a tool path to maintain constant cutter engagement.
See https://wiki.freecad.org/Path_Adaptive for usage notes.
- Parameters:
shapes –
tool –
finishing_profile –
force_inside_cut –
helix_angle –
helix_cone_angle –
helix_diameter_limit –
keep_tool_down_ratio –
lift_distance –
operation_type –
side –
step_over –
stock_to_leave –
tolerance –
use_helix_arcs –
use_outline –
clearance_height –
final_depth –
safe_height –
start_depth –
step_down –
- Returns:
- deburr(shapes: OCP.TopoDS.TopoDS_Face | OCP.TopoDS.TopoDS_Wire | OCP.TopoDS.TopoDS_Edge | OCP.TopoDS.TopoDS_Vertex | OCP.TopoDS.TopoDS_Compound | cadquery.Workplane | cadquery.Face | cadquery.Wire | cadquery.Edge | cadquery.Vertex | cadquery.Compound | build123d.ShapeList | build123d.Face | build123d.Wire | build123d.Edge | build123d.Vertex | build123d.Compound | build123d.Part | list[Union[OCP.TopoDS.TopoDS_Face, OCP.TopoDS.TopoDS_Wire, OCP.TopoDS.TopoDS_Edge, OCP.TopoDS.TopoDS_Vertex, OCP.TopoDS.TopoDS_Compound, cadquery.Workplane, cadquery.Face, cadquery.Wire, cadquery.Edge, cadquery.Vertex, cadquery.Compound, build123d.ShapeList, build123d.Face, build123d.Wire, build123d.Edge, build123d.Vertex, build123d.Compound, build123d.Part]], tool: ocp_freecad_cam.api_tool.Toolbit, *, width: float | str = '1 mm', extra_depth: float | str = '0.5 mm', direction: Literal['cw', 'ccw'] = 'cw', entry_point: int = 0, clearance_height=None, final_depth=None, safe_height=None, start_depth=None, step_down=None, coolant: Literal['None', 'Flood', 'Mist'] = 'None')
Deburring operation, typically using a chamfer tool.
See https://wiki.freecad.org/Path_Deburr for usage notes.
- Parameters:
shapes –
tool –
width –
extra_depth –
direction –
entry_point –
clearance_height –
final_depth –
safe_height –
start_depth –
step_down –
- Returns:
- drill(shapes: OCP.TopoDS.TopoDS_Face | OCP.TopoDS.TopoDS_Wire | OCP.TopoDS.TopoDS_Edge | OCP.TopoDS.TopoDS_Vertex | OCP.TopoDS.TopoDS_Compound | cadquery.Workplane | cadquery.Face | cadquery.Wire | cadquery.Edge | cadquery.Vertex | cadquery.Compound | build123d.ShapeList | build123d.Face | build123d.Wire | build123d.Edge | build123d.Vertex | build123d.Compound | build123d.Part | list[Union[OCP.TopoDS.TopoDS_Face, OCP.TopoDS.TopoDS_Wire, OCP.TopoDS.TopoDS_Edge, OCP.TopoDS.TopoDS_Vertex, OCP.TopoDS.TopoDS_Compound, cadquery.Workplane, cadquery.Face, cadquery.Wire, cadquery.Edge, cadquery.Vertex, cadquery.Compound, build123d.ShapeList, build123d.Face, build123d.Wire, build123d.Edge, build123d.Vertex, build123d.Compound, build123d.Part]], tool: ocp_freecad_cam.api_tool.Toolbit, dwell_time: float | None = None, extra_offset: Literal['none', '1x', '2x'] | None = 'none', peck_depth: float | None = None, keep_tool_down: bool | None = False, retract_height: bool | None = None, chip_break_enabled: bool | None = False, clearance_height=None, final_depth=None, safe_height=None, start_depth=None, step_down=None, coolant: Literal['None', 'Flood', 'Mist'] = 'None')
Drilling OP works at least on circular edges and cylindrical faces.
See https://wiki.freecad.org/Path_Drilling for usage notes.
- Parameters:
shapes – shapes to perform this op on
tool – tool to use
dwell_time – setting this to any value will enable dwell
extra_offset – extend drilling depth
peck_depth –
keep_tool_down –
retract_height –
chip_break_enabled –
- Returns:
- engrave(shapes: OCP.TopoDS.TopoDS_Face | OCP.TopoDS.TopoDS_Wire | OCP.TopoDS.TopoDS_Edge | OCP.TopoDS.TopoDS_Vertex | OCP.TopoDS.TopoDS_Compound | cadquery.Workplane | cadquery.Face | cadquery.Wire | cadquery.Edge | cadquery.Vertex | cadquery.Compound | build123d.ShapeList | build123d.Face | build123d.Wire | build123d.Edge | build123d.Vertex | build123d.Compound | build123d.Part | list[Union[OCP.TopoDS.TopoDS_Face, OCP.TopoDS.TopoDS_Wire, OCP.TopoDS.TopoDS_Edge, OCP.TopoDS.TopoDS_Vertex, OCP.TopoDS.TopoDS_Compound, cadquery.Workplane, cadquery.Face, cadquery.Wire, cadquery.Edge, cadquery.Vertex, cadquery.Compound, build123d.ShapeList, build123d.Face, build123d.Wire, build123d.Edge, build123d.Vertex, build123d.Compound, build123d.Part]], tool: ocp_freecad_cam.api_tool.Toolbit, *, start_vertex: int = 0, clearance_height=None, final_depth=None, safe_height=None, start_depth=None, step_down=None, coolant: Literal['None', 'Flood', 'Mist'] = 'None')
Engraving OP follows edges.
See https://wiki.freecad.org/Path_Engrave for usage notes.
- Parameters:
shapes –
tool –
start_vertex –
clearance_height –
final_depth –
safe_height –
start_depth –
step_down –
- Returns:
- face(shapes: OCP.TopoDS.TopoDS_Face | OCP.TopoDS.TopoDS_Wire | OCP.TopoDS.TopoDS_Edge | OCP.TopoDS.TopoDS_Vertex | OCP.TopoDS.TopoDS_Compound | cadquery.Workplane | cadquery.Face | cadquery.Wire | cadquery.Edge | cadquery.Vertex | cadquery.Compound | build123d.ShapeList | build123d.Face | build123d.Wire | build123d.Edge | build123d.Vertex | build123d.Compound | build123d.Part | list[Union[OCP.TopoDS.TopoDS_Face, OCP.TopoDS.TopoDS_Wire, OCP.TopoDS.TopoDS_Edge, OCP.TopoDS.TopoDS_Vertex, OCP.TopoDS.TopoDS_Compound, cadquery.Workplane, cadquery.Face, cadquery.Wire, cadquery.Edge, cadquery.Vertex, cadquery.Compound, build123d.ShapeList, build123d.Face, build123d.Wire, build123d.Edge, build123d.Vertex, build123d.Compound, build123d.Part]], tool: ocp_freecad_cam.api_tool.Toolbit, *, finish_depth: float = None, boundary: Literal['boundbox', 'face', 'perimeter', 'stock'] = None, clear_edges: bool = None, exclude_raised: bool = None, pattern: Literal['zigzag', 'offset', 'zigzag_offset', 'line', 'grid'] = None, clearance_height=None, final_depth=None, safe_height=None, start_depth=None, step_down=None, coolant: Literal['None', 'Flood', 'Mist'] = 'None') ocp_freecad_cam.api.Job
2.5D face operation to clear material from a surface.
See https://wiki.freecad.org/Path_MillFace for usage notes.
- Parameters:
shapes – Shape(s) to perform this OP on
tool – Tool to use in this OP
finish_depth –
boundary –
clear_edges –
exclude_raised –
pattern –
- Returns:
- helix(shapes: OCP.TopoDS.TopoDS_Face | OCP.TopoDS.TopoDS_Wire | OCP.TopoDS.TopoDS_Edge | OCP.TopoDS.TopoDS_Vertex | OCP.TopoDS.TopoDS_Compound | cadquery.Workplane | cadquery.Face | cadquery.Wire | cadquery.Edge | cadquery.Vertex | cadquery.Compound | build123d.ShapeList | build123d.Face | build123d.Wire | build123d.Edge | build123d.Vertex | build123d.Compound | build123d.Part | list[Union[OCP.TopoDS.TopoDS_Face, OCP.TopoDS.TopoDS_Wire, OCP.TopoDS.TopoDS_Edge, OCP.TopoDS.TopoDS_Vertex, OCP.TopoDS.TopoDS_Compound, cadquery.Workplane, cadquery.Face, cadquery.Wire, cadquery.Edge, cadquery.Vertex, cadquery.Compound, build123d.ShapeList, build123d.Face, build123d.Wire, build123d.Edge, build123d.Vertex, build123d.Compound, build123d.Part]], tool: ocp_freecad_cam.api_tool.Toolbit, *, direction: Literal['cw', 'ccw'] | None = 'cw', offset_extra: float | None = 0, start_radius: float | None = 0, start_side: Literal['out', 'in'] | None = 'out', step_over: float | None = 50, clearance_height=None, final_depth=None, safe_height=None, start_depth=None, step_down=None, coolant: Literal['None', 'Flood', 'Mist'] = 'None')
Perform a helix plunge.
See https://wiki.freecad.org/Path_Helix for usage notes.
- Parameters:
shapes – circular shapes to perform the op on
tool – tool to use
direction – default clockwise helix
offset_extra – negative value creates a roughing pass followed by a final pass with the original radius
start_radius – inner radius?
start_side – define where the op starts when doing multiple passes
step_over – percentage of tool diameter to step over
- Returns:
- pocket(shapes: OCP.TopoDS.TopoDS_Face | OCP.TopoDS.TopoDS_Wire | OCP.TopoDS.TopoDS_Edge | OCP.TopoDS.TopoDS_Vertex | OCP.TopoDS.TopoDS_Compound | cadquery.Workplane | cadquery.Face | cadquery.Wire | cadquery.Edge | cadquery.Vertex | cadquery.Compound | build123d.ShapeList | build123d.Face | build123d.Wire | build123d.Edge | build123d.Vertex | build123d.Compound | build123d.Part | list[Union[OCP.TopoDS.TopoDS_Face, OCP.TopoDS.TopoDS_Wire, OCP.TopoDS.TopoDS_Edge, OCP.TopoDS.TopoDS_Vertex, OCP.TopoDS.TopoDS_Compound, cadquery.Workplane, cadquery.Face, cadquery.Wire, cadquery.Edge, cadquery.Vertex, cadquery.Compound, build123d.ShapeList, build123d.Face, build123d.Wire, build123d.Edge, build123d.Vertex, build123d.Compound, build123d.Part]], tool: ocp_freecad_cam.api_tool.Toolbit, *, finish_depth: float = 0, pattern: Literal['zigzag', 'offset', 'zigzag_offset', 'line', 'grid'] = 'zigzag', cut_mode: Literal['climb', 'conventional'] = 'climb', extra_offset: float = 0, keep_tool_down: bool = False, min_travel: bool = False, pocket_last_stepover: float = 0, start_at: Literal['center', 'edge'] = 'center', step_over: float = 100, use_outline: bool = False, zigzag_angle: float = 45.0, dressups: list[ocp_freecad_cam.fc_impl.Dressup] = None, clearance_height=None, final_depth=None, safe_height=None, start_depth=None, step_down=None, coolant: Literal['None', 'Flood', 'Mist'] = 'None') ocp_freecad_cam.api.Job
2.5D pocket operation.
See https://wiki.freecad.org/Path_Pocket_Shape for usage notes.
- Parameters:
shapes – Shape(s) to perform this OP on.
tool – Tool to use in this OP.
finish_depth – Final pass depth, 0 to disable.
pattern – Pocket tool path pattern.
cut_mode – Climb/Conventional selection.
extra_offset – Offset the operation boundaries.
keep_tool_down – Attempts to avoid unnecessary retractions
min_travel – Use 3D sorting of path
pocket_last_stepover –
?
start_at – Where the pocketing operation starts (inside-out vs outside-in)
step_over – Step over by percentage of cutter diameter
use_outline – Use outline of base geometry
zigzag_angle – Valid when zigzagging
dressups – Dressup operations
- Returns:
- profile(shapes: OCP.TopoDS.TopoDS_Face | OCP.TopoDS.TopoDS_Wire | OCP.TopoDS.TopoDS_Edge | OCP.TopoDS.TopoDS_Vertex | OCP.TopoDS.TopoDS_Compound | cadquery.Workplane | cadquery.Face | cadquery.Wire | cadquery.Edge | cadquery.Vertex | cadquery.Compound | build123d.ShapeList | build123d.Face | build123d.Wire | build123d.Edge | build123d.Vertex | build123d.Compound | build123d.Part | list[Union[OCP.TopoDS.TopoDS_Face, OCP.TopoDS.TopoDS_Wire, OCP.TopoDS.TopoDS_Edge, OCP.TopoDS.TopoDS_Vertex, OCP.TopoDS.TopoDS_Compound, cadquery.Workplane, cadquery.Face, cadquery.Wire, cadquery.Edge, cadquery.Vertex, cadquery.Compound, build123d.ShapeList, build123d.Face, build123d.Wire, build123d.Edge, build123d.Vertex, build123d.Compound, build123d.Part]], tool: ocp_freecad_cam.api_tool.Toolbit, *, side: Literal['out', 'in', 'mid'] = 'out', direction: Literal['cw', 'ccw'] = 'cw', handle_multiple_features: Literal['collectively', 'individually'] = 'collectively', offset_extra: float = 0.0, circles: bool = False, holes: bool = False, perimeter: bool = True, dressups: list[ocp_freecad_cam.fc_impl.Dressup] = None, clearance_height=None, final_depth=None, safe_height=None, start_depth=None, step_down=None, coolant: Literal['None', 'Flood', 'Mist'] = 'None')
2.5D profile operation will operate on faces, wires and edges.
Edges do not have to form a closed loop, and they do not have to be on the same Z-level. See https://wiki.freecad.org/Path_Profile for usage notes.
- Parameters:
shapes – Shape(s) to perform this OP on
tool – Tool to use in this OP
side – Defines whether cutter radius compensation is applied on the inside or the outside of the perimeter (outer wire). Irrelevant for open edges.
direction – Defines the direction of travel (clockwise or counterclockwise).
handle_multiple_features – Defines whether to combine features or handle them as individual sub operations.
offset_extra – Additional offset.
circles – Faces: profile circular holes (inner wires).
holes – Faces: profile non-circular holes (inner wires).
perimeter – Faces: mill the perimeter (outer wire).
dressups – Define dressups to use in this OP. For example Tab (tags) or Dogbone.
- save_fcstd(filename='debug.fcstd', force_rebuild=False)
Save the current document so that it can be opened manually in FreeCAD.
- Parameters:
filename – Filename to save to (relative to current dir)
force_rebuild – set to True if you’ve tweaked some parameters outside the normal fluent flow
- Returns:
- show(show_object=None, force_rebuild=False)
Generates an AIS_InteractiveObject that can be used to display the result in cq-editor or cq-viewer
- Parameters:
show_object –
force_rebuild – set to True if you’ve tweaked some parameters outside the normal fluent flow
- Returns:
AIS_InteractiveObject that can be given to show_object
- surface(shapes: OCP.TopoDS.TopoDS_Face | OCP.TopoDS.TopoDS_Wire | OCP.TopoDS.TopoDS_Edge | OCP.TopoDS.TopoDS_Vertex | OCP.TopoDS.TopoDS_Compound | cadquery.Workplane | cadquery.Face | cadquery.Wire | cadquery.Edge | cadquery.Vertex | cadquery.Compound | build123d.ShapeList | build123d.Face | build123d.Wire | build123d.Edge | build123d.Vertex | build123d.Compound | build123d.Part | list[Union[OCP.TopoDS.TopoDS_Face, OCP.TopoDS.TopoDS_Wire, OCP.TopoDS.TopoDS_Edge, OCP.TopoDS.TopoDS_Vertex, OCP.TopoDS.TopoDS_Compound, cadquery.Workplane, cadquery.Face, cadquery.Wire, cadquery.Edge, cadquery.Vertex, cadquery.Compound, build123d.ShapeList, build123d.Face, build123d.Wire, build123d.Edge, build123d.Vertex, build123d.Compound, build123d.Part]] | None, tool: ocp_freecad_cam.api_tool.Toolbit, *, bound_box: Literal['base_bound_box', 'stock'] = 'base_bound_box', cut_mode: Literal['climb', 'conventional'] = 'climb', cut_pattern: Literal['line', 'circular', 'circular_zig_zag', 'offset', 'spiral', 'zigzag'] = 'line', cut_pattern_angle: float = 0, cut_pattern_reversed: bool = False, depth_offset: float = 0, layer_mode: Literal['single', 'multi'] = 'single', profile_edges: Literal['none', 'only', 'first', 'last'] = 'none', sample_interval: float | str = '1.0 mm', step_over: float = 100, angular_deflection: float | str = '0.25 mm', linear_deflection: float | str = '0.001 mm', circular_use_g2g3: bool = False, gap_threshold: float | str = '0.01 mm', optimize_linear_paths: bool = True, optimize_step_over_transitions: bool = False, avoid_last_x_faces: int = 0, avoid_last_x_internal_features: bool = True, boundary_adjustment: float | str = 0, boundary_enforcement: bool = True, multiple_features: Literal['collectively', 'individually'] = 'collectively', internal_features_adjustment: float | str = 0, internal_features_cut: bool = True, start_point: tuple[float | str, float | str, float | str] = None, scan_type: Literal['planar', 'rotational'] = 'planar', clearance_height=None, final_depth=None, safe_height=None, start_depth=None, step_down=None, coolant: Literal['None', 'Flood', 'Mist'] = 'None')
3D surface op that mills the part using a XY scan pattern and a drop-down algorithm.
If no shape(s) are provided, performs the OP on the whole model.
See https://wiki.freecad.org/Path_Surface for usage notes.
- Parameters:
shapes –
tool –
bound_box –
cut_mode –
cut_pattern –
cut_pattern_angle –
cut_pattern_reversed –
depth_offset –
layer_mode –
profile_edges –
sample_interval –
step_over –
angular_deflection –
linear_deflection –
circular_use_g2g3 –
gap_threshold –
optimize_linear_paths –
optimize_step_over_transitions –
avoid_last_x_faces –
avoid_last_x_internal_features –
boundary_adjustment –
boundary_enforcement –
multiple_features –
internal_features_adjustment –
internal_features_cut –
start_point –
scan_type –
clearance_height –
final_depth –
safe_height –
start_depth –
step_down –
- Returns:
- to_gcode(force_rebuild=False)
Generates G-Code.
Output is generated by the job’s postprocessor and in the job’s units.
- Parameters:
force_rebuild – set to True if you’ve tweaked some parameters outside the normal fluent flow
- Returns:
- vcarve(shapes: OCP.TopoDS.TopoDS_Face | OCP.TopoDS.TopoDS_Wire | OCP.TopoDS.TopoDS_Edge | OCP.TopoDS.TopoDS_Vertex | OCP.TopoDS.TopoDS_Compound | cadquery.Workplane | cadquery.Face | cadquery.Wire | cadquery.Edge | cadquery.Vertex | cadquery.Compound | build123d.ShapeList | build123d.Face | build123d.Wire | build123d.Edge | build123d.Vertex | build123d.Compound | build123d.Part | list[Union[OCP.TopoDS.TopoDS_Face, OCP.TopoDS.TopoDS_Wire, OCP.TopoDS.TopoDS_Edge, OCP.TopoDS.TopoDS_Vertex, OCP.TopoDS.TopoDS_Compound, cadquery.Workplane, cadquery.Face, cadquery.Wire, cadquery.Edge, cadquery.Vertex, cadquery.Compound, build123d.ShapeList, build123d.Face, build123d.Wire, build123d.Edge, build123d.Vertex, build123d.Compound, build123d.Part]], tool: ocp_freecad_cam.api_tool.Toolbit, *, discretize: float = 0.01, colinear: float = 10.0, clearance_height=None, final_depth=None, safe_height=None, start_depth=None, step_down=None, coolant: Literal['None', 'Flood', 'Mist'] = 'None')
V-Carve based on voronoi diagrams.
Verify the tool path carefully! This algorithm is sometimes unstable.
See https://wiki.freecad.org/Path_Vcarve for usage notes.
- Parameters:
shapes –
tool –
discretize – Try a smaller value if getting too many retracts.
colinear –
- Returns:
- waterline(shapes: OCP.TopoDS.TopoDS_Face | OCP.TopoDS.TopoDS_Wire | OCP.TopoDS.TopoDS_Edge | OCP.TopoDS.TopoDS_Vertex | OCP.TopoDS.TopoDS_Compound | cadquery.Workplane | cadquery.Face | cadquery.Wire | cadquery.Edge | cadquery.Vertex | cadquery.Compound | build123d.ShapeList | build123d.Face | build123d.Wire | build123d.Edge | build123d.Vertex | build123d.Compound | build123d.Part | list[Union[OCP.TopoDS.TopoDS_Face, OCP.TopoDS.TopoDS_Wire, OCP.TopoDS.TopoDS_Edge, OCP.TopoDS.TopoDS_Vertex, OCP.TopoDS.TopoDS_Compound, cadquery.Workplane, cadquery.Face, cadquery.Wire, cadquery.Edge, cadquery.Vertex, cadquery.Compound, build123d.ShapeList, build123d.Face, build123d.Wire, build123d.Edge, build123d.Vertex, build123d.Compound, build123d.Part]] | None, tool: ocp_freecad_cam.api_tool.Toolbit, *, algorithm: Literal['ocl', 'experimental'] = 'ocl', bound_box: Literal['base', 'stock'] = 'base', cut_mode: Literal['climb', 'conventional'] = 'climb', depth_offset: float | str = 0, layer_mode: Literal['single', 'multi'] = 'single', sample_interval: float | str = '1.00 mm', angular_deflection: float | str = '0.25 mm', linear_deflection: float | str = '0.01 mm', clearance_height=None, final_depth=None, safe_height=None, start_depth=None, step_down=None, coolant: Literal['None', 'Flood', 'Mist'] = 'None')
Similar to the Surface OP, but performs the operation using a push cutter in the XY plane. Used for milling features on the XY-plane.
If no shape(s) are provided, performs the OP on the whole model.
See https://wiki.freecad.org/Path_Waterline for usage notes.
- Parameters:
shapes –
tool –
algorithm –
bound_box –
cut_mode –
depth_offset –
layer_mode –
sample_interval –
angular_deflection –
linear_deflection –
clearance_height –
final_depth –
safe_height –
start_depth –
step_down –
- Returns:
Tools
- class ocp_freecad_cam.api_tool.Toolbit(*, name: str = '', number: int = 1, path: str | None = None, h_feed: float | str = None, v_feed: float | str = None, speed: float | str = None, spindle_dir: Literal['forward', 'reverse', 'none'] = None)
Base class for Toolbits
- name: str = ''
Completely optional tool name
- number: int = 1
Tool number for tool change purposes
- path: str | None = None
Tool shape path. Not needed if the shape is located in the expected library folder
- h_feed: float | str = None
Horizontal feed rate. Units are either mm/min or in/min. Floats are interpreted with the job units. Strings should include the unit.
- v_feed: float | str = None
Vertical feed rate. Units are either mm/min or in/min. Floats are interpreted with the job units. Strings should include the unit.
- speed: float | str = None
Spindle speed in RPM.
- spindle_dir: Literal['forward', 'reverse', 'none'] = None
Spindle direction, forward (clockwise) or reverse (counterclockwise).
- class ocp_freecad_cam.api_tool.Endmill(*, name: str = '', number: int = 1, path: str | None = None, h_feed: float | str = None, v_feed: float | str = None, speed: float | str = None, spindle_dir: Literal['forward', 'reverse', 'none'] = None, cutting_edge_height: float | str = None, diameter: float | str = None, length: float | str = None, shank_diameter: float | str = None)
Endmill is the standard cylindrical tool bit.
- cutting_edge_height: float | str = None
Length of the cutter aka maximum cut depth. Floats are interpreted either in mm or in depending on job unit.
- diameter: float | str = None
Diameter of the cutter. Floats are interpreted either in mm or in depending on job unit.
- length: float | str = None
Total length of the tool from spindle holder. Floats are interpreted either in mm or in depending on job unit.
- shank_diameter: float | str = None
Diameter of the shank abover the cutter. Floats are interpreted either in mm or in depending on job unit.
- class ocp_freecad_cam.api_tool.Ballnose(*, name: str = '', number: int = 1, path: str | None = None, h_feed: float | str = None, v_feed: float | str = None, speed: float | str = None, spindle_dir: Literal['forward', 'reverse', 'none'] = None, cutting_edge_height: float | str = None, diameter: float | str = None, length: float | str = None, shank_diameter: float | str = None)
Ballnose is an Endmill with a round tip.
- class ocp_freecad_cam.api_tool.Bullnose(*, name: str = '', number: int = 1, path: str | None = None, h_feed: float | str = None, v_feed: float | str = None, speed: float | str = None, spindle_dir: Literal['forward', 'reverse', 'none'] = None, cutting_edge_height: float | str = None, diameter: float | str = None, length: float | str = None, shank_diameter: float | str = None, flat_radius: float | str = None)
A mix of Endmill and Ballnose, the Bullnose has a flat area at the tip with rounded cutting edges.
- flat_radius: float | str = None
The radius of the flat part and the tip of the tool. Floats are interpreted either in mm or in depending on job unit.
- class ocp_freecad_cam.api_tool.VBit(*, name: str = '', number: int = 1, path: str | None = None, h_feed: float | str = None, v_feed: float | str = None, speed: float | str = None, spindle_dir: Literal['forward', 'reverse', 'none'] = None, cutting_edge_height: float | str = None, diameter: float | str = None, length: float | str = None, shank_diameter: float | str = None, tip_angle: float = None, tip_diameter: float | str = None)
V-Bit’s are engraving tools that come in various shapes. Depth of cut defines the cut width. Typically used with the V-Carve operation (for variable width cuts) or Engrave operation (for constant width).
- tip_angle: float = None
Tip angle in degrees, typically 15, 30, 60 or 90.
- tip_diameter: float | str = None
Diameter of the tip. Friendly reminder that low grade V-bits have huge disparity, ie something advertised as 0.1 mm can be actually 0.3 m. Measure your bits if doing high detail work!
Floats are interpreted either in mm or in depending on Job unit.
- class ocp_freecad_cam.api_tool.Chamfer(*, name: str = '', number: int = 1, path: str | None = None, h_feed: float | str = None, v_feed: float | str = None, speed: float | str = None, spindle_dir: Literal['forward', 'reverse', 'none'] = None, cutting_edge_height: float | str = None, diameter: float | str = None, length: float | str = None, shank_diameter: float | str = None, tip_angle: float = None, tip_diameter: float | str = None)
Chamfer has same attributes as a VBit. In practice, they have usually comparatively wide tip diameters.
- class ocp_freecad_cam.api_tool.Drill(*, name: str = '', number: int = 1, path: str | None = None, h_feed: float | str = None, v_feed: float | str = None, speed: float | str = None, spindle_dir: Literal['forward', 'reverse', 'none'] = None, diameter: float | str = None, length: float | str = None, tip_angle: float = None)
A Drill tool for.. drilling holes!
- diameter: float | str = None
Diameter of the drill. Floats are interpreted either in mm or in depending on job unit.
- length: float | str = None
Length of the drill from tip to collet. Floats are interpreted either in mm or in depending on job unit.
- tip_angle: float = None
Tip angle in degrees. Determines the extra distance of penetration needed to get the correct hole size.
- class ocp_freecad_cam.api_tool.SlittingSaw(*, name: str = '', number: int = 1, path: str | None = None, h_feed: float | str = None, v_feed: float | str = None, speed: float | str = None, spindle_dir: Literal['forward', 'reverse', 'none'] = None, blade_thickness: float | str = None, cap_diameter: float | str = None, cap_height: float | str = None, diameter: float | str = None, length: float | str = None, shank_diameter: float | str = None)
Please refer to FreeCAD on how to use this.
- class ocp_freecad_cam.api_tool.ThreadMill(*, name: str = '', number: int = 1, path: str | None = None, h_feed: float | str = None, v_feed: float | str = None, speed: float | str = None, spindle_dir: Literal['forward', 'reverse', 'none'] = None, crest: float | str = None, diameter: float | str = None, length: float | str = None, neck_diameter: float | str = None, neck_length: float | str = None, shank_diameter: float | str = None, cutting_angle: float = None)
Please refer to FreeCAD on how to use this tool.
Dressups
- class ocp_freecad_cam.api.Dogbone(incision: Literal['adaptive', 'fixed', 'custom'] | None = None, custom: float | None = None, side: Literal['left', 'right'] | None = None, style: Literal['dogbone', 'thor', 'tver', 'tlong', 'tshort'] | None = None)
- class ocp_freecad_cam.api.Tab(angle=None, height=None, width=None, positions=None, disabled=None, fillet_radius=None, segmentation_factor=None)