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.
* Machining model and materials
Adds a few machinability material model
and a couple materials. There's a button in the job dialog
to assign a material.
The sanity report is updated to display the surface speed for assigned materials
* improving the machinability model
* Introduce MaterialConstant for the machinability model
This constant is required to calculate the actual specific cutting force
from the normalized value. It determines how the actaual value varies
when the actual chip thickness gets further away from the normalization
point.
* Rename some machinability properties
- SpecificCuttingForce becomes UnitCuttingForce to clearer differentiate
between normalized and actual specific cutting force. The term unit
cutting force is used less often in literature, but
NormalizedSpecificCuttingForce as property name is too long for my taste.
- MaterialConstant becomes ChipThicknessExponent, as "material constant"
is just too generic for our context. In literature, this constant is most
often just used as the symbol m_c.
---------
Co-authored-by: Jonas Bähr <jonas.baehr@web.de>