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

#include <orcad_converter.h>

Classes

struct  FOLDER_WALK
 Page counters and rules threaded through a folder hierarchy walk. More...
 
struct  INTERFACE_LABEL_SOURCE
 
struct  LIB_ENTRY
 One emitted KiCad lib symbol (possibly multi-unit). More...
 
struct  NET_LABEL_INTENT
 
struct  OFFPAGE_NET
 One resolved off-page connector: index into page.offpage, net, pin position. More...
 
struct  PAGE_NET_INDEX
 Lookups for the page and scope being converted, rebuilt by buildNetLookup(). More...
 
struct  PAGE_SCOPE
 Occurrence context of the page being converted. More...
 
struct  PIN_EMIT
 Per-pin choices kicadSymbolFor() makes before emitting a pin. More...
 
struct  PLACED_PACKAGE_UNIT
 
struct  POWER_ALIAS_EVIDENCE
 Placements of a power symbol name and the power nets they resolved to. More...
 
struct  SOURCE_PIN_IDENTITY
 
struct  UNIT_INFO
 – shared bookkeeping types ------------------------------------------------— More...
 

Public Member Functions

 ORCAD_CONVERTER (ORCAD_DESIGN &aDesign, SCHEMATIC *aSchematic, REPORTER *aReporter, PROGRESS_REPORTER *aProgressReporter=nullptr)
 
 ~ORCAD_CONVERTER ()
 Out-of-line: LIB_ENTRY holds LIB_SYMBOL by unique_ptr.
 
SCH_SHEET * Convert (SCH_SHEET *aRootSheet)
 aRootSheet must have a screen and be registered on the schematic.
 
std::vector< LIB_SYMBOL * > BuildSymbolLibrary ()
 The caller owns the returned library symbols.
 

Static Public Attributes

static constexpr const char * LIB_NICK = "orcad_import"
 Symbol library nickname used in every emitted LIB_ID.
 

Private Types

using PKG_KEY = std::tuple<std::string, std::string, int, std::string>
 (sourcePackage-or-pkgName, pkgName, variant index, unit discriminator) -> (lib name, unit number).
 

Private Member Functions

void warn (const wxString &aMsg)
 – reporting [orcad_converter_sheet.cpp] ---------------------------------------—
 
void note (const wxString &aMsg)
 Fact about the source design (not a conversion problem): RPT_SEVERITY_INFO.
 
void prepareGlobalNetNames ()
 Capture net names ignore case; KiCad net names do not.
 
std::string canonicalGlobalNetName (const std::string &aName) const
 Return the design-wide spelling selected by prepareGlobalNetNames().
 
std::string canonicalGlobalNetKey (const std::string &aName) const
 Case-folded canonicalGlobalNetName() for use as a map key.
 
std::string effectiveInterfaceNetName (const std::string &aName) const
 
void enterScope (PAGE_SCOPE aScope)
 
std::string occurrenceBaseNetName (const std::string &aName) const
 
std::string occurrenceElectricalNetName (uint32_t aOccurrenceId, const std::string &aName) const
 
bool isPowerNetName (const std::string &aName) const
 
bool isOffpageNetName (const std::string &aName) const
 
void prepareSymbols ()
 
LIB_ENTRY buildPackageEntry (const ORCAD_PACKAGE &aPackage) const
 One unit per package device; a Convert view becomes the unit's DeMorgan body.
 
ORCAD_SYMBOL_DEF synthesizeSymbol (const std::string &aPkgName, const std::vector< const ORCAD_PLACED_INSTANCE * > &aInstances) const
 Use placed pin positions to keep uncached symbols connected.
 
std::string unitLetter (const ORCAD_PLACED_INSTANCE &aInst) const
 The unit key includes a non-Normal view so DeMorgan graphics remain distinct.
 
std::pair< const ORCAD_SYMBOL_DEF *, int > pickVariant (const ORCAD_PLACED_INSTANCE &aInst) const
 Match cached variants to placed pin positions; use the first entry if none matches.
 
std::pair< std::string, int > libForInstance (const ORCAD_PLACED_INSTANCE &aInst, const PKG_KEY **aSourceUnit=nullptr)
 Returns the registered library name and unit number.
 
void finalizeNativePowerPackages ()
 
std::optional< uint32_t > occurrenceNetIdFor (const std::string *aName) const
 Return the occurrence net id owning aName, which the table identifies by address.
 
void finishConversion ()
 Run the shared finalization sequence that ends every conversion entry point.
 
std::string powerLibFor (const std::string &aSymbolName, const std::string &aNetName)
 Key power symbols by net name because users can rename their ports.
 
LIB_SYMBOL * kicadSymbolFor (const std::string &aLibName)
 
void addSymbolPrimitive (LIB_SYMBOL *aSymbol, const ORCAD_PRIMITIVE &aPrim, int aUnit, int aColor, int aOffsetX=0, int aOffsetY=0)
 
void addSymbolArc (LIB_SYMBOL *aSymbol, const ORCAD_PRIMITIVE &aPrim, int aUnit, int aColor, int aOffsetX=0, int aOffsetY=0)
 Polyline approximation of an arc primitive.
 
void addSymbolPin (LIB_SYMBOL *aSymbol, const ORCAD_SYMBOL_PIN &aPin, const BOX2I &aBodyBox, PIN_EMIT aEmit)
 
std::string uniqueLibName (const std::string &aBase, const std::function< bool(const LIB_ENTRY &)> &aReusable) const
 aBase, or aBase_pinsN for the first N >= 2 whose existing entry is absent or passes aReusable.
 
SCH_SYMBOL * instantiateSymbol (const LIB_SYMBOL &aLibSymbol, const std::string &aLibName, int aUnit, int aOrient, const VECTOR2I &aPos, const SCH_SHEET_PATH &aSheetPath) const
 New placement of a library symbol, oriented by an OrCAD orientation code.
 
void placeInstance (ORCAD_RAW_PAGE &aPage, const ORCAD_PLACED_INSTANCE &aInst, SCH_SCREEN *aScreen, const SCH_SHEET_PATH &aSheetPath)
 
void applyCisVariants (SCH_SYMBOL *aSymbol, const ORCAD_PLACED_INSTANCE &aInst, const SCH_SHEET_PATH &aSheetPath, const std::string &aValue)
 Record each CIS variant's installed state and property overrides as KiCad symbol variants.
 
wxString resolveReference (const ORCAD_PLACED_INSTANCE &aInst) const
 Use the occurrence reference when the instance has an unannotated template.
 
void placePowerSymbol (ORCAD_RAW_PAGE &aPage, const ORCAD_GRAPHIC_INST &aInst, const std::string &aNet, SCH_SCREEN *aScreen, const SCH_SHEET_PATH &aSheetPath)
 
void placeSymbolFields (SCH_SYMBOL *aSymbol, const ORCAD_PLACED_INSTANCE &aInst, const ORCAD_SYMBOL_DEF &aDef, int aOrient, const std::string &aValue, const std::string &aFootprint)
 
const ORCAD_PACKAGE * packageFor (const ORCAD_PLACED_INSTANCE &aInst) const
 The cache package backing a placement, or nullptr when the design has none.
 
std::map< std::string, std::string > effectiveProps (const ORCAD_PLACED_INSTANCE &aInst, const ORCAD_SYMBOL_DEF &aDef) const
 Empty package and placement values must not clear a library property.
 
void computeFontBaseline ()
 
int displayFontId (const ORCAD_DISPLAY_PROP &aProp) const
 
bool displayUsesTemplateFont (const ORCAD_DISPLAY_PROP &aProp) const
 
VECTOR2I displayPropPosition (const ORCAD_DISPLAY_PROP &aDisplay, const VECTOR2I &aAnchorIu) const
 Capture's display-property origin sits on the font baseline; return the KiCad text origin.
 
void applyDisplayProp (SCH_FIELD &aField, const ORCAD_DISPLAY_PROP &aDisplay, const VECTOR2I &aAnchorIu, bool aSymbolFlips, bool aApplyVisibility=true) const
 Style a field from a display property.
 
int wireAliasFontId (const ORCAD_ALIAS &aAlias) const
 
int textBaselineOffset (int aTextSize, int aFontIdx, bool aTemplateFont=true) const
 
int resolveFontIndex (int aFontIdx) const
 Resolve a Design Template font ID to its 1-based LOGFONT index.
 
int fontHeightDbu (int aFontIdx, bool aTemplateFont=true) const
 |lfHeight| of a Design Template font ID; ID 0 selects the template default.
 
int textSizeIU (int aFontIdx, bool aTemplateFont=true) const
 
VECTOR2I textSize (int aFontIdx, bool aTemplateFont=true) const
 Preserve an explicit LOGFONT width while retaining natural font aspect when it is zero.
 
void applyFont (EDA_TEXT *aText, int aFontIdx, bool aTemplateFont=true) const
 
void applyMultilineSpacing (SCH_TEXT *aText, int aFontIdx, bool aTemplateFont=true) const
 
void convertPage (ORCAD_RAW_PAGE &aPage, SCH_SCREEN *aScreen, const SCH_SHEET_PATH &aSheetPath, bool aContainerPage=false, bool aSharedFolderPage=false)
 
void placeHierarchicalBlockFields (SCH_SHEET *aSheet, const ORCAD_DRAWN_INSTANCE &aBlock, const std::string &aChildFolder)
 
void placeHierarchicalBlockPinFill (SCH_SCREEN *aScreen, SCH_SHEET_PIN *aPin)
 
void appendNetIntent (SCH_SCREEN *aScreen, SCH_LABEL *aLabel, bool aExplicitName, uint32_t aNetId=0)
 
void minimizeNetLabels ()
 
void finalizeNetNames ()
 
void recordNetNameMap ()
 
void convertUnreferencedPages ()
 
void prepareOccurrenceNets ()
 – hierarchy [orcad_converter_sheet.cpp] --------------------------------------—
 
PAGE_SCOPE occurrenceScope (const ORCAD_OCC_SCOPE &aOcc) const
 A scope for aOcc carrying the occurrence aliases known so far.
 
std::map< std::string, std::string > unconnectedInterfaceNetNames (const ORCAD_DRAWN_INSTANCE &aBlock, const std::string &aFlatNetSuffix) const
 No-connect block pins whose names are wired elsewhere become per-occurrence nets.
 
SCH_SHEET * createBlockSheet (SCH_SHEET *aParentSheet, const ORCAD_RAW_PAGE &aParentPage, const ORCAD_DRAWN_INSTANCE &aBlock, const ORCAD_OCC_BLOCK &aOccurrence, const wxString &aName, const std::string &aFilePageName, int aPageIndex)
 The child sheet for a hierarchical block, with its pins, appended to aParentSheet's screen.
 
