mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-22 00:12:34 +00:00
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:
@@ -1,10 +1,10 @@
|
||||
# SnapOrca-CAD vs Onshape — capability gap analysis
|
||||
|
||||
Generated 2026-07-22 by enumerating the source, not from recollection:
|
||||
`CadFeatureType` and `add_*` in `src/libslic3r/CadDocument.hpp`, `Tool` in
|
||||
`src/slic3r/GUI/DesignPanel.hpp`, `Mode` in `src/slic3r/GUI/DesignSketchTool.hpp`,
|
||||
`SketchConstraintType` + `SketchEntity::Type` in `src/libslic3r/SketchEngine.hpp`,
|
||||
and the JSON-RPC dispatch in `src/slic3r/GUI/McpControl.cpp`.
|
||||
`CadFeatureType` and `add_*` in `src/libslic3r/CAD/CadDocument.hpp`, `Tool` in
|
||||
`src/slic3r/GUI/CAD/DesignPanel.hpp`, `Mode` in `src/slic3r/GUI/CAD/DesignSketchTool.hpp`,
|
||||
`SketchConstraintType` + `SketchEntity::Type` in `src/libslic3r/CAD/SketchEngine.hpp`,
|
||||
and the JSON-RPC dispatch in `src/slic3r/GUI/CAD/McpControl.cpp`.
|
||||
|
||||
**Scope note.** Onshape is a cloud PLM platform; SnapOrca is a Design tab inside a
|
||||
slicer. A large share of Onshape's surface (release management, branching, real-time
|
||||
|
||||
+7
-7
@@ -320,14 +320,14 @@ Being straight about the edges, so nobody discovers them the hard way:
|
||||
|
||||
| Path | Role |
|
||||
|---|---|
|
||||
| `src/libslic3r/CadDocument.*` | the feature recipe and its replay |
|
||||
| `src/libslic3r/GeometryEngine.*` | OCCT wrapper — faces, edges, booleans, healing |
|
||||
| `src/libslic3r/SketchEngine.*` | profile → wire → solid |
|
||||
| `src/libslic3r/SketchSolver.*` | constraint solving, over the vendored solver |
|
||||
| `src/libslic3r/CAD/CadDocument.*` | the feature recipe and its replay |
|
||||
| `src/libslic3r/CAD/GeometryEngine.*` | OCCT wrapper — faces, edges, booleans, healing |
|
||||
| `src/libslic3r/CAD/SketchEngine.*` | profile → wire → solid |
|
||||
| `src/libslic3r/CAD/SketchSolver.*` | constraint solving, over the vendored solver |
|
||||
| `src/libslic3r/slvs/` | vendored 2D constraint solver (GPLv3) |
|
||||
| `src/slic3r/GUI/DesignPanel.*` | the tab: toolbar, cards, feature tree |
|
||||
| `src/slic3r/GUI/DesignCanvas.*` | viewport integration |
|
||||
| `src/slic3r/GUI/DesignSketchTool.*` | in-canvas sketching |
|
||||
| `src/slic3r/GUI/CAD/DesignPanel.*` | the tab: toolbar, cards, feature tree |
|
||||
| `src/slic3r/GUI/CAD/DesignCanvas.*` | viewport integration |
|
||||
| `src/slic3r/GUI/CAD/DesignSketchTool.*` | in-canvas sketching |
|
||||
|
||||
Build with `-DSLIC3R_CAD=ON` (the default). With it OFF the tab is not compiled and the deps
|
||||
prefix matches upstream exactly — see [cad_dependency_weight.md](cad_dependency_weight.md).
|
||||
|
||||
@@ -70,4 +70,4 @@ AGPLv3/GPLv3 compatibility argument; this point should be confirmed with upstrea
|
||||
|
||||
See the [Where the code lives](docs/design_tab.md#where-the-code-lives) table in the user
|
||||
doc for the file-to-role mapping, and [docs/ux/tool_atlas.json](docs/ux/tool_atlas.json) as
|
||||
the generated-from source of `src/slic3r/GUI/DesignOffer.hpp`.
|
||||
the generated-from source of `src/slic3r/GUI/CAD/DesignOffer.hpp`.
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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."
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user