CADSTAR PCB Archive Importer: Move code into common/plugins and pcbnew/plugins folders
This commit is contained in:
parent
fc76bdfeb2
commit
3b3af5327f
|
@ -275,6 +275,11 @@ set( PLUGINS_ALTIUM_SRCS
|
||||||
plugins/altium/altium_parser.cpp
|
plugins/altium/altium_parser.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
set( PLUGINS_CADSTAR_SRCS
|
||||||
|
plugins/cadstar/cadstar_archive_parser.cpp
|
||||||
|
)
|
||||||
|
|
||||||
set( COMMON_SRCS
|
set( COMMON_SRCS
|
||||||
${LIB_KICAD_SRCS}
|
${LIB_KICAD_SRCS}
|
||||||
${COMMON_ABOUT_DLG_SRCS}
|
${COMMON_ABOUT_DLG_SRCS}
|
||||||
|
@ -284,6 +289,7 @@ set( COMMON_SRCS
|
||||||
${COMMON_PREVIEW_ITEMS_SRCS}
|
${COMMON_PREVIEW_ITEMS_SRCS}
|
||||||
${PLOTTERS_CONTROL_SRCS}
|
${PLOTTERS_CONTROL_SRCS}
|
||||||
${PLUGINS_ALTIUM_SRCS}
|
${PLUGINS_ALTIUM_SRCS}
|
||||||
|
${PLUGINS_CADSTAR_SRCS}
|
||||||
advanced_config.cpp
|
advanced_config.cpp
|
||||||
array_axis.cpp
|
array_axis.cpp
|
||||||
array_options.cpp
|
array_options.cpp
|
||||||
|
|
|
@ -19,14 +19,14 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file cadstar_common.cpp
|
* @file cadstar_archive_parser.cpp
|
||||||
* @brief Helper functions and common defines
|
* @brief Helper functions and common defines between schematic and PCB Archive files
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cadstar_archive_common.h>
|
#include <plugins/cadstar/cadstar_archive_parser.h>
|
||||||
|
|
||||||
|
|
||||||
void CADSTAR_ARCHIVE_COMMON::EVALUE::Parse( XNODE* aNode )
|
void CADSTAR_ARCHIVE_PARSER::EVALUE::Parse( XNODE* aNode )
|
||||||
{
|
{
|
||||||
wxASSERT( aNode->GetName() == wxT( "E" ) );
|
wxASSERT( aNode->GetName() == wxT( "E" ) );
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ void CADSTAR_ARCHIVE_COMMON::EVALUE::Parse( XNODE* aNode )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CADSTAR_ARCHIVE_COMMON::POINT::Parse( XNODE* aNode )
|
void CADSTAR_ARCHIVE_PARSER::POINT::Parse( XNODE* aNode )
|
||||||
{
|
{
|
||||||
wxASSERT( aNode->GetName() == wxT( "PT" ) );
|
wxASSERT( aNode->GetName() == wxT( "PT" ) );
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ void CADSTAR_ARCHIVE_COMMON::POINT::Parse( XNODE* aNode )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool CADSTAR_ARCHIVE_COMMON::VERTEX::IsVertex( XNODE* aNode )
|
bool CADSTAR_ARCHIVE_PARSER::VERTEX::IsVertex( XNODE* aNode )
|
||||||
{
|
{
|
||||||
wxString aNodeName = aNode->GetName();
|
wxString aNodeName = aNode->GetName();
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ bool CADSTAR_ARCHIVE_COMMON::VERTEX::IsVertex( XNODE* aNode )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CADSTAR_ARCHIVE_COMMON::VERTEX::Parse( XNODE* aNode )
|
void CADSTAR_ARCHIVE_PARSER::VERTEX::Parse( XNODE* aNode )
|
||||||
{
|
{
|
||||||
wxASSERT( IsVertex( aNode ) );
|
wxASSERT( IsVertex( aNode ) );
|
||||||
|
|
||||||
|
@ -105,13 +105,13 @@ void CADSTAR_ARCHIVE_COMMON::VERTEX::Parse( XNODE* aNode )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
double CADSTAR_ARCHIVE_COMMON::EVALUE::GetDouble()
|
double CADSTAR_ARCHIVE_PARSER::EVALUE::GetDouble()
|
||||||
{
|
{
|
||||||
return Base * std::pow( 10.0, Exponent );
|
return Base * std::pow( 10.0, Exponent );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CADSTAR_ARCHIVE_COMMON::InsertAttributeAtEnd( XNODE* aNode, wxString aValue )
|
void CADSTAR_ARCHIVE_PARSER::InsertAttributeAtEnd( XNODE* aNode, wxString aValue )
|
||||||
{
|
{
|
||||||
wxString result, paramName = "attr0";
|
wxString result, paramName = "attr0";
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
@ -126,7 +126,7 @@ void CADSTAR_ARCHIVE_COMMON::InsertAttributeAtEnd( XNODE* aNode, wxString aValue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
XNODE* CADSTAR_ARCHIVE_COMMON::LoadArchiveFile(
|
XNODE* CADSTAR_ARCHIVE_PARSER::LoadArchiveFile(
|
||||||
const wxString& aFileName, const wxString& aFileTypeIdentifier )
|
const wxString& aFileName, const wxString& aFileTypeIdentifier )
|
||||||
{
|
{
|
||||||
KEYWORD emptyKeywords[1] = {};
|
KEYWORD emptyKeywords[1] = {};
|
||||||
|
@ -215,7 +215,7 @@ XNODE* CADSTAR_ARCHIVE_COMMON::LoadArchiveFile(
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString CADSTAR_ARCHIVE_COMMON::GetXmlAttributeIDString( XNODE* aNode, unsigned int aID )
|
wxString CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString( XNODE* aNode, unsigned int aID )
|
||||||
{
|
{
|
||||||
wxString attrName, retVal;
|
wxString attrName, retVal;
|
||||||
attrName = "attr";
|
attrName = "attr";
|
||||||
|
@ -228,7 +228,7 @@ wxString CADSTAR_ARCHIVE_COMMON::GetXmlAttributeIDString( XNODE* aNode, unsigned
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
long CADSTAR_ARCHIVE_COMMON::GetXmlAttributeIDLong( XNODE* aNode, unsigned int aID )
|
long CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDLong( XNODE* aNode, unsigned int aID )
|
||||||
{
|
{
|
||||||
long retVal;
|
long retVal;
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@ long CADSTAR_ARCHIVE_COMMON::GetXmlAttributeIDLong( XNODE* aNode, unsigned int a
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CADSTAR_ARCHIVE_COMMON::CheckNoChildNodes( XNODE* aNode )
|
void CADSTAR_ARCHIVE_PARSER::CheckNoChildNodes( XNODE* aNode )
|
||||||
{
|
{
|
||||||
if( aNode->GetChildren() )
|
if( aNode->GetChildren() )
|
||||||
{
|
{
|
||||||
|
@ -248,7 +248,7 @@ void CADSTAR_ARCHIVE_COMMON::CheckNoChildNodes( XNODE* aNode )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CADSTAR_ARCHIVE_COMMON::CheckNoNextNodes( XNODE* aNode )
|
void CADSTAR_ARCHIVE_PARSER::CheckNoNextNodes( XNODE* aNode )
|
||||||
{
|
{
|
||||||
if( aNode->GetNext() )
|
if( aNode->GetNext() )
|
||||||
{
|
{
|
||||||
|
@ -257,7 +257,7 @@ void CADSTAR_ARCHIVE_COMMON::CheckNoNextNodes( XNODE* aNode )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CADSTAR_ARCHIVE_COMMON::ParseChildEValue( XNODE* aNode, EVALUE& aValueToParse )
|
void CADSTAR_ARCHIVE_PARSER::ParseChildEValue( XNODE* aNode, EVALUE& aValueToParse )
|
||||||
{
|
{
|
||||||
if( aNode->GetChildren()->GetName() == wxT( "E" ) )
|
if( aNode->GetChildren()->GetName() == wxT( "E" ) )
|
||||||
{
|
{
|
||||||
|
@ -269,7 +269,7 @@ void CADSTAR_ARCHIVE_COMMON::ParseChildEValue( XNODE* aNode, EVALUE& aValueToPar
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<CADSTAR_ARCHIVE_COMMON::POINT> CADSTAR_ARCHIVE_COMMON::ParseAllChildPoints(
|
std::vector<CADSTAR_ARCHIVE_PARSER::POINT> CADSTAR_ARCHIVE_PARSER::ParseAllChildPoints(
|
||||||
XNODE* aNode, bool aTestAllChildNodes, int aExpectedNumPoints )
|
XNODE* aNode, bool aTestAllChildNodes, int aExpectedNumPoints )
|
||||||
{
|
{
|
||||||
std::vector<POINT> retVal;
|
std::vector<POINT> retVal;
|
||||||
|
@ -298,7 +298,7 @@ std::vector<CADSTAR_ARCHIVE_COMMON::POINT> CADSTAR_ARCHIVE_COMMON::ParseAllChild
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::vector<CADSTAR_ARCHIVE_COMMON::VERTEX> CADSTAR_ARCHIVE_COMMON::ParseAllChildVertices(
|
std::vector<CADSTAR_ARCHIVE_PARSER::VERTEX> CADSTAR_ARCHIVE_PARSER::ParseAllChildVertices(
|
||||||
XNODE* aNode, bool aTestAllChildNodes )
|
XNODE* aNode, bool aTestAllChildNodes )
|
||||||
{
|
{
|
||||||
std::vector<VERTEX> retVal;
|
std::vector<VERTEX> retVal;
|
||||||
|
@ -322,7 +322,7 @@ std::vector<CADSTAR_ARCHIVE_COMMON::VERTEX> CADSTAR_ARCHIVE_COMMON::ParseAllChil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::vector<CADSTAR_ARCHIVE_COMMON::CUTOUT> CADSTAR_ARCHIVE_COMMON::ParseAllChildCutouts(
|
std::vector<CADSTAR_ARCHIVE_PARSER::CUTOUT> CADSTAR_ARCHIVE_PARSER::ParseAllChildCutouts(
|
||||||
XNODE* aNode, bool aTestAllChildNodes )
|
XNODE* aNode, bool aTestAllChildNodes )
|
||||||
{
|
{
|
||||||
std::vector<CUTOUT> retVal;
|
std::vector<CUTOUT> retVal;
|
||||||
|
@ -345,7 +345,7 @@ std::vector<CADSTAR_ARCHIVE_COMMON::CUTOUT> CADSTAR_ARCHIVE_COMMON::ParseAllChil
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CADSTAR_ARCHIVE_COMMON::CUTOUT::Parse( XNODE* aNode )
|
void CADSTAR_ARCHIVE_PARSER::CUTOUT::Parse( XNODE* aNode )
|
||||||
{
|
{
|
||||||
wxASSERT( aNode->GetName() == wxT( "CUTOUT" ) );
|
wxASSERT( aNode->GetName() == wxT( "CUTOUT" ) );
|
||||||
|
|
||||||
|
@ -353,7 +353,7 @@ void CADSTAR_ARCHIVE_COMMON::CUTOUT::Parse( XNODE* aNode )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool CADSTAR_ARCHIVE_COMMON::SHAPE::IsShape( XNODE* aNode )
|
bool CADSTAR_ARCHIVE_PARSER::SHAPE::IsShape( XNODE* aNode )
|
||||||
{
|
{
|
||||||
wxString aNodeName = aNode->GetName();
|
wxString aNodeName = aNode->GetName();
|
||||||
|
|
||||||
|
@ -364,7 +364,7 @@ bool CADSTAR_ARCHIVE_COMMON::SHAPE::IsShape( XNODE* aNode )
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CADSTAR_ARCHIVE_COMMON::SHAPE::Parse( XNODE* aNode )
|
void CADSTAR_ARCHIVE_PARSER::SHAPE::Parse( XNODE* aNode )
|
||||||
{
|
{
|
||||||
wxASSERT( IsShape( aNode ) );
|
wxASSERT( IsShape( aNode ) );
|
||||||
|
|
|
@ -19,14 +19,13 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file cadstar_common.h
|
* @file cadstar_archive_parser.h
|
||||||
* @brief Helper functions and common defines
|
* @brief Helper functions and common defines between schematic and PCB Archive files
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CADSTAR_ARHIVE_COMMON_H_
|
#ifndef CADSTAR_ARHIVE_PARSER_H_
|
||||||
#define CADSTAR_ARHIVE_COMMON_H_
|
#define CADSTAR_ARHIVE_PARSER_H_
|
||||||
|
|
||||||
#include <class_board.h>
|
|
||||||
#include <dsnlexer.h>
|
#include <dsnlexer.h>
|
||||||
#include <macros.h>
|
#include <macros.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -54,7 +53,7 @@
|
||||||
/**
|
/**
|
||||||
* @brief Helper functions and common structures for CADSTAR PCB and Schematic archive files.
|
* @brief Helper functions and common structures for CADSTAR PCB and Schematic archive files.
|
||||||
*/
|
*/
|
||||||
class CADSTAR_ARCHIVE_COMMON
|
class CADSTAR_ARCHIVE_PARSER
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static const long UNDEFINED_VALUE = -1;
|
static const long UNDEFINED_VALUE = -1;
|
||||||
|
@ -247,6 +246,6 @@ public:
|
||||||
XNODE* aNode, bool aTestAllChildNodes = false );
|
XNODE* aNode, bool aTestAllChildNodes = false );
|
||||||
|
|
||||||
|
|
||||||
}; // class CADSTAR_ARCHIVE_COMMON
|
}; // class CADSTAR_ARHIVE_PARSER
|
||||||
|
|
||||||
#endif // CADSTAR_COMMON_H_
|
#endif // CADSTAR_ARHIVE_PARSER_H_
|
|
@ -67,7 +67,6 @@ set_target_properties( cvpcb_kiface PROPERTIES
|
||||||
)
|
)
|
||||||
target_link_libraries( cvpcb_kiface
|
target_link_libraries( cvpcb_kiface
|
||||||
pcbcommon
|
pcbcommon
|
||||||
cadstar2kicadpcb
|
|
||||||
3d-viewer
|
3d-viewer
|
||||||
gal
|
gal
|
||||||
common
|
common
|
||||||
|
|
|
@ -596,9 +596,9 @@ endif()
|
||||||
|
|
||||||
add_subdirectory( pcad2kicadpcb_plugin )
|
add_subdirectory( pcad2kicadpcb_plugin )
|
||||||
add_subdirectory( plugins/altium )
|
add_subdirectory( plugins/altium )
|
||||||
add_subdirectory( cadstar2kicadpcb_plugin )
|
add_subdirectory( plugins/cadstar )
|
||||||
|
|
||||||
set( PCBNEW_IO_LIBRARIES pcad2kicadpcb altium2pcbnew CACHE INTERNAL "")
|
set( PCBNEW_IO_LIBRARIES pcad2kicadpcb altium2pcbnew cadstar2pcbnew CACHE INTERNAL "")
|
||||||
|
|
||||||
if( BUILD_GITHUB_PLUGIN )
|
if( BUILD_GITHUB_PLUGIN )
|
||||||
add_subdirectory( github )
|
add_subdirectory( github )
|
||||||
|
@ -693,7 +693,6 @@ set( PCBNEW_KIFACE_LIBRARIES
|
||||||
connectivity
|
connectivity
|
||||||
pcbcommon
|
pcbcommon
|
||||||
pnsrouter
|
pnsrouter
|
||||||
cadstar2kicadpcb
|
|
||||||
kiplatform
|
kiplatform
|
||||||
common
|
common
|
||||||
gal
|
gal
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
|
|
||||||
# Sources for the pcbnew PLUGIN called CADSTAR_ARCHIVE_PLUGIN
|
|
||||||
include_directories( . )
|
|
||||||
|
|
||||||
set( CADSTAR2PCBNEW_SRCS
|
|
||||||
cadstar_pcb_archive_plugin.cpp
|
|
||||||
cadstar_pcb_archive_parser.cpp
|
|
||||||
cadstar_archive_common.cpp
|
|
||||||
cadstar_pcb.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
add_library( cadstar2kicadpcb STATIC ${CADSTAR2PCBNEW_SRCS} )
|
|
||||||
|
|
||||||
target_link_libraries( cadstar2kicadpcb pcbcommon )
|
|
|
@ -89,7 +89,7 @@ bool AskLoadBoardFileName( wxWindow* aParent, int* aCtl, wxString* aFileName, bo
|
||||||
{ AltiumDesignerPcbFileWildcard(), IO_MGR::ALTIUM_DESIGNER }, // Import Altium Designer board files
|
{ AltiumDesignerPcbFileWildcard(), IO_MGR::ALTIUM_DESIGNER }, // Import Altium Designer board files
|
||||||
{ AltiumCircuitStudioPcbFileWildcard(), IO_MGR::ALTIUM_CIRCUIT_STUDIO }, // Import Altium Circuit Studio board files
|
{ AltiumCircuitStudioPcbFileWildcard(), IO_MGR::ALTIUM_CIRCUIT_STUDIO }, // Import Altium Circuit Studio board files
|
||||||
{ AltiumCircuitMakerPcbFileWildcard(), IO_MGR::ALTIUM_CIRCUIT_MAKER }, // Import Altium Circuit Maker board files
|
{ AltiumCircuitMakerPcbFileWildcard(), IO_MGR::ALTIUM_CIRCUIT_MAKER }, // Import Altium Circuit Maker board files
|
||||||
{ CadstarArchivePcbFileWildcard(), IO_MGR::CADSTAR_ARCHIVE }, // Import Cadstar PCB Archive board files
|
{ CadstarArchivePcbFileWildcard(), IO_MGR::CADSTAR_PCB_ARCHIVE }, // Import Cadstar PCB Archive board files
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
|
@ -389,9 +389,9 @@ IO_MGR::PCB_FILE_T plugin_type( const wxString& aFileName, int aCtl )
|
||||||
{
|
{
|
||||||
pluginType = IO_MGR::ALTIUM_CIRCUIT_MAKER;
|
pluginType = IO_MGR::ALTIUM_CIRCUIT_MAKER;
|
||||||
}
|
}
|
||||||
else if( fn.GetExt().CmpNoCase( IO_MGR::GetFileExtension( IO_MGR::CADSTAR_ARCHIVE ) ) == 0 )
|
else if( fn.GetExt().CmpNoCase( IO_MGR::GetFileExtension( IO_MGR::CADSTAR_PCB_ARCHIVE ) ) == 0 )
|
||||||
{
|
{
|
||||||
pluginType = IO_MGR::CADSTAR_ARCHIVE;
|
pluginType = IO_MGR::CADSTAR_PCB_ARCHIVE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#include <wx/filename.h>
|
#include <wx/filename.h>
|
||||||
#include <wx/uri.h>
|
#include <wx/uri.h>
|
||||||
|
|
||||||
#include <cadstar2kicadpcb_plugin/cadstar_pcb_archive_plugin.h>
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <eagle_plugin.h>
|
#include <eagle_plugin.h>
|
||||||
#include <gpcb_plugin.h>
|
#include <gpcb_plugin.h>
|
||||||
|
@ -36,6 +35,7 @@
|
||||||
#include <plugins/altium/altium_circuit_maker_plugin.h>
|
#include <plugins/altium/altium_circuit_maker_plugin.h>
|
||||||
#include <plugins/altium/altium_circuit_studio_plugin.h>
|
#include <plugins/altium/altium_circuit_studio_plugin.h>
|
||||||
#include <plugins/altium/altium_designer_plugin.h>
|
#include <plugins/altium/altium_designer_plugin.h>
|
||||||
|
#include <plugins/cadstar/cadstar_pcb_archive_plugin.h>
|
||||||
|
|
||||||
#if defined(BUILD_GITHUB_PLUGIN)
|
#if defined(BUILD_GITHUB_PLUGIN)
|
||||||
#include <github/github_plugin.h>
|
#include <github/github_plugin.h>
|
||||||
|
@ -216,7 +216,7 @@ static IO_MGR::REGISTER_PLUGIN registerAltiumCircuitStudioPlugin( IO_MGR::ALTIUM
|
||||||
static IO_MGR::REGISTER_PLUGIN registerAltiumCircuitMakerPlugin( IO_MGR::ALTIUM_CIRCUIT_MAKER,
|
static IO_MGR::REGISTER_PLUGIN registerAltiumCircuitMakerPlugin( IO_MGR::ALTIUM_CIRCUIT_MAKER,
|
||||||
wxT( "Altium Circuit Maker" ),
|
wxT( "Altium Circuit Maker" ),
|
||||||
[]() -> PLUGIN* { return new ALTIUM_CIRCUIT_MAKER_PLUGIN; } );
|
[]() -> PLUGIN* { return new ALTIUM_CIRCUIT_MAKER_PLUGIN; } );
|
||||||
static IO_MGR::REGISTER_PLUGIN registerCadstarArchivePlugin( IO_MGR::CADSTAR_ARCHIVE,
|
static IO_MGR::REGISTER_PLUGIN registerCadstarArchivePlugin( IO_MGR::CADSTAR_PCB_ARCHIVE,
|
||||||
wxT( "CADSTAR PCB Archive" ), []() -> PLUGIN* { return new CADSTAR_PCB_ARCHIVE_PLUGIN; } );
|
wxT( "CADSTAR PCB Archive" ), []() -> PLUGIN* { return new CADSTAR_PCB_ARCHIVE_PLUGIN; } );
|
||||||
#ifdef BUILD_GITHUB_PLUGIN
|
#ifdef BUILD_GITHUB_PLUGIN
|
||||||
static IO_MGR::REGISTER_PLUGIN registerGithubPlugin( IO_MGR::GITHUB, wxT("Github"), []() -> PLUGIN* { return new GITHUB_PLUGIN; } );
|
static IO_MGR::REGISTER_PLUGIN registerGithubPlugin( IO_MGR::GITHUB, wxT("Github"), []() -> PLUGIN* { return new GITHUB_PLUGIN; } );
|
||||||
|
|
|
@ -60,7 +60,7 @@ public:
|
||||||
ALTIUM_DESIGNER,
|
ALTIUM_DESIGNER,
|
||||||
ALTIUM_CIRCUIT_STUDIO,
|
ALTIUM_CIRCUIT_STUDIO,
|
||||||
ALTIUM_CIRCUIT_MAKER,
|
ALTIUM_CIRCUIT_MAKER,
|
||||||
CADSTAR_ARCHIVE,
|
CADSTAR_PCB_ARCHIVE,
|
||||||
GEDA_PCB, ///< Geda PCB file formats.
|
GEDA_PCB, ///< Geda PCB file formats.
|
||||||
|
|
||||||
//N.B. This needs to be commented out to ensure compile-type errors
|
//N.B. This needs to be commented out to ensure compile-type errors
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
|
||||||
|
# Sources for the pcbnew PLUGIN called CADSTAR_PCB_ARCHIVE_PLUGIN
|
||||||
|
include_directories( . )
|
||||||
|
|
||||||
|
set( CADSTAR2PCBNEW_SRCS
|
||||||
|
cadstar_pcb_archive_plugin.cpp
|
||||||
|
cadstar_pcb_archive_parser.cpp
|
||||||
|
cadstar_pcb_archive_loader.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library( cadstar2pcbnew STATIC ${CADSTAR2PCBNEW_SRCS} )
|
||||||
|
|
||||||
|
target_link_libraries( cadstar2pcbnew pcbcommon )
|
|
@ -19,11 +19,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file cadstar_pcb.cpp
|
* @file cadstar_pcb_archive_loader.cpp
|
||||||
* @brief Converts a CADSTAR_PCB_ARCHIVE_PARSER object into a KiCad BOARD object
|
* @brief Loads a cpa file into a KiCad BOARD object
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cadstar_pcb.h>
|
#include <cadstar_pcb_archive_loader.h>
|
||||||
|
|
||||||
#include <board_stackup_manager/stackup_predefined_prms.h> // KEY_COPPER, KEY_CORE, KEY_PREPREG
|
#include <board_stackup_manager/stackup_predefined_prms.h> // KEY_COPPER, KEY_CORE, KEY_PREPREG
|
||||||
#include <class_drawsegment.h> // DRAWSEGMENT
|
#include <class_drawsegment.h> // DRAWSEGMENT
|
|
@ -19,14 +19,15 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file cadstar_pcb.h
|
* @file cadstar_pcb_archive_loader.h
|
||||||
* @brief Converts a CADSTAR_PCB_ARCHIVE_PARSER object into a KiCad BOARD object
|
* @brief Loads a cpa file into a KiCad BOARD object
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CADSTAR_PCB_H_
|
#ifndef CADSTAR_PCB_ARCHIVE_LOADER_H_
|
||||||
#define CADSTAR_PCB_H_
|
#define CADSTAR_PCB_ARCHIVE_LOADER_H_
|
||||||
|
|
||||||
#include <cadstar_pcb_archive_parser.h>
|
#include <cadstar_pcb_archive_parser.h>
|
||||||
|
#include <class_board.h>
|
||||||
|
|
||||||
class BOARD;
|
class BOARD;
|
||||||
|
|
||||||
|
@ -258,4 +259,4 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // CADSTAR_PCB_H_
|
#endif // CADSTAR_PCB_ARCHIVE_LOADER_H_
|
|
@ -27,7 +27,7 @@
|
||||||
#define CADSTAR_PCB_ARCHIVE_PARSER_H_
|
#define CADSTAR_PCB_ARCHIVE_PARSER_H_
|
||||||
|
|
||||||
#include <boost/serialization/strong_typedef.hpp>
|
#include <boost/serialization/strong_typedef.hpp>
|
||||||
#include <cadstar_archive_common.h>
|
#include <plugins/cadstar/cadstar_archive_parser.h>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
@ -60,11 +60,11 @@
|
||||||
/**
|
/**
|
||||||
* @brief Represents a CADSTAR PCB Archive (CPA) file
|
* @brief Represents a CADSTAR PCB Archive (CPA) file
|
||||||
*/
|
*/
|
||||||
class CADSTAR_PCB_ARCHIVE_PARSER : public CADSTAR_ARCHIVE_COMMON
|
class CADSTAR_PCB_ARCHIVE_PARSER : public CADSTAR_ARCHIVE_PARSER
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit CADSTAR_PCB_ARCHIVE_PARSER( wxString aFilename )
|
explicit CADSTAR_PCB_ARCHIVE_PARSER( wxString aFilename )
|
||||||
: Filename( aFilename ), CADSTAR_ARCHIVE_COMMON()
|
: Filename( aFilename ), CADSTAR_ARCHIVE_PARSER()
|
||||||
{
|
{
|
||||||
KiCadUnitMultiplier = 10; // assume hundredth micron
|
KiCadUnitMultiplier = 10; // assume hundredth micron
|
||||||
}
|
}
|
|
@ -24,7 +24,7 @@
|
||||||
* based on S-expressions.
|
* based on S-expressions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cadstar_pcb.h>
|
#include <cadstar_pcb_archive_loader.h>
|
||||||
#include <cadstar_pcb_archive_plugin.h>
|
#include <cadstar_pcb_archive_plugin.h>
|
||||||
#include <class_board.h>
|
#include <class_board.h>
|
||||||
|
|
|
@ -103,7 +103,6 @@ target_link_libraries( drc_proto
|
||||||
pcbcommon
|
pcbcommon
|
||||||
bitmaps
|
bitmaps
|
||||||
gal
|
gal
|
||||||
cadstar2kicadpcb
|
|
||||||
common
|
common
|
||||||
pcbcommon
|
pcbcommon
|
||||||
${PCBNEW_IO_LIBRARIES}
|
${PCBNEW_IO_LIBRARIES}
|
||||||
|
|
|
@ -71,7 +71,6 @@ target_link_libraries( test_gal_pixel_alignment
|
||||||
kimath
|
kimath
|
||||||
pnsrouter
|
pnsrouter
|
||||||
pcbcommon
|
pcbcommon
|
||||||
cadstar2kicadpcb
|
|
||||||
bitmaps
|
bitmaps
|
||||||
3d-viewer
|
3d-viewer
|
||||||
gal
|
gal
|
||||||
|
|
|
@ -75,7 +75,6 @@ target_link_libraries( libeval_compiler_test
|
||||||
pcbcommon
|
pcbcommon
|
||||||
bitmaps
|
bitmaps
|
||||||
gal
|
gal
|
||||||
cadstar2kicadpcb
|
|
||||||
common
|
common
|
||||||
pcbcommon
|
pcbcommon
|
||||||
${PCBNEW_IO_LIBRARIES}
|
${PCBNEW_IO_LIBRARIES}
|
||||||
|
|
|
@ -73,7 +73,6 @@ target_link_libraries( qa_pcbnew
|
||||||
connectivity
|
connectivity
|
||||||
pcbcommon
|
pcbcommon
|
||||||
pnsrouter
|
pnsrouter
|
||||||
cadstar2kicadpcb
|
|
||||||
gal
|
gal
|
||||||
common
|
common
|
||||||
gal
|
gal
|
||||||
|
|
|
@ -53,7 +53,6 @@ target_link_libraries( qa_pcbnew_tools
|
||||||
connectivity
|
connectivity
|
||||||
pcbcommon
|
pcbcommon
|
||||||
pnsrouter
|
pnsrouter
|
||||||
cadstar2kicadpcb
|
|
||||||
gal
|
gal
|
||||||
dxflib_qcad
|
dxflib_qcad
|
||||||
tinyspline_lib
|
tinyspline_lib
|
||||||
|
|
Loading…
Reference in New Issue