Skip to content

feat: Axes honors a color override from spatialgeometry - #168

Merged
petercorke merged 2 commits into
jhavl:mainfrom
petercorke:feat/axes-color-override
Oct 22, 2026
Merged

petercorke merged 2 commits into
jhavl:mainfrom
petercorke:feat/axes-color-override

Conversation

@petercorke

Copy link
Copy Markdown
Collaborator

Companion to jhavl/spatialgeometry#55.

loadAxes() ignored part.color, so Axes(1, color="black") still rendered red/green/blue.

  • color null (none given): X red / Y green / Z blue, as before.
  • color set: all three axes use it, in both the plain-line style (AxesHelper.setColors()) and arrows=True (per-arrow color, tube and line shafts).
  • loadAxes is exported so it can be tested under Node; 4 new tests in shapes.test.js. All 27 JS tests and 120 Python tests pass.

Merge order: spatialgeometry#55 first, or both together. An older spatialgeometry always sends a (grey) color, which this change would apply to every Axes.

🤖 Generated with Claude Code

loadAxes() ignored part.color. Now a non-null color colors all three
axes, in both AxesHelper (line) and per-arrow styles; null keeps the
conventional X red / Y green / Z blue. Adds Node tests for both styles
and both shaft types.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1.4.2 is the first spatialgeometry that sends color=None for an Axes with
no color; an older release always sends a grey color, which the new Axes
override would apply to every Axes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@petercorke
petercorke merged commit 1134ca5 into jhavl:main Oct 22, 2026
17 checks passed
@petercorke petercorke mentioned this pull request Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant