KiCad PCB EDA Suite
Loading...
Searching...
No Matches
orcad_orient.h File Reference
#include <cstdint>
#include <math/vector2d.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...
 

Functions

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 ORCAD_ORIENT_ENTRY ORCAD_ORIENT_TABLE [8]
 Indexed by orientation bits: angle, mirror, offset selectors, then matrix coefficients.
 

Function Documentation

◆ OrcadOrientDim()

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

Definition at line 62 of file orcad_orient.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 69 of file orcad_orient.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().

◆ OrcadTransformPoint()

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

Variable Documentation

◆ 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 48 of file orcad_orient.h.

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