CAM: MBPP add min-spindle/min-feed to Machine
- Dominant language
- C++
- Stars
- 33.6k
- Forks
- 6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 196
Description
### Area / Workbench affected
CAM
### Problem description
Existing min/max velocity, and max-rpm are not checked. Should add min-rpm. Should squawk in general.
> [the pr's] added a minimum feed rate and a minimum spindle speed to the schema for both this one https://github.com/FreeCAD/FreeCAD/pull/32038 and https://github.com/FreeCAD/FreeCAD/pull/32039. That's a lot of code duplication. I'm convinced we should probably add those to the base postprocessor schema instead of repeating them down here. -- @sliptonic
### Impact
* Adds complexity to Process.py.
* Factors complexity out of MBPP's, allowing more of them to just be Machine based without a _post.py
### Suggested improvement (optional)
- [ ] Decide on where in `Machine/models/machine.py` structure to put this. `LinearAxis` and `RotaryAxis` already has a `max_velocity`.
- [ ] `Toolhead` already has min/max rpm.
- [ ] What do we do if a M3/M4 is out of range for the toolhead? Is that a squawk (but how do we surface that)?
- [ ] What is the expression for testing against velocity values? I.e. is it like `min_velocity <= math.hypot(x,y,z)` (though Z is usually a distinct speed axis)?
- [ ] Are we adding squawks to the currently explicitly empty Processor.py get_sanity_checks()? I'd at least make each one it's own method for easier overriding.
- [ ] Add squawk for violating min_velocity..max_velocity.
- [ ] Add squawk for violating min_rpm...max_rpm
Sqawk generation might go in `get_sanity_checks` in Processor.py. Make a helper function overridable separately from `get_sanity_checks` so PP's can customize. Possibly only for `gcode in Constants.GCODE_MOVE_ALL`.
### References / evidence
@32037 wants to check.
### Development version (if relevant)
```shell
1.2
```
Contributor guide
Research direction
Start by reading Machine/models/machine.py, Process.py, and Processor.py, then compare the referenced pull requests for their duplicated schema changes. Clarify where the limits belong and how sanity-check squawks should be surfaced and overridden. Done means the agreed min/max velocity and RPM checks are implemented without duplication and cover the specified out-of-range cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100