feat(datums): add unified datum creator addon #370

Merged
forbes merged 1 commits from feat/unified-datum-creator into main 2026-03-02 19:04:10 +00:00
Owner

Summary

Introduces mods/datums/ — a standalone addon that replaces the three stock PartDesign datum commands (Plane, Line, Point) with a single unified Create_DatumCreator command.

Features

  • 16 smart creation modes: 7 plane (offset, midplane, 3-point, normal, angled, tangent), 4 axis (2-point, edge, cylinder center, plane intersection), 5 point (vertex, XYZ, on-edge, face center, circle center)
  • Auto-detection engine: selects best datum type and mode from geometry selection
  • Mode override combo for manual selection
  • Dynamic parameter UI: spinboxes change based on mode (offset, angle, position, XYZ)
  • Datums_Type/Params/SourceRefs metadata stored on each datum for the edit panel
  • Edit panel with real-time parameter updates via AttachExtension
  • Catppuccin Mocha themed plane styling via SDK theme tokens
  • Injected into partdesign.body and partdesign.feature editing contexts

Architecture

mods/datums/
├── package.xml                  Priority 45, depends on sdk
├── Init.py                      Console init (no-op)
├── InitGui.py                   Deferred registration via QTimer
└── datums/
    ├── command.py               Create_DatumCreator + Create_DatumEdit commands
    ├── core.py                  16 creation functions + attachment helpers
    ├── detection.py             SelectionItem, MODES, match_mode()
    ├── panel.py                 DatumCreatorTaskPanel (creation UI)
    ├── edit_panel.py            DatumEditTaskPanel (live parameter editing)
    └── resources/icons/         16 Catppuccin-themed SVGs

Changes from archived ztools

  • Property prefix: ZTools_*Datums_*
  • Body-only (removed document-level Part::Plane/Line/Vertex fallback)
  • PySidePySide6
  • SDK integration: register_command(), inject_commands(), get_theme_tokens()

Also included

  • CMake install targets for gears and datums addons (both were missing from src/Mod/Create/CMakeLists.txt)
## Summary Introduces `mods/datums/` — a standalone addon that replaces the three stock PartDesign datum commands (Plane, Line, Point) with a single unified `Create_DatumCreator` command. ### Features - **16 smart creation modes**: 7 plane (offset, midplane, 3-point, normal, angled, tangent), 4 axis (2-point, edge, cylinder center, plane intersection), 5 point (vertex, XYZ, on-edge, face center, circle center) - **Auto-detection engine**: selects best datum type and mode from geometry selection - **Mode override combo** for manual selection - **Dynamic parameter UI**: spinboxes change based on mode (offset, angle, position, XYZ) - **`Datums_Type`/`Params`/`SourceRefs` metadata** stored on each datum for the edit panel - **Edit panel** with real-time parameter updates via AttachExtension - **Catppuccin Mocha** themed plane styling via SDK theme tokens - Injected into `partdesign.body` and `partdesign.feature` editing contexts ### Architecture ``` mods/datums/ ├── package.xml Priority 45, depends on sdk ├── Init.py Console init (no-op) ├── InitGui.py Deferred registration via QTimer └── datums/ ├── command.py Create_DatumCreator + Create_DatumEdit commands ├── core.py 16 creation functions + attachment helpers ├── detection.py SelectionItem, MODES, match_mode() ├── panel.py DatumCreatorTaskPanel (creation UI) ├── edit_panel.py DatumEditTaskPanel (live parameter editing) └── resources/icons/ 16 Catppuccin-themed SVGs ``` ### Changes from archived ztools - Property prefix: `ZTools_*` → `Datums_*` - Body-only (removed document-level Part::Plane/Line/Vertex fallback) - `PySide` → `PySide6` - SDK integration: `register_command()`, `inject_commands()`, `get_theme_tokens()` ### Also included - CMake install targets for **gears** and **datums** addons (both were missing from `src/Mod/Create/CMakeLists.txt`)
forbes added 1 commit 2026-03-02 18:28:56 +00:00
feat(datums): add unified datum creator addon
All checks were successful
Build and Test / build (pull_request) Successful in 29m22s
e3de2c0e71
Introduces mods/datums/ — a standalone addon that replaces the three
stock PartDesign datum commands (Plane, Line, Point) with a single
unified Create_DatumCreator command.

Features:
- 16 smart creation modes (7 plane, 4 axis, 5 point)
- Auto-detection engine: selects best mode from geometry selection
- Mode override combo for manual selection
- Dynamic parameter UI (offset, angle, position, XYZ)
- Datums_Type/Params/SourceRefs metadata for edit panel
- Edit panel with real-time parameter updates via AttachExtension
- Catppuccin Mocha themed plane styling via SDK theme tokens
- Injected into partdesign.body and partdesign.feature contexts

Also adds CMake install targets for gears and datums addons.

Ported from archived ztools with key changes:
- Property prefix: ZTools_ -> Datums_
- No document-level datums (Body-only)
- PySide -> PySide6
- SDK integration (register_command, inject_commands, get_theme_tokens)
forbes merged commit 10dd66fc29 into main 2026-03-02 19:04:10 +00:00
forbes deleted branch feat/unified-datum-creator 2026-03-02 19:04:10 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/create#370