Skip to main content

brep_app/workbench/
modeling.rs

1//! The "Modeling" workbench (the DEFAULT): general solid modeling.
2//!
3//! Includes every feature EXCEPT the sheet-metal ones and the assembly
4//! component โ€” i.e. the modeling features plus the shared building blocks
5//! (sketch / datum / plane). The `SM.*` codes and `ACOMP` are filtered out of
6//! the creation UI (ACOMP is the Assembly workbench's creatable, spec ยง8.1).
7//! Classification lives HERE, off the feature type code (the kernel is
8//! untouched).
9
10use super::{FeatureInfo, Workbench, WorkbenchButton};
11
12/// Everything that is not sheet-metal (`SM.*`) or the assembly component
13/// (`ACOMP`) โ€” which naturally keeps the modeling features AND the common
14/// building blocks (`S` / `D` / `P`).
15fn includes(feature: &FeatureInfo<'_>) -> bool {
16    !feature.type_code.starts_with("SM.") && feature.type_code != "ACOMP"
17}
18
19/// No extra toolbar buttons in v1.
20static BUTTONS: &[WorkbenchButton] = &[];
21
22/// No panel claims (v1).
23static PANELS: &[&str] = &[];
24
25pub static MODELING: Workbench = Workbench {
26    id: "modeling",
27    label: "Modeling",
28    includes,
29    buttons: BUTTONS,
30    panels: PANELS,
31};