Skip to content

CAM improvements for the Adaptive operation #61

@davidgilkaufman

Description

@davidgilkaufman

Proposal description

The goal of the Adaptive clearing operation is to allow users to generate tool paths with constant load on the tool. FreeCAD's implementation of Adaptive clearing works in some cases, but also has buggy behavior for small stepovers and for entrance selection, and missing rest machining features, cumulatively inhibiting usability. I will solve these problems.

Deliverables

I propose 3 separate sub-projects:

  1. Improve algorithm to enable successful generation at small stepovers

When you generate an adaptive toolpath with a "small" stepover (almost always at 1% stepover, less often as stepover increases, rare by 6% in my experience), generation often fails part way through computation, and no toolpath is produced. This is a poor user experience. Users are forced to repeatedly retry this compute-intensive generation process at increasing stepover, and then when generation succeeds, recalculate and program new feeds and speeds to match the heavier-than-desired tool load. I propose improving the adaptive toolpath generation algorithm so adaptive tool paths generate reliably at small stepovers.

Deliverables:

  • a model that cannot generate adaptive toolpaths at small stepover
  • a code change to enable successful generation of the toolpath
  1. Improved automatic diameter selection for entry helix

Adaptive operations have a parameter HelixMaxDiameter that controls the size of the helix used to enter the adaptive toolpath. The default value (0mm) triggers a simple automatic selection of the size of this helix, always pricking 0.75 * tool diameter. However, if this automatic helix does not fit at the desired start location, tool path generation will fail with the message "Start point not found!", even though it could have worked with a smaller helix entrance. Users who do not know the full details of this process often do not understand what changes they could make to manually specify a valid entrance helix, and are entirely unable to use the adaptive operation for their model. I propose adding a new parameter to constrain the minimum acceptable helix size, and improving the automatic helix algorithm to always successfully generate an entrance helix if it is possible to do so at an acceptable diameter.

Deliverables:

  • a model that fails to generate an adaptive toolpath due poor selection of helix diameter
  • a code change to enable successful generation of the toolpath

Open user issues for this bug :
FreeCAD/FreeCAD#13455
FreeCAD/FreeCAD#15975

  1. Add "rest machining" support for adaptive toolpaths

Adaptive toolpaths currently assume that the full region they need to clear is uncut stock before the operation starts. However, it is possible that prior operations have cleared some of that region (e.g. another adaptive operation using a larger tool). If so, the adaptive operation can produce a (much) more efficient toolpath if it understands what space is already cleared. I have already implemented this "rest machining" feature for other operations, but I did not implement it for adaptive because the adaptive operation is built on a different software stack than our "area operations" and has a more complicated interaction with its cleared space. I propose implementing this feature for adaptive toolpaths.

Deliverables:

  • a "Use rest machining" checkbox in the adaptive UI panel
  • a code change to avoid re-cutting regions that are already cut
  • a code change to allow adaptive paths to plunge in cleared space to begin cutting in a region, instead of entering with a helix or from the edge of the stock

Timeline

I hope to complete each of these sub-projects in a few weeks each, spaced out over the duration of the quarter. My work schedule outside of FreeCAD is flexible and will allow for this.

Risks and mitigation

  1. Support toolpath generation for small stepover: I have looked into this situation before and I think I understand why toolpath genration fails. It's not a simple fix, but I think I know what I'm getting into.

  2. Fix automatic helix diameter selection: not risky; the scope and process for this change are straight forward.

  3. Implement rest machining for adaptive: integrating with adaptive may be an involved task, but I think it is not very risky. I have already implemented the trickiest/riskiest features (identification of the regions already cut) of rest machining for other operations.

Compensation

I request a total of 4250 USD: 2000 USD for the small stepover project, 500 USD for automatic helix diameter selection, and 1750 USD for implementing rest machining, delivered upon the completion of each project.

About you

My name is David Kaufman, davidgilkaufman on the forums and github. I received a grant for CAM work last quarter. In that grant, I planned to complete all subtasks within the quarter, and right now (1 month remaining) I have working PRs under review for all proposed features.

This grant is more C++-heavy work, well within my area of expertise. I wrote FreeCAD's "rest machining" feature for other operations from scratch, and have spent time reading through the Adaptive algorithm, so I have good familiarity with the code I will be working with. I have prior experience bridging the C++/python boundary in FreeCAD, and I am comfortable with the CAM workbench code as a whole. Outside of FreeCAD I am a software developer, with C++ and computer geometry experience relevant to the work proposed in this grant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    2025 Q3fundedThe FPA voted to fund this proposal

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions