LibrePCB Developers Documentation
boardnetsegmentsplitter.h
Go to the documentation of this file.
1/*
2 * LibrePCB - Professional EDA for everyone!
3 * Copyright (C) 2013 LibrePCB Developers, see AUTHORS.md for contributors.
4 * https://librepcb.org/
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef LIBREPCB_CORE_BOARDNETSEGMENTSPLITTER_H
21#define LIBREPCB_CORE_BOARDNETSEGMENTSPLITTER_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
26#include "../../geometry/junction.h"
27#include "../../geometry/trace.h"
28#include "../../geometry/via.h"
29
30#include <QtCore>
31#include <QtWidgets>
32
33/*******************************************************************************
34 * Namespace / Forward Declarations
35 ******************************************************************************/
36namespace librepcb {
37
38class Layer;
39
40/*******************************************************************************
41 * Class BoardNetSegmentSplitter
42 ******************************************************************************/
43
48public:
49 // Types
50 struct Segment {
54 };
55
56 // Constructors / Destructor
57 BoardNetSegmentSplitter() noexcept;
59 ~BoardNetSegmentSplitter() noexcept;
60
61 // General Methods
63 const Point& pos) noexcept;
64 void addJunction(const Junction& junction) noexcept;
65 void addVia(const Via& via, bool replaceByJunctions) noexcept;
66 void addTrace(const Trace& trace) noexcept;
67 QList<Segment> split() noexcept;
68
69 // Operator Overloadings
71 delete;
72
73private: // Methods
75 const Layer& layer) noexcept;
77 ViaList& availableVias,
78 TraceList& availableTraces, Segment& segment)
79
80 noexcept;
81
82private: // Data
86
89};
90
91/*******************************************************************************
92 * End of File
93 ******************************************************************************/
94
95} // namespace librepcb
96
97#endif
The BoardNetSegmentSplitter class.
Definition: boardnetsegmentsplitter.h:47
TraceList mTraces
Definition: boardnetsegmentsplitter.h:85
TraceAnchor replaceAnchor(const TraceAnchor &anchor, const Layer &layer) noexcept
Definition: boardnetsegmentsplitter.cpp:105
JunctionList mJunctions
Definition: boardnetsegmentsplitter.h:83
QHash< QPair< TraceAnchor, const Layer * >, TraceAnchor > mReplacedAnchors
Definition: boardnetsegmentsplitter.h:88
QList< Segment > split() noexcept
Definition: boardnetsegmentsplitter.cpp:76
QHash< TraceAnchor, Point > mAnchorsToReplace
Definition: boardnetsegmentsplitter.h:87
BoardNetSegmentSplitter() noexcept
Definition: boardnetsegmentsplitter.cpp:39
ViaList mVias
Definition: boardnetsegmentsplitter.h:84
void addTrace(const Trace &trace) noexcept
Definition: boardnetsegmentsplitter.cpp:68
void findConnectedLinesAndPoints(const TraceAnchor &anchor, ViaList &availableVias, TraceList &availableTraces, Segment &segment) noexcept
Definition: boardnetsegmentsplitter.cpp:123
void addJunction(const Junction &junction) noexcept
Definition: boardnetsegmentsplitter.cpp:55
void addVia(const Via &via, bool replaceByJunctions) noexcept
Definition: boardnetsegmentsplitter.cpp:59
void replaceFootprintPadByJunctions(const TraceAnchor &anchor, const Point &pos) noexcept
Definition: boardnetsegmentsplitter.cpp:50
The Junction class represents the connection point between netlines or traces.
Definition: junction.h:47
The Layer class provides all supported geometry layers.
Definition: layer.h:42
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition: point.h:79
The TraceAnchor class.
Definition: trace.h:46
The Trace class represents a trace within a board.
Definition: trace.h:113
The Via class represents a via of a board.
Definition: via.h:52
Definition: occmodel.cpp:77
Definition: boardnetsegmentsplitter.h:50
JunctionList junctions
Definition: boardnetsegmentsplitter.h:51
TraceList traces
Definition: boardnetsegmentsplitter.h:53
ViaList vias
Definition: boardnetsegmentsplitter.h:52