KiCad PCB EDA Suite
Loading...
Searching...
No Matches
EASYPC Namespace Reference

Classes

class  ARCHIVE
 One archive load stream; it owns every object it creates. More...
 
class  COMPOUND_FILE
 A compound file held in memory; any malformed structure throws IO_ERROR. More...
 
struct  DESIGN_DOCUMENT
 
struct  DESIGN_MEMBER
 A member stored inside the design. More...
 
struct  FIELD_ROW
 A run of fields present from version since to until inclusive. More...
 
struct  FILE_INFO
 
struct  GATE_TERMINAL
 What a package's gate map says about one gate terminal. More...
 
class  LIBRARY_FILE
 A library parsed once; items are then served by name without reading the file again. More...
 
struct  LIBRARY_ITEM
 One stream, or for a component library every stream of the component's storage. More...
 
struct  LIBRARY_STREAM
 
class  LOAD_TASK
 A loader coroutine. Awaiting one queues it on its archive's frame stack instead of nesting the call. More...
 
struct  OBJECT
 Root of every deserialized object. More...
 
struct  POINT32
 A point read as two int32 values. More...
 
struct  PROJECT_DOCUMENT
 
class  SCH_BUILDER
 
struct  SCH_COMPONENT_SOURCE
 Everything one component LIB_SYMBOL is made from. More...
 
struct  SCH_FRAME
 Design to KiCad mapping: X shifted, Y negated about the origin. More...
 
class  SCH_NET_NAMES
 Project-wide net naming: a user name takes the spelling of its first occurrence. More...
 
struct  SELF_VERSIONED
 The item's own format, returned by the self-versioned classes' ItemFormat. More...
 
struct  SKIPPED
 A class no importer reads: its base's fields, then a field program on its format. More...
 
struct  SOURCE_AREA
 
struct  SOURCE_ATTRIBUTE
 
struct  SOURCE_ATTRIBUTE_NAME
 
struct  SOURCE_BOARD
 
struct  SOURCE_BUS
 
struct  SOURCE_BUS_TERMINAL
 
struct  SOURCE_CHECK_PARAMETERS
 A map of DRC switch id to value. More...
 
struct  SOURCE_COMMON_SEGMENT
 Also shape segments. More...
 
struct  SOURCE_COMMON_SHAPE
 
struct  SOURCE_COMPONENT
 
struct  SOURCE_COMPONENT_INSTANCE
 A placed component. More...
 
struct  SOURCE_CONNECT_POINT
 Also the whole body of junctions and copper terminals. More...
 
struct  SOURCE_CONNECTION
 
struct  SOURCE_COPPER_INSTANCE
 
struct  SOURCE_COPPER_TERMINAL
 
struct  SOURCE_DEFAULTS
 
struct  SOURCE_DESIGN
 The document: OLE items, then the design. More...
 
struct  SOURCE_DESIGN_ARRAY
 An array: owner tag, then a counted list of objects. More...
 
struct  SOURCE_DESIGN_DATA
 A design data member: owner tag only. More...
 
struct  SOURCE_DESIGN_ITEM
 The base of nearly every class. More...
 
struct  SOURCE_DESIGN_LIST
 A list: owner tag, then the items. More...
 
struct  SOURCE_DESIGN_PARAMETERS
 
struct  SOURCE_DESIGN_SHAPE
 Also design cutouts. More...
 
struct  SOURCE_DESIGN_SPACINGS
 The map is merged into rather than replaced on load, so the constructor defaults persist. More...
 
struct  SOURCE_FB_ENTRY
 
struct  SOURCE_FREE_COPPER
 Every drawn shape, pour and dimension part. More...
 
struct  SOURCE_FREE_PAD
 A pad of a symbol definition. More...
 
struct  SOURCE_FREE_TEXT
 
struct  SOURCE_GATE
 A schematic symbol and its pin names. More...
 
struct  SOURCE_GATE_MAP
 One gate's terminals to footprint pads. More...
 
struct  SOURCE_GATE_PIN
 
struct  SOURCE_GROUP
 Also the start of a dimension. More...
 
struct  SOURCE_JUNCTION
 
struct  SOURCE_LAYER
 
struct  SOURCE_LAYER_ARRAY
 Item order is the physical stack order. More...
 
struct  SOURCE_LAYER_SPAN
 A via span from top_layer to bottom_layer inclusive, in stack order. More...
 
struct  SOURCE_LAYER_TYPE
 Layer type names determine silk, mask and paste roles. More...
 
struct  SOURCE_LAYERED_SHAPE_ITEM
 
struct  SOURCE_LINE_STYLE
 
struct  SOURCE_NET
 
struct  SOURCE_NET_CLASS
 
struct  SOURCE_NET_NAME
 A schematic net label owned by a node. More...
 
struct  SOURCE_NODE
 
struct  SOURCE_ORIGIN
 Also placement and symbol name origins. More...
 
struct  SOURCE_PAD_INSTANCE
 A placed pad. More...
 
struct  SOURCE_PAD_STYLE
 
struct  SOURCE_PAD_STYLE_EXCEPTION
 
struct  SOURCE_PCB_COMPONENT
 The package half of a component. More...
 
struct  SOURCE_PIN_NAME
 Pin name and pin number definitions. More...
 
struct  SOURCE_PIN_NAME_INSTANCE
 Placed pin names and numbers. More...
 
struct  SOURCE_PROJECT
 The document root. More...
 
struct  SOURCE_PROJECT_ITEM
 One file of a project. More...
 
struct  SOURCE_SCM_COMPONENT
 
struct  SOURCE_SEGMENT
 A vertex. More...
 
struct  SOURCE_SHAPE
 A vertex list. More...
 
struct  SOURCE_SHAPE_ITEM
 
struct  SOURCE_SPACINGS
 values maps (a << 16) | b of SPACING_ITEM bits to a clearance More...
 
struct  SOURCE_SYMBOL
 Footprints and schematic symbols alike. More...
 
struct  SOURCE_SYMBOL_INSTANCE
 A placed footprint (gate -1) or a placed schematic gate. More...
 
struct  SOURCE_TEXT_INSTANCE
 
struct  SOURCE_TEXT_POSITION
 
struct  SOURCE_TEXT_STYLE
 
struct  SOURCE_TRACK
 
struct  SOURCE_TRACK_SEGMENT
 
struct  SOURCE_TRACK_STYLE
 
struct  SOURCE_TYPE_FONT
 A TrueType font, which the importers cannot measure. More...
 
struct  SOURCE_VALUE_POSITION
 
struct  SOURCE_VIA
 
class  TEXT_METRICS
 
struct  VALUE_LINE
 One line of the text a value position shows. More...
 

Typedefs

using REGISTRY = std::map<std::string, std::function<std::unique_ptr<OBJECT>()>, std::less<>>
 

Enumerations

enum class  DOC_KIND {
  PCB , SCHEMATIC , PCB_SYMBOL , SCH_SYMBOL ,
  COMPONENT , PROJECT
}
 Document kind, from the FileType stream or the file extension for projects. More...
 
enum  PRODUCT_KEY : int32_t {
  PRODUCT_EASYPC = 1 , PRODUCT_DESIGNSPARK = 0x943e3 , PRODUCT_DESIGNSPARK_CREATOR = 0xcf153 , PRODUCT_DESIGNSPARK_PRO = 0xe002e ,
  PRODUCT_PROTOPCB = 0x311f3
}
 Product keys, the design header's or the library LibFormat's. More...
 
enum  COMPONENT_SUPPRESS : int32_t { SUPPRESS_PARTS_LIST = 0x01 , SUPPRESS_SCM_PCB_TRANSLATION = 0x20 }
 Component instance suppress bits. More...
 
enum  VALUE_TYPE : uint64_t {
  VALUE_REFERENCE_NAME = 0x1 , VALUE_COMPONENT_NAME = 0x2 , VALUE_PACKAGE_NAME = 0x4 , VALUE_SYMBOL_NAME = 0x8 ,
  VALUE_VALUES = 0x10 , VALUE_PIN_NAME = 0x20 , VALUE_PIN_NUMBER = 0x40 , VALUE_DESCRIPTION = 0x8000 ,
  VALUE_ATTRIBUTE = 0x10000 , VALUE_NET_NAME = 0x80000
}
 Value position and component instance value type bits. More...
 
enum  AREA_TYPE : int32_t { AREA_ROUTING = 0 , AREA_COPPER = 1 , AREA_COMPONENT = 3 }
 
enum  AREA_FLAG : int32_t {
  AREA_TRACKS_MASK = 0x3 , AREA_TRACKS_IN = 0x1 , AREA_TRACKS_OUT = 0x2 , AREA_VIAS_MASK = 0xc ,
  AREA_VIAS_IN = 0x4 , AREA_VIAS_OUT = 0x8 , AREA_POUR_KEEPOUT = 0x100
}
 Area flags; track and via bits restrict routing areas, the pour keepout applies to every area. More...
 
enum  TEXT_ALIGNMENT : int32_t { TEXT_ALIGN_LEFT = 0 , TEXT_ALIGN_RIGHT = 1 , TEXT_ALIGN_CENTRE = 2 }
 
enum  DESIGN_PARAM_INDEX {
  DP_MIN_ANNULAR_RING = 4 , DP_MIN_PASTE_SIZE = 6 , DP_MIN_TRACK_WIDTH = 7 , DP_MIN_TESTPOINT_SIZE = 24 ,
  DP_MIN_TESTPOINT_SPACE = 25 , DP_MIN_HOLE_SIZE = 27 , DP_MIN_VIA_ANNULAR_RING = 28 , DP_MIRROR_PAD_STYLE_EXCEPTIONS = 30 ,
  DP_MIN_VIA_HOLE_SIZE = 31 , DP_VIA_SMD_PAD_SPACE = 35 , DP_MIN_TEXT_SIZE = 37 , DP_MIN_SOLDER_MASK_WIDTH = 38 ,
  DP_MIN_SOLDER_MASK_TO_TRACK = 39
}
 Indices into the design parameter table. More...
 
enum class  PAD_SHAPE : int32_t {
  ROUND = 0 , SQUARE = 1 , RECTANGLE = 2 , OVAL = 3 ,
  BULLET = 4 , CROSS = 5 , CHAMFERED_RECTANGLE = 6 , ROUNDED_RECTANGLE = 7 ,
  DIAMOND = 8 , OCTAGON = 9 , TRIANGLE = 10 , ANNULUS = 11 ,
  TARGET = 12 , OFFSET_OVAL = 13 , OFFSET_BULLET = 14 , OFFSET_RECTANGLE = 15 ,
  C_CUT = 18 , C_OFFSET = 19 , T_SHAPE = 20 , H_SHAPE = 21 ,
  WEDGE = 22 , EQUILATERAL_TRIANGLE = 23 , HEXAGON = 24
}
 Pad style shape, also the drill and exception shape. More...
 
enum class  LAYER_SIDE : int32_t { TOP = 0 , BOTTOM = 1 , INNER = 2 , ALL = 3 }
 
enum  LAYER_USAGE : int32_t {
  LAYER_USAGE_SET = 1 , LAYER_USAGE_ELECTRICAL = 2 , LAYER_USAGE_NON_ELECTRICAL = 4 , LAYER_USAGE_WIRE = 8 ,
  LAYER_USAGE_DRAWING = 16 , LAYER_USAGE_SPAN = 32
}
 Layer usage bits. More...
 
enum class  LAYER_OVERSIZE_TYPE : int32_t { NONE = 0 , FIXED = 1 , PERCENT = 2 }
 How a layer type grows pads. More...
 
enum  SPACING_ITEM : int32_t {
  SPACING_BOARD = 0x01 , SPACING_TRACK = 0x02 , SPACING_PAD = 0x04 , SPACING_VIA = 0x08 ,
  SPACING_SHAPE = 0x10 , SPACING_TEXT = 0x20 , SPACING_DRILL = 0x40 , SPACING_AREA = 0x80 ,
  SPACING_PANEL = 0x100
}
 Item kind bits; a spacing key is (a << 16) | b. More...
 
enum class  FILE_KIND {
  PCB_DESIGN , SCHEMATIC_DESIGN , PCB_SYMBOL_LIBRARY , SCHEMATIC_SYMBOL_LIBRARY ,
  COMPONENT_LIBRARY
}
 The FileType strings the importer reads. More...
 
enum  TEXT_H_ALIGN : int32_t { TEXT_H_LEFT = 0 , TEXT_H_RIGHT = 1 , TEXT_H_CENTRE = 2 }
 The source text position's alignment value. More...
 
enum  TEXT_V_ALIGN : int32_t { TEXT_V_BASELINE = 0 , TEXT_V_TOP = 1 , TEXT_V_MIDDLE = 2 }
 Source text positions always pass BASELINE. More...
 

Functions

LOAD_TASK SkipFields (ARCHIVE &aAr, std::string_view aOps)
 Read and drop a run of fields described by aOps, each letter optionally followed by a repeat count: b a format-dependent boolean, 1 a byte, i an int32, f a double, s a string, o an object, a a counted int32 array.
 
LOAD_TASK SkipRows (ARCHIVE &aAr, int aVersion, std::span< const FIELD_ROW > aRows)
 SkipFields for every row aVersion falls in, in order.
 
template<typename T>
void Register (REGISTRY &aReg, std::initializer_list< const char * > aNames)
 Register the class names whose objects load as a T.
 
void RegisterRootClasses (REGISTRY &aReg)
 
void RegisterStyleClasses (REGISTRY &aReg)
 
void RegisterGeometryClasses (REGISTRY &aReg)
 
void RegisterLibraryClasses (REGISTRY &aReg)
 
void RegisterConnectivityClasses (REGISTRY &aReg)
 
template<typename BASE>
void RegisterSkipped (REGISTRY &aReg, const char *aName, std::span< const FIELD_ROW > aRows)
 
