KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PCB_IO_EASYEDAPRO_PARSER Class Reference

#include <pcb_io_easyedapro_parser.h>

Public Member Functions

 PCB_IO_EASYEDAPRO_PARSER (BOARD *aBoard, PROGRESS_REPORTER *aProgressReporter)
 
 ~PCB_IO_EASYEDAPRO_PARSER ()
 
PCB_LAYER_ID LayerToKi (int aLayer)
 
FOOTPRINTParseFootprint (const nlohmann::json &aProject, const wxString &aFpUuid, const std::vector< nlohmann::json > &aLines)
 
void ParseBoard (BOARD *aBoard, const nlohmann::json &aProject, std::map< wxString, std::unique_ptr< FOOTPRINT > > &aFootprintMap, const std::map< wxString, EASYEDAPRO::BLOB > &aBlobMap, const std::multimap< wxString, EASYEDAPRO::POURED > &aPouredMap, const std::vector< nlohmann::json > &aLines, const wxString &aFpLibName)
 
std::vector< std::unique_ptr< PCB_SHAPE > > ParsePoly (BOARD_ITEM_CONTAINER *aContainer, nlohmann::json polyData, bool aClosed, bool aInFill) const
 
SHAPE_LINE_CHAIN ParseContour (nlohmann::json polyData, bool aInFill, double aArcAccuracy=SHAPE_ARC::DefaultAccuracyForPCB()) const
 

Static Public Member Functions

template<typename T >
static T ScaleSize (T aValue)
 
template<typename T >
static VECTOR2< T > ScaleSize (VECTOR2< T > aValue)
 
template<typename T >
static VECTOR2< T > ScalePos (VECTOR2< T > aValue)
 
static double Convert (wxString aValue)
 

Private Member Functions

std::unique_ptr< PADcreatePAD (FOOTPRINT *aFootprint, const nlohmann::json &line)
 
void fillFootprintModelInfo (FOOTPRINT *footprint, const wxString &modelUuid, const wxString &modelTitle, const wxString &modelTransform) const
 

Private Attributes

BOARDm_board
 
VECTOR2D m_relOrigin
 

Detailed Description

Definition at line 47 of file pcb_io_easyedapro_parser.h.

Constructor & Destructor Documentation

◆ PCB_IO_EASYEDAPRO_PARSER()

PCB_IO_EASYEDAPRO_PARSER::PCB_IO_EASYEDAPRO_PARSER ( BOARD aBoard,
PROGRESS_REPORTER aProgressReporter 
)
explicit

Definition at line 81 of file pcb_io_easyedapro_parser.cpp.

References m_board.

◆ ~PCB_IO_EASYEDAPRO_PARSER()

PCB_IO_EASYEDAPRO_PARSER::~PCB_IO_EASYEDAPRO_PARSER ( )

Definition at line 87 of file pcb_io_easyedapro_parser.cpp.

Member Function Documentation

◆ Convert()

double PCB_IO_EASYEDAPRO_PARSER::Convert ( wxString  aValue)
static

Definition at line 70 of file pcb_io_easyedapro_parser.cpp.

References _, and THROW_IO_ERROR.

Referenced by fillFootprintModelInfo().

◆ createPAD()

std::unique_ptr< PAD > PCB_IO_EASYEDAPRO_PARSER::createPAD ( FOOTPRINT aFootprint,
const nlohmann::json &  line 
)
private

◆ fillFootprintModelInfo()

void PCB_IO_EASYEDAPRO_PARSER::fillFootprintModelInfo ( FOOTPRINT footprint,
const wxString &  modelUuid,
const wxString &  modelTitle,
const wxString &  modelTransform 
) const
private

◆ LayerToKi()

◆ ParseBoard()

void PCB_IO_EASYEDAPRO_PARSER::ParseBoard ( BOARD aBoard,
const nlohmann::json &  aProject,
std::map< wxString, std::unique_ptr< FOOTPRINT > > &  aFootprintMap,
const std::map< wxString, EASYEDAPRO::BLOB > &  aBlobMap,
const std::multimap< wxString, EASYEDAPRO::POURED > &  aPouredMap,
const std::vector< nlohmann::json > &  aLines,
const wxString &  aFpLibName 
)

Definition at line 951 of file pcb_io_easyedapro_parser.cpp.

