KiCad PCB EDA Suite
Loading...
Searching...
No Matches
orcad_converter.h File Reference
#include <cstdint>
#include <functional>
#include <map>
#include <memory>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#include <wx/string.h>
#include <geometry/seg.h>
#include <math/box2.h>
#include <math/vector2d.h>
#include <gal/color4d.h>
#include <eda_shape.h>
#include <kiid.h>
#include <sch_io/orcad/orcad_orient.h>
#include <sch_io/orcad/orcad_records.h>

Go to the source code of this file.

Classes

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

Functions

KIGFX::COLOR4D OrcadColor (int aColorIndex)
 
int OrcadLineWidthIu (int aWidth)
 
int OrcadPageGraphicLineWidthIu (int aWidth)
 
LINE_STYLE OrcadLineStyle (int aStyle)
 
std::pair< double, double > OrcadDashRatios (int aFormatVersionMajor)
 
FILL_T OrcadFillType (int aFillStyle, int aHatchStyle)
 
int OrcadHatchPitchIu (uint32_t aModifyTimestamp)
 
int OrcadHatchLineWidthIu (uint32_t aModifyTimestamp)
 
std::vector< SEG > OrcadHatchLines (const EDA_SHAPE &aShape, int aHatchStyle, int aPitch)
 
int OrcadTextBaselineOffset (int aTextSize)
 
int OrcadDisplayType (const ORCAD_DISPLAY_PROP &aProp)
 
bool OrcadDisplayPropVisible (const ORCAD_DISPLAY_PROP &aProp)
 
bool OrcadDisplayPropShowsName (const ORCAD_DISPLAY_PROP &aProp)
 
bool OrcadDisplayPropShowsValue (const ORCAD_DISPLAY_PROP &aProp)
 
int OrcadDisplayFontId (const ORCAD_DISPLAY_PROP &aProp)
 
int OrcadPageOrder (wxString &aName)
 Return a numeric page prefix (or -1); strip only the "N - title" convention.
 
VECTOR2I OrcadStretchedImageSize (int aWidth, int aHeight, int aBoxWidth, int aBoxHeight)
 
wxString OrcadPinNameMarkup (const wxString &aName)
 
VECTOR2I OrcadDbuToIu (int aX, int aY)
 
void OrcadTransformPrimitivePoints (ORCAD_PRIMITIVE &aPrim, const std::function< ORCAD_POINT(const ORCAD_POINT &)> &aMap)
 Map the point members of a primitive: points, arc start and arc end.
 
void OrcadOffsetPrimitive (ORCAD_PRIMITIVE &aPrim, int aDx, int aDy)
 Translate a primitive, box included.
 
void OrcadForEachLeafPrimitive (const std::vector< ORCAD_PRIMITIVE > &aPrimitives, const std::function< void(const ORCAD_PRIMITIVE &, int, int)> &aVisit)
 Visit every non-group primitive in drawing order with the accumulated offset of its enclosing groups.
 
ORCAD_POINT OrcadInverseOrient (int aOrient, int aX, int aY)
 Undo the orientation matrix of OrcadTransformPoint.
 

Variables

constexpr int ORCAD_IU_PER_DBU = 2540
 Schematic internal units per OrCAD DBU: 10 mil * 254 IU/mil.
 

Function Documentation

◆ OrcadColor()

◆ OrcadDashRatios()

std::pair< double, double > OrcadDashRatios ( int aFormatVersionMajor)

◆ OrcadDbuToIu()

◆ OrcadDisplayFontId()

◆ OrcadDisplayPropShowsName()

bool OrcadDisplayPropShowsName ( const ORCAD_DISPLAY_PROP & aProp)

◆ OrcadDisplayPropShowsValue()

bool OrcadDisplayPropShowsValue ( const ORCAD_DISPLAY_PROP & aProp)

◆ OrcadDisplayPropVisible()

◆ OrcadDisplayType()

int OrcadDisplayType ( const ORCAD_DISPLAY_PROP & aProp)

◆ OrcadFillType()

FILL_T OrcadFillType ( int aFillStyle,
int aHatchStyle )

◆ OrcadForEachLeafPrimitive()

void OrcadForEachLeafPrimitive ( const std::vector< ORCAD_PRIMITIVE > & aPrimitives,
const std::function< void(const ORCAD_PRIMITIVE &, int, int)> & aVisit )

Visit every non-group primitive in drawing order with the accumulated offset of its enclosing groups.

