Repository navigation
Conversation
06e796e to
e8d0e0b
Compare
|
Not commenting on technical content or merit... |
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. |
Consolidate separate static and HAL-animated transform and geometry classes into single unified implementations while maintaining full backwards compatibility: - Merge Translate, Scale, Rotate, RotateEuler, and Show to accept both static values and an optional hal.component with HAL pin names. - Merge Line, Grid, Plane, and Coords primitives to support origin, normal, and normal+direction modes with optional HAL component arguments. - Consolidate CylinderX, CylinderY, and CylinderZ using a shared _CylinderAxis base class. - Retain all legacy Hal* class names as aliases for backwards compatibility. - Update vismach.adoc to document the unified classes and legacy aliases. - Also fixed along the way is a double import hal
Extend argument resolution across transforms, primitives, Color, and Track
to support dynamic dot-notation references and compiled math/conditional
expressions without requiring an explicit HAL component argument:
- Add "prefix.attr" dot-notation and "{prefix.attr}" math/conditional
expression compilation in ArgsBase (with CoordsBase alias) across
hal.component, hal module, linuxcnc.stat, and Python dict objects.
- Support hyphenated HAL pin names inside "{...}" tokens and evaluate
compiled expressions with __builtins__ disabled and pre-allocated
math environments.
- Register referenced linuxcnc.stat instances automatically and poll them
once per update/redraw cycle via poll_all_stats().
- Support coordinate expressions in Track, Capture.world_pos(world), both
Color argument orders, and an optional update callback function in main().
- Cache Collection traversal callables and optimize matrix inversion in
invert().
- Update vismach.adoc to document prefix syntax, expressions, Track,
Capture.world_pos(), and main(..., function=...).
Render translucent parts in a second pass after opaque geometry and add
configurable emissive glow to Color:
- Render opaque geometry (alpha >= 1.0) first with depth writes enabled,
followed by a second blended pass (alpha < 1.0) with depth writes
disabled so internal components remain visible through translucent parts.
- Keep legacy Color(color, parts) strictly backwards-compatible as
opaque-only (forcing alpha to 1.0 without transparency or glow).
- Add optional glow parameter (0.0..1.0) to Color(parts, [prefix,]
color[, glow]) supporting static values, "prefix.attr" paths, and
"{prefix.attr}" expressions via GL_EMISSION.
- Update vismach.adoc to document two-pass transparency, legacy Color
behavior, and glow.
c2d19ce to
618f3cd
Compare
…pressions
Unify STL and OBJ mesh loaders with runtime change-detected reloading
and modernize Hud text and conditions with prefix/expression support:
- Unify STL and OBJ under _MeshBase (with legacy AsciiSTL and AsciiOBJ
aliases), adding automatic Binary STL detection, quad/polygon OBJ
triangulation, fallback face-normal calculation, and change-detected
reload(filename=None, data=None, force=False).
- Support "{prefix.attr}" template expressions (including nested braces
and format specifiers) in Hud.add_txt() and prefix/expression
evaluation in Hud.add_pin(), show_tag_if_same(), show_tags_in_pin(),
and hide_all() while keeping legacy HAL pin fallback.
- Update vismach.adoc to document STL/OBJ reload() and Hud expression
templates.
618f3cd to
04fb9f5
Compare
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 4. Dec. '26
This RFC reflects the combined changes up to and including Step 4.
As suggested I will split it like this:
Hal*classes, no behaviour change.