20#ifndef LIBREPCB_KICADIMPORT_KICADTYPECONVERTER_H
21#define LIBREPCB_KICADIMPORT_KICADTYPECONVERTER_H
57namespace kicadimport {
84 std::shared_ptr<FootprintPad>
fptPad;
85 std::shared_ptr<Hole>
hole;
97 const QString& elemName,
98 const QList<KiCadProperty>& props);
100 const QList<KiCadProperty>& props);
121 const QList<KiCadSymbolPin>& pins);
123 const QStringList& numbers);
127 qreal pinNamesOffset);
145 qreal fptSolderPasteMargin, qreal fptSolderPasteRatio,
148 const QList<KiCadProperty>& props,
const QString& key);
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition angle.h:76
This class represents absolute, well-formatted paths to files or directories.
Definition filepath.h:127
The Layer class provides all supported geometry layers.
Definition layer.h:42
Generic logger class to pass messages between objects.
Definition messagelogger.h:43
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition point.h:78
Helper class to convert KiCad types to LibrePCB types.
Definition kicadtypeconverter.h:66
static QString convertElementKeywords(const QString &commonKeywords, const QList< KiCadProperty > &props)
Definition kicadtypeconverter.cpp:71
static std::shared_ptr< Text > convertSymbolPropertyToText(const KiCadProperty &p)
Definition kicadtypeconverter.cpp:208
static std::optional< KiCadProperty > findProperty(const QList< KiCadProperty > &props, const QString &key)
Definition kicadtypeconverter.cpp:1068
static QList< std::pair< QString, QStringList > > convertSymbolPinNames(const QList< KiCadSymbolPin > &pins)
Definition kicadtypeconverter.cpp:241
static std::shared_ptr< Circle > convertSymbolCircle(const KiCadSymbolCircle &c)
Definition kicadtypeconverter.cpp:151
KiCadTypeConverter()=delete
static std::shared_ptr< Polygon > convertFootprintRectangle(const KiCadFootprintRectangle &r)
Definition kicadtypeconverter.cpp:485
static std::shared_ptr< Polygon > convertSymbolArc(const KiCadSymbolArc &a)
Definition kicadtypeconverter.cpp:135
KiCadTypeConverter(const KiCadTypeConverter &other)=delete
static CircuitIdentifier convertCircuitIdentifier(const QString &text)
Definition kicadtypeconverter.cpp:312
static std::shared_ptr< SymbolPin > convertSymbolPin(const KiCadSymbolPin &p, const QString &name, qreal pinNamesOffset)
Definition kicadtypeconverter.cpp:364
static std::shared_ptr< StrokeText > convertFootprintPropertyToText(const KiCadProperty &p)
Definition kicadtypeconverter.cpp:587
static Point convertSymbolPoint(const QPointF &p)
Definition kicadtypeconverter.cpp:97
static PositiveLength maxArcTolerance() noexcept
Definition kicadtypeconverter.h:157
static CircuitIdentifier convertSymbolPinName(const QString &name, const QStringList &numbers)
Definition kicadtypeconverter.cpp:303
static std::shared_ptr< Circle > convertFootprintCircle(const KiCadFootprintCircle &c)
Definition kicadtypeconverter.cpp:467
static std::shared_ptr< Polygon > convertFootprintPolygon(const KiCadFootprintPolygon &p)
Definition kicadtypeconverter.cpp:497
static ElementName convertElementName(const QString &s)
Definition kicadtypeconverter.cpp:52
static UnsignedLength convertSymbolStrokeWidth(qreal width)
Definition kicadtypeconverter.cpp:114
static std::shared_ptr< Text > convertSymbolText(const KiCadSymbolText &t)
Definition kicadtypeconverter.cpp:192
static std::shared_ptr< Polygon > convertSymbolRectangle(const KiCadSymbolRectangle &r)
Definition kicadtypeconverter.cpp:161
static std::shared_ptr< Polygon > convertSymbolPolyline(const KiCadSymbolPolyline &p)
Definition kicadtypeconverter.cpp:172
KiCadTypeConverter & operator=(const KiCadTypeConverter &rhs)=delete
static std::shared_ptr< Zone > convertFootprintZone(const KiCadZone &z, MessageLogger &log)
Definition kicadtypeconverter.cpp:516
static Pad convertPad(const KiCadFootprintPad &p, qreal fptSolderMaskMargin, qreal fptSolderPasteMargin, qreal fptSolderPasteRatio, qreal fptClearance, MessageLogger &log)
Definition kicadtypeconverter.cpp:621
static QString convertElementDescription(const FilePath &libFp, const QString &elemName, const QList< KiCadProperty > &props)
Definition kicadtypeconverter.cpp:56
static UnsignedLength convertFootprintStrokeWidth(qreal width, const Layer &layer)
Definition kicadtypeconverter.cpp:126
static Line convertFootprintLine(const KiCadFootprintLine &l)
Definition kicadtypeconverter.cpp:423
static const Layer & convertFootprintGeometryLayer(const KiCadLayer &l)
Definition kicadtypeconverter.cpp:374
static PositiveLength convertSymbolTextHeight(qreal height)
Definition kicadtypeconverter.cpp:122
static ResourceList convertResources(const QList< KiCadProperty > &props)
Definition kicadtypeconverter.cpp:84
static Point convertFootprintPoint(const QPointF &p)
Definition kicadtypeconverter.cpp:101
~KiCadTypeConverter()=delete
static std::shared_ptr< StrokeText > convertFootprintText(const KiCadFootprintText &t)
Definition kicadtypeconverter.cpp:564
static Line convertFootprintArc(const KiCadFootprintArc &a)
Definition kicadtypeconverter.cpp:435
static QList< LineGroup > groupLinesByLayerAndWidth(const QList< Line > &lines)
Definition kicadtypeconverter.cpp:451
static Angle convertArc(const Point &start, const Point &mid, const Point &end)
Definition kicadtypeconverter.cpp:105
KiCadLayer
Definition kicadtypes.h:158
Definition occmodel.cpp:76
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition length.h:810
type_safe::constrained_type< QString, CircuitIdentifierConstraint, CircuitIdentifierVerifier > CircuitIdentifier
Definition circuitidentifier.h:95
type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier > UnsignedLength
Definition length.h:694
type_safe::constrained_type< QString, ElementNameConstraint, ElementNameVerifier > ElementName
Definition elementname.h:84
Represents a KiCad property.
Definition kicadtypes.h:229
Represents a KiCad symbol arc.
Definition kicadtypes.h:353
Represents a KiCad symbol circle.
Definition kicadtypes.h:374
Represents a KiCad symbol pin.
Definition kicadtypes.h:455
Represents a KiCad symbol polyline.
Definition kicadtypes.h:415
Represents a KiCad symbol rectangle.
Definition kicadtypes.h:394
Represents a KiCad symbol text.
Definition kicadtypes.h:434
Definition kicadtypeconverter.h:78
UnsignedLength width
Definition kicadtypeconverter.h:80
QVector< Path > paths
Definition kicadtypeconverter.h:81
const Layer * layer
Definition kicadtypeconverter.h:79
Definition kicadtypeconverter.h:71
UnsignedLength width
Definition kicadtypeconverter.h:73
Point start
Definition kicadtypeconverter.h:74
Point end
Definition kicadtypeconverter.h:75
Angle angle
Definition kicadtypeconverter.h:76
const Layer * layer
Definition kicadtypeconverter.h:72
Definition kicadtypeconverter.h:83
std::shared_ptr< FootprintPad > fptPad
Definition kicadtypeconverter.h:84
QList< std::shared_ptr< Polygon > > polygons
Definition kicadtypeconverter.h:86
std::shared_ptr< Hole > hole
Definition kicadtypeconverter.h:85
Represents a KiCad zone.
Definition kicadtypes.h:331