const std::vector< OBJECT * > & ListItems (const OBJECT *aList)
 The items of a design list or array, empty for anything else.
 
bool IsPadList (const wxString &aPcbSymbolPin)
 Whether a gate pin's pad reference names several pads ("-1", the unmapped marker, does not)
 
std::vector< wxString > ExpandPinNumberList (const wxString &aList, wxString *aDisplay=nullptr)
 Expand a gate pin's component pin list by Easy-PC's pin list syntax: items separated by , or +, numeric ranges 5-9, and an optional display= prefix that only changes what is shown.
 
template<typename T>
std::vector< T * > TypedItems (const OBJECT *aList)
 The items of ListItems that are a T, in order.
 
POINT32 ReadPoint (ARCHIVE &aAr)
 
LOAD_TASK SkipMember (ARCHIVE &aAr, const char *aClass, bool aDesignOwned=false)
 Load and drop an embedded member of a registered class; aDesignOwned marks its design as owner.
 
void FillTitleBlock (const DESIGN_DOCUMENT &aDoc, TITLE_BLOCK &aTitleBlock)
 Fill a title block from the design's SummaryInformation property set: title from Title, date from the last save, comments 1 to 4 from Subject, Author, Keywords and Comments.
 
PAGE_INFO PageForExtents (const BOX2L &aExtentsNm)
 Easy-PC stores no page size, so the first of A4 to A0 then A to E, landscape before portrait, that holds the extents and margins is chosen, else a User page of exactly that size rounded up to whole millimetres.
 
std::unique_ptr< DESIGN_DOCUMENT > LoadDesign (const wxString &aPath)
 
std::unique_ptr< PROJECT_DOCUMENT > LoadProject (const wxString &aPath)
 
wxString ResolveProjectItem (const wxString &aProjectPath, const wxString &aItemName)
 The file a project item names, as Easy-PC opens it: the Windows path relative to the project's directory, the file name matched without regard to case.
 
FILE_INFO Probe (const wxString &aPath)
 Identify a file; projects are parsed fully, while designs and libraries are only inspected. Never throws.
 
const char * FileKindString (FILE_KIND aKind)
 
wxString UnescapeItemName (const std::u16string &aName)
 Undo the item name escaping, which stores # ! \ / : * ? " < > | as 0x06..0x10.
 
std::vector< uint8_t > ReadWholeFile (const wxString &aPath)
 The whole content of a file; throws IO_ERROR when it cannot be read.
 
bool TextStaysUpright (const SOURCE_DESIGN &aDesign, bool aSchematic)
 Whether aDesign's text is drawn upright: the design's flag, which old schematics imply, or a schematic from DesignSpark Creator, Pro or ProtoPCB, which are always upright.
 
int32_t UprightRotation (int32_t aAngle, bool aKeepUpright)
 With text kept upright, an angle above 135 and up to 305 degrees turns by 180.
 
wxString ToKiCadMarkup (const wxString &aText)
 A displayed string in KiCad's markup.
 
constexpr int64_t DsuToNm (int64_t aDsu)
 
constexpr double AngleToDegrees (int32_t aAngle)
 
constexpr int32_t NormalizeAngle (int32_t aAngle)
 Wrap an angle into [0, ANGLE_FULL_TURN)
 
void PointRotate (double aPx, double aPy, int32_t aAngle, double aCx, double aCy, int32_t &aOutX, int32_t &aOutY)
 Rotate aPx, aPy anticlockwise by aAngle about aCx, aCy as Easy-PC places points: in double with exact quarter turns, truncating toward zero, so the operand order of each sum decides the last bit.
 
void PointRotate (int32_t &aX, int32_t &aY, int32_t aAngle, int32_t aCx, int32_t aCy)
 
bool IsNamedNet (const wxString &aName)
 True unless aName is an automatic net name (N or n and digits, an optional !sheet! suffix)
 
static POINT32 placePoint (const SOURCE_SYMBOL_INSTANCE &aInst, const SOURCE_SYMBOL &aSym, const POINT32 &aLocal)
 Symbol point to design point: subtract the symbol origin, mirror in X, rotate anticlockwise, add the position.
 
static bool isDrawn (const SOURCE_SYMBOL_INSTANCE &aInst)
 Gates the import draws: placed ones, and unplaced ones whose pins are still on nets.
 
static const SOURCE_NET * netOf (const OBJECT *aNode)
 
static const SOURCE_TEXT_STYLE * defaultTextStyle (const SOURCE_DESIGN &aDesign)
 
static std::vector< const SOURCE_ATTRIBUTE * > partAttributes (const SOURCE_COMPONENT_INSTANCE &aComp, const SOURCE_COMPONENT &aPart)
 Package attributes then the instance's own, an instance attribute overriding the package's of the same name.
 
static wxString attributeValue (const SOURCE_COMPONENT_INSTANCE &aComp, const SOURCE_COMPONENT &aPart, const wxString &aName)
 The value of the part's first attribute named aName, or empty.
 
static std::vector< VALUE_LINE > valueLines (const SOURCE_VALUE_POSITION &aVp, const SOURCE_COMPONENT_INSTANCE &aComp, const SOURCE_COMPONENT &aPart, const SOURCE_SYMBOL_INSTANCE &aInst)
 
static wxString joinLines (const std::vector< VALUE_LINE > &aLines)
 
static int32_t floorTo (int64_t aValue, int32_t aGrid)
 
static TRANSFORM placementTransform (int32_t aAngle, bool aMirrored)
 KiCad transform for a stored placement: mirror in X, then rotate anticlockwise (Y up)
 
static bool isScmOnly (const SOURCE_COMPONENT &aPart)
 Schematic-only part: no package, an empty package name, or no gate pin mapped to a pad.
 
static SOURCE_TEXT_POSITION placedText (const SOURCE_SYMBOL_INSTANCE &aInst, const SOURCE_SYMBOL &aSym, const SOURCE_TEXT_POSITION &aLocal)
 A symbol-local text position placed on the sheet with the instance transform.
 
static bool collinearOverlap (const SEG &aA, const SEG &aB)
 Two segments on one line sharing more than a point.
 
static SPIN_STYLE labelSpin (const SOURCE_NET_NAME &aName, const SOURCE_NODE &aNode, const wxString &aText)
 Label orientation from the stored text rotation and alignment, judged by the middle of the text.
 
std::vector< const SOURCE_SEGMENT * > ShapeVertices (const SOURCE_SHAPE &aShape)
 A shape's vertices in drawing order, following next references for formats 1 and 2.
 
static VECTOR2D rotateAbout (const VECTOR2D &aPt, const VECTOR2D &aCentre, double aRadians)
 
static VECTOR2D arcCentre (const VECTOR2D &aStart, const VECTOR2D &aEnd, int32_t aAngle, bool aAnticlockwise)
 Centre of an arc span from its ends and swept angle.
 
static VECTOR2I mapD (const SCH_FRAME &aFrame, const VECTOR2D &aPt)
 
