KiCad PCB EDA Suite

Information which can be added in a gerber P&P file as attribute of a component. More...

#include <gbr_netlist_metadata.h>

Public Types


Public Member Functions

void ClearData ()
wxString FormatCmpPnPMetadata ()

Public Attributes

double m_Orientation
wxString m_Manufacturer
wxString m_MPN
wxString m_Package
wxString m_Footprint
wxString m_LibraryName
wxString m_LibraryDescr
wxString m_Value
MOUNT_TYPE m_MountType

Detailed Description

Information which can be added in a gerber P&P file as attribute of a component.

This is only applicable to objects having the TA.AperFunction attribute "ComponentMain" There are specific attributes defined attached to the component by the TO command TO.CRot,<angle> The rotation angle of the component. The rotation angle is consistent with the one for graphics objects. Positive rotation is counter- clockwise as viewed from the top side, even if the component is on the board side. The base orientation of component - no rotation - on the top side is as in IPC-7351. Components on the bottom side are of course mirrored. The base orientation on the bottom side is the one on the top side mirrored around the X axis.

TO.CMfr,<string> Manufacturer TO.CMPN,<string> Manufacturer part number TO.Cpkg,<string> Package, as per IPC-7351 TO.CVal,<string> Value, a string. E.g. 220nF TO.CMnt,<string> Mount type: (SMD|TH|Other) TO.CFtp,<string> Footprint name, a string. E.g. LQFP-100_14x14mm_P0.5mm This is the footprint name coming from the CAD tool libraries. TO.CPgN,<string> Package name, like the JEDEC JEP95 standard. TO.CPgD,<string> Package description. TO.CHgt,<string> Height, a decimal, in the unit of the file. TO.CLbN,<string> Library name. TO.CLbD,<string> Library description. TO.Sup,<SN>,<SPN> SN is a field with the supplier name. SPN is a field with the supplier part name.

Definition at line 57 of file gbr_netlist_metadata.h.

Member Enumeration Documentation


Constructor & Destructor Documentation



Member Function Documentation

◆ ClearData()

void GBR_CMP_PNP_METADATA::ClearData ( )

◆ FormatCmpPnPMetadata()

wxString GBR_CMP_PNP_METADATA::FormatCmpPnPMetadata ( )
a string containing the formatted metadata in X2 syntax.
a string containing the formated metadata in X2 syntax. one line by non empty data the orientation (.CRot) and mount type (.CMnt) are always generated

Definition at line 730 of file gbr_metadata.cpp.

731 {
732  wxString text;
733  wxString start_of_line( "%TO.");
734  wxString end_of_line( "*%\n" );
736  wxString mounType[] =
737  {
738  "Other", "SMD", "TH"
739  };
741  if( !m_Manufacturer.IsEmpty() )
742  text << start_of_line << "CMfr," << m_Manufacturer << end_of_line;
744  if( !m_MPN.IsEmpty() )
745  text << start_of_line << "CMPN," << m_MPN << end_of_line;
747  if( !m_Package.IsEmpty() )
748  text << start_of_line << "Cpkg," << m_Package << end_of_line;
750  if( !m_Footprint.IsEmpty() )
751  text << start_of_line << "CFtp," << m_Footprint << end_of_line;
753  if( !m_Value.IsEmpty() )
754  text << start_of_line << "CVal," << m_Value << end_of_line;
756  if( !m_LibraryName.IsEmpty() )
757  text << start_of_line << "CLbN," << m_LibraryName << end_of_line;
759  if( !m_LibraryDescr.IsEmpty() )
760  text << start_of_line << "CLbD," << m_LibraryDescr << end_of_line;
762  text << start_of_line << "CMnt," << mounType[m_MountType] << end_of_line;
763  text << start_of_line << "CRot," << m_Orientation << end_of_line;
765  return text;
766 }

References m_Footprint, m_LibraryDescr, m_LibraryName, m_Manufacturer, m_MountType, m_MPN, m_Orientation, m_Package, and m_Value.

Referenced by PLACEFILE_GERBER_WRITER::CreatePlaceFile().

Member Data Documentation

◆ m_Footprint

wxString GBR_CMP_PNP_METADATA::m_Footprint

◆ m_LibraryDescr

wxString GBR_CMP_PNP_METADATA::m_LibraryDescr

Definition at line 86 of file gbr_netlist_metadata.h.

Referenced by FormatCmpPnPMetadata().

◆ m_LibraryName

wxString GBR_CMP_PNP_METADATA::m_LibraryName

◆ m_Manufacturer

wxString GBR_CMP_PNP_METADATA::m_Manufacturer

Definition at line 81 of file gbr_netlist_metadata.h.

Referenced by ClearData(), and FormatCmpPnPMetadata().

◆ m_MountType


◆ m_MPN


Definition at line 82 of file gbr_netlist_metadata.h.

Referenced by ClearData(), and FormatCmpPnPMetadata().

◆ m_Orientation

double GBR_CMP_PNP_METADATA::m_Orientation

◆ m_Package

wxString GBR_CMP_PNP_METADATA::m_Package

Definition at line 83 of file gbr_netlist_metadata.h.

Referenced by ClearData(), and FormatCmpPnPMetadata().

◆ m_Value

wxString GBR_CMP_PNP_METADATA::m_Value

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