feat: unified datum creation command replacing separate plane/line/point commands #241
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Replace the four separate PartDesign datum commands (
PartDesign_Plane,PartDesign_Line,PartDesign_Point,PartDesign_CoordinateSystem) with a single unified datum creation command based on the ztools DatumCreator.Motivation
The current PartDesign workflow requires users to know which datum type they need before selecting geometry. The ztools DatumCreator reverses this: select geometry first, and the tool auto-detects the best datum type from 16 modes (7 planes, 4 axes, 5 points). This is faster, more discoverable, and covers creation modes that the native commands cannot express at all (midplane, tangent to cylinder, axis at cylinder center, point at face center, etc.).
Current State
Native PartDesign (4 commands, C++):
PartDesign_Plane/PartDesign_Line/PartDesign_Point/PartDesign_CoordinateSystemPartDesign_CompDatumsin toolbarAttachExtensionwith the standard attachment panelztools DatumCreator (1 command, Python):
ZTools_DatumCreator— unified task panel with selection table + auto-detectionZTools_Type,ZTools_Params,ZTools_SourceRefsZToolsDatumViewProviderWorkbenchManipulatorProposed Change
Integrate the unified datum creation command into the base FreeCAD PartDesign workbench, replacing the four separate commands with one:
PartDesign_CompDatumstoolbar group with the unified datum command16 Datum Creation Modes
Planes (7)
Axes (4)
Points (5)
Key Files
mods/ztools/ztools/ztools/commands/datum_commands.py— DatumCreator command + task panelmods/ztools/ztools/ztools/datums/core.py— 16 creation functions + attachment logicmods/ztools/ztools/ztools/commands/datum_viewprovider.py— custom ViewProvider + edit panelsrc/Mod/PartDesign/Gui/Command.cpp— native datum commands (lines 2638–2720)src/Mod/PartDesign/Gui/Workbench.cpp— native toolbar/menu registrationNotes
ZTools_DatumManager) is currently a placeholder stub — it is not part of this issue