Design tab: move the CAD sources into their own folder

Review request on PR #15238: "Place CAD-related files (e.g. CadDocument/
GeometryEngine) into a separate folder."

  src/libslic3r/CAD/     the kernel — CadDocument, GeometryEngine, the four
                         Sketch* units, SketchSolver, ThreadStandards
  src/slic3r/GUI/CAD/    the tab — DesignPanel, DesignCanvas, DesignSketchTool,
                         SketchInlineEditor, McpControl, generated DesignOffer

Pure relocation: no line of logic changes. Two include rewrites follow from it —
files that moved re-spell their own neighbours against src/ (already on the
include path), and files that did not move pick up the new folder. docs and
docs/ux/mockups/gen_offer_table.py follow the same paths.

Verified: libslic3r, libslic3r_gui and libslic3r_tests all build, CAD suite green
at 2518 assertions in 194 test cases, and the sibling fork builds identically —
17 shared sources still byte-identical, 8 diverging by their expected counts.
This commit is contained in:
Tommaso Bianchi
2026-08-20 17:44:34 +02:00
parent 5d120921d5
commit 2b02a8e3dd
44 changed files with 135 additions and 135 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ The map exists ONCE. The mockups and the shipping menu read the same rows in the
order from the same file, so a drawing and the product cannot drift apart — which is the
only way row constancy (charter 4.1) survives contact with a codebase.
Output: src/slic3r/GUI/DesignOffer.hpp, checked in and never hand-edited.
Output: src/slic3r/GUI/CAD/DesignOffer.hpp, checked in and never hand-edited.
"""
import json
@@ -17,7 +17,7 @@ HERE = os.path.dirname(os.path.abspath(__file__))
UX = os.path.dirname(HERE)
REPO = os.path.dirname(os.path.dirname(UX))
ATLAS = os.path.join(UX, "tool_atlas.json")
OUT = os.path.join(REPO, "src", "slic3r", "GUI", "DesignOffer.hpp")
OUT = os.path.join(REPO, "src", "slic3r", "GUI", "CAD", "DesignOffer.hpp")
# selection id -> C++ enumerator
ENUM = {
+4 -4
View File
@@ -3,11 +3,11 @@
"Source of truth for the object-driven tool offer (see docs/cad_ux_guidelines.md 4.1).",
"Every verb, the selections it accepts, the document state it needs, and its fixed",
"compass address. Extracted from the code, not from memory:",
" verbs + shortcuts + refusal messages -> src/slic3r/GUI/DesignPanel.cpp (feat_dropdown",
" verbs + shortcuts + refusal messages -> src/slic3r/GUI/CAD/DesignPanel.cpp (feat_dropdown",
" call sites at 524/662/734/790/874/904, sk_key table at 369-400, m_keys_feature)",
" kernel coverage -> src/libslic3r/CadDocument.hpp (enum CadFeatureType)",
" headless coverage -> src/slic3r/GUI/McpControl.cpp (method == \"...\")",
" selection kinds -> src/slic3r/GUI/DesignCanvas.hpp (the on_*_selected callbacks)",
" kernel coverage -> src/libslic3r/CAD/CadDocument.hpp (enum CadFeatureType)",
" headless coverage -> src/slic3r/GUI/CAD/McpControl.cpp (method == \"...\")",
" selection kinds -> src/slic3r/GUI/CAD/DesignCanvas.hpp (the on_*_selected callbacks)",
"gen_offer_mockups.py reads this file; the eventual C++ offer table is generated from it",
"too, so the map exists once."
],