From e928d72c3b250c7e92937301286b613cc8d7796a Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Sun, 29 Jan 2023 22:19:37 -0500 Subject: [PATCH] Fix relative step file export Forgot to set the project relative path, and the library search path Fixes https://gitlab.com/kicad/code/kicad/-/issues/13696 --- pcbnew/exporters/step/exporter_step.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pcbnew/exporters/step/exporter_step.cpp b/pcbnew/exporters/step/exporter_step.cpp index 769262cb56..4d12ff21e1 100644 --- a/pcbnew/exporters/step/exporter_step.cpp +++ b/pcbnew/exporters/step/exporter_step.cpp @@ -123,6 +123,8 @@ EXPORTER_STEP::EXPORTER_STEP( BOARD* aBoard, const EXPORTER_STEP_PARAMS& aParams m_resolver = std::make_unique(); m_resolver->Set3DConfigDir( wxT( "" ) ); + // needed to add the project to the search stack + m_resolver->SetProject( aBoard->GetProject() ); m_resolver->SetProgramBase( &Pgm() ); } @@ -188,7 +190,7 @@ bool EXPORTER_STEP::composePCB( FOOTPRINT* aFootprint, VECTOR2D aOrigin ) continue; std::vector searchedPaths; - wxString mname = m_resolver->ResolvePath( fp_model.m_Filename, wxEmptyString ); + wxString mname = m_resolver->ResolvePath( fp_model.m_Filename, footprintBasePath ); if( !wxFileName::FileExists( mname ) )