Skip to content

feat: add CustomGridLineManager and OpenPlans grid-line API#40

Open
aka-blackboots wants to merge 1 commit into
mainfrom
codex/add-custom-grid-lines-feature
Open

feat: add CustomGridLineManager and OpenPlans grid-line API#40
aka-blackboots wants to merge 1 commit into
mainfrom
codex/add-custom-grid-lines-feature

Conversation

@aka-blackboots
Copy link
Copy Markdown
Contributor

Motivation

  • Provide a production-ready feature to create and manage CAD-like reference grid lines in the scene with rich styling, axis locking and optional glyph labels for user references.
  • Expose a simple API on OpenPlans so callers can create, update, query and remove reference grid lines programmatically.

Description

  • Added a new service src/service/custom-grid-lines.ts implementing CustomGridLineManager with typed options (CreateGridLineOptions, UpdateGridLineOptions, GridLineData) and reasonable defaults for style and label properties.
  • Implemented solid/dashed line rendering, opacity/linewidth/dash/gap handling, elevation and axisLock constraints, geometry/material disposal on updates/removal, and scene-layer ownership via a Group named custom-grid-lines.
  • Integrated glyph-based labels using Glyphs.addGlyph for midpoint placement and rotation along the line direction, and synced label visibility with the line state.
  • Wired the manager into OpenPlans (src/index.ts) by instantiating CustomGridLineManager and exposing createReferenceGridLine, updateReferenceGridLine, removeReferenceGridLine, getReferenceGridLine, clearReferenceGridLines, and the referenceGridLines getter.

Testing

  • Ran npm run build to validate compilation which failed due to pre-existing repository issues (unresolved ../kernel/ imports and a TypeScript TS5096 config warning) that are unrelated to the new files and APIs.
  • No unit tests were added in this change; create/update/remove/get/list/clear paths were exercised during development by creating and updating entities in the running environment (manual validation).

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant