diff --git a/kicad b/kicad index c630090..fef0343 160000 --- a/kicad +++ b/kicad @@ -1 +1 @@ -Subproject commit c63009046c06011a0220b0e3ada28e084ffe4e54 +Subproject commit fef0343a97c0c8426128422924fbd5e065cbd1f3 diff --git a/wasm/stubs/model_substitution_stub.cpp b/wasm/stubs/model_substitution_stub.cpp new file mode 100644 index 0000000..f51e22f --- /dev/null +++ b/wasm/stubs/model_substitution_stub.cpp @@ -0,0 +1,37 @@ +/* + * MODEL_SUBSTITUTION stubs for the KiCad WASM build. + * + * When KICAD_BUILD_3D_VIEWER_WASM=OFF the 3D-viewer library is not linked, but + * it is where the .wrl→STEP model-substitution helpers + * (3d-viewer/3d_cache/model_substitution_helpers.cpp) live. pcbnew's + * dialog_migrate_3d_models.cpp still references them, so the final pcbnew/ + * footprint_editor link fails with undefined MODEL_SUBSTITUTION symbols. + * + * These no-op stubs satisfy the linker. There is no 3D viewer in the browser + * build, so model migration simply finds no substitutions (the dialog reports + * nothing to migrate) — which is the correct behavior for a WASM build with no + * local 3D model filesystem. + */ + +#include <3d_cache/model_substitution_helpers.h> + +namespace MODEL_SUBSTITUTION +{ + +bool IsWrlExtension( const wxString& ) +{ + return false; +} + + +void STEP_CATALOG::Build( const wxString&, const FILENAME_RESOLVER* ) +{ +} + + +wxString STEP_CATALOG::FindMatchFor( const wxString& ) const +{ + return wxEmptyString; +} + +} // namespace MODEL_SUBSTITUTION