20#ifndef LIBREPCB_CORE_GERBERAPERTURELIST_H
21#define LIBREPCB_CORE_GERBERAPERTURELIST_H
26#include "../fileio/filepath.h"
27#include "../geometry/path.h"
28#include "../types/length.h"
29#include "../types/uuid.h"
73 using Function = std::optional<GerberAttribute::ApertureFunction>;
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition angle.h:76
A helper class to generate the aperture definitions for a Gerber file.
Definition gerberaperturelist.h:68
int addObround(const PositiveLength &w, const PositiveLength &h, const Angle &rot, Function function) noexcept
Add an obround aperture.
Definition gerberaperturelist.cpp:81
std::optional< GerberAttribute::ApertureFunction > Function
Definition gerberaperturelist.h:73
int addComponentPin(bool isPin1) noexcept
Add a component pin aperture (for component layers only)
Definition gerberaperturelist.cpp:264
int addCircle(const UnsignedLength &dia, Function function)
Add a circle aperture.
Definition gerberaperturelist.cpp:75
int addOutline(const StraightAreaPath &path, const Angle &rot, Function function) noexcept
Add a custom outline aperture.
Definition gerberaperturelist.cpp:251
int addOctagon(const PositiveLength &w, const PositiveLength &h, const UnsignedLength &r, const Angle &rot, Function function) noexcept
Add an octagon aperture.
Definition gerberaperturelist.cpp:193
QMap< int, std::pair< Function, QString > > mApertures
Definition gerberaperturelist.h:227
QString buildOutlineMacro(Path path, const Angle &rot) const noexcept
Internal helper for addOutline()
Definition gerberaperturelist.cpp:290
QString generateString() const noexcept
Generate the aperture definitions string.
Definition gerberaperturelist.cpp:48
int addRect(const PositiveLength &w, const PositiveLength &h, const UnsignedLength &r, const Angle &rot, Function function) noexcept
Add a rectangular aperture.
Definition gerberaperturelist.cpp:127
GerberApertureList() noexcept
Definition gerberaperturelist.cpp:38
int addAperture(QString aperture, Function function) noexcept
Helper method to actually add a new or get an existing aperture.
Definition gerberaperturelist.cpp:304
int addComponentMain() noexcept
Add a component main aperture (for component layers only)
Definition gerberaperturelist.cpp:257
The Path class represents a list of vertices connected by straight lines or circular arc segments.
Definition path.h:57
Definition occmodel.cpp:76
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition length.h:810
type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier > UnsignedLength
Definition length.h:694
type_safe::constrained_type< Path, StraightAreaPathConstraint, StraightAreaPathVerifier > StraightAreaPath
Definition path.h:274