Repository navigation
Conversation
06e796e to
e8d0e0b
Compare
|
Not commenting on technical content or merit... |
…ransparency
Consolidate static and HAL-driven Vismach primitives and transforms into
unified classes backed by pre-compiled bytecode/attribute evaluators,
multi-source expression support, and automatic two-pass transparency.
Key changes:
- Unified classes & aliases: Merge static (Translate, Rotate, Scale, Box,
CylinderX/Y/Z, Sphere, TriangleXY/XZ/YZ, ArcX, AsciiSTL, AsciiOBJ) and
Hal* classes into single implementations while retaining all Hal* names
as aliases.
- Multi-source expressions & optional prefixes: Add ArgsBase with one-time
caller-scope prefix caching for hal.component, hal module, and
linuxcnc.stat. Support "prefix.attr" dot notation, "{prefix.attr}" math
expressions, and zero-overhead static numeric fast-paths.
- Single stat.poll() per cycle: Register linuxcnc.stat instances across
scene objects and user callbacks (main(..., function=...)) via
poll_all_stats() so status is polled once per update cycle/redraw.
- Two-pass alpha transparency & Color glow: Extend Color to support
(parts, color, glow=0), dynamic RGBA expressions, emission glow, and
opaque-first / transparent-second traversal with back-face culling for
0.0 < alpha < 1.0 (preserving legacy [R, G, B, 0] opaque parts).
- Dynamic mesh loading: Add path support and dynamic filename/path
expressions to AsciiSTL and AsciiOBJ, freeing old OpenGL display lists
with glDeleteLists() on reload.
- Upgraded Hud: Support linuxcnc.stat, mixed/conditional expressions,
multi-value tuple unpacking in format strings, dynamic HUD colors, and
non-crashing Vismach HUD Warning diagnostics.
- Bug fixes & math cleanup: Fix CylinderY dynamic initialization, HalGrid
prefix handling, Python 3 floor division in O.redraw() backplot trimming,
uncaptured Capture() guards, and replace copy.deepcopy() in invert()
with scale-safe tuple unpacking.
- Backwards compatibility: Retain CoordsBase, legacy Color(color, parts)
order, zero-arg coords()/get_values() subclass overrides, and dummy
single-arg primitive calls (e.g., TriangleXZ(0)).
e8d0e0b to
c2d19ce
Compare
|
Thanks for the comment. |
|
I'm in favour. Simpler sim configs for multiaxis machines would help a lot, especially driving parts from expressions on stat values instead of extra HAL glue. For review I'd split it roughly like this, each step with its own docs:
Step 1 is the big diff, so it would be easiest to check on its own against the in-tree models. |
|
Thank you. |
Request for comment - Not meant for detailed review -
This is a drop-in replacement for the current 'vismach.py' and contains enhancements and changes that I have found useful for creating machine simulations over the years.
Update 2. Dec. '26
As suggested I will split it like this:
Hal*classes, no behaviour change.