Fix base template substitution and improve tool/op formatting in sanity report, also update HTML/CSS and image handling.
- Major HTML/CSS refactor for CAM Sanity Report template:
- Rewrote HTMLTemplate.py with modern, responsive CSS, semantic HTML, and accessibility improvements.
- Added CSS reset, responsive image handling, and improved table/list styling.
- Introduced .heading-container and .top-link for right-aligned "Top" navigation links on all major sections and tool headers (hidden in print).
- Updated all section and tool headers to use new navigation and layout.
- Cleaned up legacy markup, removed inline styles, and standardized variable substitution using string.Template syntax (${key}, ${val}).
- Updated base_template in HTMLTemplate.py to use string.Template syntax (${key}, ${val}) instead of %{key}, %{val} for correct variable substitution.
- Enhanced image generation and embedding:
- Updated ImageBuilder to support high-DPI (800x800) images and direct byte output for embedding.
- All report images (base, stock, datum, tool) now use in-memory bytes for embedding when possible.
- Tool images support a toggle for using toolbit thumbnails or fallback head-on renders.
- ReportGenerator now embeds images as base64 when requested, with correct HTML tags.
- Improved squawk, tool, and operation data formatting:
- Squawk dates now use localized string formatting.
- Tool diameter and feedrate now use .UserString for better display.
- Spindle speed now formatted as integer with "rpm" suffix.
- Operation feed and speed values also use .UserString and "rpm" formatting.
- Fixed _format_bases in ReportGenerator.py to iterate over base_data.items() and pass {"key": key, "val": val} to the template, ensuring all bases are listed correctly.
- General code cleanup and improved maintainability throughout the CAM Sanity reporting stack.
The standard in FreeCAD is that workbench preference pages get loaded when the module gets loaded.
That behavior was altered by PR 21981 which attempted to load CAM preference pages at startup even if CAM was not loaded.
The result was that pages were only partially loaded and the result was a confusing mess.
There is some discussion about future enhancements to allow workbench preferences to be loaded early.
When that is implemented, CAM will adjust to be compliant with FreeCAD standard.
This effectively revertts PR #21981
* Sketcher: titles of parameter sections to Title Case
* Update src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h
Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Sketcher: Change "By control points" and "By knots" texts
Elsewhere in the Sketcher GUI texts, "By" has been replaced by "From". For example "Arc From Center". It makes sense to also do that for the B-spline modes "By control points" and "By knots".
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Consistent Addition
1. Additions are hidden by onChanged()
2. makeStairs() previously made 1st segment of a Complex Stairs went to Base and the rest segments went to Additions
3. For consistency in grouping and visibility, all segments in go to Additions with this commit
Consistent Move With Host
1. A Complex Stairs has multiple segment (in Additions) and railings (in RailingLeft/Right), they should move togther.
2. All segments and Railing set MoveWithHost to True upon creation, and thus move together, regardless system setting default with this commit
Other Associated Inconsistency
Other visibility default behaviour as discussed in https://forum.freecad.org/viewtopic.php?p=844965#p844920 would be added in subsequent PR
Last associated PR/commits :
* Sketcher: QMessageBox titles to Title Case
* Sketcher: QMessageBox titles to Title Case
* Sketcher: QMessageBox titles to Title Case
* Update Command.cpp
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Sketcher: Coin resize when screen change. Fix#23267
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update ViewProviderSketch.cpp
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Updated all user-facing strings from "Tool" to "Toolbit" for clarity and consistency.
- Changed combo box filtering logic to use index for "All Toolbit Types" (localization-safe).
- Improved visual distinction for "All Toolbits" in library editor (bold/italic).
- Reduced default SVG icon size in ShapeWidget for a more compact display.
- Updated window titles, labels, tooltips, and placeholder texts to use "Toolbit".
- Removed obsolete string comparisons in filtering logic.
- Change the Menu item from "Toolbit Library Editor" to "Toolbit Library Manager"
* Fix B-spline keyboard focus issue (#23859)
- Restore keyboard focus after command restart in changeConstructionMethode()
- Fixes M key mode switching and R toggle periodic functionality
- Uses direct MDI view focus restoration instead of private ensureFocus() method
Fixes issue where keyboard shortcuts stop working after first mode switch.
* Address Copilot feedback: Add null check for activeDocument()
- Use ternary operator for cleaner null safety
- Prevents potential crash if activeDocument() returns null
- More idiomatic C++ code style
* Improve variable scope per @chennes feedback
- Use if-with-initialization to scope doc and mdi variables
- Variables now only exist where needed instead of leaking into function scope
- More idiomatic C++ code style
Fix issue with toolshapes
Renamed fillet to radius
Added Tool Type Filter to library
Fix units so that they honor user preference
Remove the QToolBox widget from the Shape Selector page and combine into a single page.
Fix issue with PropertyBag so that CustomPropertyGroups as a string is converted to enum and enums are handled correctly.
Update TestPathPropertyBag test for enum changes.
Update TestPathToolBitListWidget
Update TestPathToolLibrarySerializer to match new LinuxCNC output
Fix LinuxCNC export too handle ALL tool types, use user preferences for units, and include all lcnc fields