API: Add symbol path for footprint instances
See https://gitlab.com/kicad/code/kicad-python/-/issues/37
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include <magic_enum.hpp>
|
||||
#include <api/api_utils.h>
|
||||
#include <geometry/shape_poly_set.h>
|
||||
#include <kiid.h>
|
||||
#include <wx/log.h>
|
||||
|
||||
const wxChar* const traceApi = wxT( "KICAD_API" );
|
||||
@@ -232,4 +233,14 @@ KICOMMON_API KIGFX::COLOR4D UnpackColor( const types::Color& aInput )
|
||||
return KIGFX::COLOR4D( r, g, b, a );
|
||||
}
|
||||
|
||||
KICOMMON_API void PackSheetPath( types::SheetPath& aOutput, const KIID_PATH& aInput )
|
||||
{
|
||||
aOutput.clear_path();
|
||||
|
||||
for( const KIID& entry : aInput )
|
||||
aOutput.add_path()->set_value( entry.AsStdString() );
|
||||
|
||||
aOutput.set_path_human_readable( aInput.AsString().ToStdString() );
|
||||
}
|
||||
|
||||
} // namespace kiapi::common
|
||||
|
||||
Reference in New Issue
Block a user