Definition at line 357 of file orcad_converter_sheet.cpp.

References GROUP_PRIM.

Referenced by ORCAD_CONVERTER::placeDefinitionImages(), ORCAD_CONVERTER::placeDefinitionVectors(), and ORCAD_CONVERTER::placeGraphics().

◆ OrcadHatchLines()

◆ OrcadHatchLineWidthIu()

int OrcadHatchLineWidthIu ( uint32_t aModifyTimestamp)

Definition at line 276 of file orcad_converter_symbols.cpp.

References schIUScale.

Referenced by addOrcadSymbolHatch(), and BOOST_AUTO_TEST_CASE().

◆ OrcadHatchPitchIu()

int OrcadHatchPitchIu ( uint32_t aModifyTimestamp)

Definition at line 269 of file orcad_converter_symbols.cpp.

References schIUScale.

Referenced by addOrcadSymbolHatch(), and BOOST_AUTO_TEST_CASE().

◆ OrcadInverseOrient()

ORCAD_POINT OrcadInverseOrient ( int aOrient,
int aX,
int aY )
inline

Undo the orientation matrix of OrcadTransformPoint.

Its determinant is +/-1, so the division is exact.

Definition at line 111 of file orcad_converter.h.

References ORCAD_ORIENT_ENTRY::a, ORCAD_ORIENT_ENTRY::b, ORCAD_ORIENT_ENTRY::c, ORCAD_ORIENT_ENTRY::d, and ORCAD_ORIENT_TABLE.

Referenced by ORCAD_CONVERTER::synthesizeSymbol().

◆ OrcadLineStyle()

LINE_STYLE OrcadLineStyle ( int aStyle)

Definition at line 206 of file orcad_converter_symbols.cpp.

References DASH, DASHDOT, DASHDOTDOT, DEFAULT, DOT, and SOLID.

Referenced by BOOST_AUTO_TEST_CASE(), and ORCAD_CONVERTER::placeGraphics().

◆ OrcadLineWidthIu()

int OrcadLineWidthIu ( int aWidth)

◆ OrcadOffsetPrimitive()

void OrcadOffsetPrimitive ( ORCAD_PRIMITIVE & aPrim,
int aDx,
int aDy )

Translate a primitive, box included.

Group children are relative to the group and need no shift.

Definition at line 343 of file orcad_converter_sheet.cpp.

References OrcadTransformPrimitivePoints(), ORCAD_POINT::x, ORCAD_PRIMITIVE::x1, ORCAD_PRIMITIVE::x2, ORCAD_POINT::y, ORCAD_PRIMITIVE::y1, and ORCAD_PRIMITIVE::y2.

Referenced by ORCAD_CONVERTER::offsetPage(), and ORCAD_CONVERTER::placeGraphics().

◆ OrcadPageGraphicLineWidthIu()

int OrcadPageGraphicLineWidthIu ( int aWidth)

◆ OrcadPageOrder()

int OrcadPageOrder ( wxString & aName)

Return a numeric page prefix (or -1); strip only the "N - title" convention.

Definition at line 717 of file orcad_converter_sheet.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ OrcadPinNameMarkup()

wxString OrcadPinNameMarkup ( const wxString & aName)

Definition at line 165 of file orcad_converter_symbols.cpp.

References result.

Referenced by ORCAD_CONVERTER::addSymbolPin(), and BOOST_AUTO_TEST_CASE().

◆ OrcadStretchedImageSize()

VECTOR2I OrcadStretchedImageSize ( int aWidth,
int aHeight,
int aBoxWidth,
int aBoxHeight )

◆ OrcadTextBaselineOffset()

int OrcadTextBaselineOffset ( int aTextSize)

◆ OrcadTransformPrimitivePoints()

void OrcadTransformPrimitivePoints ( ORCAD_PRIMITIVE & aPrim,
const std::function< ORCAD_POINT(const ORCAD_POINT &)> & aMap )

Map the point members of a primitive: points, arc start and arc end.

The box corners are left alone.

Definition at line 329 of file orcad_converter_sheet.cpp.

References ORCAD_PRIMITIVE::end, ORCAD_PRIMITIVE::points, and ORCAD_PRIMITIVE::start.

Referenced by OrcadOffsetPrimitive(), and ORCAD_CONVERTER::placeDefinitionVectors().

Variable Documentation

◆ ORCAD_IU_PER_DBU