use super::{FeatureInfo, Workbench, WorkbenchButton};
pub const CONSTRAINTS_PANEL_ID: &str = "assemblyConstraints";
pub const BOM_PANEL_ID: &str = "assemblyBom";
fn includes(feature: &FeatureInfo<'_>) -> bool {
matches!(feature.type_code, "S" | "D" | "P" | "ACOMP")
}
static BUTTONS: &[WorkbenchButton] = &[
WorkbenchButton {
id: "assembly.add_component",
glyph: "\u{2295}",
tooltip: "Add component (insert a part from the library or a saved model)",
},
WorkbenchButton {
id: "assembly.step_parts_library",
glyph: "\u{1F4DA}",
tooltip: "step.parts library — browse & import an online STEP part as a component",
},
WorkbenchButton {
id: "assembly.auto_constrain",
glyph: "\u{E067}",
tooltip: "Auto constraints \u{2014} infer mates (concentric, touch align, coincident) from where the components already sit",
},
WorkbenchButton {
id: "assembly.interference",
glyph: "\u{2229}",
tooltip: "Interference check (pairwise intersect)",
},
];
static PANELS: &[&str] = &[CONSTRAINTS_PANEL_ID, BOM_PANEL_ID];
pub static ASSEMBLY: Workbench = Workbench {
id: "assembly",
label: "Assembly",
glyph: "\u{E064}",
includes,
buttons: BUTTONS,
panels: PANELS,
};