KiCad PCB EDA Suite
Loading...
Searching...
No Matches
orcad_converter.h File Reference
#include <cstdint>
#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_records.h>

Go to the source code of this file.

Classes

struct  ORCAD_ORIENT_ENTRY
 OrCAD rotates about the bounding box; KiCad rotates about the anchor. More...
 
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::PLACED_PACKAGE_UNIT
 
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< SEGOrcadHatchLines (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)
 
int OrcadOrientOf (int aRotation, bool aMirror)
 Compose the 3-bit orientation code from the rotation bits and mirror bit.
 
int OrcadOrientDim (int aSelector, int aWidth, int aHeight)
 
VECTOR2I OrcadOrientOffset (int aOrient, int aWidth, int aHeight)
 Bbox re-anchoring offset for the given orientation and body size (DBU).
 
VECTOR2I OrcadTransformPoint (int aOrient, int aWidth, int aHeight, int aBaseX, int aBaseY, int aPx, int aPy)
 Parts use the instance anchor as the base.
 

Variables

constexpr int ORCAD_IU_PER_DBU = 2540
 Schematic internal units per OrCAD DBU: 10 mil * 254 IU/mil.
 
constexpr ORCAD_ORIENT_ENTRY ORCAD_ORIENT_TABLE [8]
 Indexed by orientation bits: angle, mirror, offset selectors, then matrix coefficients.
 

Function Documentation

◆ OrcadColor()

◆ OrcadDashRatios()

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

◆ OrcadDbuToIu()

◆ OrcadDisplayFontId()

◆ OrcadDisplayPropShowsName()

◆ 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 )

◆ OrcadHatchLines()

◆ OrcadHatchLineWidthIu()

int OrcadHatchLineWidthIu ( uint32_t aModifyTimestamp)

Definition at line 270 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 263 of file orcad_converter_symbols.cpp.

References schIUScale.

Referenced by addOrcadSymbolHatch(), and BOOST_AUTO_TEST_CASE().

◆ OrcadLineStyle()

LINE_STYLE OrcadLineStyle ( int aStyle)

Definition at line 200 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)

◆ OrcadOrientDim()

int OrcadOrientDim ( int aSelector,
int aWidth,
int aHeight )
inline

Definition at line 124 of file orcad_converter.h.

Referenced by OrcadOrientOffset().

◆ OrcadOrientOf()

int OrcadOrientOf ( int aRotation,
bool aMirror )
inline

◆ OrcadOrientOffset()

VECTOR2I OrcadOrientOffset ( int aOrient,
int aWidth,
int aHeight )
inline

Bbox re-anchoring offset for the given orientation and body size (DBU).

Definition at line 131 of file orcad_converter.h.

References ORCAD_ORIENT_TABLE, OrcadOrientDim(), ORCAD_ORIENT_ENTRY::txSel, and ORCAD_ORIENT_ENTRY::tySel.

Referenced by OrcadTransformPoint(), ORCAD_CONVERTER::placeInstance(), ORCAD_CONVERTER::placePowerSymbol(), and ORCAD_CONVERTER::synthesizeSymbol().

◆ 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 631 of file orcad_converter_sheet.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ OrcadPinNameMarkup()

wxString OrcadPinNameMarkup ( const wxString & aName)

Definition at line 159 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()

◆ OrcadTransformPoint()

VECTOR2I OrcadTransformPoint ( int aOrient,
int aWidth,
int aHeight,
int aBaseX,
int aBaseY,
int aPx,
int aPy )
inline

Variable Documentation

◆ ORCAD_IU_PER_DBU

◆ ORCAD_ORIENT_TABLE

ORCAD_ORIENT_ENTRY ORCAD_ORIENT_TABLE[8]
inlineconstexpr
Initial value:
= {
{ 0, 0, 0, 0, 1, 0, 0, 1 }, { 90, 0, 0, 1, 0, 1, -1, 0 }, { 180, 0, 1, 2, -1, 0, 0, -1 },
{ 270, 0, 2, 0, 0, -1, 1, 0 }, { 0, 'y', 1, 0, -1, 0, 0, 1 }, { 90, 'x', 0, 0, 0, 1, 1, 0 },
{ 0, 'x', 0, 2, 1, 0, 0, -1 }, { 270, 'x', 2, 1, 0, -1, -1, 0 }
}

Indexed by orientation bits: angle, mirror, offset selectors, then matrix coefficients.

Definition at line 110 of file orcad_converter.h.

Referenced by OrcadOrientOffset(), OrcadTransformPoint(), ORCAD_CONVERTER::placeBitmap(), ORCAD_CONVERTER::placedPinElectricalPosition(), ORCAD_CONVERTER::placeSymbolFields(), and ORCAD_CONVERTER::synthesizeSymbol().