Add comments about SVG import.

This commit is contained in:
jean-pierre charras 2019-03-11 19:25:52 +01:00
parent 61567d3917
commit 80cf4ec5cb
2 changed files with 9 additions and 4 deletions

View File

@ -49,15 +49,12 @@ namespace AC_KEYS
{ {
/** /**
* Currently (Version 5.1) SVG import is disabled by default, to avoid issues
* SVG needs some enhancements. * SVG needs some enhancements.
* *
* Especially, all SVG shapes are imported as curves and converted to a lot of segments. * Especially, all SVG shapes are imported as curves and converted to a lot of segments.
* A better approach is to convert to polylines (not yet existing in Pcbnew) and keep * A better approach is to convert to polylines (not yet existing in Pcbnew) and keep
* arcs and circles as primitives (not yet possible with tinysvg library. * arcs and circles as primitives (not yet possible with tinysvg library.
* So, until these issues are solved, disable SVG import option. * So, until these issues are solved, keep disabling SVG import option available.
*
* Warning: enable svg import is currently only for developers.
*/ */
static const wxChar EnableSvgImport[] = wxT( "EnableSvgImport" ); static const wxChar EnableSvgImport[] = wxT( "EnableSvgImport" );

View File

@ -73,6 +73,14 @@ DIALOG_IMPORT_GFX::DIALOG_IMPORT_GFX( PCB_BASE_FRAME* aParent, bool aImportAsFoo
GRAPHICS_IMPORT_MGR::TYPE_LIST blacklist; GRAPHICS_IMPORT_MGR::TYPE_LIST blacklist;
// Currently: all types are allowed, so the blacklist is empty // Currently: all types are allowed, so the blacklist is empty
// (no GFX_FILE_T in the blacklist) // (no GFX_FILE_T in the blacklist)
// To disable SVG import, enable these 2 lines
// if( !ADVANCED_CFG::GetCfg().m_enableSvgImport )
// blacklist.push_back( GRAPHICS_IMPORT_MGR::SVG );
// The SVG import has currently a flaw:
// All SVG shapes are imported as curves and converted to a lot of segments.
// A better approach is to convert to polylines (not yet existing in Pcbnew) and keep
// arcs and circles as primitives (not yet possible with tinysvg library).
m_gfxImportMgr = std::make_unique<GRAPHICS_IMPORT_MGR>( blacklist ); m_gfxImportMgr = std::make_unique<GRAPHICS_IMPORT_MGR>( blacklist );
} }