static std::vector< VECTOR2D > arcAsPolyline (const VECTOR2D &aStart, const VECTOR2D &aEnd, const VECTOR2D &aCentre, int32_t aAngle, bool aAnticlockwise)
 Points after aStart of an arc span at ARC_HIGH_DEF, at most 16384 of them.
 
std::vector< std::unique_ptr< SCH_SHAPE > > ConvertShape (const SOURCE_SHAPE &aShape, const SCH_FRAME &aFrame, SCH_LAYER_ID aLayer, int aStrokeWidth, bool aFilled, int aUnit=0)
 Outline of a shape: polylines, arcs and circles; a filled outline with arcs is one polygon.
 
std::vector< std::unique_ptr< SCH_SHAPE > > ConvertShapeItem (const SOURCE_SHAPE_ITEM &aItem, const SCH_FRAME &aFrame, SCH_LAYER_ID aLayer, int aUnit=0)
 A shape item with its own line style and fill.
 
VECTOR2I TextSize (const SOURCE_TEXT_STYLE &aStyle)
 KiCad text size for a source text style: its height as the width, its capital height as the height.
 
bool DrawsUpright (const SOURCE_TEXT_POSITION &aPos, bool aKeepUpright)
 True when a design that keeps text upright turns aPos about the far end of its first line.
 
void ApplyTextPosition (EDA_TEXT &aText, const SOURCE_TEXT_POSITION &aPos, const SCH_FRAME &aFrame, bool aKeepUpright=false, const wxString &aMeasured=wxEmptyString)
 Place any KiCad text as the source position says: anchor, angle, mirror, justification and style.
 
std::unique_ptr< SCH_TEXT > ConvertFreeText (const SOURCE_FREE_TEXT &aText, const SCH_FRAME &aFrame, SCH_LAYER_ID aLayer, int aUnit, bool aKeepUpright)
 
GATE_TERMINAL ResolveTerminal (const SOURCE_PCB_COMPONENT *aPcb, int aGate, int aTerminal)
 Terminal aTerminal (0-based) of gate aGate; formats before 9000 map a bare pad number, -1 unmapped.
 
std::unique_ptr< LIB_SYMBOL > ConvertComponentSymbol (const SCH_COMPONENT_SOURCE &aSrc, const LIB_ID &aId)
 One unit per gate in symbol-local coordinates, zero-length passive pins at the pads, pin texts where the symbol stores them.
 
std::unique_ptr< LIB_SYMBOL > ConvertSymbol (const SOURCE_SYMBOL &aSymbol, const LIB_ID &aId)
 A .ssl symbol alone: one unit, pins numbered by pad number.
 

Variables

constexpr int NEWEST_ITEM_FORMAT = 0x7531
 The newest item format a file can carry (30001)
 
constexpr char THERMAL_RULE_SET [] = "o o a o a o a o a 12 o"
 A thermal rule set as SkipFields ops: owner, four thermal rules (owner and an int array), two flags and a hatch style.
 
constexpr double PAGE_MARGIN_MM = 10.0
 Margin added on every side of the drawn extents before choosing a page, in millimetres.
 
constexpr int64_t NM_PER_DSU = 100
 
constexpr int ANGLE_FULL_TURN = 360000
 
constexpr double COORD_LIMIT = std::numeric_limits<int>::max() / 2.0
 Half of KiCad's integer range, so shape code rotating or adding coordinates cannot overflow.
 
static constexpr int32_t SHEET_ORIGIN_GRID = 25400
 The sheet origin snaps to 0.1 inch, keeping items on Easy-PC grids on KiCad's 50 mil grid.
 
static constexpr int32_t PAGE_MARGIN = static_cast<int32_t>( PAGE_MARGIN_MM * 10000 )
 
static constexpr int32_t DETOUR = 10
 Offset that keeps a wire off another net's connection point, far below drawing resolution.
 

Typedef Documentation

◆ REGISTRY

using EASYPC::REGISTRY = std::map<std::string, std::function<std::unique_ptr<OBJECT>()>, std::less<>>

Definition at line 136 of file easypc_archive.h.

Enumeration Type Documentation

◆ AREA_FLAG

enum EASYPC::AREA_FLAG : int32_t

Area flags; track and via bits restrict routing areas, the pour keepout applies to every area.

Enumerator
AREA_TRACKS_MASK 

0 unrestricted, 1 keep in, 2 keep out

AREA_TRACKS_IN 
AREA_TRACKS_OUT 
AREA_VIAS_MASK 
AREA_VIAS_IN 
AREA_VIAS_OUT 
AREA_POUR_KEEPOUT 

Definition at line 51 of file easypc_classes_geometry.h.

◆ AREA_TYPE

enum EASYPC::AREA_TYPE : int32_t
Enumerator
AREA_ROUTING 
AREA_COPPER 
AREA_COMPONENT 

Definition at line 42 of file easypc_classes_geometry.h.

◆ COMPONENT_SUPPRESS

Component instance suppress bits.

Enumerator
SUPPRESS_PARTS_LIST 
SUPPRESS_SCM_PCB_TRANSLATION 

Definition at line 42 of file easypc_classes_connectivity.h.

◆ DESIGN_PARAM_INDEX

Indices into the design parameter table.

Enumerator
DP_MIN_ANNULAR_RING 
DP_MIN_PASTE_SIZE 
DP_MIN_TRACK_WIDTH 
DP_MIN_TESTPOINT_SIZE 
DP_MIN_TESTPOINT_SPACE 
DP_MIN_HOLE_SIZE 
DP_MIN_VIA_ANNULAR_RING 
DP_MIRROR_PAD_STYLE_EXCEPTIONS 
DP_MIN_VIA_HOLE_SIZE 
DP_VIA_SMD_PAD_SPACE 
DP_MIN_TEXT_SIZE 
DP_MIN_SOLDER_MASK_WIDTH 
DP_MIN_SOLDER_MASK_TO_TRACK 

Definition at line 83 of file easypc_classes_root.h.

◆ DOC_KIND

enum class EASYPC::DOC_KIND
strong

Document kind, from the FileType stream or the file extension for projects.

Enumerator
PCB 
SCHEMATIC 
PCB_SYMBOL 

one item stream of a PCB Symbol Library

SCH_SYMBOL 

one item stream of a Schematic Symbol Library

COMPONENT 

one stream of a Component Library storage

PROJECT 

Definition at line 160 of file easypc_archive.h.

◆ FILE_KIND

enum class EASYPC::FILE_KIND
strong

The FileType strings the importer reads.

Enumerator
PCB_DESIGN 
SCHEMATIC_DESIGN 
PCB_SYMBOL_LIBRARY 
SCHEMATIC_SYMBOL_LIBRARY 
COMPONENT_LIBRARY 

Definition at line 43 of file easypc_file.h.

◆ LAYER_OVERSIZE_TYPE

enum class EASYPC::LAYER_OVERSIZE_TYPE : int32_t
strong

How a layer type grows pads.

Enumerator
NONE 
FIXED 

