KiCad PCB EDA Suite
Loading...
Searching...
No Matches
easypc_sch_items.h File Reference

Schematic graphics, texts and symbols shared by the sheet builder and the symbol libraries, so a part placed on a sheet and the same part in a library are converted by one code path. More...

#include <memory>
#include <vector>
#include <layer_ids.h>
#include <math/vector2d.h>
#include <wx/arrstr.h>
#include <wx/string.h>

Go to the source code of this file.

Classes

struct  EASYPC::SCH_FRAME
 Design to KiCad mapping: X shifted, Y negated about the origin. More...
 
struct  EASYPC::SCH_COMPONENT_SOURCE
 Everything one component LIB_SYMBOL is made from. More...
 
struct  EASYPC::GATE_TERMINAL
 What a package's gate map says about one gate terminal. More...
 

Namespaces

namespace  EASYPC
 

Functions

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.
 
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=0)
 Outline of a shape: polylines, arcs and circles; a filled outline with arcs is one polygon.
 
std::vector< std::unique_ptr< SCH_SHAPE > > EASYPC::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 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.
 
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.
 
void EASYPC::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 > EASYPC::ConvertFreeText (const SOURCE_FREE_TEXT &aText, const SCH_FRAME &aFrame, SCH_LAYER_ID aLayer, int aUnit, bool aKeepUpright)
 
std::unique_ptr< LIB_SYMBOL > EASYPC::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 > EASYPC::ConvertSymbol (const SOURCE_SYMBOL &aSymbol, const LIB_ID &aId)
 A .ssl symbol alone: one unit, pins numbered by pad number.
 
GATE_TERMINAL EASYPC::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.
 

Detailed Description

Schematic graphics, texts and symbols shared by the sheet builder and the symbol libraries, so a part placed on a sheet and the same part in a library are converted by one code path.

Design units and schematic IU are both 100 nm; a SCH_FRAME only shifts the origin and turns Y down.

Definition in file easypc_sch_items.h.