Repository navigation
Conversation
Sigma1912
marked this pull request as draft
November 29, 2026 15:19
Sigma1912
force-pushed
the
Vismach_new_version
branch
from
November 29, 2026 15:40
06e796e to
e8d0e0b
Compare
Contributor
|
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)).
Sigma1912
force-pushed
the
Vismach_new_version
branch
from
November 29, 2026 16:37
e8d0e0b to
c2d19ce
Compare
Contributor
Author
|
Thanks for the comment. |
Contributor
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Is there a general interest in this? If so how would this single commit need to be split?
with pre-compiled bytecode/attribute evaluators (ArgsBase) and static
numeric fast-paths, keeping all Hal* names as aliases.
"{prefix.attr}" math/conditional expressions across hal.component,
hal module, and linuxcnc.stat.
poll_all_stats(), including user callbacks (main(..., function=...)).
back-face culling for 0.0 < alpha < 1.0) and emission glow to Color.
AsciiSTL/AsciiOBJ, plus multi-value formatting and graceful warnings to Hud.