not ABSOLUTE, which wingdi.h defines

PERCENT 

Definition at line 94 of file easypc_classes_styles.h.

◆ LAYER_SIDE

enum class EASYPC::LAYER_SIDE : int32_t
strong
Enumerator
TOP 
BOTTOM 
INNER 
ALL 

Definition at line 72 of file easypc_classes_styles.h.

◆ LAYER_USAGE

enum EASYPC::LAYER_USAGE : int32_t

Layer usage bits.

Enumerator
LAYER_USAGE_SET 

pseudo layer [All], [Top] or [Bottom]

LAYER_USAGE_ELECTRICAL 
LAYER_USAGE_NON_ELECTRICAL 
LAYER_USAGE_WIRE 
LAYER_USAGE_DRAWING 
LAYER_USAGE_SPAN 

Definition at line 82 of file easypc_classes_styles.h.

◆ PAD_SHAPE

enum class EASYPC::PAD_SHAPE : int32_t
strong

Pad style shape, also the drill and exception shape.

Enumerator
ROUND 
SQUARE 
RECTANGLE 
OVAL 
BULLET 
CROSS 
CHAMFERED_RECTANGLE 
ROUNDED_RECTANGLE 
DIAMOND 
OCTAGON 
TRIANGLE 
ANNULUS 
TARGET 
OFFSET_OVAL 
OFFSET_BULLET 
OFFSET_RECTANGLE 
C_CUT 
C_OFFSET 
T_SHAPE 
H_SHAPE 
WEDGE 
EQUILATERAL_TRIANGLE 
HEXAGON 

Definition at line 44 of file easypc_classes_styles.h.

◆ PRODUCT_KEY

enum EASYPC::PRODUCT_KEY : int32_t

Product keys, the design header's or the library LibFormat's.

Enumerator
PRODUCT_EASYPC 
PRODUCT_DESIGNSPARK 
PRODUCT_DESIGNSPARK_CREATOR 
PRODUCT_DESIGNSPARK_PRO 
PRODUCT_PROTOPCB 

Definition at line 172 of file easypc_archive.h.

◆ SPACING_ITEM

enum EASYPC::SPACING_ITEM : int32_t

Item kind bits; a spacing key is (a << 16) | b.

Enumerator
SPACING_BOARD 
SPACING_TRACK 
SPACING_PAD 
SPACING_VIA 
SPACING_SHAPE 
SPACING_TEXT 
SPACING_DRILL 
SPACING_AREA 
SPACING_PANEL 

Definition at line 103 of file easypc_classes_styles.h.

◆ TEXT_ALIGNMENT

enum EASYPC::TEXT_ALIGNMENT : int32_t
Enumerator
TEXT_ALIGN_LEFT 
TEXT_ALIGN_RIGHT 
TEXT_ALIGN_CENTRE 

Definition at line 63 of file easypc_classes_geometry.h.

◆ TEXT_H_ALIGN

enum EASYPC::TEXT_H_ALIGN : int32_t

The source text position's alignment value.

Enumerator
TEXT_H_LEFT 
TEXT_H_RIGHT 
TEXT_H_CENTRE 

Definition at line 50 of file easypc_text_metrics.h.

◆ TEXT_V_ALIGN

enum EASYPC::TEXT_V_ALIGN : int32_t

Source text positions always pass BASELINE.

Enumerator
TEXT_V_BASELINE 
TEXT_V_TOP 
TEXT_V_MIDDLE 

Definition at line 59 of file easypc_text_metrics.h.

◆ VALUE_TYPE

enum EASYPC::VALUE_TYPE : uint64_t

Value position and component instance value type bits.

Enumerator
VALUE_REFERENCE_NAME 
VALUE_COMPONENT_NAME 
VALUE_PACKAGE_NAME 
VALUE_SYMBOL_NAME 
VALUE_VALUES 
VALUE_PIN_NAME 
VALUE_PIN_NUMBER 
VALUE_DESCRIPTION 
VALUE_ATTRIBUTE 

the attribute the value position names

VALUE_NET_NAME 

Definition at line 50 of file easypc_classes_connectivity.h.

Function Documentation

◆ AngleToDegrees()

double EASYPC::AngleToDegrees ( int32_t aAngle)
constexpr

Definition at line 51 of file easypc_units.h.

Referenced by EASYPC_PCB::FRAME::Angle().

◆ ApplyTextPosition()

void EASYPC::ApplyTextPosition ( EDA_TEXT & aText,
const SOURCE_TEXT_POSITION & aPos,
const SCH_FRAME & aFrame,
bool aKeepUpright = false,
const wxString & aMeasured = wxEmptyString )

◆ arcAsPolyline()

static std::vector< VECTOR2D > EASYPC::arcAsPolyline ( const VECTOR2D & aStart,
const VECTOR2D & aEnd,
const VECTOR2D & aCentre,
int32_t aAngle,
bool aAnticlockwise )
static

Points after aStart of an arc span at ARC_HIGH_DEF, at most 16384 of them.

Definition at line 122 of file easypc_sch_items.cpp.

References std::abs(), ARC_HIGH_DEF_MM, M_PI, radius, rotateAbout(), and schIUScale.

Referenced by ConvertShape().

◆ arcCentre()

static VECTOR2D EASYPC::arcCentre ( const VECTOR2D & aStart,
const VECTOR2D & aEnd,
int32_t aAngle,
bool aAnticlockwise )
static

Centre of an arc span from its ends and swept angle.

Definition at line 103 of file easypc_sch_items.cpp.

References std::abs(), M_PI, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by ConvertShape().

◆ attributeValue()

static wxString EASYPC::attributeValue ( const SOURCE_COMPONENT_INSTANCE & aComp,
const SOURCE_COMPONENT & aPart,
const wxString & aName )
static

The value of the part's first attribute named aName, or empty.

Definition at line 206 of file easypc_sch_builder.cpp.

References partAttributes().

Referenced by EASYPC::SCH_BUILDER::buildSymbols().

◆ collinearOverlap()

static bool EASYPC::collinearOverlap ( const SEG & aA,
const SEG & aB )
static

Two segments on one line sharing more than a point.

Definition at line 832 of file easypc_sch_builder.cpp.

References SEG::A, SEG::B, VECTOR2< T >::x, and VECTOR2< T >::y.

◆ ConvertComponentSymbol()

◆ ConvertFreeText()

std::unique_ptr< SCH_TEXT > EASYPC::ConvertFreeText ( const SOURCE_FREE_TEXT & aText,
const SCH_FRAME & aFrame,
SCH_LAYER_ID aLayer,
int aUnit,
bool aKeepUpright )

◆ ConvertShape()

std::vector< std::unique_ptr< SCH_SHAPE > > EASYPC::ConvertShape ( const SOURCE_SHAPE & aShape,
const SCH_FRAME & aFrame,
SCH_LAYER_ID aLayer,
int aStrokeWidth,
bool aFilled,
int aUnit )

◆ ConvertShapeItem()

std::vector< std::unique_ptr< SCH_SHAPE > > EASYPC::ConvertShapeItem ( const SOURCE_SHAPE_ITEM & aItem,
const SCH_FRAME & aFrame,
SCH_LAYER_ID aLayer,
int aUnit )

◆ ConvertSymbol()

std::unique_ptr< LIB_SYMBOL > EASYPC::ConvertSymbol ( const SOURCE_SYMBOL & aSymbol,
const LIB_ID & aId )

A .ssl symbol alone: one unit, pins numbered by pad number.

Definition at line 692 of file easypc_sch_items.cpp.

References EASYPC::SOURCE_SYMBOL::Name, EASYPC::SOURCE_SYMBOL::OriginX, EASYPC::SOURCE_SYMBOL::OriginY, and ToKiCadMarkup().

Referenced by SCH_IO_EASYPC::LoadSymbol().

◆ defaultTextStyle()

static const SOURCE_TEXT_STYLE * EASYPC::defaultTextStyle ( const SOURCE_DESIGN & aDesign)
static

◆ DrawsUpright()

bool EASYPC::DrawsUpright ( const SOURCE_TEXT_POSITION & aPos,
bool aKeepUpright )

True when a design that keeps text upright turns aPos about the far end of its first line.

Definition at line 267 of file easypc_sch_items.cpp.

References EASYPC::TEXT_METRICS::CanMeasure(), EASYPC::SOURCE_TEXT_POSITION::Rotation, EASYPC::SOURCE_TEXT_POSITION::TextStyle, and UprightRotation().

Referenced by ApplyTextPosition(), and EASYPC::SCH_BUILDER::placeFields().

◆ DsuToNm()

int64_t EASYPC::DsuToNm ( int64_t aDsu)
constexpr

Definition at line 45 of file easypc_units.h.

References NM_PER_DSU.

◆ ExpandPinNumberList()

std::vector< wxString > EASYPC::ExpandPinNumberList ( const wxString & aList,
wxString * aDisplay )

Expand a gate pin's component pin list by Easy-PC's pin list syntax: items separated by , or +, numeric ranges 5-9, and an optional display= prefix that only changes what is shown.

Definition at line 307 of file easypc_classes_library.cpp.

Referenced by ResolveTerminal().

◆ FileKindString()

const char * EASYPC::FileKindString ( FILE_KIND aKind)

Definition at line 75 of file easypc_file.cpp.

Referenced by EASYPC::LIBRARY_FILE::LIBRARY_FILE(), and LoadDesign().

◆ FillTitleBlock()

void EASYPC::FillTitleBlock ( const DESIGN_DOCUMENT & aDoc,
TITLE_BLOCK & aTitleBlock )

Fill a title block from the design's SummaryInformation property set: title from Title, date from the last save, comments 1 to 4 from Subject, Author, Keywords and Comments.

Definition at line 56 of file easypc_design_settings.cpp.

References _, TITLE_BLOCK::SetComment(), TITLE_BLOCK::SetDate(), TITLE_BLOCK::SetTitle(), EASYPC::DESIGN_DOCUMENT::SummaryInformation, text, and THROW_IO_ERROR.

Referenced by EASYPC::SCH_BUILDER::BuildSheet().

◆ floorTo()

static int32_t EASYPC::floorTo ( int64_t aValue,
int32_t aGrid )
static

Definition at line 324 of file easypc_sch_builder.cpp.

Referenced by EASYPC::SCH_BUILDER::computeOffset().

◆ isDrawn()

static bool EASYPC::isDrawn ( const SOURCE_SYMBOL_INSTANCE & aInst)
static

◆ IsNamedNet()

bool EASYPC::IsNamedNet ( const wxString & aName)

True unless aName is an automatic net name (N or n and digits, an optional !sheet! suffix)

Definition at line 77 of file easypc_sch_builder.cpp.

Referenced by EASYPC::SCH_NET_NAMES::AddSheet(), EASYPC::SCH_BUILDER::buildLabels(), EASYPC::SCH_BUILDER::buildSymbols(), EASYPC::SCH_NET_NAMES::Name(), and EASYPC::SCH_NET_NAMES::Shared().

◆ IsPadList()

bool EASYPC::IsPadList ( const wxString & aPcbSymbolPin)

Whether a gate pin's pad reference names several pads ("-1", the unmapped marker, does not)

Definition at line 294 of file easypc_classes_library.cpp.

Referenced by ResolveTerminal().

◆ isScmOnly()

static bool EASYPC::isScmOnly ( const SOURCE_COMPONENT & aPart)
static

Schematic-only part: no package, an empty package name, or no gate pin mapped to a pad.

Definition at line 511 of file easypc_sch_builder.cpp.

References EASYPC::SOURCE_COMPONENT::Board, EASYPC::SOURCE_PCB_COMPONENT::GateMaps, EASYPC::SOURCE_PCB_COMPONENT::Package, pad, pin, and TypedItems().

Referenced by EASYPC::SCH_BUILDER::buildSymbols().

◆ joinLines()

static wxString EASYPC::joinLines ( const std::vector< VALUE_LINE > & aLines)
static

◆ labelSpin()

◆ ListItems()

const std::vector< OBJECT * > & EASYPC::ListItems ( const OBJECT * aList)

The items of a design list or array, empty for anything else.

Definition at line 162 of file easypc_classes_library.cpp.

References array, and empty().

Referenced by SCH_IO_EASYPC::convertComponent(), EASYPC::SOURCE_COMPONENT_INSTANCE::Load(), and TypedItems().

◆ LoadDesign()

◆ LoadProject()

◆ mapD()

static VECTOR2I EASYPC::mapD ( const SCH_FRAME & aFrame,
const VECTOR2D & aPt )
static

Definition at line 115 of file easypc_sch_items.cpp.

