Skip to content

Missing commands when processing toolbar items #472

@krokosik

Description

@krokosik

Describe the bug
When creating new panels/dropdowns there are multiple commands missing.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Layout editor
  2. Go to Create new panel
  3. Search for Line
  4. Notice missing sketcher variant

Expected behavior
I expect all commands from the command reference to be available

Please complete the following information:

  • OS: Linux
  • FreeCAD information:
OS: CachyOS (Hyprland/hyprland-uwsm/wayland)
Architecture: x86_64
Version: 1.1.1.44874 (Git)
Build date: 2026/04/14 22:09:59
Build type: Release
Branch: makepkg
Hash: 0108fd4b4850cc46e625b60e53cea7a7bbe69f8d
Python 3.14.4, Qt 6.11.0, Coin 4.0.8, Vtk 9.6.1, boost 1_90, Eigen3 5.0.1, PySide 6.11.0
shiboken 6.11.0, SMESH 7.7.1.0, xerces-c 3.3.0, OCC 7.9.3
Locale: English/United States (en_US)
Navigation Style/Orbit Style/Rotation Mode: Blender/Trackball/Drag at cursor
Stylesheet/Theme/QtStyle: FreeCAD.qss/FreeCAD Light/
Logical DPI/Physical DPI/Pixel Ratio: 96/129.57/2
Installed mods: 
  * SaveAndRestore 0.2.2
  * SearchBar 1.8.0
  * FreeCAD-Ribbon 1.10.10.2
  • Ribbon information (Develop version only):
Installed version: 1.10.10.2
Branch: -
Commit ID: -

Additional context
I have asked an agent to find all the missing commands and pinpoint the issue:

1. The Composite/Dropdown Command Flaw
In FreeCAD 1.0/1.1, many commands in the Sketcher and PartDesign workbenches were grouped into "Composite" dropdown commands on the toolbars (e.g., Sketcher_CompLine, PartDesign_CompDatums). 
The Ribbon addon populates its available commands list by reading WorkBench.getToolbarItems(). When it encounters a composite dropdown, it attempts to extract the child commands via returnDropDownCommands() in LoadDesign_Ribbon.py. However, instead of extracting the actual FreeCAD command name for the child action, it registers them using an internal pseudo-name formatted as CompositeName, index (e.g., Sketcher_CompLine, 0 or PartDesign_CompPrimitiveAdditive, 2). 
Because of this, the true command names (like Sketcher_CreateLine) are never added to the master self.List_Commands list.
2. The UI Label Deduplication Flaw (ShadowList)
In LoadDesign_Ribbon.py -> LoadCommands(), the addon attempts to prevent duplicate entries from appearing in the Layout window by keeping a ShadowList. 
The flaw: It deduplicates based on the translated menu text (MenuNameTranslated) rather than the unique command name. 
If two completely different commands from different workbenches share the exact same UI label (e.g., "Fillet", "Chamfer", "Thickness"), the first one processed (usually from the Part workbench) is added, and the subsequent one (from PartDesign) is silently discarded.
---
List of Missing Commands (FreeCAD 1.1)
Based on these two flaws and checking the FreeCAD reference, here are the major commands missing from the layout lists:
Missing Sketcher Commands (Due to Dropdown logic):
*   Lines: Sketcher_CreateLine, Sketcher_CreatePolyline (Hidden in Sketcher_CompLine)
*   Arcs/Circles: Sketcher_CreateArc, Sketcher_Create3PointArc, Sketcher_CreateCircle, Sketcher_Create3PointCircle, Sketcher_CreateArcOfEllipse, Sketcher_CreateArcOfHyperbola, Sketcher_CreateArcOfParabola (Hidden in Sketcher_CompCreateArc)
*   Conics: Sketcher_CreateEllipseByCenter, Sketcher_CreateEllipseBy3Points (Hidden in Sketcher_CompCreateConic)
*   Rectangles/Polygons: Sketcher_CreateRectangle, Sketcher_CreateTriangle, Sketcher_CreateSquare, Sketcher_CreatePentagon, Sketcher_CreateHexagon, etc. (Hidden in Sketcher_CompCreateRectangles / Sketcher_CompCreateRegularPolygon)
*   Slots: Sketcher_CreateSlot, Sketcher_CreateArcSlot (Hidden in Sketcher_CompSlot)
*   B-Splines: Sketcher_CreateBSpline, Sketcher_CreatePeriodicBSpline (Hidden in Sketcher_CompCreateBSpline)
*   Dressups: Sketcher_CreateFillet, Sketcher_CreateChamfer (Hidden in Sketcher_CompCreateFillets)
*   Constraints: Many specific constraint commands are hidden inside Sketcher_CompConstrainRadDia, Sketcher_CompConstrainTools, Sketcher_CompHorVer, etc.
Missing PartDesign Commands:
*   Missing due to Deduplication Flaw (Label conflicts with Part):
    *   PartDesign_Fillet (Conflicts with Part_Fillet -> "Fillet")
    *   PartDesign_Chamfer (Conflicts with Part_Chamfer -> "Chamfer")
    *   PartDesign_Thickness (Conflicts with Part_Thickness -> "Thickness")
    *   PartDesign_Draft (Conflicts with Part_Draft -> "Draft")
*   Missing due to Dropdown logic:
    *   Additive Primitives: PartDesign_AdditiveBox, PartDesign_AdditiveCone, PartDesign_AdditiveCylinder, etc. (Hidden in PartDesign_CompPrimitiveAdditive)
    *   Subtractive Primitives: PartDesign_SubtractiveBox, PartDesign_SubtractiveCone, PartDesign_SubtractiveCylinder, etc. (Hidden in PartDesign_CompPrimitiveSubtractive)
    *   Datums: PartDesign_Point, PartDesign_Line, PartDesign_Plane, PartDesign_CoordinateSystem (Hidden in PartDesign_CompDatums)
(Note: While commands like PartDesign_Hole or PartDesign_Pad appear correctly because they are still exposed natively as independent items on standard FreeCAD 1.1 toolbars and have distinct labels).

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions