Files
create/docs/COMPONENTS.md
forbes 6773ca0dfd
Some checks failed
Build and Test / build (pull_request) Has been cancelled
fix(theme): eliminate QSS/CFG duplication (#51)
- Make src/Gui/Stylesheets/KindredCreate.qss the single source of truth
- Generate PreferencePacks QSS copy at build time via configure_file()
- Merge missing preference defaults into PreferencePacks cfg:
  Document (undo, autosave, backup, license), TreeView (PreSelection,
  SyncView, SyncSelection), NotificationArea, OutputWindow recording,
  General (AutoloadModule=ZToolsWorkbench)
- Delete unused resources/preferences/KindredCreate/ directory
- Delete src/Gui/PreferencePacks/KindredCreate/KindredCreate.qss from source
- Update documentation to reflect single QSS location
2026-02-08 17:41:26 -06:00

5.1 KiB

Components

ztools workbench

Registered commands (9):

Command Function
ZTools_DatumCreator Create datum planes, axes, points (16 modes)
ZTools_DatumManager Manage existing datum objects
ZTools_EnhancedPocket Flip-side pocket (cut outside sketch profile)
ZTools_RotatedLinearPattern Linear pattern with incremental rotation
ZTools_AssemblyLinearPattern Pattern assembly components linearly
ZTools_AssemblyPolarPattern Pattern assembly components around axis
ZTools_SpreadsheetStyle{Bold,Italic,Underline} Text style toggles
ZTools_SpreadsheetAlign{Left,Center,Right} Cell alignment
ZTools_Spreadsheet{BgColor,TextColor,QuickAlias} Colors and alias creation

PartDesign integration via _ZToolsPartDesignManipulator:

  • ZTools_DatumCreator, ZTools_DatumManager → "Part Design Helper Features" toolbar
  • ZTools_EnhancedPocket → "Part Design Modeling Features" toolbar
  • ZTools_RotatedLinearPattern → "Part Design Transformation Features" toolbar
  • Same commands inserted into Part Design menu after PartDesign_Boolean

Datum types (7): offset_from_face, offset_from_plane, midplane, 3_points, normal_to_edge, angled, tangent_to_cylinder. All except tangent_to_cylinder use Part::AttachExtension for automatic parametric updates.


Origin commands (C++)

The Origin abstraction (src/Gui/FileOrigin.h) provides a backend-agnostic interface for document storage. Commands delegate to the active FileOrigin implementation (currently LocalFileOrigin for local files, SiloOrigin via mods/silo/freecad/silo_origin.py for Silo-tracked documents).

Registered commands (5):

Command Function Icon
Origin_Commit Commit changes as a new revision silo-commit
Origin_Pull Pull a specific revision from the origin silo-pull
Origin_Push Push local changes to the origin silo-push
Origin_Info Show document information from origin silo-info
Origin_BOM Show Bill of Materials for this document silo-bom

These appear in the File menu and "Origin Tools" toolbar across all workbenches (see src/Gui/Workbench.cpp).


Silo workbench

Registered commands (14):

Command Function
Silo_New Create new Silo-tracked document
Silo_Open Open file from Silo database
Silo_Save Save to Silo (create revision)
Silo_Commit Commit current revision
Silo_Pull Pull latest revision from server
Silo_Push Push local changes to server
Silo_Info View item metadata and history
Silo_BOM Bill of materials dialog (BOM + Where Used)
Silo_TagProjects Assign project tags
Silo_Rollback Rollback to previous revision
Silo_SetStatus Set revision status (draft/review/released/obsolete)
Silo_Settings Configure API URL, projects dir, SSL certificates
Silo_Auth Login/logout authentication panel

Global integration via the origin system in src/Gui/:

  • File toolbar: Std_Origin selector widget + Std_New/Std_Open/Std_Save (delegate to current origin)
  • Origin Tools toolbar: Origin_Commit/Origin_Pull/Origin_Push/Origin_Info/Origin_BOM (auto-disable by capability)
  • Silo origin registered at startup by src/Mod/Create/InitGui.py

Server architecture: Go REST API (38+ routes) + PostgreSQL + MinIO S3. Authentication via local (bcrypt), LDAP, or OIDC backends. See mods/silo/docs/ for server documentation.

LibreOffice Calc extension (silo-calc): BOM management, item creation, and AI-assisted descriptions via OpenRouter API. Shares the same Silo REST API and auth token system via the shared silo-client package.


Theme

Canonical source: src/Gui/Stylesheets/KindredCreate.qss

The PreferencePacks copy (src/Gui/PreferencePacks/KindredCreate/KindredCreate.qss) is generated at build time via configure_file() in src/Gui/PreferencePacks/CMakeLists.txt. Only the Stylesheets copy needs to be maintained.


Icon infrastructure

Qt resource icons (src/Gui/Icons/)

5 silo-* SVGs registered in resource.qrc, used by C++ Origin commands:

silo-bom.svg, silo-commit.svg, silo-info.svg, silo-pull.svg, silo-push.svg

Silo module icons (mods/silo/freecad/resources/icons/)

10 SVGs loaded at runtime by the _icon() function in silo_commands.py:

silo-auth.svg, silo-bom.svg, silo-commit.svg, silo-info.svg, silo-new.svg, silo-open.svg, silo-pull.svg, silo-push.svg, silo-save.svg, silo.svg

Missing icons

3 command icon names have no corresponding SVG file: silo-tag, silo-rollback, silo-status. The _icon() function returns an empty string for these, so Silo_TagProjects, Silo_Rollback, and Silo_SetStatus render without toolbar icons.

Palette

All silo-* icons use the Catppuccin Mocha color scheme. See kindred-icons/README.md for palette specification and icon design standards.