References KiROUND(), EASYPC::SCH_FRAME::Map(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by ConvertShape().

◆ netOf()

◆ NormalizeAngle()

int32_t EASYPC::NormalizeAngle ( int32_t aAngle)
constexpr

Wrap an angle into [0, ANGLE_FULL_TURN)

Definition at line 58 of file easypc_units.h.

References ANGLE_FULL_TURN.

Referenced by ApplyTextPosition(), EASYPC_PCB::ApplyTextPosition(), labelSpin(), placedText(), and placementTransform().

◆ PageForExtents()

PAGE_INFO EASYPC::PageForExtents ( const BOX2L & aExtentsNm)

Easy-PC stores no page size, so the first of A4 to A0 then A to E, landscape before portrait, that holds the extents and margins is chosen, else a User page of exactly that size rounded up to whole millimetres.

Definition at line 129 of file easypc_design_settings.cpp.

References A, A0, A1, A2, A3, A4, B, C, D, E, BOX2< Vec >::GetHeight(), PAGE_INFO::GetHeightMM(), BOX2< Vec >::GetWidth(), PAGE_INFO::GetWidthMM(), PAGE_MARGIN_MM, PAGE_INFO::SetHeightMM(), PAGE_INFO::SetWidthMM(), and User.

Referenced by EASYPC::SCH_BUILDER::computeOffset().

◆ partAttributes()

static std::vector< const SOURCE_ATTRIBUTE * > EASYPC::partAttributes ( const SOURCE_COMPONENT_INSTANCE & aComp,
const SOURCE_COMPONENT & aPart )
static

Package attributes then the instance's own, an instance attribute overriding the package's of the same name.

Definition at line 177 of file easypc_sch_builder.cpp.

References EASYPC::SOURCE_DESIGN_ITEM::Attributes, EASYPC::SOURCE_COMPONENT::Board, and TypedItems().

Referenced by attributeValue(), and valueLines().

◆ placedText()

◆ placementTransform()

static TRANSFORM EASYPC::placementTransform ( int32_t aAngle,
bool aMirrored )
static

KiCad transform for a stored placement: mirror in X, then rotate anticlockwise (Y up)

Definition at line 499 of file easypc_sch_builder.cpp.

References NormalizeAngle().

Referenced by EASYPC::SCH_BUILDER::buildSymbols().

◆ placePoint()

◆ PointRotate() [1/2]

void EASYPC::PointRotate ( double aPx,
double aPy,
int32_t aAngle,
double aCx,
double aCy,
int32_t & aOutX,
int32_t & aOutY )
inline

Rotate aPx, aPy anticlockwise by aAngle about aCx, aCy as Easy-PC places points: in double with exact quarter turns, truncating toward zero, so the operand order of each sum decides the last bit.

Definition at line 68 of file easypc_units.h.

References M_PI.

Referenced by placePoint(), and PointRotate().

◆ PointRotate() [2/2]

void EASYPC::PointRotate ( int32_t & aX,
int32_t & aY,
int32_t aAngle,
int32_t aCx,
int32_t aCy )
inline

Definition at line 101 of file easypc_units.h.

References PointRotate().

◆ Probe()

FILE_INFO EASYPC::Probe ( const wxString & aPath)

Identify a file; projects are parsed fully, while designs and libraries are only inspected. Never throws.

Definition at line 323 of file easypc_document.cpp.

References EASYPC::COMPOUND_FILE::FileKind(), LoadProject(), and Probe().

Referenced by SCH_IO_EASYPC::CanReadLibrary(), SCH_IO_EASYPC::CanReadSchematicFile(), isKind(), and Probe().

◆ ReadPoint()

◆ ReadWholeFile()

std::vector< uint8_t > EASYPC::ReadWholeFile ( const wxString & aPath)

The whole content of a file; throws IO_ERROR when it cannot be read.

Definition at line 92 of file easypc_file.cpp.

References _, and THROW_IO_ERROR.

Referenced by EASYPC::COMPOUND_FILE::COMPOUND_FILE(), and LoadProject().

◆ Register()

template<typename T>
void EASYPC::Register ( REGISTRY & aReg,
std::initializer_list< const char * > aNames )

Register the class names whose objects load as a T.

Definition at line 141 of file easypc_archive.h.

References name.

Referenced by RegisterConnectivityClasses(), RegisterGeometryClasses(), RegisterLibraryClasses(), RegisterRootClasses(), and RegisterStyleClasses().

◆ RegisterConnectivityClasses()

void EASYPC::RegisterConnectivityClasses ( REGISTRY & aReg)

Definition at line 365 of file easypc_classes_connectivity.cpp.

References Register(), RegisterSkipped(), and SHEET.

◆ RegisterGeometryClasses()

void EASYPC::RegisterGeometryClasses ( REGISTRY & aReg)

Definition at line 464 of file easypc_classes_geometry.cpp.

References Register(), and RegisterSkipped().

◆ RegisterLibraryClasses()

void EASYPC::RegisterLibraryClasses ( REGISTRY & aReg)

Definition at line 365 of file easypc_classes_library.cpp.

References Register().

◆ RegisterRootClasses()

void EASYPC::RegisterRootClasses ( REGISTRY & aReg)

Definition at line 485 of file easypc_classes_root.cpp.

References Register(), and RegisterSkipped().

◆ RegisterSkipped()

template<typename BASE>
void EASYPC::RegisterSkipped ( REGISTRY & aReg,
const char * aName,
std::span< const FIELD_ROW > aRows )

◆ RegisterStyleClasses()

void EASYPC::RegisterStyleClasses ( REGISTRY & aReg)

Definition at line 527 of file easypc_classes_styles.cpp.

References Register(), and RegisterSkipped().

◆ ResolveProjectItem()

wxString EASYPC::ResolveProjectItem ( const wxString & aProjectPath,
const wxString & aItemName )

The file a project item names, as Easy-PC opens it: the Windows path relative to the project's directory, the file name matched without regard to case.

Returned even when no such file exists.

Definition at line 293 of file easypc_document.cpp.

References name, and ResolveProjectItem().

Referenced by SCH_IO_EASYPC::convertComponent(), IMPORT_PROJ_HELPER::EasyPcProjectHandler(), SCH_IO_EASYPC::LoadSchematicFile(), and ResolveProjectItem().

◆ ResolveTerminal()

GATE_TERMINAL EASYPC::ResolveTerminal ( const SOURCE_PCB_COMPONENT * aPcb,
int aGate,
int aTerminal )

◆ rotateAbout()

static VECTOR2D EASYPC::rotateAbout ( const VECTOR2D & aPt,
const VECTOR2D & aCentre,
double aRadians )
static

Definition at line 92 of file easypc_sch_items.cpp.

References VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by arcAsPolyline(), and ConvertShape().

◆ ShapeVertices()

std::vector< const SOURCE_SEGMENT * > EASYPC::ShapeVertices ( const SOURCE_SHAPE & aShape)

A shape's vertices in drawing order, following next references for formats 1 and 2.

Definition at line 50 of file easypc_sch_items.cpp.

References EASYPC::SOURCE_SEGMENT::HasNextRef, and EASYPC::SOURCE_SHAPE::Segments.

Referenced by EASYPC::SCH_BUILDER::addBusAlias(), EASYPC::SCH_BUILDER::buildBuses(), EASYPC::SCH_BUILDER::buildWires(), EASYPC::SCH_BUILDER::computeOffset(), and ConvertShape().

◆ SkipFields()

LOAD_TASK EASYPC::SkipFields ( ARCHIVE & aAr,
std::string_view aOps )

Read and drop a run of fields described by aOps, each letter optionally followed by a repeat count: b a format-dependent boolean, 1 a byte, i an int32, f a double, s a string, o an object, a a counted int32 array.

Spaces are ignored.

Definition at line 460 of file easypc_archive.cpp.

References EASYPC::ARCHIVE::Count(), EASYPC::ARCHIVE::InBool(), EASYPC::ARCHIVE::Object(), EASYPC::ARCHIVE::Skip(), and EASYPC::ARCHIVE::SkipString().

Referenced by EASYPC::SOURCE_AREA::Load(), EASYPC::SOURCE_DEFAULTS::Load(), EASYPC::SOURCE_DESIGN::Load(), EASYPC::SOURCE_DESIGN_ITEM::Load(), EASYPC::SOURCE_DESIGN_PARAMETERS::Load(), EASYPC::SOURCE_LAYER::Load(), EASYPC::SOURCE_NET_CLASS::Load(), and SkipRows().

◆ SkipMember()

LOAD_TASK EASYPC::SkipMember ( ARCHIVE & aAr,
const char * aClass,
bool aDesignOwned )

Load and drop an embedded member of a registered class; aDesignOwned marks its design as owner.

Definition at line 238 of file easypc_classes_root.cpp.

References EASYPC::ARCHIVE::Create().

Referenced by EASYPC::SOURCE_DESIGN::Load(), and EASYPC::SOURCE_SYMBOL::Load().

◆ SkipRows()

LOAD_TASK EASYPC::SkipRows ( ARCHIVE & aAr,
int aVersion,
std::span< const FIELD_ROW > aRows )

◆ TextSize()

VECTOR2I EASYPC::TextSize ( const SOURCE_TEXT_STYLE & aStyle)

KiCad text size for a source text style: its height as the width, its capital height as the height.

Definition at line 260 of file easypc_sch_items.cpp.

References EASYPC::SOURCE_TEXT_STYLE::Height, and KiROUND().

Referenced by EASYPC::SCH_BUILDER::addBusAlias(), EASYPC::SCH_BUILDER::addLabel(), ApplyTextPosition(), and EASYPC::SCH_BUILDER::buildLabels().

◆ TextStaysUpright()

bool EASYPC::TextStaysUpright ( const SOURCE_DESIGN & aDesign,
bool aSchematic )

Whether aDesign's text is drawn upright: the design's flag, which old schematics imply, or a schematic from DesignSpark Creator, Pro or ProtoPCB, which are always upright.

Definition at line 323 of file easypc_text_metrics.cpp.

References EASYPC::SOURCE_DESIGN::AdjustTextRotation, EASYPC::SOURCE_DESIGN::Product, PRODUCT_DESIGNSPARK_CREATOR, PRODUCT_DESIGNSPARK_PRO, PRODUCT_PROTOPCB, and EASYPC::SOURCE_DESIGN::Version.

Referenced by EASYPC::SCH_BUILDER::BuildSheet().

◆ ToKiCadMarkup()

wxString EASYPC::ToKiCadMarkup ( const wxString & aText)

A displayed string in KiCad's markup.

A doubled underscore toggles an overbar and a line break ends it, so "__X__Y" becomes "~{X}Y"; a literal "~{" is escaped.

Definition at line 346 of file easypc_text_metrics.cpp.

References next().

Referenced by EASYPC::SCH_BUILDER::addBusAlias(), EASYPC::SCH_BUILDER::addLabel(), EASYPC_PCB::ApplyTextPosition(), EASYPC::SCH_BUILDER::buildSymbols(), ConvertComponentSymbol(), ConvertFreeText(), ConvertSymbol(), EASYPC::SCH_BUILDER::placeFields(), and EASYPC::SCH_BUILDER::placePinItems().

◆ TypedItems()

◆ UnescapeItemName()

wxString EASYPC::UnescapeItemName ( const std::u16string & aName)

Undo the item name escaping, which stores # ! \ / : * ? " < > | as 0x06..0x10.

Definition at line 81 of file easypc_file.cpp.

References result.

Referenced by EASYPC::LIBRARY_FILE::LoadItem().

◆ UprightRotation()

int32_t EASYPC::UprightRotation ( int32_t aAngle,
bool aKeepUpright )

With text kept upright, an angle above 135 and up to 305 degrees turns by 180.

Definition at line 337 of file easypc_text_metrics.cpp.

References ANGLE_FULL_TURN.

Referenced by ApplyTextPosition(), DrawsUpright(), and EASYPC::SCH_BUILDER::placeFields().

◆ valueLines()

Variable Documentation

◆ ANGLE_FULL_TURN

int EASYPC::ANGLE_FULL_TURN = 360000
constexpr

Definition at line 39 of file easypc_units.h.

Referenced by NormalizeAngle(), and UprightRotation().

◆ COORD_LIMIT

double EASYPC::COORD_LIMIT = std::numeric_limits<int>::max() / 2.0
constexpr

Half of KiCad's integer range, so shape code rotating or adding coordinates cannot overflow.

Definition at line 42 of file easypc_units.h.

Referenced by EASYPC_PCB::ArcForm(), ConvertShape(), EASYPC::SCH_FRAME::Map(), and EASYPC_PCB::FRAME::ToKiCad().

◆ DETOUR

int32_t EASYPC::DETOUR = 10
staticconstexpr

Offset that keeps a wire off another net's connection point, far below drawing resolution.

Definition at line 74 of file easypc_sch_builder.cpp.

Referenced by EASYPC::SCH_BUILDER::buildWires().

◆ NEWEST_ITEM_FORMAT

int EASYPC::NEWEST_ITEM_FORMAT = 0x7531
constexpr

The newest item format a file can carry (30001)

Definition at line 32 of file easypc_classes_base.h.

Referenced by EASYPC::SOURCE_DESIGN::Load(), EASYPC::SOURCE_PCB_COMPONENT::Load(), and EASYPC::SOURCE_SCM_COMPONENT::Load().

◆ NM_PER_DSU

int64_t EASYPC::NM_PER_DSU = 100
constexpr

Definition at line 37 of file easypc_units.h.

Referenced by DsuToNm().

◆ PAGE_MARGIN

int32_t EASYPC::PAGE_MARGIN = static_cast<int32_t>( PAGE_MARGIN_MM * 10000 )
staticconstexpr

Definition at line 71 of file easypc_sch_builder.cpp.

Referenced by EASYPC::SCH_BUILDER::computeOffset().

◆ PAGE_MARGIN_MM

double EASYPC::PAGE_MARGIN_MM = 10.0
constexpr

Margin added on every side of the drawn extents before choosing a page, in millimetres.

Definition at line 45 of file easypc_design_settings.h.

Referenced by PageForExtents().

◆ SHEET_ORIGIN_GRID

int32_t EASYPC::SHEET_ORIGIN_GRID = 25400
staticconstexpr

The sheet origin snaps to 0.1 inch, keeping items on Easy-PC grids on KiCad's 50 mil grid.

Definition at line 69 of file easypc_sch_builder.cpp.

Referenced by EASYPC::SCH_BUILDER::computeOffset().

◆ THERMAL_RULE_SET

char EASYPC::THERMAL_RULE_SET[] = "o o a o a o a o a 12 o"
constexpr

A thermal rule set as SkipFields ops: owner, four thermal rules (owner and an int array), two flags and a hatch style.

Embedded in net classes, areas and the design parameters.

Definition at line 283 of file easypc_classes_styles.h.

Referenced by EASYPC::SOURCE_AREA::Load(), EASYPC::SOURCE_DESIGN_PARAMETERS::Load(), and EASYPC::SOURCE_NET_CLASS::Load().