docs: write ZTOOLS.md — workbench structure, PartDesign injection, and adding new tools #91

Closed
opened 2026-02-09 13:45:23 +00:00 by forbes · 1 comment
Owner

Tier 2 — Component Guide

File: docs/ZTOOLS.md

What this document should cover

  1. Overview — ztools is a pure-Python FreeCAD workbench providing unified Part Design/Assembly/Sketcher tools

    • Submodule: mods/ztools/git.kindred-systems.com/forbes/ztools
    • Pinned commit: 3298d1c
  2. Directory structure:

    mods/ztools/
    ├── ztools/ztools/
    │   ├── InitGui.py        # Workbench registration
    │   ├── Init.py           # Console initialization
    │   ├── commands/          # 9 command implementations
    │   ├── datums/core.py    # Datum creation (16 modes)
    │   └── resources/        # Icons and theme
    └── CatppuccinMocha/      # Theme preference pack
    
  3. Features and commands (9 total):

    • Datum Creator — planes, axes, points with 16 creation modes
    • Enhanced Pocket — flip-side cutting (outside sketch profile)
    • Assembly Patterns — linear and polar patterning
    • Spreadsheet Formatting — bold, italic, underline, alignment, colors
    • Detail each command's purpose and how it appears in the UI
  4. PartDesign injection mechanism:

    • _ZToolsPartDesignManipulator class
    • How it hooks into PartDesign workbench menus and toolbars
    • Registration flow from InitGui.py
  5. How to add a new tool:

    • Create command class in commands/
    • Register in InitGui.py
    • Add icon to resources/
    • Hook into PartDesign via manipulator (if needed)
    • Follow FreeCAD's Gui.addCommand() pattern
  6. Datum creation modes — document all 16 modes in datums/core.py with brief descriptions

  7. Theme integrationCatppuccinMocha/ preference pack, how it overlays the base theme

Key source files

  • mods/ztools/ztools/ztools/InitGui.py — workbench + manipulator registration
  • mods/ztools/ztools/ztools/commands/ — all command implementations
  • mods/ztools/ztools/ztools/datums/core.py — datum creation logic
  • mods/ztools/KINDRED_INTEGRATION.md — existing integration notes
  • mods/ztools/ROADMAP.md — planned features

Acceptance criteria

  • All 9 commands are documented with purpose and UI location
  • PartDesign injection mechanism is explained clearly
  • A developer can follow a guide to add a new tool
  • All 16 datum modes are listed
## Tier 2 — Component Guide **File:** `docs/ZTOOLS.md` ### What this document should cover 1. **Overview** — ztools is a pure-Python FreeCAD workbench providing unified Part Design/Assembly/Sketcher tools - Submodule: `mods/ztools/` → `git.kindred-systems.com/forbes/ztools` - Pinned commit: `3298d1c` 2. **Directory structure:** ``` mods/ztools/ ├── ztools/ztools/ │ ├── InitGui.py # Workbench registration │ ├── Init.py # Console initialization │ ├── commands/ # 9 command implementations │ ├── datums/core.py # Datum creation (16 modes) │ └── resources/ # Icons and theme └── CatppuccinMocha/ # Theme preference pack ``` 3. **Features and commands (9 total):** - Datum Creator — planes, axes, points with 16 creation modes - Enhanced Pocket — flip-side cutting (outside sketch profile) - Assembly Patterns — linear and polar patterning - Spreadsheet Formatting — bold, italic, underline, alignment, colors - Detail each command's purpose and how it appears in the UI 4. **PartDesign injection mechanism:** - `_ZToolsPartDesignManipulator` class - How it hooks into PartDesign workbench menus and toolbars - Registration flow from `InitGui.py` 5. **How to add a new tool:** - Create command class in `commands/` - Register in `InitGui.py` - Add icon to `resources/` - Hook into PartDesign via manipulator (if needed) - Follow FreeCAD's `Gui.addCommand()` pattern 6. **Datum creation modes** — document all 16 modes in `datums/core.py` with brief descriptions 7. **Theme integration** — `CatppuccinMocha/` preference pack, how it overlays the base theme ### Key source files - `mods/ztools/ztools/ztools/InitGui.py` — workbench + manipulator registration - `mods/ztools/ztools/ztools/commands/` — all command implementations - `mods/ztools/ztools/ztools/datums/core.py` — datum creation logic - `mods/ztools/KINDRED_INTEGRATION.md` — existing integration notes - `mods/ztools/ROADMAP.md` — planned features ### Acceptance criteria - [ ] All 9 commands are documented with purpose and UI location - [ ] PartDesign injection mechanism is explained clearly - [ ] A developer can follow a guide to add a new tool - [ ] All 16 datum modes are listed
forbes added the documentation label 2026-02-09 13:45:23 +00:00
Author
Owner

Superseded by the mdBook documentation structure set up in PR #105. The content scope of this issue is now covered by the pages in docs/src/. Remaining content work is tracked in #104.

Superseded by the mdBook documentation structure set up in PR #105. The content scope of this issue is now covered by the pages in `docs/src/`. Remaining content work is tracked in #104.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/create#91