Commit Graph

6 Commits

Author SHA1 Message Date
sliptonic
587bb9179e Merge pull request #24675 from Connor9220/PathCommandAnnotations
CAM: Path command annotations
2025-11-14 11:39:31 -06:00
pre-commit-ci[bot]
25c3ba7338 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
Billy Huddleston
bcefebca5f CAM: Simplify annotation handling in GCode and improve annotation parsing
src/Mod/CAM/App/Command.cpp:
- Removed requirement for annotations= prefix; now all text after ; is treated as annotation data.
- Updated Command::toGCode to output annotations as key-value pairs in comments.
- Improved setFromGCode to extract annotations from any comment after ;.
- Enhanced annotation parsing to handle quoted strings and floating-point numbers.
- Simplified XML serialization and restoration logic for annotations.

src/Mod/CAM/App/Path.cpp:
- Added addCommandNoRecalc, allowing bulk loading of commands without repeated recalculation.
- Refactored RestoreDocFile to read GCode files line-by-line, parse each command, and call recalculate() only once after all commands are loaded.
- Added explanatory comment above the old implementation.

src/Mod/CAM/App/Path.h:
- Declared addCommandNoRecalc in the Toolpath class.

src/Mod/CAM/CAMTests/TestPathCommandAnnotations.py:
- Adjusted unit test for scientific notation annotation to check only 6 decimal places.
- Adjusted unit test 10 to properly handle assertions with the toGCode method

src/Mod/CAM/PathSimulator/AppGL/GCodeParser.cpp:
- GCodeParser::ParseLine: Truncate at first semicolon (annotations / comment)
2025-10-15 14:43:40 -04:00
PhoneDroid
b5b9913293 Updated SPDX License Identifiers 2025-10-08 19:11:11 -05:00
Adrian Insaurralde Avalos
7274dac185 CAM: apply precommit 2024-09-03 14:54:36 -04:00
Brad Collette
d041482ab7 move Path to CAM 2024-03-04 11:18:41 -06:00