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

The ASCII format of the kicad place file is: More...

#include <place_file_exporter.h>

Public Member Functions

 PLACE_FILE_EXPORTER (BOARD *aBoard, bool aUnitsMM, bool aOnlySMD, bool aExcludeAllTH, bool aExcludeDNP, bool aTopSide, bool aBottomSide, bool aFormatCSV, bool aUseAuxOrigin, bool aNegateBottomX)
 Create a PLACE_FILE_EXPORTER.
 
std::string GenPositionData ()
 build a string filled with the position data
 
std::string GenReportData ()
 build a string filled with the pad report data This report does not used options aForceSmdItems,aTopSide, aBottomSide and aFormatCSV.
 
int GetFootprintCount ()
 

Static Public Member Functions

static std::string GetFrontSideName ()
 
static std::string GetBackSideName ()
 

Private Attributes

BOARDm_board
 
bool m_unitsMM
 
bool m_onlySMD
 
bool m_excludeDNP
 
bool m_excludeAllTH
 
int m_side
 
bool m_formatCSV
 
bool m_negateBottomX
 
int m_fpCount
 
VECTOR2I m_place_Offset
 

Detailed Description

The ASCII format of the kicad place file is:

Module positions - created on 04/12/2012 15:24:24

Printed by Pcbnew version pcbnew (2012-11-30 BZR 3828)-testing

Unit = inches, Angle = deg.

or

Unit = mm, Angle = deg.

Side : top

or

Side : bottom

or

Side : all

Ref Val Package PosX PosY Rot Side

C123 0,1uF/50V SM0603 1.6024 -2.6280 180.0 Front C124 0,1uF/50V SM0603 1.6063 -2.7579 180.0 Front C125 0,1uF/50V SM0603 1.6010 -2.8310 180.0 Front

End

Definition at line 51 of file place_file_exporter.h.

Constructor & Destructor Documentation

◆ PLACE_FILE_EXPORTER()

PLACE_FILE_EXPORTER::PLACE_FILE_EXPORTER ( BOARD aBoard,
bool  aUnitsMM,
bool  aOnlySMD,
bool  aExcludeAllTH,
bool  aExcludeDNP,
bool  aTopSide,
bool  aBottomSide,
bool  aFormatCSV,
bool  aUseAuxOrigin,
bool  aNegateBottomX 
)

Create a PLACE_FILE_EXPORTER.

Parameters
aBoardis the board
aUnitsMMis the unit option: true foo mm, false for inches
aOnlySMDtrue to force only footprints flagged smd to be in the list
aExcludeAllTHtrue to include only footprints with no TH pads no matter the footprint flag
aExcludeDNPtrue to exclude footprints flagged DNP
aTopSidetrue to generate top side info
aBottomSidetrue to generate bottom side info
aFormatCSVtrue to generate a csv format info, false to generate a ascii info
aNegateBottomXtrue to negate X coordinates for bottom side of the placement file
aUseAuxOrigintrue to use auxiliary axis as an origin for the position data

Definition at line 76 of file place_file_exporter.cpp.

References BOARD_DESIGN_SETTINGS::GetAuxOrigin(), BOARD::GetDesignSettings(), m_board, m_excludeAllTH, m_excludeDNP, m_formatCSV, m_fpCount, m_negateBottomX, m_onlySMD, m_place_Offset, m_side, m_unitsMM, PCB_BACK_SIDE, PCB_BOTH_SIDES, PCB_FRONT_SIDE, and PCB_NO_SIDE.

Member Function Documentation

◆ GenPositionData()

◆ GenReportData()

std::string PLACE_FILE_EXPORTER::GenReportData ( )

build a string filled with the pad report data This report does not used options aForceSmdItems,aTopSide, aBottomSide and aFormatCSV.

All footprints and their pads on board are reported.

Definition at line 287 of file place_file_exporter.cpp.

References PADSTACK::ALL_LAYERS, B_Cu, BOARD::ComputeBoundingBox(), conv_unit_inch, conv_unit_mm, F_Cu, BOARD::Footprints(), FP_SMD, FP_THROUGH_HOLE, BOX2< Vec >::GetBottom(), GetBuildVersion(), GetISO8601CurrentDateTime(), BOX2< Vec >::GetRight(), BOX2< Vec >::GetX(), BOX2< Vec >::GetY(), m_board, m_place_Offset, m_unitsMM, pad, TO_UTF8, unit_text_inch, unit_text_mm, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by PCB_EDIT_FRAME::DoGenFootprintsReport().

◆ GetBackSideName()

static std::string PLACE_FILE_EXPORTER::GetBackSideName ( )
inlinestatic

◆ GetFootprintCount()

int PLACE_FILE_EXPORTER::GetFootprintCount ( )
inline
Returns
the footprint count found on board by GenPositionData() must be called only after GenPositionData() is run

Definition at line 88 of file place_file_exporter.h.

References m_fpCount.

Referenced by DIALOG_GEN_FOOTPRINT_POSITION::CreateAsciiFiles(), and PCB_EDIT_FRAME::DoGenFootprintsPositionFile().

◆ GetFrontSideName()

static std::string PLACE_FILE_EXPORTER::GetFrontSideName ( )
inlinestatic

Member Data Documentation

◆ m_board

BOARD* PLACE_FILE_EXPORTER::m_board
private

Definition at line 96 of file place_file_exporter.h.

Referenced by GenPositionData(), GenReportData(), and PLACE_FILE_EXPORTER().

◆ m_excludeAllTH

bool PLACE_FILE_EXPORTER::m_excludeAllTH
private

Definition at line 100 of file place_file_exporter.h.

Referenced by GenPositionData(), and PLACE_FILE_EXPORTER().

◆ m_excludeDNP

bool PLACE_FILE_EXPORTER::m_excludeDNP
private

Definition at line 99 of file place_file_exporter.h.

Referenced by GenPositionData(), and PLACE_FILE_EXPORTER().

◆ m_formatCSV

bool PLACE_FILE_EXPORTER::m_formatCSV
private

Definition at line 102 of file place_file_exporter.h.

Referenced by GenPositionData(), and PLACE_FILE_EXPORTER().

◆ m_fpCount

int PLACE_FILE_EXPORTER::m_fpCount
private

Definition at line 104 of file place_file_exporter.h.

Referenced by GenPositionData(), GetFootprintCount(), and PLACE_FILE_EXPORTER().

◆ m_negateBottomX

bool PLACE_FILE_EXPORTER::m_negateBottomX
private

Definition at line 103 of file place_file_exporter.h.

Referenced by GenPositionData(), and PLACE_FILE_EXPORTER().

◆ m_onlySMD

bool PLACE_FILE_EXPORTER::m_onlySMD
private

Definition at line 98 of file place_file_exporter.h.

Referenced by GenPositionData(), and PLACE_FILE_EXPORTER().

◆ m_place_Offset

VECTOR2I PLACE_FILE_EXPORTER::m_place_Offset
private

Definition at line 105 of file place_file_exporter.h.

Referenced by GenPositionData(), GenReportData(), and PLACE_FILE_EXPORTER().

◆ m_side

int PLACE_FILE_EXPORTER::m_side
private

Definition at line 101 of file place_file_exporter.h.

Referenced by GenPositionData(), and PLACE_FILE_EXPORTER().

◆ m_unitsMM

bool PLACE_FILE_EXPORTER::m_unitsMM
private

Definition at line 97 of file place_file_exporter.h.

Referenced by GenPositionData(), GenReportData(), and PLACE_FILE_EXPORTER().


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