References SEG::A, BOARD::Add(), SHAPE_POLY_SET::AddOutline(), AlignText(), PADSTACK::ALL_LAYERS, ANGLE_0, SHAPE_POLY_SET::Append(), ARC_HIGH_DEF, ARC_LOW_DEF, SEG::B, B_Cu, SHAPE_LINE_CHAIN::BBox(), SHAPE_POLY_SET::BBox(), SHAPE_POLY_SET::BooleanAdd(), SHAPE_POLY_SET::BooleanSubtract(), BOARD::ComputeBoundingBox(), ConnectBoardShapes(), SHAPE_ARC::ConstructFromStartEndCenter(), SHAPE_POLY_SET::CPolygons(), createPAD(), SHAPE_LINE_CHAIN::CSegment(), DEG2RAD(), DEGREES_T, delta, BOARD::Drawings(), Edge_Cuts, ERROR_INSIDE, fillFootprintModelInfo(), BOARD::FindNet(), EASYEDAPRO::PCB_ATTR::fontName, SHAPE_POLY_SET::Fracture(), get_opt(), BOX2< Vec >::GetCenter(), BOARD::GetDesignSettings(), BOARD::GetEnabledLayers(), KIFONT::FONT::GetFont(), PAGE_INFO::GetHeightMils(), BOARD::GetNetCount(), BOX2< Vec >::GetOrigin(), BOARD::GetPageSettings(), SHAPE_LINE_CHAIN::GetPoint(), REFERENCE_IMAGE::GetSize(), BOX2< Vec >::GetSize(), PAGE_INFO::GetWidthMils(), group, EASYEDAPRO::PCB_ATTR::height, EASYEDAPRO::IMPORT_POURED, SHAPE_POLY_SET::Inflate(), EASYEDAPRO::PCB_ATTR::inverted, IsBackLayer(), SHAPE_POLY_SET::IsEmpty(), EASYEDAPRO::POURED::isPoly, EASYEDAPRO::PCB_ATTR::key, EASYEDAPRO::PCB_ATTR::keyVisible, KiROUND(), EASYEDAPRO::PCB_ATTR::layer, LayerToKi(), BOARD_DESIGN_SETTINGS::m_MinClearance, BOARD_DESIGN_SETTINGS::m_TrackMinWidth, BOX2< Vec >::Merge(), EDA_IU_SCALE::MilsToIU(), BITMAP_BASE::Mirror(), MIRROR(), EDA_IU_SCALE::mmToIU(), BOARD::Move(), REFERENCE_IMAGE::MutableImage(), SHAPE_RECT::Outline(), SHAPE_POLY_SET::OutlineCount(), pad, EASYEDAPRO::POURED::parentId, ParseContour(), ParsePoly(), PCB_SHAPE_T, pcbIUScale, SHAPE_POLY_SET::PM_STRICTLY_SIMPLE, SHAPE_LINE_CHAIN::PointCount(), EASYEDAPRO::POURED::polyData, EASYEDAPRO::PCB_ATTR::position, REFERENCE_IMAGE::ReadImageFile(), SHAPE_POLY_SET::RebuildHolesFromContours(), REFERENCE_FIELD, EASYEDAPRO::PCB_ATTR::rotation, scale, ScalePos(), ScaleSize(), SHAPE_LINE_CHAIN::SegmentCount(), BASE_SET::set(), BOARD_DESIGN_SETTINGS::SetAuxOrigin(), SHAPE_LINE_CHAIN::SetClosed(), BOARD::SetEnabledLayers(), REFERENCE_IMAGE::SetImageScale(), BOARD::SetLayerName(), SHAPE_LINE_CHAIN::SetPoint(), SHAPE_JOIN_DISTANCE, SHAPE_POLY_SET::Simplify(), EASYEDAPRO::PCB_ATTR::strokeWidth, text, EASYEDAPRO::PCB_ATTR::textOrigin, EASYEDAPRO::ToKiCadLibID(), TransformOvalToPolygon(), EASYEDAPRO::POURED::unki, EASYEDAPRO::PCB_ATTR::value, EASYEDAPRO::PCB_ATTR::valVisible, via, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by PCB_IO_EASYEDAPRO::LoadBoard().

◆ ParseContour()

◆ ParseFootprint()

◆ ParsePoly()

std::vector< std::unique_ptr< PCB_SHAPE > > PCB_IO_EASYEDAPRO_PARSER::ParsePoly ( BOARD_ITEM_CONTAINER aContainer,
nlohmann::json  polyData,
bool  aClosed,
bool  aInFill 
) const

◆ ScalePos()

template<typename T >
static VECTOR2< T > PCB_IO_EASYEDAPRO_PARSER::ScalePos ( VECTOR2< T >  aValue)
inlinestatic

Definition at line 68 of file pcb_io_easyedapro_parser.h.

References ScaleSize(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by createPAD(), ParseBoard(), ParseContour(), and ParsePoly().

◆ ScaleSize() [1/2]

template<typename T >
static T PCB_IO_EASYEDAPRO_PARSER::ScaleSize ( aValue)
inlinestatic

◆ ScaleSize() [2/2]

template<typename T >
static VECTOR2< T > PCB_IO_EASYEDAPRO_PARSER::ScaleSize ( VECTOR2< T >  aValue)
inlinestatic

Definition at line 62 of file pcb_io_easyedapro_parser.h.

References ScaleSize(), VECTOR2< T >::x, and VECTOR2< T >::y.

Member Data Documentation

◆ m_board

BOARD* PCB_IO_EASYEDAPRO_PARSER::m_board
private

Definition at line 92 of file pcb_io_easyedapro_parser.h.

Referenced by ParseFootprint(), and PCB_IO_EASYEDAPRO_PARSER().

◆ m_relOrigin

VECTOR2D PCB_IO_EASYEDAPRO_PARSER::m_relOrigin
private

Definition at line 93 of file pcb_io_easyedapro_parser.h.


The documentation for this class was generated from the following files: