20#ifndef PADS_SCH_SCHEMATIC_BUILDER_H_
21#define PADS_SCH_SCHEMATIC_BUILDER_H_
69 const std::set<std::string>& aSignalOpcIds,
70 const std::set<std::string>& aSkipSignals = {},
71 const std::map<std::string, NETNAME_LABEL>& aNetNameLabels = {} );
94 static bool IsBusSignal(
const std::string& aName );
120 const wxString& aBaseFilename );
147 const std::set<int>& aSheetNumbers );
161 int toKiCadY(
double aPadsY )
const;
SCH_LINE * CreateWire(const WIRE_SEGMENT &aWire)
std::vector< VECTOR2I > findJunctionPoints(const std::vector< SCH_SIGNAL > &aSignals)
Find points where 3+ wire segments meet.
static SPIN_STYLE SpinFromNetNameLabel(const NETNAME_LABEL &aLabel)
Map a PADS NETNAMES label entry to a KiCad global-label spin style.
int toKiCadY(double aPadsY) const
Convert PADS Y coordinate to KiCad Y, accounting for Y-axis inversion and page offset.
SCH_SHEET_PIN * CreateSheetPin(SCH_SHEET *aSheet, const std::string &aSignalName, int aPinIndex)
Create a sheet pin that connects to a hierarchical label in the sub-schematic.
int CreateJunctions(const std::vector< SCH_SIGNAL > &aSignals, SCH_SCREEN *aScreen)
void ApplyPartAttributes(SCH_SYMBOL *aSymbol, const PART_PLACEMENT &aPlacement)
Set reference, value, footprint and other fields on a symbol from a part placement.
PADS_SCH_SCHEMATIC_BUILDER(const PARAMETERS &aParams, SCHEMATIC *aSchematic)
void CreateTitleBlock(SCH_SCREEN *aScreen)
Set the title block from PADS fields, checking custom names too because PADS designs often leave the ...
const PARAMETERS & m_params
VECTOR2I CalculateSheetPosition(int aSheetIndex, int aTotalSheets) const
Position a sheet symbol in a roughly square grid on the parent.
static SPIN_STYLE computeLabelOrientation(const VECTOR2I &aLabelPos, const VECTOR2I &aAdjacentPos)
Orient a label opposite to the wire direction at its position so it clears the wire.
int toKiCadUnits(double aPadsValue) const
int CreateCustomFields(SCH_SYMBOL *aSymbol, const PART_PLACEMENT &aPlacement)
Create KiCad user fields for PADS attributes that have no standard-field mapping.
VECTOR2I chooseLabelPosition(const SCH_SIGNAL &aSignal)
SCH_LINE * CreateBusWire(const WIRE_SEGMENT &aWire)
SCH_HIERLABEL * CreateHierLabel(const std::string &aSignalName, const VECTOR2I &aPosition, SCH_SCREEN *aScreen)
Create a hierarchical label that connects to a sheet pin on the parent.
void ApplyFieldSettings(SCH_SYMBOL *aSymbol, const PART_PLACEMENT &aPlacement)
int CreateWires(const std::vector< SCH_SIGNAL > &aSignals, SCH_SCREEN *aScreen)
SCH_GLOBALLABEL * CreateNetLabel(const SCH_SIGNAL &aSignal, const VECTOR2I &aPosition, SPIN_STYLE aOrientation=SPIN_STYLE::RIGHT)
Create a net label.
static bool IsGlobalSignal(const std::string &aSignalName, const std::set< int > &aSheetNumbers)
A signal is global when it spans multiple sheets or is a common power net.
int CreateBusWires(const std::vector< SCH_SIGNAL > &aSignals, SCH_SCREEN *aScreen)
wxString convertNetName(const std::string &aName) const
Convert a PADS net name to a KiCad label, mapping a "/" prefix to a "~{}" overbar.
SCH_SHEET * CreateHierarchicalSheet(int aSheetNumber, int aTotalSheets, SCH_SHEET *aParentSheet, const wxString &aBaseFilename)
Create a sub-sheet positioned on its parent and backed by its own screen.
VECTOR2I GetDefaultSheetSize() const
int CreateNetLabels(const std::vector< SCH_SIGNAL > &aSignals, SCH_SCREEN *aScreen, const std::set< std::string > &aSignalOpcIds, const std::set< std::string > &aSkipSignals={}, const std::map< std::string, NETNAME_LABEL > &aNetNameLabels={})
Create net labels for named signals.
~PADS_SCH_SCHEMATIC_BUILDER()
static bool IsBusSignal(const std::string &aName)
Holds all the data relating to one schematic.
Class for a wire to bus entry.
Segment description base class to describe items which have 2 end points (track, wire,...
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Define a sheet pin (label) used in sheets to create hierarchical schematics.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Wire segment connecting two endpoints through coordinate vertices.
VECTOR2< int32_t > VECTOR2I