LibrePCB Developers Documentation
Loading...
Searching...
No Matches
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#include "boardpaddata.h"
30
31#include <QtCore>
32#include <QtWidgets>
33
34/*******************************************************************************
35 * Namespace / Forward Declarations
36 ******************************************************************************/
37namespace librepcb {
38
39class Layer;
40
41/*******************************************************************************
42 * Class BoardNetSegmentSplitter
43 ******************************************************************************/
44
49public:
50 // Types
57
58 // Constructors / Destructor
59 BoardNetSegmentSplitter() noexcept;
61 ~BoardNetSegmentSplitter() noexcept;
62
63 // General Methods
65 const Point& pos) noexcept;
66 void addJunction(const Junction& junction) noexcept;
67 void addPad(const BoardPadData& pad, bool replaceByJunctions) noexcept;
68 void addVia(const Via& via, bool replaceByJunctions) noexcept;
69 void addTrace(const Trace& trace) noexcept;
70 QList<Segment> split() noexcept;
71
72 // Operator Overloadings
74 delete;
75
76private: // Methods
78 const Layer& layer) noexcept;
80 const TraceAnchor& anchor,
81 QList<std::shared_ptr<BoardPadData>>& availablePads,
82 QList<std::shared_ptr<Via>>& availableVias,
83 QList<std::shared_ptr<Trace>>& availableTraces, Segment& segment)
84
85 noexcept;
86
87private: // Data
92
95};
96
97/*******************************************************************************
98 * End of File
99 ******************************************************************************/
100
101} // namespace librepcb
102
103#endif
The BoardNetSegmentSplitter class.
Definition boardnetsegmentsplitter.h:48
TraceList mTraces
Definition boardnetsegmentsplitter.h:91
void addPad(const BoardPadData &pad, bool replaceByJunctions) noexcept
Definition boardnetsegmentsplitter.cpp:59
TraceAnchor replaceAnchor(const TraceAnchor &anchor, const Layer &layer) noexcept
Definition boardnetsegmentsplitter.cpp:123
JunctionList mJunctions
Definition boardnetsegmentsplitter.h:88
QHash< QPair< TraceAnchor, const Layer * >, TraceAnchor > mReplacedAnchors
Definition boardnetsegmentsplitter.h:94
QList< Segment > split() noexcept
Definition boardnetsegmentsplitter.cpp:85
QHash< TraceAnchor, Point > mAnchorsToReplace
Definition boardnetsegmentsplitter.h:93
BoardNetSegmentSplitter() noexcept
Definition boardnetsegmentsplitter.cpp:39
ViaList mVias
Definition boardnetsegmentsplitter.h:90
void findConnectedLinesAndPoints(const TraceAnchor &anchor, QList< std::shared_ptr< BoardPadData > > &availablePads, QList< std::shared_ptr< Via > > &availableVias, QList< std::shared_ptr< Trace > > &availableTraces, Segment &segment) noexcept
Definition boardnetsegmentsplitter.cpp:141
void addTrace(const Trace &trace) noexcept
Definition boardnetsegmentsplitter.cpp:77
BoardPadDataList mPads
Definition boardnetsegmentsplitter.h:89
void addJunction(const Junction &junction) noexcept
Definition boardnetsegmentsplitter.cpp:55
void addVia(const Via &via, bool replaceByJunctions) noexcept
Definition boardnetsegmentsplitter.cpp:68
void replaceFootprintPadByJunctions(const TraceAnchor &anchor, const Point &pos) noexcept
Definition boardnetsegmentsplitter.cpp:50
The BoardPadData class represents a pad in a board.
Definition boardpaddata.h:43
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:78
The TraceAnchor class.
Definition trace.h:45
The Trace class represents a trace within a board.
Definition trace.h:123
The Via class represents a via of a board.
Definition via.h:55
Definition occmodel.cpp:77
Definition uuid.h:186
Definition boardnetsegmentsplitter.h:51
BoardPadDataList pads
Definition boardnetsegmentsplitter.h:53
JunctionList junctions
Definition boardnetsegmentsplitter.h:52
TraceList traces
Definition boardnetsegmentsplitter.h:55
ViaList vias
Definition boardnetsegmentsplitter.h:54