std::vector< SCH_SHEET * > createTopLevelSheets (const std::vector< std::pair< wxString, wxString > > &aNamesAndFiles, bool aReuseRoot, bool aOrdinalSheetUuids)
 Top-level sheets named by aNamesAndFiles.
 
void recordPowerAlias (std::map< std::string, POWER_ALIAS_EVIDENCE > &aCandidates, const std::string &aSourceName, const std::string &aElectricalName) const
 
void acceptPowerAliases (const std::map< std::string, POWER_ALIAS_EVIDENCE > &aCandidates)
 Rename a power symbol to the net most of its placements resolve to.
 
bool canBuildNativeHierarchy (const ORCAD_RAW_PAGE &aPage, const ORCAD_OCC_SCOPE &aScope) const
 One root page whose every block opens a single-page child.
 
bool canBuildFolderHierarchy (const std::vector< ORCAD_RAW_PAGE > &aPages, const ORCAD_OCC_SCOPE &aScope) const
 Every occurrence block is drawn exactly once on its parent folder's pages.
 
void convertFolderHierarchy (const SCH_SHEET_PATH &aRootPath, bool aNative)
 
void addChildOccurrenceAliases (const ORCAD_RAW_PAGE &aParentPage, const ORCAD_OCC_SCOPE &aParentScope, const ORCAD_DRAWN_INSTANCE &aDrawn, const ORCAD_OCC_SCOPE &aChildScope)
 
void collectFolderPowerAliases (std::map< std::string, POWER_ALIAS_EVIDENCE > &aCandidates, std::vector< ORCAD_RAW_PAGE > &aPages, const ORCAD_OCC_SCOPE &aScope)
 
void placeFolder (FOLDER_WALK &aWalk, std::vector< ORCAD_RAW_PAGE > &aPages, const ORCAD_OCC_SCOPE &aScope, SCH_SHEET *aFolderSheet, const SCH_SHEET_PATH &aFolderPath, const std::string &aOccurrenceSuffix, bool aRepeatedFolder, const std::map< std::string, std::string > &aUnconnectedInterfaceNetNames, std::map< std::string, std::string > aInterfaceNetAliases)
 
void convertFlatPages (const SCH_SHEET_PATH &aRootPath)
 Every page, each child occurrence expanded, becomes a top-level sheet.
 
void forEachDesignPage (const std::function< void(const ORCAD_RAW_PAGE &)> &aVisit, bool aUnreferenced=false) const
 Visit root pages, then child-folder pages, then unreferenced folder pages if asked.
 
wxString uniqueSheetName (const wxString &aBase)
 aBase, or "aBase (N)" for the first N >= 2 not already used by a sibling sheet.
 
std::set< const std::string * > pinOccurrenceTargets (const ORCAD_RAW_PAGE &aPage, const ORCAD_BLOCK_PIN &aPin, const std::map< uint32_t, std::string > &aScopeNets, bool aSkipGenerated, std::set< std::string > *aSourceKeys=nullptr) const
 Occurrence nets in aScopeNets that a block pin on aPage reaches by name or by wire object id.
 
SCH_SHEET_PATH topLevelPath (SCH_SHEET *aSheet, size_t aPageNumber) const
 The hierarchy path ending at a top-level sheet, numbered aPageNumber.
 
KIID deterministicUuid (const std::string &aRole, size_t aOrdinal) const
 
void assignPinUuids (SCH_SYMBOL *aSymbol, const std::string &aRole) const
 Name-based UUIDs for a symbol's raw pins, derived from aRole and each pin's number, name and position.
 
SCH_SCREEN * newScreen ()
 A new screen with the next deterministic screen UUID, recorded as created by this import.
 
void assignRemainingUuids ()
 Give items created after page conversion, such as moved labels and cleanup junctions, UUIDs derived from their type and position.
 
void appendPageItem (SCH_SCREEN *aScreen, SCH_ITEM *aItem)
 
void assignPageItemUuids (size_t aPageOrdinal)
 
void applyPageSettings (ORCAD_RAW_PAGE &aPage, SCH_SCREEN *aScreen)
 Shift content on the 10-DBU grid to preserve connectivity.
 
void placePageFrame (const ORCAD_RAW_PAGE &aPage, SCH_SCREEN *aScreen)
 
void applyTitleBlock (const ORCAD_RAW_PAGE &aPage, SCH_SCREEN *aScreen)
 
void buildNetLookup (const ORCAD_RAW_PAGE &aPage)
 Rebuild m_netIndex for a page in the current scope.
 
const std::set< uint32_t > & pinNetIds (const ORCAD_PIN_INST &aPin) const
 Page nets a placed pin joins through its net id, its wire object id or a wire under it.
 
std::string netAt (const ORCAD_RAW_PAGE &aPage, int aX, int aY) const
 Prefer endpoint nets, then intersecting wires, then endpoint aliases.
 
std::string powerNet (const ORCAD_RAW_PAGE &aPage, const ORCAD_GRAPHIC_INST &aInst) const
 Memoized resolvePowerNet() for the indexed page.
 
std::string resolvePowerNet (const ORCAD_RAW_PAGE &aPage, const ORCAD_GRAPHIC_INST &aInst) const
 
const ORCAD_SYMBOL_DEF * graphicDefinition (const ORCAD_GRAPHIC_INST &aInst) const
 The cached variant a page graphic uses: its Source Library first, then its placed bounds, else the first.
 
VECTOR2I graphicPinPos (const ORCAD_GRAPHIC_INST &aInst) const
 Use the transformed cache pin position, or the instance anchor if no pin is available.
 
VECTOR2I namedGraphicPinPos (const ORCAD_RAW_PAGE &aPage, const ORCAD_GRAPHIC_INST &aInst) const
 Graphic-symbol connection point, corrected to a nearby endpoint of its named wire.
 
VECTOR2I powerPinPos (const ORCAD_RAW_PAGE &aPage, const ORCAD_GRAPHIC_INST &aInst) const
 Power-symbol connection point, corrected to a nearby endpoint of its named wire.
 
std::vector< int > placedStackedPinOffsets (const ORCAD_PLACED_INSTANCE &aInstance) const
 
VECTOR2I placedPinElectricalPosition (const ORCAD_PLACED_INSTANCE &aInstance, size_t aPinIndex) const
 
bool hasImplicitPowerPinName (const ORCAD_PLACED_INSTANCE &aInstance, size_t aPinIndex, const std::string &aNetName) const
 
std::vector< OFFPAGE_NET > offpageNets (const ORCAD_RAW_PAGE &aPage) const
 Resolve every off-page connector on the page to (index, net, pin position).
 
std::vector< VECTOR2I > computeJunctions (const ORCAD_RAW_PAGE &aPage) const
 Use both geometry and net IDs; a crossing alone does not create a junction.
 
void placeJunctions (const ORCAD_RAW_PAGE &aPage, SCH_SCREEN *aScreen)
 Append computed junctions as SCH_JUNCTION items.
 
void placeWires (const ORCAD_RAW_PAGE &aPage, SCH_SCREEN *aScreen, bool aHierarchical, bool aNestedHierarchy, bool aSharedFolderPage)
 
void placeBusEntries (const ORCAD_RAW_PAGE &aPage, SCH_SCREEN *aScreen)
 SCH_BUS_WIRE_ENTRY per bus entry (position x1,y1; size x2-x1, y2-y1).
 
void placeGraphicDisplayText (const ORCAD_GRAPHIC_INST &aGraphic, const ORCAD_DISPLAY_PROP &aDisplay, const std::string &aText, SCH_SCREEN *aScreen)
 One displayed property attached to a placed page symbol, preserving source text geometry.
 
void placeOffpageConnectors (const ORCAD_RAW_PAGE &aPage, SCH_SCREEN *aScreen, const SCH_SHEET_PATH &aSheetPath, bool aHierarchical)
 Keep computed intersheet references hidden; display the stored OrCAD IREF text.
 
void placePorts (const ORCAD_RAW_PAGE &aPage, SCH_SCREEN *aScreen, bool aHierarchical)
 
SPIN_STYLE spinAwayFromWire (const VECTOR2I &aPosDbu) const
 Point an interface label at aPosDbu away from the wire that ends there.
 
const ORCAD_DISPLAY_PROP * finishInterfaceLabel (const ORCAD_GRAPHIC_INST &aGraphic, SCH_LABEL_BASE *aLabel, const std::vector< SEG > &aSourceWires, SCH_SCREEN *aScreen)
 Style a port or off-page label from its source graphic, draw its stored IREF text and add it.
 
void placeGraphics (const ORCAD_RAW_PAGE &aPage, SCH_SCREEN *aScreen)
 
void placeBitmap (const ORCAD_PRIMITIVE &aPrim, SCH_SCREEN *aScreen, int aOrient=0, bool *aUsedEmbeddedEmf=nullptr)
 Skip undecodable images with a warning.
 
void placeDefinitionImages (const ORCAD_SYMBOL_DEF &aDefinition, int aBaseX, int aBaseY, int aOrient, SCH_SCREEN *aScreen)
 
void placeDefinitionVectors (const ORCAD_SYMBOL_DEF &aDefinition, int aBaseX, int aBaseY, int aOrient, SCH_SCREEN *aScreen, double aTextScaleX=1.0, double aTextScaleY=1.0, bool aUseGenericTextBaseline=false)
 
void rememberInterfaceLabelSource (SCH_SCREEN *aScreen, SCH_LABEL_BASE *aLabel, const std::vector< SEG > &aSourceWires)
 

Static Private Member Functions

static int toKicadOrientation (int aOrient)
 
static std::string SymbolId (const std::string &aName)
 LIB_ID-safe symbol name: ':', '"', '/' and whitespace runs -> '_'; "SYM" if empty.
 
static wxString MakePageFileName (int aPageIndex, const std::string &aPageName)
 
static BOX2I pageExtentDbu (const ORCAD_RAW_PAGE &aPage)
 Free graphics use nested primitive bounds; their outer boxes do not describe page coordinates.
 
static void offsetPage (ORCAD_RAW_PAGE &aPage, int aDx, int aDy)
 aDx and aDy must be multiples of the 10-DBU grid.
 
static VECTOR2I snapToWire (int aX, int aY, const ORCAD_WIRE &aWire)
 Closest point (DBU) on a wire segment to (aX, aY); exact for H/V wires.
 
static bool onSegment (int aX, int aY, const ORCAD_WIRE &aWire)
 True when the point lies strictly INSIDE (not at an endpoint of) an H/V wire.
 
static wxString SanitizeFileName (const std::string &aName)
 

Private Attributes

ORCAD_DESIGN & m_design
 
SCHEMATIC * m_schematic
 
