Repository navigation
refactor(visualization): honor the G92 reference frame in the plotter (S4) - #287
Merged
Merged
Conversation
`_collect_segments` now applies `SET_POSITION` (G92) by resetting the tracked position to the move's targets — exactly as `nominal_metrics` does — so every IR consumer interprets G92 identically. Previously the plotter ignored G92, so at each `zero_axes` boundary it drew a ~96,865° backward sweep at x=0 (mandrel A values are absolute/cumulative, reaching ~97,225°), which `_split_segment` shredded into a vertical bar of spurious bands. The change preserves 100% of the winding pattern: for simple_cylinder the first 1147 segments are byte-identical; the 144 removed segments all start at x=0 (the artifact), and the 2 added (also x=0) are the real return rotation. segments_rendered drops 1291->1149 (and similarly for the other goldens). Regenerates the plot half of `sim_plot_snapshot.json` (digest + segments_rendered); the sim half is untouched. Updates the two pinned plotter assertions. Example G-code stays byte-equal; plot route returns a PNG (no OpenAPI drift). Closes #286. Part of #136.
15 tasks done
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.
S4 of #136 — closes #286.
_collect_segmentsnow appliesSET_POSITION(G92) by resetting tracked position to the move targets — identical tonominal_metrics, so every IR consumer interprets G92 the same way. Previously the plotter ignored G92 and drew a ~96,865° backward sweep at x=0 at eachzero_axesboundary (mandrelAis absolute/cumulative, reaching ~97,225°), shredded into a vertical bar of spurious bands.Pattern preserved, artifact removed (proven by multiset diff)
For simple_cylinder: the first 1147 segments are byte-identical; the 144 removed segments all start at
x=0(the artifact), and the 2 added (alsox=0) are the real return rotation.segments_rendered1291→1149 (1973→1803, 36935→36368, 76486→76165 for the others).Reviewable delta — plot half of
sim_plot_snapshot.jsonregeneratedOnly
digest+segments_renderedchange; the sim half is untouched (S3 owns it), as aremandrel_length_mm/tow_width_mm. The two pinned plotter assertions (SIMPLE_CYLINDER_SIGNATURE_DIGEST,segments_rendered) are updated deliberately.Other
Example G-code byte-equal · plot route returns a PNG (no OpenAPI drift) · 153 passed · ruff/format/mypy clean.
Part of #136. Follows S3 (#284); precedes S5 (delete dead scaffolding incl. unused
dump_header+ CI guard).