From 80cf4ec5cb5b9a365c78d161c2662107fd0412fb Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 11 Mar 2019 19:25:52 +0100 Subject: [PATCH] Add comments about SVG import. --- common/advanced_config.cpp | 5 +---- pcbnew/import_gfx/dialog_import_gfx.cpp | 8 ++++++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/common/advanced_config.cpp b/common/advanced_config.cpp index 4317d45a32..8908652a3c 100644 --- a/common/advanced_config.cpp +++ b/common/advanced_config.cpp @@ -49,15 +49,12 @@ namespace AC_KEYS { /** - * Currently (Version 5.1) SVG import is disabled by default, to avoid issues * SVG needs some enhancements. * * 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 * arcs and circles as primitives (not yet possible with tinysvg library. - * So, until these issues are solved, disable SVG import option. - * - * Warning: enable svg import is currently only for developers. + * So, until these issues are solved, keep disabling SVG import option available. */ static const wxChar EnableSvgImport[] = wxT( "EnableSvgImport" ); diff --git a/pcbnew/import_gfx/dialog_import_gfx.cpp b/pcbnew/import_gfx/dialog_import_gfx.cpp index f0b661c6e4..d1bfc5117a 100644 --- a/pcbnew/import_gfx/dialog_import_gfx.cpp +++ b/pcbnew/import_gfx/dialog_import_gfx.cpp @@ -73,6 +73,14 @@ DIALOG_IMPORT_GFX::DIALOG_IMPORT_GFX( PCB_BASE_FRAME* aParent, bool aImportAsFoo GRAPHICS_IMPORT_MGR::TYPE_LIST blacklist; // Currently: all types are allowed, so the blacklist is empty // (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( blacklist ); }