REPORTER * m_reporter
 
PROGRESS_REPORTER * m_progressReporter
 
SCH_SHEET * m_rootSheet
 
std::map< std::string, LIB_ENTRY > m_libSymbols
 keyed by emitted lib name
 
std::map< PKG_KEY, std::pair< std::string, int > > m_pkgToLib
 
std::map< PKG_KEY, std::pair< std::string, int > > m_preparedPkgToLib
 
std::map< std::string, std::vector< UNIT_INFO > > m_preparedLibUnits
 
std::vector< PLACED_PACKAGE_UNIT > m_placedPackageUnits
 
std::set< std::string > m_nativePowerFamilies
 
std::map< std::string, std::string > m_globalNetNames
 
std::map< std::string, std::string > m_globalNetAliases
 
std::set< std::string > m_powerNetNames
 
std::set< std::string > m_offpageNetNames
 
std::set< std::string > m_connectedBlockInterfaceNames
 
std::map< std::string, size_t > m_occurrenceNetNameScopeCounts
 
std::map< std::string, size_t > m_occurrenceNetNameMinDepth
 
std::map< std::string, size_t > m_occurrenceFolderCounts
 
bool m_simpleRepeatedLeafDesign = false
 
std::map< std::string, std::string > m_baseOccurrenceNetAliases
 Occurrence net aliases shared by every scope, then those a parent block adds per child scope.
 
std::map< const std::map< uint32_t, std::string > *, std::map< std::string, std::string > > m_occurrenceAliasesByScope
 
int m_powerCount
 "#PWR%04d" counter
 
int m_fontBaselineDbu
 dominant text height; 0 = none
 
size_t m_pageOrdinal = 0
 
size_t m_screenOrdinal = 1
 
SCH_SCREEN * m_pageItemScreen = nullptr
 
std::vector< SCH_ITEM * > m_pageItems
 
std::set< SCH_SCREEN * > m_importedScreens
 
std::set< const SCH_ITEM * > m_preExistingItems
 already on the root screen
 
PAGE_SCOPE m_scope
 
std::set< const ORCAD_PIN_INST * > m_currentImplicitPowerPins
 
std::map< std::string, std::map< std::string, std::string > > m_hierBusNamesByScreen
 
std::vector< INTERFACE_LABEL_SOURCE > m_interfaceLabelSources
 
std::vector< NET_LABEL_INTENT > m_netLabelIntents
 
std::vector< std::pair< SCH_LABEL_BASE *, std::pair< SCH_SCREEN *, uint32_t > > > m_labelSourceNets
 
std::map< SCH_SCREEN *, const ORCAD_RAW_PAGE * > m_sourcePages
 
std::map< std::pair< SCH_SCREEN *, uint32_t >, std::vector< SCH_ITEM * > > m_sourceNetItems
 
std::map< std::pair< SCH_SCREEN *, uint32_t >, std::set< std::string > > m_sourceNetNames
 
std::map< std::pair< SCH_SCREEN *, uint32_t >, std::string > m_sourceGeneratedNetNames
 
std::map< SCH_SYMBOL *, std::vector< SOURCE_PIN_IDENTITY > > m_sourcePinIdentities
 
std::map< SCH_SYMBOL *, const ORCAD_PLACED_INSTANCE * > m_sourceInstances
 
std::map< SCH_SCREEN *, std::vector< wxString > > m_sourceOccurrences
 
std::map< std::tuple< SCH_SCREEN *, const ORCAD_PLACED_INSTANCE *, size_t >, std::pair< uint32_t, std::string > > m_wirelessNetNames
 
std::set< wxString > m_usedSheetNames
 Lower-cased sheet names already emitted, to keep sibling sheet names unique.
 
PAGE_NET_INDEX m_netIndex
 

Static Private Attributes

static constexpr int PIN_LEN_DBU = 10
 – constants (calibrated; do not change) -------------------------------------—
 
static constexpr int MARGIN_L_DBU = 60
 Page margins in DBU leave room for the KiCad frame and title block.
 
static constexpr int MARGIN_T_DBU = 60
 
static constexpr int MARGIN_R_DBU = 60
 
static constexpr int MARGIN_B_DBU = 100
 

Detailed Description

Definition at line 120 of file orcad_converter.h.

Member Typedef Documentation

◆ PKG_KEY

using ORCAD_CONVERTER::PKG_KEY = std::tuple<std::string, std::string, int, std::string>
private

(sourcePackage-or-pkgName, pkgName, variant index, unit discriminator) -> (lib name, unit number).

Definition at line 189 of file orcad_converter.h.

Constructor & Destructor Documentation

◆ ORCAD_CONVERTER()

ORCAD_CONVERTER::ORCAD_CONVERTER ( ORCAD_DESIGN & aDesign,
SCHEMATIC * aSchematic,
REPORTER * aReporter,
PROGRESS_REPORTER * aProgressReporter = nullptr )
Parameters
aDesignparsed design; held by reference and MUTATED during conversion (page-content shift, placeholder symbol insertion), so it must outlive the converter.
aSchematicis KiCad schematic to load into.
aReporteris an optional REPORTER object to write status information.
aProgressReporteris an optional progress dialog to show conversion progress.

[orcad_converter_sheet.cpp]

Definition at line 421 of file orcad_converter_sheet.cpp.

References m_design, m_fontBaselineDbu, m_powerCount, m_progressReporter, m_reporter, m_rootSheet, and m_schematic.

◆ ~ORCAD_CONVERTER()

ORCAD_CONVERTER::~ORCAD_CONVERTER ( )
default

Member Function Documentation

◆ acceptPowerAliases()

void ORCAD_CONVERTER::acceptPowerAliases ( const std::map< std::string, POWER_ALIAS_EVIDENCE > & aCandidates)
private

Rename a power symbol to the net most of its placements resolve to.

Definition at line 1715 of file orcad_converter_sheet.cpp.

References m_globalNetAliases.

Referenced by convertFolderHierarchy().

◆ addChildOccurrenceAliases()

void ORCAD_CONVERTER::addChildOccurrenceAliases ( const ORCAD_RAW_PAGE & aParentPage,
const ORCAD_OCC_SCOPE & aParentScope,
const ORCAD_DRAWN_INSTANCE & aDrawn,
const ORCAD_OCC_SCOPE & aChildScope )
private

◆ addSymbolArc()

void ORCAD_CONVERTER::addSymbolArc ( LIB_SYMBOL * aSymbol,
const ORCAD_PRIMITIVE & aPrim,
int aUnit,
int aColor,
int aOffsetX = 0,
int aOffsetY = 0 )
private

◆ addSymbolPin()

◆ addSymbolPrimitive()

◆ appendNetIntent()

void ORCAD_CONVERTER::appendNetIntent ( SCH_SCREEN * aScreen,
SCH_LABEL * aLabel,
bool aExplicitName,
uint32_t aNetId = 0 )
private

◆ appendPageItem()

◆ applyCisVariants()

◆ applyDisplayProp()

◆ applyFont()

◆ applyMultilineSpacing()

void ORCAD_CONVERTER::applyMultilineSpacing ( SCH_TEXT * aText,
int aFontIdx,
bool aTemplateFont = true ) const
private

◆ applyPageSettings()

◆ applyTitleBlock()

◆ assignPageItemUuids()

void ORCAD_CONVERTER::assignPageItemUuids ( size_t aPageOrdinal)
private

◆ assignPinUuids()

void ORCAD_CONVERTER::assignPinUuids ( SCH_SYMBOL * aSymbol,
const std::string & aRole ) const
private

Name-based UUIDs for a symbol's raw pins, derived from aRole and each pin's number, name and position.

Definition at line 443 of file orcad_converter_sheet.cpp.

References deterministicUuid(), SCH_SYMBOL::GetRawPins(), pin, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by assignPageItemUuids(), and assignRemainingUuids().

◆ assignRemainingUuids()

void ORCAD_CONVERTER::assignRemainingUuids ( )
private

Give items created after page conversion, such as moved labels and cleanup junctions, UUIDs derived from their type and position.

Only screens this import created are touched.

Definition at line 474 of file orcad_converter_sheet.cpp.

