20#ifndef PADS_PCB_CONVERTER_H_
21#define PADS_PCB_CONVERTER_H_
89 int ScaleCoord(
double aVal,
bool aIsX )
const;
105 void SetupLayers(
const std::vector<PADS_IO::LAYER_INFO>& aPadsLayers,
int aPadsLayerCount,
117 void BuildStackup(
const std::vector<PADS_IO::LAYER_INFO>& aPadsLayers );
119 void EnsureNet(
const std::string& aNetName );
134 void LoadTexts(
const std::vector<PADS_IO::TEXT>& aTexts );
136 void LoadKeepouts(
const std::vector<PADS_IO::KEEPOUT>& aKeepouts );
138 void LoadDimensions(
const std::vector<PADS_IO::DIMENSION>& aDimensions );
155 const std::vector<PADS_IO::DIFF_PAIR_DEF>& aDiffPairs );
Information pertinent to a Pcbnew printed circuit board.
Maps PADS layer numbers and names to KiCad layer IDs.
double GetScaleFactor() const
const std::vector< PADS_LAYER_INFO > & GetLayerInfos() const
PADS_LAYER_MAPPER m_layerMapper
void AppendArcPoints(SHAPE_LINE_CHAIN &aChain, const std::vector< PADS_IO::ARC_POINT > &aPts) const
Append PADS vertices to a chain, converting arc entries to polylines and expanding a lone full-circle...
double GetOriginX() const
VECTOR2I ScalePoint(double aX, double aY) const
PADS_UNIT_CONVERTER m_unitConverter
void WriteDiffPairRules(const wxString &aFileName, const std::vector< PADS_IO::DIFF_PAIR_DEF > &aDiffPairs)
Write a .kicad_dru beside aFileName carrying one clearance rule per differential pair with a gap.
bool SetOriginFromOutlines(const std::vector< PADS_IO::POLYLINE > &aOutlines)
Move the origin to the center of the board outline bounding box, which places the imported board near...
PCB_LAYER_ID GetMappedLayer(int aPadsLayer) const
PADS_UNIT_CONVERTER & UnitConverter()
std::map< wxString, PCB_LAYER_ID > m_layerMap
PADS_PCB_CONVERTER(BOARD *aBoard, REPORTER *aReporter)
void SetupLayers(const std::vector< PADS_IO::LAYER_INFO > &aPadsLayers, int aPadsLayerCount, const LAYER_MAPPING_HANDLER &aMappingHandler, bool aResolveUnknownTypeByName)
Resolve the PADS layer table to KiCad layers and apply the copper layer count to the board.
void EnsureNet(const std::string &aNetName)
SHAPE_ARC MakeMidpointArc(const PADS_IO::ARC_POINT &aPrev, const PADS_IO::ARC_POINT &aCurr, int aWidth) const
Build a SHAPE_ARC from two consecutive PADS points.
void LoadTexts(const std::vector< PADS_IO::TEXT > &aTexts)
void LoadDimensions(const std::vector< PADS_IO::DIMENSION > &aDimensions)
void ApplyPourSettings(ZONE *aZone, const PADS_IO::POUR &aPour, int aMaxPriority, const PADS_IO::PARAMETERS &aParams)
Apply the cutout or fill settings of aPour to a zone whose outline the caller has already built.
void LoadKeepouts(const std::vector< PADS_IO::KEEPOUT > &aKeepouts)
double GetOriginY() const
void SetOrigin(double aX, double aY)
std::vector< PADS_LAYER_INFO > m_layerInfos
int ScaleSize(double aVal) const
int ScaleCoord(double aVal, bool aIsX) const
void SetScaleFactor(double aScaleFactor)
Set the nanometers-per-file-unit factor used by the coordinate transform.
void BuildStackup(const std::vector< PADS_IO::LAYER_INFO > &aPadsLayers)
Build the board stackup from the PADS physical layer data, if that data carries real thicknesses or d...
Converts PADS file units (MILS, METRIC, INCHES, or internal BASIC database units) to KiCad internal u...
A pure virtual class used to derive REPORTER objects from.
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
Handle a list of polygons defining a copper zone.
PCB_LAYER_ID
A quick note on layer IDs:
std::function< std::map< wxString, PCB_LAYER_ID >(const std::vector< INPUT_LAYER_DESC > &)> LAYER_MAPPING_HANDLER
Pointer to a function that takes a map of source and KiCad layers and returns a re-mapped version.
A polyline point that may instead be an arc segment.
VECTOR2< int32_t > VECTOR2I