35    auto& x = 
nets_map.emplace( std::piecewise_construct, std::forward_as_tuple( 0 ),
 
   36                                std::forward_as_tuple( 
nets.size(), 
"$NONE$" ) )
 
 
   51    for( 
const auto& subnet : 
subnets )
 
 
   65        auto& net = 
nets_map.emplace( std::piecewise_construct,
 
   67                                      std::forward_as_tuple( 
nets.size(), netName ) )
 
   70        nets.push_back( &net );
 
 
   94    static const std::map<TYPE, std::string> type_map = {
 
   95        { TYPE::COPPER, 
"C" },
 
 
  117    static const std::map<FILL_TYPE, std::string> fill_type_map = { { 
FILL_TYPE::SOLID, 
"S" },
 
  120    static const std::map<CUTOUT_TYPE, std::string> cutout_type_map = {
 
 
  134    static const std::map<SIDE, std::string> side_map = {
 
 
  159        layers.push_back( aLayer );
 
 
  191    ost << 
"CT" << std::endl;
 
  193    ost << 
"CE" << std::endl;
 
 
  202    std::shared_ptr<FOOTPRINT> fp( 
static_cast<FOOTPRINT*
>( aFp->
Clone() ) );
 
  204    fp->SetParentGroup( 
nullptr );
 
  205    fp->SetPosition( { 0, 0 } );
 
  218    wxString fp_name = fp->GetFPID().GetLibItemName().wx_str();
 
  221    if( fp_name.IsEmpty() )
 
  222        fp_name = wxS( 
"__" );
 
  231    PACKAGE* pkg = &( iter->second );
 
  235    BOX2I bbox = fp->GetBoundingBox();
 
  242    if( fp->Pads().size() < 2 )
 
  245    for( 
size_t i = 0; i < fp->Pads().size(); ++i )
 
  247        const PAD* pad1 = fp->Pads()[i];
 
  249        for( 
size_t j = i + 1; j < fp->Pads().size(); ++j )
 
  251            const PAD*     pad2 = fp->Pads()[j];
 
  262        pkg_outline = courtyard;
 
  266        pkg_outline = courtyard_back;
 
  271        pkg_outline = fp->GetBoundingHull();
 
  278        for( 
int ii = 0; ii < pkg_outline.
OutlineCount(); ++ii )
 
  281                    std::make_unique<OUTLINE_CONTOUR>( pkg_outline.
Polygon( ii ) ) );
 
  285    for( 
size_t i = 0; i < fp->Pads().size(); ++i )
 
  287        const PAD* 
pad = fp->Pads()[i];
 
 
  306        name = wxString::Format( 
"NPTH%zu", aPinNum );
 
  307    else if( 
name.empty() )
 
  308        name = wxString::Format( 
"PAD%zu", aPinNum );
 
  320        pin->type = PIN::TYPE::THROUGH_HOLE;
 
  324        pin->type = PIN::TYPE::SURFACE;
 
  352    const std::shared_ptr<SHAPE_POLY_SET>& polygons =
 
  357    if( polygons->OutlineCount() > 0 )
 
  359        pin->m_pinOutlines.push_back( std::make_unique<OUTLINE_CONTOUR>( polygons->Polygon( 0 ) ) );
 
 
  366    static const std::map<TYPE, std::string> type_map = { { TYPE::SURFACE, 
"S" },
 
  367                                                          { TYPE::THROUGH_HOLE, 
"T" },
 
  368                                                          { TYPE::BLIND, 
"B" } };
 
  370    static const std::map<ELECTRICAL_TYPE, std::string> etype_map = {
 
  386        outline->Write( ost );
 
 
  399        outline->Write( ost );
 
 
  411    ost << 
"# " << wxDateTime::Now().FormatISOCombined() << std::endl;
 
  416    for( 
const auto& layer : 
layers )
 
  425    for( 
const auto& net : 
nets )
 
  427        ost << 
"#NET " << net->m_index << std::endl;
 
  434        ost << 
"# PKG " << i << std::endl;
 
  437        ost << 
"#" << std::endl;
 
 
constexpr EDA_IU_SCALE pcbIUScale
 
wxString GetBuildVersion()
Get the full KiCad version string.
 
void WriteAttributes(std::ostream &ost, const std::string &prefix="") const
 
void WriteAttributes(std::ostream &ost) const
 
VECTOR2I GetFPRelativePosition() const
 
constexpr const Vec & GetPosition() const
 
constexpr const Vec GetEnd() const
 
void Write(std::ostream &ost) const
 
void Write(std::ostream &ost) const
 
std::list< std::unique_ptr< SUB_NET > > subnets
 
void AddPin(const PAD *aPad, size_t aPinNum)
 
std::vector< std::shared_ptr< PIN > > m_pinsVec
 
wxString m_name
<! Reference number of the package to be used in CMP.
 
void Write(std::ostream &ost) const
 
std::list< std::unique_ptr< PKG_OUTLINE > > m_pkgOutlines
 
std::list< std::unique_ptr< PKG_OUTLINE > > m_pinOutlines
 
std::pair< wxString, wxString > m_center
 
void Write(std::ostream &ost) const
 
void WriteSubnet(std::ostream &ost) const override
 
void WriteSubnet(std::ostream &ost) const override
 
void WriteSubnet(std::ostream &ost) const override
 
void WriteSubnet(std::ostream &ost) const override
 
std::list< FEATURE_ID > feature_ids
 
void Write(std::ostream &ost) const
 
void AddFeatureID(FEATURE_ID::TYPE type, const wxString &layer, size_t feature_id)
 
virtual void WriteSubnet(std::ostream &ost) const =0
 
std::list< const PACKAGE * > packages
 
std::map< wxString, size_t > layers_map
 
std::list< const NET * > nets
 
std::map< size_t, NET > nets_map
 
std::vector< wxString > layers
 
std::map< size_t, PACKAGE > packages_map
 
void AddNET(const NETINFO_ITEM *aNet)
 
std::vector< std::shared_ptr< FOOTPRINT > > m_eda_footprints
 
size_t GetLyrIdx(const wxString &aLayerName)
 
void AddPackage(const FOOTPRINT *aFp)
 
void Write(std::ostream &ost) const
 
Handle the data for a net.
 
const wxString & GetNetname() const
 
void Write(std::ostream &ost) const override
 
void Write(std::ostream &ost) const override
 
std::unique_ptr< ODB_SURFACE_DATA > m_surfaces
 
void Write(std::ostream &ost) const override
 
void Write(std::ostream &ost) const override
 
static constexpr PCB_LAYER_ID ALL_LAYERS
! Temporary layer identifier to identify code that is not padstack-aware
 
PAD_ATTRIB GetAttribute() const
 
const wxString & GetNumber() const
 
VECTOR2I GetCenter() const override
This defaults to the center of the bounding box if not overridden.
 
bool IsOnCopperLayer() const override
 
const std::shared_ptr< SHAPE_POLY_SET > & GetEffectivePolygon(PCB_LAYER_ID aLayer, ERROR_LOC aErrorLoc=ERROR_INSIDE) const
 
bool HasHole() const override
 
static std::string m_unitsStr
 
Represent a set of closed polygons.
 
POLYGON & Polygon(int aIndex)
Return the aIndex-th subpolygon in the set.
 
int OutlineCount() const
Return the number of outlines in the set.
 
static constexpr EDA_ANGLE ANGLE_0
 
size_t hash_fp_item(const EDA_ITEM *aItem, int aFlags)
Calculate hash of an EDA_ITEM.
 
Hashing functions for EDA_ITEMs.
 
@ REL_COORD
Use coordinates relative to the parent object.
 
@ LEFT_RIGHT
Flip left to right (around the Y axis)
 
@ TOP_BOTTOM
Flip top to bottom (around the X axis)
 
wxString Data2String(double aVal)
 
void RemoveWhitespace(wxString &aStr)
 
std::pair< wxString, wxString > AddXY(const VECTOR2I &aVec)
 
@ NPTH
like PAD_PTH, but not plated mechanical use only, no connection allowed
 
@ SMD
Smd pad, appears on the solder paste layer (default)
 
@ PTH
Plated through hole pad.
 
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.
 
VECTOR2< double > VECTOR2D