References assignPinUuids(), SCH_SHEET_LIST::ContainsSheet(), KIID::FromName(), SCH_SYMBOL::GetRawPins(), SCH_SCREEN::Items(), m_design, m_importedScreens, m_preExistingItems, m_rootSheet, m_schematic, path, SCH_SYMBOL_T, SCH_SHEET_LIST::SortByPageNumbers(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by finishConversion().

◆ buildNetLookup()

◆ buildPackageEntry()

◆ BuildSymbolLibrary()

◆ canBuildFolderHierarchy()

bool ORCAD_CONVERTER::canBuildFolderHierarchy ( const std::vector< ORCAD_RAW_PAGE > & aPages,
const ORCAD_OCC_SCOPE & aScope ) const
private

Every occurrence block is drawn exactly once on its parent folder's pages.

Definition at line 1789 of file orcad_converter_sheet.cpp.

References ORCAD_OCC_SCOPE::blocks, canBuildFolderHierarchy(), ORCAD_OCC_BLOCK::childFolder, m_design, OrcadLower(), ORCAD_OCC_BLOCK::scope, and ORCAD_OCC_BLOCK::targetDbId.

Referenced by canBuildFolderHierarchy(), and Convert().

◆ canBuildNativeHierarchy()

bool ORCAD_CONVERTER::canBuildNativeHierarchy ( const ORCAD_RAW_PAGE & aPage,
const ORCAD_OCC_SCOPE & aScope ) const
private

◆ canonicalGlobalNetKey()

std::string ORCAD_CONVERTER::canonicalGlobalNetKey ( const std::string & aName) const
private

Case-folded canonicalGlobalNetName() for use as a map key.

Definition at line 638 of file orcad_converter_sheet.cpp.

References canonicalGlobalNetName(), and OrcadLower().

Referenced by convertFlatPages(), pinOccurrenceTargets(), placeFolder(), and prepareOccurrenceNets().

◆ canonicalGlobalNetName()

std::string ORCAD_CONVERTER::canonicalGlobalNetName ( const std::string & aName) const
private

◆ collectFolderPowerAliases()

◆ computeFontBaseline()

◆ computeJunctions()

std::vector< VECTOR2I > ORCAD_CONVERTER::computeJunctions ( const ORCAD_RAW_PAGE & aPage) const
private

◆ Convert()

◆ convertFlatPages()

◆ convertFolderHierarchy()

◆ convertPage()

◆ convertUnreferencedPages()

◆ createBlockSheet()

◆ createTopLevelSheets()

std::vector< SCH_SHEET * > ORCAD_CONVERTER::createTopLevelSheets ( const std::vector< std::pair< wxString, wxString > > & aNamesAndFiles,
bool aReuseRoot,
bool aOrdinalSheetUuids )
private

Top-level sheets named by aNamesAndFiles.

With aReuseRoot the first is the root sheet and the list replaces the top level; otherwise the sheets are appended. Returns only the listed sheets.

Definition at line 1659 of file orcad_converter_sheet.cpp.

References deterministicUuid(), SCH_SHEET::GetField(), SCH_SHEET::GetScreen(), m_rootSheet, m_schematic, EDA_ITEM::m_Uuid, name, newScreen(), SCH_SCREEN::SetFileName(), SCH_SHEET::SetScreen(), SCH_FIELD::SetText(), SHEET_FILENAME, SHEET_NAME, and SCH_SHEET::SyncUuidToScreen().

Referenced by convertUnreferencedPages(), and placeFolder().

◆ deterministicUuid()

KIID ORCAD_CONVERTER::deterministicUuid ( const std::string & aRole,
size_t aOrdinal ) const
private

◆ displayFontId()

◆ displayPropPosition()

VECTOR2I ORCAD_CONVERTER::displayPropPosition ( const ORCAD_DISPLAY_PROP & aDisplay,
const VECTOR2I & aAnchorIu ) const
private

Capture's display-property origin sits on the font baseline; return the KiCad text origin.

Definition at line 3809 of file orcad_converter_symbols.cpp.

References displayFontId(), displayUsesTemplateFont(), ORCAD_DISPLAY_PROP::rotation, textBaselineOffset(), and textSizeIU().

Referenced by applyDisplayProp(), and applyTitleBlock().

◆ displayUsesTemplateFont()

bool ORCAD_CONVERTER::displayUsesTemplateFont ( const ORCAD_DISPLAY_PROP & aProp) const
private

◆ effectiveInterfaceNetName()

std::string ORCAD_CONVERTER::effectiveInterfaceNetName ( const std::string & aName) const
private

◆ effectiveProps()

std::map< std::string, std::string > ORCAD_CONVERTER::effectiveProps ( const ORCAD_PLACED_INSTANCE & aInst,
const ORCAD_SYMBOL_DEF & aDef ) const
private

Empty package and placement values must not clear a library property.

Definition at line 1513 of file orcad_converter_symbols.cpp.

References ORCAD_PLACED_INSTANCE::dbId, m_scope, name, overlay, packageFor(), ORCAD_PLACED_INSTANCE::props, and ORCAD_SYMBOL_DEF::props.

Referenced by placeInstance(), and placeSymbolFields().

◆ enterScope()

void ORCAD_CONVERTER::enterScope ( PAGE_SCOPE aScope)
private

◆ finalizeNativePowerPackages()

◆ finalizeNetNames()

◆ finishConversion()

void ORCAD_CONVERTER::finishConversion ( )
private

Run the shared finalization sequence that ends every conversion entry point.

Definition at line 3655 of file orcad_converter_sheet.cpp.

References assignRemainingUuids(), convertUnreferencedPages(), finalizeNativePowerPackages(), and finalizeNetNames().

Referenced by Convert().

◆ finishInterfaceLabel()

const ORCAD_DISPLAY_PROP * ORCAD_CONVERTER::finishInterfaceLabel ( const ORCAD_GRAPHIC_INST & aGraphic,
SCH_LABEL_BASE * aLabel,
const std::vector< SEG > & aSourceWires,
SCH_SCREEN * aScreen )
private

◆ fontHeightDbu()

int ORCAD_CONVERTER::fontHeightDbu ( int aFontIdx,
bool aTemplateFont = true ) const
private

|lfHeight| of a Design Template font ID; ID 0 selects the template default.

Definition at line 3897 of file orcad_converter_symbols.cpp.

References std::abs(), m_design, and resolveFontIndex().

Referenced by applyMultilineSpacing(), computeFontBaseline(), and textSizeIU().

◆ forEachDesignPage()

void ORCAD_CONVERTER::forEachDesignPage ( const std::function< void(const ORCAD_RAW_PAGE &)> & aVisit,
bool aUnreferenced = false ) const
private

Visit root pages, then child-folder pages, then unreferenced folder pages if asked.

Definition at line 1366 of file orcad_converter_sheet.cpp.

References m_design.

Referenced by convertFlatPages(), prepareGlobalNetNames(), prepareOccurrenceNets(), and prepareSymbols().

◆ graphicDefinition()

const ORCAD_SYMBOL_DEF * ORCAD_CONVERTER::graphicDefinition ( const ORCAD_GRAPHIC_INST & aInst) const
private

◆ graphicPinPos()

VECTOR2I ORCAD_CONVERTER::graphicPinPos ( const ORCAD_GRAPHIC_INST & aInst) const
private

◆ hasImplicitPowerPinName()

bool ORCAD_CONVERTER::hasImplicitPowerPinName ( const ORCAD_PLACED_INSTANCE & aInstance,
size_t aPinIndex,
const std::string & aNetName ) const
private

◆ instantiateSymbol()

SCH_SYMBOL * ORCAD_CONVERTER::instantiateSymbol ( const LIB_SYMBOL & aLibSymbol,
const std::string & aLibName,
int aUnit,
int aOrient,
const VECTOR2I & aPos,
const SCH_SHEET_PATH & aSheetPath ) const
private

New placement of a library symbol, oriented by an OrCAD orientation code.

Definition at line 2558 of file orcad_converter_symbols.cpp.

References libIdFor(), SCH_SYMBOL::SetOrientation(), and toKicadOrientation().

Referenced by placeInstance(), and placePowerSymbol().

◆ isOffpageNetName()

bool ORCAD_CONVERTER::isOffpageNetName ( const std::string & aName) const
private

Definition at line 702 of file orcad_converter_sheet.cpp.

References m_offpageNetNames, and OrcadLower().

Referenced by convertFlatPages(), and placeWires().

◆ isPowerNetName()

bool ORCAD_CONVERTER::isPowerNetName ( const std::string & aName) const
private

◆ kicadSymbolFor()

LIB_SYMBOL * ORCAD_CONVERTER::kicadSymbolFor ( const std::string & aLibName)
private

Definition at line 2038 of file orcad_converter_symbols.cpp.

References addSymbolPin(), addSymbolPrimitive(), ALL_BODY_STYLES, ORCAD_SYMBOL_DEF::bbox, ORCAD_SYMBOL_DEF::color, ORCAD_CONVERTER::UNIT_INFO::convert, ORCAD_SYMBOL_PIN::displayProps, ORCAD_CONVERTER::PIN_EMIT::explicitNet, ORCAD_CONVERTER::UNIT_INFO::explicitPinNets, LIB_ID::FixIllegalChars(), FromOrcadString(), ORCAD_SYMBOL_DEF::generalFlags, ORCAD_CONVERTER::PIN_EMIT::hidden, ORCAD_SYMBOL_PIN::hotptX, ORCAD_CONVERTER::LIB_ENTRY::isPower, ORCAD_CONVERTER::LIB_ENTRY::kicadSymbol, libIdFor(), m_libSymbols, name, ORCAD_CONVERTER::LIB_ENTRY::name, ORCAD_DISPLAY_PROP::name, ORCAD_CONVERTER::PIN_EMIT::nameOverride, ORCAD_CONVERTER::PIN_EMIT::nameVisible, ORCAD_CONVERTER::PIN_EMIT::number, ORCAD_CONVERTER::PIN_EMIT::numberVisible, ORCAD_IU_PER_DBU, OrcadDisplayPropVisible(), OrcadIEquals(), ORCAD_CONVERTER::UNIT_INFO::pinIgnore, ORCAD_CONVERTER::UNIT_INFO::pinNumbers, ORCAD_CONVERTER::UNIT_INFO::pinNumberVisible, ORCAD_CONVERTER::UNIT_INFO::pinOffsets, ORCAD_SYMBOL_DEF::pins, ORCAD_SYMBOL_PIN::position, ORCAD_CONVERTER::PIN_EMIT::power, ORCAD_CONVERTER::LIB_ENTRY::powerNet, ORCAD_SYMBOL_DEF::primitives, ORCAD_CONVERTER::LIB_ENTRY::refPrefix, SCH_FIELD_T, SCH_FIELD::SetText(), EDA_TEXT::SetTextPos(), EDA_TEXT::SetVisible(), ORCAD_CONVERTER::PIN_EMIT::showPinNumbers, ORCAD_SYMBOL_PIN::startX, ORCAD_CONVERTER::UNIT_INFO::symbol, ORCAD_PRIMITIVE::text, ORCAD_CONVERTER::PIN_EMIT::unit, ORCAD_CONVERTER::LIB_ENTRY::units, UTF8::wx_str(), and ORCAD_BBOX::y1.

Referenced by BuildSymbolLibrary(), finalizeNativePowerPackages(), placeInstance(), and placePowerSymbol().

◆ libForInstance()

◆ MakePageFileName()

wxString ORCAD_CONVERTER::MakePageFileName ( int aPageIndex,
const std::string & aPageName )
staticprivate

◆ minimizeNetLabels()

◆ namedGraphicPinPos()

VECTOR2I ORCAD_CONVERTER::namedGraphicPinPos ( const ORCAD_RAW_PAGE & aPage,
const ORCAD_GRAPHIC_INST & aInst ) const
private

◆ netAt()

std::string ORCAD_CONVERTER::netAt ( const ORCAD_RAW_PAGE & aPage,
int aX,
int aY ) const
private

Prefer endpoint nets, then intersecting wires, then endpoint aliases.

Definition at line 4692 of file orcad_converter_sheet.cpp.

References empty(), m_netIndex, name, ORCAD_ALIAS::name, ORCAD_RAW_PAGE::netAliases, ORCAD_RAW_PAGE::netmap, onSegment(), and ORCAD_RAW_PAGE::wires.

Referenced by resolvePowerNet().

◆ newScreen()

SCH_SCREEN * ORCAD_CONVERTER::newScreen ( )
private

A new screen with the next deterministic screen UUID, recorded as created by this import.

Definition at line 465 of file orcad_converter_sheet.cpp.

References deterministicUuid(), SCH_SCREEN::GetUuid(), m_importedScreens, m_schematic, and m_screenOrdinal.

Referenced by createBlockSheet(), createTopLevelSheets(), and placeFolder().

◆ note()

void ORCAD_CONVERTER::note ( const wxString & aMsg)
private

Fact about the source design (not a conversion problem): RPT_SEVERITY_INFO.

Definition at line 571 of file orcad_converter_sheet.cpp.

References m_reporter, and RPT_SEVERITY_INFO.

Referenced by placeInstance(), placeOffpageConnectors(), and prepareSymbols().

◆ occurrenceBaseNetName()

std::string ORCAD_CONVERTER::occurrenceBaseNetName ( const std::string & aName) const
private

Definition at line 668 of file orcad_converter_sheet.cpp.

References m_scope, name, and OrcadLower().

Referenced by enterScope(), and occurrenceElectricalNetName().

◆ occurrenceElectricalNetName()

std::string ORCAD_CONVERTER::occurrenceElectricalNetName ( uint32_t aOccurrenceId,
const std::string & aName ) const
private

Definition at line 682 of file orcad_converter_sheet.cpp.

References m_scope, occurrenceBaseNetName(), and OrcadLower().

Referenced by placeWires(), and resolvePowerNet().

◆ occurrenceNetIdFor()

std::optional< uint32_t > ORCAD_CONVERTER::occurrenceNetIdFor ( const std::string * aName) const
private

Return the occurrence net id owning aName, which the table identifies by address.

Definition at line 3262 of file orcad_converter_sheet.cpp.

References m_scope.

Referenced by resolvePowerNet().

◆ occurrenceScope()

ORCAD_CONVERTER::PAGE_SCOPE ORCAD_CONVERTER::occurrenceScope ( const ORCAD_OCC_SCOPE & aOcc) const
private

◆ offpageNets()

◆ offsetPage()

◆ onSegment()

bool ORCAD_CONVERTER::onSegment ( int aX,
int aY,
const ORCAD_WIRE & aWire )
staticprivate

True when the point lies strictly INSIDE (not at an endpoint of) an H/V wire.

Definition at line 7916 of file orcad_converter_sheet.cpp.

References ORCAD_WIRE::x1, ORCAD_WIRE::x2, ORCAD_WIRE::y1, and ORCAD_WIRE::y2.

Referenced by computeJunctions(), netAt(), placeWires(), recordNetNameMap(), and resolvePowerNet().

◆ packageFor()

◆ pageExtentDbu()

◆ pickVariant()

std::pair< const ORCAD_SYMBOL_DEF *, int > ORCAD_CONVERTER::pickVariant ( const ORCAD_PLACED_INSTANCE & aInst) const
private

◆ pinNetIds()

const std::set< uint32_t > & ORCAD_CONVERTER::pinNetIds ( const ORCAD_PIN_INST & aPin) const
private

Page nets a placed pin joins through its net id, its wire object id or a wire under it.

Definition at line 4682 of file orcad_converter_sheet.cpp.

References m_netIndex.

Referenced by buildNetLookup().

◆ pinOccurrenceTargets()

std::set< const std::string * > ORCAD_CONVERTER::pinOccurrenceTargets ( const ORCAD_RAW_PAGE & aPage,
const ORCAD_BLOCK_PIN & aPin,
const std::map< uint32_t, std::string > & aScopeNets,
bool aSkipGenerated,
std::set< std::string > * aSourceKeys = nullptr ) const
private

Occurrence nets in aScopeNets that a block pin on aPage reaches by name or by wire object id.

aSourceKeys receives the pin's own name keys and those of the wires under it.

Definition at line 1055 of file orcad_converter_sheet.cpp.

References canonicalGlobalNetKey(), ORCAD_WIRE::dbId, ORCAD_WIRE::id, ORCAD_WIRE::isBus, name, ORCAD_BLOCK_PIN::name, pageNetNames(), rawPointOnSegment(), ORCAD_RAW_PAGE::wires, ORCAD_BLOCK_PIN::x, and ORCAD_BLOCK_PIN::y.

Referenced by addChildOccurrenceAliases(), and placeFolder().

◆ placeBitmap()

◆ placeBusEntries()

◆ placeDefinitionImages()

void ORCAD_CONVERTER::placeDefinitionImages ( const ORCAD_SYMBOL_DEF & aDefinition,
int aBaseX,
int aBaseY,
int aOrient,
SCH_SCREEN * aScreen )
private

◆ placeDefinitionVectors()

◆ placedPinElectricalPosition()

VECTOR2I ORCAD_CONVERTER::placedPinElectricalPosition ( const ORCAD_PLACED_INSTANCE & aInstance,
size_t aPinIndex ) const
private

◆ placedStackedPinOffsets()

std::vector< int > ORCAD_CONVERTER::placedStackedPinOffsets ( const ORCAD_PLACED_INSTANCE & aInstance) const
private

◆ placeFolder()

void ORCAD_CONVERTER::placeFolder ( FOLDER_WALK & aWalk,
std::vector< ORCAD_RAW_PAGE > & aPages,
const ORCAD_OCC_SCOPE & aScope,
SCH_SHEET * aFolderSheet,
const SCH_SHEET_PATH & aFolderPath,
const std::string & aOccurrenceSuffix,
bool aRepeatedFolder,
const std::map< std::string, std::string > & aUnconnectedInterfaceNetNames,
std::map< std::string, std::string > aInterfaceNetAliases )
private

Definition at line 1922 of file orcad_converter_sheet.cpp.

References A4, addChildOccurrenceAliases(), SCH_SHEET::AddPin(), SCH_SCREEN::Append(), appendOccurrenceSuffix(), appendPageItem(), applyPageSettings(), KIID::AsStdString(), canonicalGlobalNetKey(), canonicalGlobalNetName(), ORCAD_OCC_BLOCK::childFolder, convertPage(), createBlockSheet(), createTopLevelSheets(), deterministicUuid(), enterScope(), findDrawnBlock(), ORCAD_CONVERTER::PAGE_SCOPE::flatNetSuffix, ORCAD_CONVERTER::FOLDER_WALK::folderSheetNames, FromOrcadString(), ORCAD_CONVERTER::PAGE_SCOPE::generatedFlatNets, SCH_SHEET::GetField(), SCH_SHEET::GetPins(), SCH_SHEET::GetScreen(), SCH_SCREEN::GetUuid(), ORCAD_CONVERTER::FOLDER_WALK::interfaceAliases, ORCAD_CONVERTER::PAGE_SCOPE::interfaceNetAliases, L_BIDI, LEFT, m_design, m_hierBusNamesByScreen, m_occurrenceFolderCounts, m_progressReporter, m_rootSheet, m_schematic, m_simpleRepeatedLeafDesign, EDA_ITEM::m_Uuid, MakePageFileName(), name, ORCAD_RAW_PAGE::name, ORCAD_CONVERTER::PAGE_SCOPE::namedFlatNets, ORCAD_CONVERTER::FOLDER_WALK::nestedFlatSuffix, ORCAD_OCC_SCOPE::netNames, newScreen(), ORCAD_CONVERTER::FOLDER_WALK::numberSourcePages, ORCAD_CONVERTER::FOLDER_WALK::occurrenceAliases, occurrenceScope(), ORCAD_RAW_PAGE::offpage, OrcadLower(), ORCAD_CONVERTER::FOLDER_WALK::pageIndex, path, pin, pinOccurrenceTargets(), ORCAD_DRAWN_INSTANCE::pins, placeFolder(), ORCAD_RAW_PAGE::ports, SCH_SHEET_PATH::push_back(), ORCAD_DRAWN_INSTANCE::reference, ORCAD_CONVERTER::FOLDER_WALK::rootSharedFolderPage, schIUScale, ORCAD_OCC_BLOCK::scope, SCH_SCREEN::SetFileName(), SCH_SHEET_PATH::SetPageNumber(), SCH_SCREEN::SetPageSettings(), SCH_SHEET::SetScreen(), SCH_LABEL_BASE::SetShape(), SCH_FIELD::SetText(), SHEET_FILENAME, SHEET_NAME, sortedOccurrences(), ORCAD_CONVERTER::FOLDER_WALK::sourcePageCount, ORCAD_CONVERTER::FOLDER_WALK::sourcePageIndex, ORCAD_OCC_BLOCK::targetDbId, topLevelPath(), ORCAD_CONVERTER::PAGE_SCOPE::unconnectedInterfaceNetNames, unconnectedInterfaceNetNames(), uniqueSheetName(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by convertFolderHierarchy(), and placeFolder().

◆ placeGraphicDisplayText()

◆ placeGraphics()

void ORCAD_CONVERTER::placeGraphics ( const ORCAD_RAW_PAGE & aPage,
SCH_SCREEN * aScreen )
private

Definition at line 7439 of file orcad_converter_sheet.cpp.

References std::abs(), ANGLE_VERTICAL, appendPageItem(), applyFont(), applyMultilineSpacing(), ARC, BEZIER, ORCAD_FONT::bold, ORCAD_GRAPHIC_INST::color, ELLIPSE, ORCAD_PRIMITIVE::end, ORCAD_FONT::face, ORCAD_PRIMITIVE::fillStyle, ORCAD_PRIMITIVE::fontIdx, FromOrcadString(), KIFONT::FONT::GetFont(), SCH_TEXT::GetOffsetToMatchSCH_FIELD(), SCH_TEXT::GetPosition(), SCH_TEXT::GetSchematicTextOffset(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_V_ALIGN_TOP, ORCAD_RAW_PAGE::graphics, GROUP_PRIM, ORCAD_FONT::height, IMAGE, ORCAD_PRIMITIVE::kind, KiROUND(), LAYER_NOTES, LINE, ORCAD_PRIMITIVE::lineStyle, ORCAD_PRIMITIVE::lineWidth, m_design, M_PI, ORCAD_GRAPHIC_INST::nested, NO_FILL, ORCAD_ST_GRAPHIC_OLE_INST, OrcadColor(), OrcadDbuToIu(), OrcadForEachLeafPrimitive(), OrcadLineStyle(), OrcadLineWidthIu(), OrcadLower(), OrcadOffsetPrimitive(), OrcadPageGraphicLineWidthIu(), OrcadTextBaselineOffset(), placeBitmap(), ORCAD_PRIMITIVE::points, POLYGON, POLYLINE, ORCAD_SYMBOL_DEF::primitives, RECTANGLE, ORCAD_GRAPHIC_INST::rotation, EDA_SHAPE::SetBezierC1(), EDA_SHAPE::SetBezierC2(), EDA_SHAPE::SetEnd(), EDA_SHAPE::SetFillMode(), EDA_TEXT::SetMultilineAllowed(), SCH_SHAPE::SetPosition(), SCH_TEXT::SetPosition(), SCH_SHAPE::SetStroke(), ORCAD_PRIMITIVE::start, TEXT, text, ORCAD_PRIMITIVE::text, textBaselineOffset(), ORCAD_PRIMITIVE::textBoundsStart, ORCAD_GRAPHIC_INST::textScaleX, ORCAD_GRAPHIC_INST::textScaleY, textSize(), ORCAD_GRAPHIC_INST::typeId, KIGFX::COLOR4D::UNSPECIFIED, ORCAD_GRAPHIC_INST::useGenericTextBaseline, ORCAD_GRAPHIC_INST::useSymbolLineWidths, ORCAD_FONT::width, ORCAD_POINT::x, VECTOR2< T >::x, ORCAD_PRIMITIVE::x1, ORCAD_PRIMITIVE::x2, ORCAD_POINT::y, VECTOR2< T >::y, ORCAD_PRIMITIVE::y1, and ORCAD_PRIMITIVE::y2.

◆ placeHierarchicalBlockFields()

◆ placeHierarchicalBlockPinFill()

◆ placeInstance()

void ORCAD_CONVERTER::placeInstance ( ORCAD_RAW_PAGE & aPage,
const ORCAD_PLACED_INSTANCE & aInst,
SCH_SCREEN * aScreen,
const SCH_SHEET_PATH & aSheetPath )
private

Definition at line 2872 of file orcad_converter_symbols.cpp.

References _, std::abs(), ANGLE_HORIZONTAL, ANGLE_VERTICAL, appendPageItem(), applyCisVariants(), ORCAD_SYMBOL_DEF::bbox, candidates(), BOX2< Vec >::Centre(), CIRCLE, correction, SHAPE_LINE_CHAIN::CPoints(), ORCAD_PLACED_INSTANCE::dbId, delta, effectiveProps(), ORCAD_CONVERTER::LIB_ENTRY::footprint, FromOrcadString(), LIB_SYMBOL::GetDrawItems(), SCH_SYMBOL::GetField(), SCH_SYMBOL::GetFields(), SCH_SYMBOL::GetLibSymbolRef(), SCH_SYMBOL::GetPins(), EDA_SHAPE::GetPolyShape(), SCH_SHAPE::GetPosition(), EDA_SHAPE::GetRadius(), BOX2< Vec >::GetRight(), EDA_SHAPE::GetShape(), SYMBOL::GetTransform(), GR_TEXT_H_ALIGN_LEFT, GR_TEXT_V_ALIGN_CENTER, ORCAD_CONVERTER::SOURCE_PIN_IDENTITY::ignored, index, instantiateSymbol(), TRANSFORM::InverseTransform(), SHAPE_POLY_SET::IsEmpty(), isInstalledPropertyName(), EDA_TEXT::IsVisible(), kicadSymbolFor(), LAYER_DEVICE, LAYER_PINNAM, LAYER_PINNUM, libForInstance(), ORCAD_CONVERTER::SOURCE_PIN_IDENTITY::libraryPin, m_libSymbols, m_nativePowerFamilies, m_placedPackageUnits, m_preparedLibUnits, m_preparedPkgToLib, m_scope, m_sourceInstances, m_sourcePinIdentities, ORCAD_PLACED_INSTANCE::mirror, ORCAD_CONVERTER::LIB_ENTRY::name, ORCAD_RAW_PAGE::name, note(), ORCAD_CONVERTER::SOURCE_PIN_IDENTITY::number, ORCAD_IU_PER_DBU, OrcadDbuToIu(), OrcadIEquals(), OrcadOrientOf(), OrcadOrientOffset(), OrcadTextBaselineOffset(), SHAPE_POLY_SET::Outline(), pin, ORCAD_CONVERTER::UNIT_INFO::pinIgnore, ORCAD_CONVERTER::UNIT_INFO::pinNumbers, ORCAD_PLACED_INSTANCE::pins, ORCAD_SYMBOL_DEF::pins, placeDefinitionImages(), placedPinElectricalPosition(), placeSymbolFields(), POLY, ORCAD_CONVERTER::SOURCE_PIN_IDENTITY::position, radius, ORCAD_PLACED_INSTANCE::reference, resolveReference(), ORCAD_PLACED_INSTANCE::rotation, SCH_SHAPE_T, SCH_TEXT_T, SCH_SYMBOL::SetDNP(), SCH_SYMBOL::SetExcludedFromBoard(), SCH_SYMBOL::SetRef(), SCH_FIELD::SetText(), SCH_SYMBOL::SetUnitSelection(), MULTIVECTOR< T, FIRST_TYPE_VAL, LAST_TYPE_VAL >::sort(), ORCAD_CONVERTER::UNIT_INFO::symbol, ORCAD_SYMBOL_DEF::synthesized, text, TRANSFORM::TransformCoordinate(), ORCAD_CONVERTER::LIB_ENTRY::units, VALUE, ORCAD_PLACED_INSTANCE::value, warn(), ORCAD_PLACED_INSTANCE::x, VECTOR2< T >::x, ORCAD_BBOX::x1, ORCAD_BBOX::x2, ORCAD_PLACED_INSTANCE::y, VECTOR2< T >::y, ORCAD_BBOX::y1, TRANSFORM::y1, and ORCAD_BBOX::y2.

◆ placeJunctions()

void ORCAD_CONVERTER::placeJunctions ( const ORCAD_RAW_PAGE & aPage,
SCH_SCREEN * aScreen )
private

Append computed junctions as SCH_JUNCTION items.

Definition at line 5432 of file orcad_converter_sheet.cpp.

References appendPageItem(), m_netIndex, OrcadDbuToIu(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by convertPage().

◆ placeOffpageConnectors()

◆ placePageFrame()

◆ placePorts()

◆ placePowerSymbol()

◆ placeSymbolFields()

void ORCAD_CONVERTER::placeSymbolFields ( SCH_SYMBOL * aSymbol,
const ORCAD_PLACED_INSTANCE & aInst,
const ORCAD_SYMBOL_DEF & aDef,
int aOrient,
const std::string & aValue,
const std::string & aFootprint )
private

Definition at line 3363 of file orcad_converter_symbols.cpp.

References std::abs(), SCH_SYMBOL::AddField(), ANGLE_HORIZONTAL, ANGLE_VERTICAL, appendPageItem(), applyDisplayProp(), applyFont(), ORCAD_SYMBOL_DEF::bbox, DATASHEET, ORCAD_PLACED_INSTANCE::dbId, DESCRIPTION, displayFontId(), ORCAD_PLACED_INSTANCE::displayProps, displayUsesTemplateFont(), effectiveProps(), FOOTPRINT, FromOrcadString(), SCH_SYMBOL::GetField(), SCH_SYMBOL::GetFields(), SCH_FIELD::GetPosition(), SCH_SYMBOL::GetPosition(), SCH_FIELD::GetText(), EDA_TEXT::GetTextSize(), SYMBOL::GetTransform(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_V_ALIGN_TOP, EDA_TEXT::IsVisible(), LAYER_NOTES, m_pageItemScreen, m_scope, ORCAD_DISPLAY_PROP::name, ORCAD_IU_PER_DBU, ORCAD_ORIENT_TABLE, OrcadColor(), OrcadDbuToIu(), OrcadDisplayPropShowsName(), OrcadDisplayPropShowsValue(), OrcadDisplayPropVisible(), OrcadIEquals(), OrcadTransformPoint(), ORCAD_PLACED_INSTANCE::pins, ORCAD_SYMBOL_DEF::pins, REFERENCE, ORCAD_PLACED_INSTANCE::reference, SCH_SYMBOL::RemoveField(), resolveReference(), SCH_SYMBOL::SetFootprintFieldText(), EDA_TEXT::SetHorizJustify(), SCH_FIELD::SetNameShown(), SCH_FIELD::SetPosition(), SCH_FIELD::SetText(), EDA_TEXT::SetTextAngle(), EDA_TEXT::SetTextSize(), SCH_SYMBOL::SetValueFieldText(), EDA_TEXT::SetVisible(), text, ORCAD_PLACED_INSTANCE::unitIndex, unitLetter(), USER, VALUE, ORCAD_PLACED_INSTANCE::value, ORCAD_DISPLAY_PROP::x, ORCAD_PLACED_INSTANCE::x, VECTOR2< T >::x, ORCAD_BBOX::x1, ORCAD_BBOX::x2, ORCAD_DISPLAY_PROP::y, ORCAD_PLACED_INSTANCE::y, VECTOR2< T >::y, ORCAD_BBOX::y1, TRANSFORM::y1, and ORCAD_BBOX::y2.

Referenced by placeInstance().

◆ placeWires()

◆ powerLibFor()

std::string ORCAD_CONVERTER::powerLibFor ( const std::string & aSymbolName,
const std::string & aNetName )
private

◆ powerNet()

std::string ORCAD_CONVERTER::powerNet ( const ORCAD_RAW_PAGE & aPage,
const ORCAD_GRAPHIC_INST & aInst ) const
private

Memoized resolvePowerNet() for the indexed page.

Definition at line 4755 of file orcad_converter_sheet.cpp.

References m_netIndex, and resolvePowerNet().

Referenced by collectFolderPowerAliases(), and placeWires().

◆ powerPinPos()

VECTOR2I ORCAD_CONVERTER::powerPinPos ( const ORCAD_RAW_PAGE & aPage,
const ORCAD_GRAPHIC_INST & aInst ) const
private

◆ prepareGlobalNetNames()

void ORCAD_CONVERTER::prepareGlobalNetNames ( )
private

Capture net names ignore case; KiCad net names do not.

Use one spelling for each global net.

Definition at line 578 of file orcad_converter_sheet.cpp.

References forEachDesignPage(), ORCAD_GRAPHIC_INST::logicalName, m_globalNetNames, m_offpageNetNames, m_powerNetNames, name, ORCAD_GRAPHIC_INST::name, OrcadLower(), and ORCAD_GRAPHIC_INST::props.

Referenced by Convert().

◆ prepareOccurrenceNets()

◆ prepareSymbols()

◆ recordNetNameMap()

void ORCAD_CONVERTER::recordNetNameMap ( )
private

Definition at line 3281 of file orcad_converter_sheet.cpp.

References _, SCH_CONNECTION::AllMembers(), KIID::AsStdString(), BUS, SCH_CONNECTION::BusCode(), candidates(), SCH_ITEM::Connection(), ORCAD_WIRE::dbId, IMPORT_NET_MAP::entries, FromOrcadString(), IMPORT_NET_MAP_ENTRY::generatedName, SCH_ITEM::GetBodyStyle(), SCH_PIN::GetLibPin(), SCH_PIN::GetName(), SCH_PIN::GetOrientation(), SCH_ITEM::GetParentSymbol(), SCH_SYMBOL::GetPins(), SCH_PIN::GetPosition(), SCH_SYMBOL::GetRef(), SCH_PIN::GetType(), SCH_ITEM::GetUnit(), SCH_SYMBOL::GetUnitSelection(), SCH_SCREEN::GetUuid(), group, ORCAD_WIRE::id, ORCAD_CONVERTER::SOURCE_PIN_IDENTITY::ignored, index, SCH_CONNECTION::IsBus(), ORCAD_WIRE::isBus, SCH_CONNECTION::IsNet(), ORCAD_PIN_INST::IsNoConnect(), SCH_SCREEN::Items(), IMPORT_NET_MAP_ENTRY::itemUuids, left, ORCAD_CONVERTER::SOURCE_PIN_IDENTITY::libraryPin, m_hierBusNamesByScreen, m_schematic, m_sourceGeneratedNetNames, m_sourceInstances, m_sourceNetItems, m_sourceNetNames, m_sourceOccurrences, m_sourcePages, m_sourcePinIdentities, EDA_ITEM::m_Uuid, m_wirelessNetNames, SCH_CONNECTION::Name(), name, IMPORT_NET_MAP_ENTRY::nameAtImport, SCH_CONNECTION::NetCode(), NO_CONNECT, ORCAD_CONVERTER::SOURCE_PIN_IDENTITY::number, IMPORT_NET_MAP_ENTRY::occurrence, EE_RTREE::OfType(), onSegment(), IMPORT_NET_MAP_ENTRY::originalName, pin, ORCAD_PLACED_INSTANCE::pins, ORCAD_CONVERTER::SOURCE_PIN_IDENTITY::position, alg::remove_duplicates(), RESOLVED, right, SCH_PIN_T, SCH_SYMBOL_T, scopedHierBusMember(), source, IMPORT_NET_MAP_ENTRY::sourceNetId, SPLIT, IMPORT_NET_MAP_ENTRY::status, IMPORT_NET_MAP_ENTRY::terminals, UNCONNECTED, IMPORT_NET_MAP_ENTRY::view, warn(), ORCAD_PIN_INST::wordA, ORCAD_PIN_INST::wordB, ORCAD_PIN_INST::x, VECTOR2< T >::x, ORCAD_PIN_INST::y, and VECTOR2< T >::y.

Referenced by finalizeNetNames().

◆ recordPowerAlias()

void ORCAD_CONVERTER::recordPowerAlias ( std::map< std::string, POWER_ALIAS_EVIDENCE > & aCandidates,
const std::string & aSourceName,
const std::string & aElectricalName ) const
private

◆ rememberInterfaceLabelSource()

void ORCAD_CONVERTER::rememberInterfaceLabelSource ( SCH_SCREEN * aScreen,
SCH_LABEL_BASE * aLabel,
const std::vector< SEG > & aSourceWires )
private

◆ resolveFontIndex()

int ORCAD_CONVERTER::resolveFontIndex ( int aFontIdx) const
private

Resolve a Design Template font ID to its 1-based LOGFONT index.

Definition at line 3875 of file orcad_converter_symbols.cpp.

References m_design.

Referenced by addSymbolPin(), applyFont(), displayFontId(), fontHeightDbu(), textBaselineOffset(), textSize(), and textSizeIU().

◆ resolvePowerNet()

◆ resolveReference()

wxString ORCAD_CONVERTER::resolveReference ( const ORCAD_PLACED_INSTANCE & aInst) const
private

Use the occurrence reference when the instance has an unannotated template.

Definition at line 3244 of file orcad_converter_symbols.cpp.

References ORCAD_PLACED_INSTANCE::dbId, FromOrcadString(), m_scope, and ORCAD_PLACED_INSTANCE::reference.

Referenced by placeInstance(), and placeSymbolFields().

◆ SanitizeFileName()

wxString ORCAD_CONVERTER::SanitizeFileName ( const std::string & aName)
staticprivate

Definition at line 3950 of file orcad_converter_sheet.cpp.

References FromOrcadString().

Referenced by MakePageFileName().

◆ snapToWire()

VECTOR2I ORCAD_CONVERTER::snapToWire ( int aX,
int aY,
const ORCAD_WIRE & aWire )
staticprivate

Closest point (DBU) on a wire segment to (aX, aY); exact for H/V wires.

Definition at line 7893 of file orcad_converter_sheet.cpp.

References KiROUND(), ORCAD_WIRE::x1, ORCAD_WIRE::x2, ORCAD_WIRE::y1, and ORCAD_WIRE::y2.

◆ spinAwayFromWire()

SPIN_STYLE ORCAD_CONVERTER::spinAwayFromWire ( const VECTOR2I & aPosDbu) const
private

Point an interface label at aPosDbu away from the wire that ends there.

Definition at line 7377 of file orcad_converter_sheet.cpp.

References std::abs(), SPIN_STYLE::BOTTOM, end, SPIN_STYLE::LEFT, m_netIndex, SPIN_STYLE::RIGHT, SPIN_STYLE::UP, VECTOR2< T >::x, ORCAD_WIRE::x1, ORCAD_WIRE::x2, VECTOR2< T >::y, ORCAD_WIRE::y1, and ORCAD_WIRE::y2.

Referenced by placeOffpageConnectors(), and placePorts().

◆ SymbolId()

std::string ORCAD_CONVERTER::SymbolId ( const std::string & aName)
staticprivate

LIB_ID-safe symbol name: ':', '"', '/' and whitespace runs -> '_'; "SYM" if empty.

Definition at line 4030 of file orcad_converter_symbols.cpp.

Referenced by buildPackageEntry(), BuildSymbolLibrary(), and powerLibFor().

◆ synthesizeSymbol()

◆ textBaselineOffset()

int ORCAD_CONVERTER::textBaselineOffset ( int aTextSize,
int aFontIdx,
bool aTemplateFont = true ) const
private

◆ textSize()

VECTOR2I ORCAD_CONVERTER::textSize ( int aFontIdx,
bool aTemplateFont = true ) const
private

◆ textSizeIU()

int ORCAD_CONVERTER::textSizeIU ( int aFontIdx,
bool aTemplateFont = true ) const
private

◆ toKicadOrientation()

int ORCAD_CONVERTER::toKicadOrientation ( int aOrient)
staticprivate

◆ topLevelPath()

SCH_SHEET_PATH ORCAD_CONVERTER::topLevelPath ( SCH_SHEET * aSheet,
size_t aPageNumber ) const
private

The hierarchy path ending at a top-level sheet, numbered aPageNumber.

Definition at line 1400 of file orcad_converter_sheet.cpp.

References m_schematic, and path.

Referenced by convertUnreferencedPages(), and placeFolder().

◆ unconnectedInterfaceNetNames()

std::map< std::string, std::string > ORCAD_CONVERTER::unconnectedInterfaceNetNames ( const ORCAD_DRAWN_INSTANCE & aBlock,
const std::string & aFlatNetSuffix ) const
private

No-connect block pins whose names are wired elsewhere become per-occurrence nets.

Definition at line 1575 of file orcad_converter_sheet.cpp.

References canonicalGlobalNetName(), m_connectedBlockInterfaceNames, OrcadLower(), pin, ORCAD_DRAWN_INSTANCE::pins, and result.

Referenced by convertFlatPages(), and placeFolder().

◆ uniqueLibName()

std::string ORCAD_CONVERTER::uniqueLibName ( const std::string & aBase,
const std::function< bool(const LIB_ENTRY &)> & aReusable ) const
private

aBase, or aBase_pinsN for the first N >= 2 whose existing entry is absent or passes aReusable.

Definition at line 2541 of file orcad_converter_symbols.cpp.

References m_libSymbols.

Referenced by finalizeNativePowerPackages().

◆ uniqueSheetName()

wxString ORCAD_CONVERTER::uniqueSheetName ( const wxString & aBase)
private

aBase, or "aBase (N)" for the first N >= 2 not already used by a sibling sheet.

Definition at line 1389 of file orcad_converter_sheet.cpp.

References m_usedSheetNames, and name.

Referenced by convertUnreferencedPages(), and placeFolder().

◆ unitLetter()

std::string ORCAD_CONVERTER::unitLetter ( const ORCAD_PLACED_INSTANCE & aInst) const
private

The unit key includes a non-Normal view so DeMorgan graphics remain distinct.

Definition at line 1280 of file orcad_converter_symbols.cpp.

References OrcadLower(), ORCAD_PLACED_INSTANCE::pkgName, ORCAD_PLACED_INSTANCE::props, and ORCAD_PLACED_INSTANCE::sourcePackage.

Referenced by libForInstance(), and placeSymbolFields().

◆ warn()

void ORCAD_CONVERTER::warn ( const wxString & aMsg)
private

– reporting [orcad_converter_sheet.cpp] ---------------------------------------—

Conversion problem: REPORTER at RPT_SEVERITY_WARNING.

Definition at line 564 of file orcad_converter_sheet.cpp.

References m_reporter, and RPT_SEVERITY_WARNING.

Referenced by BuildSymbolLibrary(), finalizeNativePowerPackages(), libForInstance(), placeBitmap(), placeInstance(), and recordNetNameMap().

◆ wireAliasFontId()

int ORCAD_CONVERTER::wireAliasFontId ( const ORCAD_ALIAS & aAlias) const
private

Definition at line 3844 of file orcad_converter_symbols.cpp.

References ORCAD_ALIAS::fontIdx, and m_design.

Referenced by computeFontBaseline().

Member Data Documentation

◆ LIB_NICK

const char* ORCAD_CONVERTER::LIB_NICK = "orcad_import"
staticconstexpr

Symbol library nickname used in every emitted LIB_ID.

Definition at line 146 of file orcad_converter.h.

Referenced by libIdFor().

◆ m_baseOccurrenceNetAliases

std::map<std::string, std::string> ORCAD_CONVERTER::m_baseOccurrenceNetAliases
private

Occurrence net aliases shared by every scope, then those a parent block adds per child scope.

Definition at line 634 of file orcad_converter.h.

Referenced by occurrenceScope(), and prepareOccurrenceNets().

◆ m_connectedBlockInterfaceNames

std::set<std::string> ORCAD_CONVERTER::m_connectedBlockInterfaceNames
private

Definition at line 627 of file orcad_converter.h.

Referenced by prepareOccurrenceNets(), and unconnectedInterfaceNetNames().

◆ m_currentImplicitPowerPins

std::set<const ORCAD_PIN_INST*> ORCAD_CONVERTER::m_currentImplicitPowerPins
private

Definition at line 646 of file orcad_converter.h.

◆ m_design

◆ m_fontBaselineDbu

int ORCAD_CONVERTER::m_fontBaselineDbu
private

dominant text height; 0 = none

Definition at line 637 of file orcad_converter.h.

Referenced by computeFontBaseline(), and ORCAD_CONVERTER().

◆ m_globalNetAliases

std::map<std::string, std::string> ORCAD_CONVERTER::m_globalNetAliases
private

Definition at line 624 of file orcad_converter.h.

Referenced by acceptPowerAliases(), and canonicalGlobalNetName().

◆ m_globalNetNames

std::map<std::string, std::string> ORCAD_CONVERTER::m_globalNetNames
private

Definition at line 623 of file orcad_converter.h.

Referenced by canonicalGlobalNetName(), and prepareGlobalNetNames().

◆ m_hierBusNamesByScreen

std::map<std::string, std::map<std::string, std::string> > ORCAD_CONVERTER::m_hierBusNamesByScreen
private

◆ m_importedScreens

std::set<SCH_SCREEN*> ORCAD_CONVERTER::m_importedScreens
private

Definition at line 642 of file orcad_converter.h.

Referenced by assignRemainingUuids(), Convert(), and newScreen().

◆ m_interfaceLabelSources

std::vector<INTERFACE_LABEL_SOURCE> ORCAD_CONVERTER::m_interfaceLabelSources
private

Definition at line 666 of file orcad_converter.h.

Referenced by finalizeNetNames(), and rememberInterfaceLabelSource().

◆ m_labelSourceNets

std::vector<std::pair<SCH_LABEL_BASE*, std::pair<SCH_SCREEN*, uint32_t> > > ORCAD_CONVERTER::m_labelSourceNets
private

Definition at line 668 of file orcad_converter.h.

Referenced by appendNetIntent(), and finalizeNetNames().

◆ m_libSymbols

std::map<std::string, LIB_ENTRY> ORCAD_CONVERTER::m_libSymbols
private

◆ m_nativePowerFamilies

std::set<std::string> ORCAD_CONVERTER::m_nativePowerFamilies
private

Definition at line 622 of file orcad_converter.h.

Referenced by finalizeNativePowerPackages(), and placeInstance().

◆ m_netIndex

◆ m_netLabelIntents

std::vector<NET_LABEL_INTENT> ORCAD_CONVERTER::m_netLabelIntents
private

Definition at line 667 of file orcad_converter.h.

Referenced by appendNetIntent(), and minimizeNetLabels().

◆ m_occurrenceAliasesByScope

std::map<const std::map<uint32_t, std::string>*, std::map<std::string, std::string> > ORCAD_CONVERTER::m_occurrenceAliasesByScope
private

Definition at line 635 of file orcad_converter.h.

Referenced by addChildOccurrenceAliases(), and occurrenceScope().

◆ m_occurrenceFolderCounts

std::map<std::string, size_t> ORCAD_CONVERTER::m_occurrenceFolderCounts
private

Definition at line 630 of file orcad_converter.h.

Referenced by convertFlatPages(), placeFolder(), and prepareOccurrenceNets().

◆ m_occurrenceNetNameMinDepth

std::map<std::string, size_t> ORCAD_CONVERTER::m_occurrenceNetNameMinDepth
private

Definition at line 629 of file orcad_converter.h.

Referenced by placePorts(), and prepareOccurrenceNets().

◆ m_occurrenceNetNameScopeCounts

std::map<std::string, size_t> ORCAD_CONVERTER::m_occurrenceNetNameScopeCounts
private

Definition at line 628 of file orcad_converter.h.

Referenced by prepareOccurrenceNets().

◆ m_offpageNetNames

std::set<std::string> ORCAD_CONVERTER::m_offpageNetNames
private

Definition at line 626 of file orcad_converter.h.

Referenced by isOffpageNetName(), and prepareGlobalNetNames().

◆ m_pageItems

std::vector<SCH_ITEM*> ORCAD_CONVERTER::m_pageItems
private

Definition at line 641 of file orcad_converter.h.

Referenced by appendPageItem(), assignPageItemUuids(), and convertPage().

◆ m_pageItemScreen

SCH_SCREEN* ORCAD_CONVERTER::m_pageItemScreen = nullptr
private

Definition at line 640 of file orcad_converter.h.

Referenced by appendPageItem(), convertPage(), and placeSymbolFields().

◆ m_pageOrdinal

size_t ORCAD_CONVERTER::m_pageOrdinal = 0
private

Definition at line 638 of file orcad_converter.h.

◆ m_pkgToLib

std::map<PKG_KEY, std::pair<std::string, int> > ORCAD_CONVERTER::m_pkgToLib
private

Definition at line 618 of file orcad_converter.h.

Referenced by prepareSymbols().

◆ m_placedPackageUnits

std::vector<PLACED_PACKAGE_UNIT> ORCAD_CONVERTER::m_placedPackageUnits
private

Definition at line 621 of file orcad_converter.h.

Referenced by finalizeNativePowerPackages(), and placeInstance().

◆ m_powerCount

int ORCAD_CONVERTER::m_powerCount
private

"#PWR%04d" counter

Definition at line 636 of file orcad_converter.h.

Referenced by ORCAD_CONVERTER(), and placePowerSymbol().

◆ m_powerNetNames

std::set<std::string> ORCAD_CONVERTER::m_powerNetNames
private

Definition at line 625 of file orcad_converter.h.

Referenced by isPowerNetName(), and prepareGlobalNetNames().

◆ m_preExistingItems

std::set<const SCH_ITEM*> ORCAD_CONVERTER::m_preExistingItems
private

already on the root screen

Definition at line 643 of file orcad_converter.h.

Referenced by assignRemainingUuids(), and Convert().

◆ m_preparedLibUnits

std::map<std::string, std::vector<UNIT_INFO> > ORCAD_CONVERTER::m_preparedLibUnits
private

Definition at line 620 of file orcad_converter.h.

Referenced by finalizeNativePowerPackages(), placeInstance(), and prepareSymbols().

◆ m_preparedPkgToLib

std::map<PKG_KEY, std::pair<std::string, int> > ORCAD_CONVERTER::m_preparedPkgToLib
private

Definition at line 619 of file orcad_converter.h.

Referenced by finalizeNativePowerPackages(), placeInstance(), and prepareSymbols().

◆ m_progressReporter

PROGRESS_REPORTER* ORCAD_CONVERTER::m_progressReporter
private

Definition at line 614 of file orcad_converter.h.

Referenced by convertUnreferencedPages(), ORCAD_CONVERTER(), and placeFolder().

◆ m_reporter

REPORTER* ORCAD_CONVERTER::m_reporter
private

Definition at line 613 of file orcad_converter.h.

Referenced by note(), ORCAD_CONVERTER(), and warn().

◆ m_rootSheet

SCH_SHEET* ORCAD_CONVERTER::m_rootSheet
private

◆ m_schematic

◆ m_scope

◆ m_screenOrdinal

size_t ORCAD_CONVERTER::m_screenOrdinal = 1
private

Definition at line 639 of file orcad_converter.h.

Referenced by newScreen().

◆ m_simpleRepeatedLeafDesign

bool ORCAD_CONVERTER::m_simpleRepeatedLeafDesign = false
private

Definition at line 631 of file orcad_converter.h.

Referenced by convertFlatPages(), placeFolder(), and prepareOccurrenceNets().

◆ m_sourceGeneratedNetNames

std::map<std::pair<SCH_SCREEN*, uint32_t>, std::string> ORCAD_CONVERTER::m_sourceGeneratedNetNames
private

Definition at line 672 of file orcad_converter.h.

Referenced by recordNetNameMap().

◆ m_sourceInstances

std::map<SCH_SYMBOL*, const ORCAD_PLACED_INSTANCE*> ORCAD_CONVERTER::m_sourceInstances
private

Definition at line 682 of file orcad_converter.h.

Referenced by placeInstance(), and recordNetNameMap().

◆ m_sourceNetItems

std::map<std::pair<SCH_SCREEN*, uint32_t>, std::vector<SCH_ITEM*> > ORCAD_CONVERTER::m_sourceNetItems
private

Definition at line 670 of file orcad_converter.h.

Referenced by finalizeNetNames(), and recordNetNameMap().

◆ m_sourceNetNames

std::map<std::pair<SCH_SCREEN*, uint32_t>, std::set<std::string> > ORCAD_CONVERTER::m_sourceNetNames
private

Definition at line 671 of file orcad_converter.h.

Referenced by convertPage(), and recordNetNameMap().

◆ m_sourceOccurrences

std::map<SCH_SCREEN*, std::vector<wxString> > ORCAD_CONVERTER::m_sourceOccurrences
private

Definition at line 683 of file orcad_converter.h.

Referenced by convertPage(), and recordNetNameMap().

◆ m_sourcePages

std::map<SCH_SCREEN*, const ORCAD_RAW_PAGE*> ORCAD_CONVERTER::m_sourcePages
private

Definition at line 669 of file orcad_converter.h.

Referenced by convertPage(), and recordNetNameMap().

◆ m_sourcePinIdentities

std::map<SCH_SYMBOL*, std::vector<SOURCE_PIN_IDENTITY> > ORCAD_CONVERTER::m_sourcePinIdentities
private

Definition at line 681 of file orcad_converter.h.

Referenced by placeInstance(), and recordNetNameMap().

◆ m_usedSheetNames

std::set<wxString> ORCAD_CONVERTER::m_usedSheetNames
private

Lower-cased sheet names already emitted, to keep sibling sheet names unique.

Definition at line 687 of file orcad_converter.h.

Referenced by convertUnreferencedPages(), and uniqueSheetName().

◆ m_wirelessNetNames

std::map<std::tuple<SCH_SCREEN*, const ORCAD_PLACED_INSTANCE*, size_t>, std::pair<uint32_t, std::string> > ORCAD_CONVERTER::m_wirelessNetNames
private

Definition at line 684 of file orcad_converter.h.

Referenced by recordNetNameMap().

◆ MARGIN_B_DBU

int ORCAD_CONVERTER::MARGIN_B_DBU = 100
staticconstexprprivate

Definition at line 260 of file orcad_converter.h.

Referenced by applyPageSettings().

◆ MARGIN_L_DBU

int ORCAD_CONVERTER::MARGIN_L_DBU = 60
staticconstexprprivate

Page margins in DBU leave room for the KiCad frame and title block.

Definition at line 257 of file orcad_converter.h.

Referenced by applyPageSettings().

◆ MARGIN_R_DBU

int ORCAD_CONVERTER::MARGIN_R_DBU = 60
staticconstexprprivate

Definition at line 259 of file orcad_converter.h.

Referenced by applyPageSettings().

◆ MARGIN_T_DBU

int ORCAD_CONVERTER::MARGIN_T_DBU = 60
staticconstexprprivate

Definition at line 258 of file orcad_converter.h.

Referenced by applyPageSettings().

◆ PIN_LEN_DBU

int ORCAD_CONVERTER::PIN_LEN_DBU = 10
staticconstexprprivate

– constants (calibrated; do not change) -------------------------------------—

Standard OrCAD pin length used for synthesized placeholder pins, DBU.

Definition at line 254 of file orcad_converter.h.

Referenced by synthesizeSymbol().


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