25#ifndef PCB_IO_AUTOTRAX_H_
26#define PCB_IO_AUTOTRAX_H_
69 bool CanReadBoard(
const wxString& aFileName )
const override;
74 void loadBoard(
const wxString& aFileName,
BOARD& aBoard,
bool aIsNewLoad,
75 const std::map<std::string, UTF8>* aProperties =
nullptr,
PROJECT* aProject =
nullptr )
override;
83 void assignNets(
const std::vector<AUTOTRAX::NET_NODE>& aNodes );
114 static int toIU(
double aMils ) {
return KiROUND( aMils * 25400.0 ); }
130 std::map<wxString, NETINFO_ITEM*>
m_nets;
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Information pertinent to a Pcbnew printed circuit board.
Handle the data for a net.
void buildComponent(const AUTOTRAX::COMPONENT &aComp)
NETINFO_ITEM * getNet(const wxString &aNetName)
bool CanReadBoard(const wxString &aFileName) const override
std::map< wxString, NETINFO_ITEM * > m_nets
int m_targetPads
pads with a crosshair or moire target shape
static int toIU(double aMils)
Convert a mil value to KiCad internal units (nm).
void buildBoard(const AUTOTRAX::BOARD_DATA &aData)
BOARD_ITEM * parentOf(FOOTPRINT *aFootprint) const
Parent for a primitive: the owning footprint, or the board for free items.
bool applyText(const AUTOTRAX::TEXT &aText, PCB_TEXT *aTarget)
Apply an Autotrax string record's placement, size, rotation and layer to aText.
void assignNets(const std::vector< AUTOTRAX::NET_NODE > &aNodes)
Attach each NETDEF "refdes-pad" node to the matching imported pads.
PCB_LAYER_ID m_keepoutLayer
Edge_Cuts when the keepout outlines the board.
bool mapLayer(int aLayer, const FOOTPRINT *aFootprint, PCB_LAYER_ID &aResult) const
Map an Autotrax layer number to a KiCad layer for an item owned by aFootprint, or a free item when it...
const IO_BASE::IO_FILE_DESC GetBoardFileDesc() const override
Return board file description for the PCB_IO.
void addItem(BOARD_ITEM *aItem, FOOTPRINT *aFootprint)
Attach an item to its footprint, or append it to the board.
long long GetLibraryTimestamp(const wxString &aLibraryPath) const override
Generate a timestamp representing all the files in the library (including the library directory).
int m_maxY
board Y extent in IU, used to flip the Y axis
~PCB_IO_AUTOTRAX() override
std::multimap< wxString, FOOTPRINT * > m_footprintsByRef
footprints created by this load
VECTOR2I toBoard(double aX, double aY) const
Convert an Autotrax point (mils, Y-up) to a board point (nm, Y-down).
void emitTrack(const AUTOTRAX::TRACK &aTrack, FOOTPRINT *aFootprint)
void emitFill(const AUTOTRAX::FILL &aFill, FOOTPRINT *aFootprint)
int m_unmappedItems
items on a layer with no KiCad equivalent
void emitPad(const AUTOTRAX::PAD &aPad, FOOTPRINT *aFootprint)
int m_offLayerPads
pads on a layer KiCad cannot place them on
const IO_BASE::IO_FILE_DESC GetLibraryDesc() const override
Get the descriptor for the library container that this IO plugin operates on.
void emitArc(const AUTOTRAX::ARC &aArc, FOOTPRINT *aFootprint)
void loadBoard(const wxString &aFileName, BOARD &aBoard, bool aIsNewLoad, const std::map< std::string, UTF8 > *aProperties=nullptr, PROJECT *aProject=nullptr) override
Parse aFileName into aBoard.
void emitText(const AUTOTRAX::TEXT &aText, FOOTPRINT *aFootprint)
void reportGaps() const
Report what the import dropped or could not represent.
int m_planePads
pads asking for a ground or power plane connection
void emitVia(const AUTOTRAX::VIA &aVia, FOOTPRINT *aFootprint)
REPORTER & reporter() const
PCB_IO(const wxString &aName)
Container for project specific data.
A pure virtual class used to derive REPORTER objects from.
PCB_LAYER_ID
A quick note on layer IDs:
Free or component arc (FA / CA).
Everything parsed out of an Autotrax/Easytrax file, before any KiCad object is created.
A placed component (COMP .. ENDCOMP) holding its own primitives.
Free or component rectangular fill (FF / CF), Autotrax's only pour.
Free or component pad/pin (FP / CP).
Free or component string (FS / CS).
Free or component track segment (FT / CT). All coordinates are in mils.
Free or component via (FV / CV).
Container that describes file type info.
VECTOR2< int32_t > VECTOR2I