diff --git a/src/app/model_ops.rs b/src/app/model_ops.rs index accf338ee..ee3eed0c2 100644 --- a/src/app/model_ops.rs +++ b/src/app/model_ops.rs @@ -469,6 +469,7 @@ impl super::OpenCADStudio { /// SECTION — draw the cross-section outline where an axis-aligned plane /// (X/Y/Z = `axis` at `value`) cuts the one selected solid, as Line entities. /// Reuses the mesh-interference analyzer to find the cut segments. + #[cfg(feature = "solid3d")] pub(super) fn solid_section(&mut self, axis: usize, value: f64) -> Task { use acadrust::types::Vector3; use acadrust::Line; @@ -576,6 +577,14 @@ impl super::OpenCADStudio { Task::none() } + /// Without `solid3d` (e.g. wasm) there is no mesh-interference kernel. + #[cfg(not(feature = "solid3d"))] + pub(super) fn solid_section(&mut self, _axis: usize, _value: f64) -> Task { + self.command_line + .push_error("SECTION: solid modelling is unavailable in this build."); + Task::none() + } + /// PYRAMID — create an `n`-sided pyramid (regular polygon base of the given /// circumradius, apex at `height`) as a tessellated mesh, reusing the same /// face→Shell→mesh path as LOFT. Each face is independent, so no closed-shell diff --git a/src/io/file_association.rs b/src/io/file_association.rs index 300769ccf..a5ca6141f 100644 --- a/src/io/file_association.rs +++ b/src/io/file_association.rs @@ -37,7 +37,6 @@ const APP_ID: &str = "io.github.HakanSeven12.OpenCadStudio"; /// Idempotent and best-effort; safe to call on every launch. Runs synchronously /// (registry / small file writes), so callers should invoke it off the UI /// thread. -#[cfg(not(target_arch = "wasm32"))] pub fn register_as_handler() -> Result<(), String> { #[cfg(target_os = "windows")] {