LibrePCB Developers Documentation
boarddesignrulecheckmessages.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_BOARDDESIGNRULECHECKMESSAGES_H
21#define LIBREPCB_CORE_BOARDDESIGNRULECHECKMESSAGES_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
26#include "../../../rulecheck/rulecheckmessage.h"
28
29#include <QtCore>
30
31/*******************************************************************************
32 * Namespace / Forward Declarations
33 ******************************************************************************/
34namespace librepcb {
35
36/*******************************************************************************
37 * Class DrcHoleRef
38 ******************************************************************************/
39
40struct DrcHoleRef {
42
43 bool isPadHole() const noexcept { return mDevice && mPad && mHole; }
44 bool isViaHole() const noexcept { return mSegment && mVia; }
45 bool isPlated() const noexcept { return isPadHole() || isViaHole(); }
46 const QString& getNetName() const noexcept { return mNetName; }
47 const Data::Pad* getPad() const noexcept { return mPad; }
48 PositiveLength getDiameter() const noexcept {
49 if (mHole) {
50 return mHole->diameter;
51 } else if (mVia) {
52 return mVia->drillDiameter;
53 } else {
54 Q_ASSERT(false);
55 qCritical() << "DrcHoleRef: Unknown object type.";
56 return PositiveLength(1);
57 }
58 }
59 void serialize(SExpression& node) const;
60
61 static DrcHoleRef boardHole(const Data::Hole& hole) {
62 DrcHoleRef obj;
63 obj.mHole = &hole;
64 return obj;
65 }
66 static DrcHoleRef deviceHole(const Data::Device& device,
67 const Data::Hole& hole) {
68 DrcHoleRef obj;
69 obj.mDevice = &device;
70 obj.mHole = &hole;
71 return obj;
72 }
73 static DrcHoleRef padHole(const Data::Device& device, const Data::Pad& pad,
74 const Data::Hole& hole) {
75 DrcHoleRef obj;
76 obj.mDevice = &device;
77 obj.mPad = &pad;
78 obj.mHole = &hole;
79 obj.mNetName = pad.netName;
80 return obj;
81 }
82 static DrcHoleRef via(const Data::Segment& segment, const Data::Via& via) {
83 DrcHoleRef obj;
84 obj.mSegment = &segment;
85 obj.mVia = &via;
86 obj.mNetName = segment.netName;
87 return obj;
88 }
89
90private:
91 const Data::Hole* mHole = nullptr;
92 const Data::Segment* mSegment = nullptr;
93 const Data::Via* mVia = nullptr;
94 const Data::Device* mDevice = nullptr;
95 const Data::Pad* mPad = nullptr;
96 QString mNetName; // Empty if no net.
97};
98
99/*******************************************************************************
100 * Class DrcMsgMissingDevice
101 ******************************************************************************/
102
107 Q_DECLARE_TR_FUNCTIONS(DrcMsgMissingDevice)
108
109public:
110 // Constructors / Destructor
112 DrcMsgMissingDevice(const Uuid& uuid, const QString& name) noexcept;
114 : RuleCheckMessage(other) {}
115 virtual ~DrcMsgMissingDevice() noexcept {}
116};
117
118/*******************************************************************************
119 * Class DrcMsgMissingConnection
120 ******************************************************************************/
121
126 Q_DECLARE_TR_FUNCTIONS(DrcMsgMissingConnection)
127
128public:
130 struct Anchor {
131 QString getName() const;
132 void serialize(SExpression& node) const;
133
134 static Anchor pad(const Data::Device& device, const Data::Pad& pad) {
135 Anchor obj;
136 obj.mDevice = &device;
137 obj.mPad = &pad;
138 return obj;
139 }
140 static Anchor junction(const Data::Segment& segment,
141 const Data::Junction& junction) {
142 Anchor obj;
143 obj.mSegment = &segment;
144 obj.mJunction = &junction;
145 return obj;
146 }
147 static Anchor via(const Data::Segment& segment, const Data::Via& via) {
148 Anchor obj;
149 obj.mSegment = &segment;
150 obj.mVia = &via;
151 return obj;
152 }
153
154 private:
155 // Either it's a pad...
156 const Data::Device* mDevice = nullptr;
157 const Data::Pad* mPad = nullptr;
158 // ... or a junction or via
159 const Data::Segment* mSegment = nullptr;
160 const Data::Junction* mJunction = nullptr;
161 const Data::Via* mVia = nullptr;
162 };
163
164 // Constructors / Destructor
166 DrcMsgMissingConnection(const Anchor& p1, const Anchor& p2,
167 const QString& netName,
168 const QVector<Path>& locations);
170 : RuleCheckMessage(other) {}
171 virtual ~DrcMsgMissingConnection() noexcept {}
172};
173
174/*******************************************************************************
175 * Class DrcMsgMissingBoardOutline
176 ******************************************************************************/
177
182 Q_DECLARE_TR_FUNCTIONS(DrcMsgMissingBoardOutline)
183
184public:
185 // Constructors / Destructor
186 DrcMsgMissingBoardOutline() noexcept;
188 : RuleCheckMessage(other) {}
189 virtual ~DrcMsgMissingBoardOutline() noexcept {}
190};
191
192/*******************************************************************************
193 * Class DrcMsgMultipleBoardOutlines
194 ******************************************************************************/
195
200 Q_DECLARE_TR_FUNCTIONS(DrcMsgMultipleBoardOutlines)
201
202public:
203 // Constructors / Destructor
204 explicit DrcMsgMultipleBoardOutlines(const QVector<Path>& locations) noexcept;
206 : RuleCheckMessage(other) {}
207 virtual ~DrcMsgMultipleBoardOutlines() noexcept {}
208};
209
210/*******************************************************************************
211 * Class DrcMsgOpenBoardOutlinePolygon
212 ******************************************************************************/
213
218 Q_DECLARE_TR_FUNCTIONS(DrcMsgOpenBoardOutlinePolygon)
219
220public:
221 // Constructors / Destructor
223 DrcMsgOpenBoardOutlinePolygon(const Uuid& polygon,
224 const tl::optional<Uuid>& device,
225 const QVector<Path>& locations) noexcept;
227 const DrcMsgOpenBoardOutlinePolygon& other) noexcept
228 : RuleCheckMessage(other) {}
229 virtual ~DrcMsgOpenBoardOutlinePolygon() noexcept {}
230};
231
232/*******************************************************************************
233 * Class DrcMsgMinimumBoardOutlineInnerRadiusViolation
234 ******************************************************************************/
235
240 : public RuleCheckMessage {
242
243public:
244 // Constructors / Destructor
247 const UnsignedLength& minRadius, const QVector<Path>& locations) noexcept;
250 : RuleCheckMessage(other) {}
252};
253
254/*******************************************************************************
255 * Class DrcMsgEmptyNetSegment
256 ******************************************************************************/
257
262 Q_DECLARE_TR_FUNCTIONS(DrcMsgEmptyNetSegment)
263
264public:
266
267 // Constructors / Destructor
269 explicit DrcMsgEmptyNetSegment(const Data::Segment& ns) noexcept;
271 : RuleCheckMessage(other) {}
272 virtual ~DrcMsgEmptyNetSegment() noexcept {}
273};
274
275/*******************************************************************************
276 * Class DrcMsgUnconnectedJunction
277 ******************************************************************************/
278
283 Q_DECLARE_TR_FUNCTIONS(DrcMsgUnconnectedJunction)
284
285public:
287
288 // Constructors / Destructor
291 const Data::Segment& ns,
292 const QVector<Path>& locations) noexcept;
294 : RuleCheckMessage(other) {}
295 virtual ~DrcMsgUnconnectedJunction() noexcept {}
296};
297
298/*******************************************************************************
299 * Class DrcMsgMinimumTextHeightViolation
300 ******************************************************************************/
301
306 Q_DECLARE_TR_FUNCTIONS(DrcMsgMinimumTextHeightViolation)
307
308public:
310
311 // Constructors / Destructor
314 const Data::Device* device,
315 const UnsignedLength& minHeight,
316 const QVector<Path>& locations) noexcept;
318 const DrcMsgMinimumTextHeightViolation& other) noexcept
319 : RuleCheckMessage(other) {}
321};
322
323/*******************************************************************************
324 * Class DrcMsgMinimumWidthViolation
325 ******************************************************************************/
326
331 Q_DECLARE_TR_FUNCTIONS(DrcMsgMinimumWidthViolation)
332
333public:
335
336 // Constructors / Destructor
339 const Data::Trace& trace,
340 const UnsignedLength& minWidth,
341 const QVector<Path>& locations) noexcept;
343 const UnsignedLength& minWidth,
344 const QVector<Path>& locations) noexcept;
346 const UnsignedLength& minWidth,
347 const QVector<Path>& locations) noexcept;
349 const Data::Device* device,
350 const UnsignedLength& minWidth,
351 const QVector<Path>& locations) noexcept;
353 const Data::Polygon& polygon,
354 const UnsignedLength& minWidth,
355 const QVector<Path>& locations) noexcept;
357 const Data::Circle& circle,
358 const UnsignedLength& minWidth,
359 const QVector<Path>& locations) noexcept;
361 : RuleCheckMessage(other) {}
362 virtual ~DrcMsgMinimumWidthViolation() noexcept {}
363};
364
365/*******************************************************************************
366 * Class DrcMsgCopperCopperClearanceViolation
367 ******************************************************************************/
368
373 Q_DECLARE_TR_FUNCTIONS(DrcMsgCopperCopperClearanceViolation)
374
375public:
377
378 struct Object {
379 QString getName() const;
380 void serialize(SExpression& node) const;
381
382 static Object pad(const Data::Pad& pad, const Data::Device& device) {
383 Object obj;
384 obj.mPad = &pad;
385 obj.mDevice = &device;
386 obj.mNetName = pad.netName;
387 return obj;
388 }
390 const Data::Segment& segment) {
391 Object obj;
392 obj.mTrace = &trace;
393 obj.mSegment = &segment;
394 obj.mNetName = segment.netName;
395 return obj;
396 }
397 static Object via(const Data::Via& via, const Data::Segment& segment) {
398 Object obj;
399 obj.mVia = &via;
400 obj.mSegment = &segment;
401 obj.mNetName = segment.netName;
402 return obj;
403 }
404 static Object plane(const Data::Plane& plane) {
405 Object obj;
406 obj.mPlane = &plane;
407 obj.mNetName = plane.netName;
408 return obj;
409 }
411 const Data::Device* device) {
412 Object obj;
413 obj.mPolygon = &polygon;
414 obj.mDevice = device;
415 return obj;
416 }
418 const Data::Device* device) {
419 Object obj;
420 obj.mCircle = &circle;
421 obj.mDevice = device;
422 return obj;
423 }
425 const Data::Device* device) {
426 Object obj;
427 obj.mStrokeText = &txt;
428 obj.mDevice = device;
429 return obj;
430 }
431
432 bool operator==(const Object& rhs) const {
433 std::unique_ptr<SExpression> obj1 = SExpression::createList("object");
434 serialize(*obj1);
435 std::unique_ptr<SExpression> obj2 = SExpression::createList("object");
436 rhs.serialize(*obj2);
437 return (*obj1) == (*obj2);
438 }
439
440 private:
441 // Actual object (one of them)
442 const Data::Pad* mPad = nullptr;
443 const Data::Trace* mTrace = nullptr;
444 const Data::Via* mVia = nullptr;
445 const Data::Plane* mPlane = nullptr;
446 const Data::Polygon* mPolygon = nullptr;
447 const Data::Circle* mCircle = nullptr;
449
450 // Optional context (depending on object type)
451 const Data::Segment* mSegment = nullptr;
452 const Data::Device* mDevice = nullptr;
453 QString mNetName; // Empty if no net.
454 };
455
456 // Constructors / Destructor
458 DrcMsgCopperCopperClearanceViolation(const Object& obj1, const Object& obj2,
459 const QSet<const Layer*>& layers,
460 const Length& minClearance,
461 const QVector<Path>& locations);
463 const DrcMsgCopperCopperClearanceViolation& other) noexcept
464 : RuleCheckMessage(other) {}
466
467private:
468 static QString getLayerName(const QSet<const Layer*>& layers);
469};
470
471/*******************************************************************************
472 * Class DrcMsgCopperBoardClearanceViolation
473 ******************************************************************************/
474
479 Q_DECLARE_TR_FUNCTIONS(DrcMsgCopperBoardClearanceViolation)
480
481public:
483
484 // Constructors / Destructor
487 const Data::Via& via,
488 const UnsignedLength& minClearance,
489 const QVector<Path>& locations) noexcept;
491 const Data::Trace& trace,
492 const UnsignedLength& minClearance,
493 const QVector<Path>& locations) noexcept;
495 const Data::Pad& pad,
496 const UnsignedLength& minClearance,
497 const QVector<Path>& locations) noexcept;
499 const UnsignedLength& minClearance,
500 const QVector<Path>& locations) noexcept;
502 const Data::Device* device,
503 const UnsignedLength& minClearance,
504 const QVector<Path>& locations) noexcept;
506 const Data::Circle& circle,
507 const UnsignedLength& minClearance,
508 const QVector<Path>& locations) noexcept;
510 const Data::Device* device,
511 const UnsignedLength& minClearance,
512 const QVector<Path>& locations) noexcept;
514 const DrcMsgCopperBoardClearanceViolation& other) noexcept
515 : RuleCheckMessage(other) {}
517};
518
519/*******************************************************************************
520 * Class DrcMsgCopperHoleClearanceViolation
521 ******************************************************************************/
522
527 Q_DECLARE_TR_FUNCTIONS(DrcMsgCopperHoleClearanceViolation)
528
529public:
531
532 // Constructors / Destructor
535 const Data::Device* device,
536 const UnsignedLength& minClearance,
537 const QVector<Path>& locations) noexcept;
539 const DrcMsgCopperHoleClearanceViolation& other) noexcept
540 : RuleCheckMessage(other) {}
542};
543
544/*******************************************************************************
545 * Class DrcMsgCopperInKeepoutZone
546 ******************************************************************************/
547
552 Q_DECLARE_TR_FUNCTIONS(DrcMsgCopperInKeepoutZone)
553
554public:
556
557 // Constructors / Destructor
560 const Data::Device* zoneDevice,
561 const Data::Device& device, const Data::Pad& pad,
562 const QVector<Path>& locations) noexcept;
564 const Data::Device* zoneDevice,
565 const Data::Segment& ns, const Data::Via& via,
566 const QVector<Path>& locations) noexcept;
568 const Data::Device* zoneDevice,
569 const Data::Segment& ns, const Data::Trace& trace,
570 const QVector<Path>& locations) noexcept;
572 const Data::Device* zoneDevice,
573 const Data::Polygon& polygon,
574 const QVector<Path>& locations) noexcept;
576 const Data::Device* zoneDevice,
577 const Data::Device& device,
578 const Data::Polygon& polygon,
579 const QVector<Path>& locations) noexcept;
581 const Data::Device* zoneDevice,
582 const Data::Device& device,
583 const Data::Circle& circle,
584 const QVector<Path>& locations) noexcept;
586 : RuleCheckMessage(other) {}
587 virtual ~DrcMsgCopperInKeepoutZone() noexcept {}
588
589private:
590 void addZoneApprovalNodes(const Data::Zone& zone,
591 const Data::Device* zoneDevice) noexcept;
592 static QString getDescription() noexcept;
593};
594
595/*******************************************************************************
596 * Class DrcMsgDrillDrillClearanceViolation
597 ******************************************************************************/
598
603 Q_DECLARE_TR_FUNCTIONS(DrcMsgDrillDrillClearanceViolation)
604
605public:
606 // Constructors / Destructor
609 const DrcHoleRef& hole2,
610 const UnsignedLength& minClearance,
611 const QVector<Path>& locations);
613 const DrcMsgDrillDrillClearanceViolation& other) noexcept
614 : RuleCheckMessage(other) {}
616};
617
618/*******************************************************************************
619 * Class DrcMsgDrillBoardClearanceViolation
620 ******************************************************************************/
621
626 Q_DECLARE_TR_FUNCTIONS(DrcMsgDrillBoardClearanceViolation)
627
628public:
629 // Constructors / Destructor
632 const UnsignedLength& minClearance,
633 const QVector<Path>& locations) noexcept;
635 const DrcMsgDrillBoardClearanceViolation& other) noexcept
636 : RuleCheckMessage(other) {}
638};
639
640/*******************************************************************************
641 * Class DrcMsgDeviceInCourtyard
642 ******************************************************************************/
643
648 Q_DECLARE_TR_FUNCTIONS(DrcMsgDeviceInCourtyard)
649
650public:
652
653 // Constructors / Destructor
656 const Data::Device& device2,
657 const QVector<Path>& locations) noexcept;
659 : RuleCheckMessage(other) {}
660 virtual ~DrcMsgDeviceInCourtyard() noexcept {}
661};
662
663/*******************************************************************************
664 * Class DrcMsgOverlappingDevices
665 ******************************************************************************/
666
671 Q_DECLARE_TR_FUNCTIONS(DrcMsgOverlappingDevices)
672
673public:
675
676 // Constructors / Destructor
679 const Data::Device& device2,
680 const QVector<Path>& locations) noexcept;
682 : RuleCheckMessage(other) {}
683 virtual ~DrcMsgOverlappingDevices() noexcept {}
684};
685
686/*******************************************************************************
687 * Class DrcMsgDeviceInKeepoutZone
688 ******************************************************************************/
689
694 Q_DECLARE_TR_FUNCTIONS(DrcMsgDeviceInKeepoutZone)
695
696public:
698
699 // Constructors / Destructor
702 const Data::Device* zoneDevice,
703 const Data::Device& device,
704 const QVector<Path>& locations) noexcept;
706 : RuleCheckMessage(other) {}
707 virtual ~DrcMsgDeviceInKeepoutZone() noexcept {}
708
709private:
710 void addZoneApprovalNodes(const Data::Zone& zone,
711 const Data::Device* zoneDevice) noexcept;
712 static QString getDescription() noexcept;
713};
714
715/*******************************************************************************
716 * Class DrcMsgExposureInKeepoutZone
717 ******************************************************************************/
718
723 Q_DECLARE_TR_FUNCTIONS(DrcMsgExposureInKeepoutZone)
724
725public:
727
728 // Constructors / Destructor
731 const Data::Device* zoneDevice,
732 const Data::Device& device, const Data::Pad& pad,
733 const QVector<Path>& locations) noexcept;
735 const Data::Device* zoneDevice,
736 const Data::Segment& ns, const Data::Via& via,
737 const QVector<Path>& locations) noexcept;
739 const Data::Device* zoneDevice,
740 const Data::Polygon& polygon,
741 const QVector<Path>& locations) noexcept;
743 const Data::Device* zoneDevice,
744 const Data::Device& device,
745 const Data::Polygon& polygon,
746 const QVector<Path>& locations) noexcept;
748 const Data::Device* zoneDevice,
749 const Data::Device& device,
750 const Data::Circle& circle,
751 const QVector<Path>& locations) noexcept;
753 : RuleCheckMessage(other) {}
754 virtual ~DrcMsgExposureInKeepoutZone() noexcept {}
755
756private:
757 void addZoneApprovalNodes(const Data::Zone& zone,
758 const Data::Device* zoneDevice) noexcept;
759 static QString getDescription() noexcept;
760};
761
762/*******************************************************************************
763 * Class DrcMsgMinimumAnnularRingViolation
764 ******************************************************************************/
765
770 Q_DECLARE_TR_FUNCTIONS(DrcMsgMinimumAnnularRingViolation)
771
772public:
774
775 // Constructors / Destructor
778 const Data::Via& via,
779 const UnsignedLength& minAnnularWidth,
780 const QVector<Path>& locations) noexcept;
782 const Data::Pad& pad,
783 const UnsignedLength& minAnnularWidth,
784 const QVector<Path>& locations) noexcept;
786 const DrcMsgMinimumAnnularRingViolation& other) noexcept
787 : RuleCheckMessage(other) {}
789};
790
791/*******************************************************************************
792 * Class DrcMsgMinimumDrillDiameterViolation
793 ******************************************************************************/
794
799 Q_DECLARE_TR_FUNCTIONS(DrcMsgMinimumDrillDiameterViolation)
800
801public:
802 // Constructors / Destructor
805 const UnsignedLength& minDiameter,
806 const QVector<Path>& locations) noexcept;
808 const DrcMsgMinimumDrillDiameterViolation& other) noexcept
809 : RuleCheckMessage(other) {}
811
812private:
813 static QString determineMessage(const DrcHoleRef& hole,
814 const UnsignedLength& minDiameter) noexcept;
815 static QString determineDescription(const DrcHoleRef& hole) noexcept;
816};
817
818/*******************************************************************************
819 * Class DrcMsgMinimumSlotWidthViolation
820 ******************************************************************************/
821
826 Q_DECLARE_TR_FUNCTIONS(DrcMsgMinimumSlotWidthViolation)
827
828public:
829 // Constructors / Destructor
832 const UnsignedLength& minWidth,
833 const QVector<Path>& locations) noexcept;
835 const DrcMsgMinimumSlotWidthViolation& other) noexcept
836 : RuleCheckMessage(other) {}
838
839private:
840 static QString determineMessage(bool plated,
841 const PositiveLength& actualWidth,
842 const UnsignedLength& minWidth) noexcept;
843 static QString determineDescription(bool plated) noexcept;
844};
845
846/*******************************************************************************
847 * Class DrcMsgInvalidPadConnection
848 ******************************************************************************/
849
854 Q_DECLARE_TR_FUNCTIONS(DrcMsgInvalidPadConnection)
855
856public:
858
859 // Constructors / Destructor
861 DrcMsgInvalidPadConnection(const Data::Device& device, const Data::Pad& pad,
862 const Layer& layer,
863 const QVector<Path>& locations) noexcept;
865 : RuleCheckMessage(other) {}
866 virtual ~DrcMsgInvalidPadConnection() noexcept {}
867};
868
869/*******************************************************************************
870 * Class DrcMsgForbiddenSlot
871 ******************************************************************************/
872
877 Q_DECLARE_TR_FUNCTIONS(DrcMsgForbiddenSlot)
878
879public:
881
882 // Constructors / Destructor
884 DrcMsgForbiddenSlot(const Data::Hole& hole, const Data::Device* device,
885 const Data::Pad* pad,
886 const QVector<Path>& locations) noexcept;
888 : RuleCheckMessage(other) {}
889 virtual ~DrcMsgForbiddenSlot() noexcept {}
890
891private:
892 static QString determineMessage(const NonEmptyPath& path) noexcept;
893 static QString determineDescription(const NonEmptyPath& path) noexcept;
894};
895
896/*******************************************************************************
897 * Class DrcMsgForbiddenVia
898 ******************************************************************************/
899
904 Q_DECLARE_TR_FUNCTIONS(DrcMsgForbiddenVia)
905
906public:
908
909 // Constructors / Destructor
911 DrcMsgForbiddenVia(const Data::Segment& ns, const Data::Via& via,
912 const QVector<Path>& locations) noexcept;
914 : RuleCheckMessage(other) {}
915 virtual ~DrcMsgForbiddenVia() noexcept {}
916
917private:
918 static QString determineMessage(const Data::Segment& ns,
919 const Data::Via& via) noexcept;
920 static QString determineDescription(const Data::Via& via) noexcept;
921};
922
923/*******************************************************************************
924 * Class DrcMsgSilkscreenClearanceViolation
925 ******************************************************************************/
926
931 Q_DECLARE_TR_FUNCTIONS(DrcMsgSilkscreenClearanceViolation)
932
933public:
935
936 // Constructors / Destructor
939 const Data::Device* device,
940 const UnsignedLength& minClearance,
941 const QVector<Path>& locations) noexcept;
943 const DrcMsgSilkscreenClearanceViolation& other) noexcept
944 : RuleCheckMessage(other) {}
946};
947
948/*******************************************************************************
949 * Class DrcMsgUselessZone
950 ******************************************************************************/
951
956 Q_DECLARE_TR_FUNCTIONS(DrcMsgUselessZone)
957
958public:
960
961 // Constructors / Destructor
963 DrcMsgUselessZone(const Data::Zone& zone,
964 const QVector<Path>& locations) noexcept;
966 : RuleCheckMessage(other) {}
967 virtual ~DrcMsgUselessZone() noexcept {}
968};
969
970/*******************************************************************************
971 * Class DrcMsgUselessVia
972 ******************************************************************************/
973
977class DrcMsgUselessVia final : public RuleCheckMessage {
978 Q_DECLARE_TR_FUNCTIONS(DrcMsgUselessVia)
979
980public:
982
983 // Constructors / Destructor
985 DrcMsgUselessVia(const Data::Segment& ns, const Data::Via& via,
986 const QVector<Path>& locations) noexcept;
987 DrcMsgUselessVia(const DrcMsgUselessVia& other) noexcept
988 : RuleCheckMessage(other) {}
989 virtual ~DrcMsgUselessVia() noexcept {}
990};
991
992/*******************************************************************************
993 * Class DrcMsgDisabledLayer
994 ******************************************************************************/
995
1000 Q_DECLARE_TR_FUNCTIONS(DrcMsgDisabledLayer)
1001
1002public:
1003 // Constructors / Destructor
1005 explicit DrcMsgDisabledLayer(const Layer& layer) noexcept;
1007 : RuleCheckMessage(other) {}
1008 virtual ~DrcMsgDisabledLayer() noexcept {}
1009};
1010
1011/*******************************************************************************
1012 * Class DrcMsgUnusedLayer
1013 ******************************************************************************/
1014
1019 Q_DECLARE_TR_FUNCTIONS(DrcMsgUnusedLayer)
1020
1021public:
1022 // Constructors / Destructor
1024 explicit DrcMsgUnusedLayer(const Layer& layer) noexcept;
1026 : RuleCheckMessage(other) {}
1027 virtual ~DrcMsgUnusedLayer() noexcept {}
1028};
1029
1030/*******************************************************************************
1031 * End of File
1032 ******************************************************************************/
1033
1034} // namespace librepcb
1035
1036#endif
The DrcMsgCopperBoardClearanceViolation class.
Definition: boarddesignrulecheckmessages.h:478
DrcMsgCopperBoardClearanceViolation(const DrcMsgCopperBoardClearanceViolation &other) noexcept
Definition: boarddesignrulecheckmessages.h:513
virtual ~DrcMsgCopperBoardClearanceViolation() noexcept
Definition: boarddesignrulecheckmessages.h:516
The DrcMsgCopperCopperClearanceViolation class.
Definition: boarddesignrulecheckmessages.h:372
DrcMsgCopperCopperClearanceViolation(const DrcMsgCopperCopperClearanceViolation &other) noexcept
Definition: boarddesignrulecheckmessages.h:462
static QString getLayerName(const QSet< const Layer * > &layers)
Definition: boarddesignrulecheckmessages.cpp:608
virtual ~DrcMsgCopperCopperClearanceViolation() noexcept
Definition: boarddesignrulecheckmessages.h:465
The DrcMsgCopperHoleClearanceViolation class.
Definition: boarddesignrulecheckmessages.h:526
DrcMsgCopperHoleClearanceViolation(const DrcMsgCopperHoleClearanceViolation &other) noexcept
Definition: boarddesignrulecheckmessages.h:538
virtual ~DrcMsgCopperHoleClearanceViolation() noexcept
Definition: boarddesignrulecheckmessages.h:541
The DrcMsgCopperInKeepoutZone class.
Definition: boarddesignrulecheckmessages.h:551
void addZoneApprovalNodes(const Data::Zone &zone, const Data::Device *zoneDevice) noexcept
Definition: boarddesignrulecheckmessages.cpp:906
static QString getDescription() noexcept
Definition: boarddesignrulecheckmessages.cpp:917
DrcMsgCopperInKeepoutZone(const DrcMsgCopperInKeepoutZone &other) noexcept
Definition: boarddesignrulecheckmessages.h:585
virtual ~DrcMsgCopperInKeepoutZone() noexcept
Definition: boarddesignrulecheckmessages.h:587
The DrcMsgDeviceInCourtyard class.
Definition: boarddesignrulecheckmessages.h:647
virtual ~DrcMsgDeviceInCourtyard() noexcept
Definition: boarddesignrulecheckmessages.h:660
DrcMsgDeviceInCourtyard(const DrcMsgDeviceInCourtyard &other) noexcept
Definition: boarddesignrulecheckmessages.h:658
The DrcMsgDeviceInKeepoutZone class.
Definition: boarddesignrulecheckmessages.h:693
virtual ~DrcMsgDeviceInKeepoutZone() noexcept
Definition: boarddesignrulecheckmessages.h:707
DrcMsgDeviceInKeepoutZone(const DrcMsgDeviceInKeepoutZone &other) noexcept
Definition: boarddesignrulecheckmessages.h:705
The DrcMsgDisabledLayer class.
Definition: boarddesignrulecheckmessages.h:999
DrcMsgDisabledLayer(const DrcMsgDisabledLayer &other) noexcept
Definition: boarddesignrulecheckmessages.h:1006
virtual ~DrcMsgDisabledLayer() noexcept
Definition: boarddesignrulecheckmessages.h:1008
The DrcMsgDrillBoardClearanceViolation class.
Definition: boarddesignrulecheckmessages.h:625
virtual ~DrcMsgDrillBoardClearanceViolation() noexcept
Definition: boarddesignrulecheckmessages.h:637
DrcMsgDrillBoardClearanceViolation(const DrcMsgDrillBoardClearanceViolation &other) noexcept
Definition: boarddesignrulecheckmessages.h:634
The DrcMsgDrillDrillClearanceViolation class.
Definition: boarddesignrulecheckmessages.h:602
virtual ~DrcMsgDrillDrillClearanceViolation() noexcept
Definition: boarddesignrulecheckmessages.h:615
DrcMsgDrillDrillClearanceViolation(const DrcMsgDrillDrillClearanceViolation &other) noexcept
Definition: boarddesignrulecheckmessages.h:612
The DrcMsgEmptyNetSegment class.
Definition: boarddesignrulecheckmessages.h:261
virtual ~DrcMsgEmptyNetSegment() noexcept
Definition: boarddesignrulecheckmessages.h:272
DrcMsgEmptyNetSegment(const DrcMsgEmptyNetSegment &other) noexcept
Definition: boarddesignrulecheckmessages.h:270
The DrcMsgExposureInKeepoutZone class.
Definition: boarddesignrulecheckmessages.h:722
DrcMsgExposureInKeepoutZone(const DrcMsgExposureInKeepoutZone &other) noexcept
Definition: boarddesignrulecheckmessages.h:752
virtual ~DrcMsgExposureInKeepoutZone() noexcept
Definition: boarddesignrulecheckmessages.h:754
The DrcMsgForbiddenSlot class.
Definition: boarddesignrulecheckmessages.h:876
DrcMsgForbiddenSlot(const DrcMsgForbiddenSlot &other) noexcept
Definition: boarddesignrulecheckmessages.h:887
virtual ~DrcMsgForbiddenSlot() noexcept
Definition: boarddesignrulecheckmessages.h:889
The DrcMsgForbiddenVia class.
Definition: boarddesignrulecheckmessages.h:903
virtual ~DrcMsgForbiddenVia() noexcept
Definition: boarddesignrulecheckmessages.h:915
DrcMsgForbiddenVia(const DrcMsgForbiddenVia &other) noexcept
Definition: boarddesignrulecheckmessages.h:913
The DrcMsgInvalidPadConnection class.
Definition: boarddesignrulecheckmessages.h:853
DrcMsgInvalidPadConnection(const DrcMsgInvalidPadConnection &other) noexcept
Definition: boarddesignrulecheckmessages.h:864
virtual ~DrcMsgInvalidPadConnection() noexcept
Definition: boarddesignrulecheckmessages.h:866
The DrcMsgMinimumAnnularRingViolation class.
Definition: boarddesignrulecheckmessages.h:769
virtual ~DrcMsgMinimumAnnularRingViolation() noexcept
Definition: boarddesignrulecheckmessages.h:788
DrcMsgMinimumAnnularRingViolation(const DrcMsgMinimumAnnularRingViolation &other) noexcept
Definition: boarddesignrulecheckmessages.h:785
The DrcMsgMinimumBoardOutlineInnerRadiusViolation class.
Definition: boarddesignrulecheckmessages.h:240
DrcMsgMinimumBoardOutlineInnerRadiusViolation(const DrcMsgMinimumBoardOutlineInnerRadiusViolation &other) noexcept
Definition: boarddesignrulecheckmessages.h:248
virtual ~DrcMsgMinimumBoardOutlineInnerRadiusViolation() noexcept
Definition: boarddesignrulecheckmessages.h:251
The DrcMsgMinimumDrillDiameterViolation class.
Definition: boarddesignrulecheckmessages.h:798
DrcMsgMinimumDrillDiameterViolation(const DrcMsgMinimumDrillDiameterViolation &other) noexcept
Definition: boarddesignrulecheckmessages.h:807
virtual ~DrcMsgMinimumDrillDiameterViolation() noexcept
Definition: boarddesignrulecheckmessages.h:810
The DrcMsgMinimumSlotWidthViolation class.
Definition: boarddesignrulecheckmessages.h:825
virtual ~DrcMsgMinimumSlotWidthViolation() noexcept
Definition: boarddesignrulecheckmessages.h:837
DrcMsgMinimumSlotWidthViolation(const DrcMsgMinimumSlotWidthViolation &other) noexcept
Definition: boarddesignrulecheckmessages.h:834
The DrcMsgMinimumTextHeightViolation class.
Definition: boarddesignrulecheckmessages.h:305
DrcMsgMinimumTextHeightViolation(const DrcMsgMinimumTextHeightViolation &other) noexcept
Definition: boarddesignrulecheckmessages.h:317
virtual ~DrcMsgMinimumTextHeightViolation() noexcept
Definition: boarddesignrulecheckmessages.h:320
The DrcMsgMinimumWidthViolation class.
Definition: boarddesignrulecheckmessages.h:330
virtual ~DrcMsgMinimumWidthViolation() noexcept
Definition: boarddesignrulecheckmessages.h:362
DrcMsgMinimumWidthViolation(const DrcMsgMinimumWidthViolation &other) noexcept
Definition: boarddesignrulecheckmessages.h:360
The DrcMsgMissingBoardOutline class.
Definition: boarddesignrulecheckmessages.h:181
DrcMsgMissingBoardOutline() noexcept
Definition: boarddesignrulecheckmessages.cpp:195
virtual ~DrcMsgMissingBoardOutline() noexcept
Definition: boarddesignrulecheckmessages.h:189
DrcMsgMissingBoardOutline(const DrcMsgMissingBoardOutline &other) noexcept
Definition: boarddesignrulecheckmessages.h:187
The DrcMsgMissingConnection class.
Definition: boarddesignrulecheckmessages.h:125
DrcMsgMissingConnection(const DrcMsgMissingConnection &other) noexcept
Definition: boarddesignrulecheckmessages.h:169
virtual ~DrcMsgMissingConnection() noexcept
Definition: boarddesignrulecheckmessages.h:171
The DrcMsgMissingDevice class.
Definition: boarddesignrulecheckmessages.h:106
DrcMsgMissingDevice(const DrcMsgMissingDevice &other) noexcept
Definition: boarddesignrulecheckmessages.h:113
virtual ~DrcMsgMissingDevice() noexcept
Definition: boarddesignrulecheckmessages.h:115
The DrcMsgMultipleBoardOutlines class.
Definition: boarddesignrulecheckmessages.h:199
virtual ~DrcMsgMultipleBoardOutlines() noexcept
Definition: boarddesignrulecheckmessages.h:207
DrcMsgMultipleBoardOutlines(const QVector< Path > &locations) noexcept
Definition: boarddesignrulecheckmessages.cpp:210
DrcMsgMultipleBoardOutlines(const DrcMsgMultipleBoardOutlines &other) noexcept
Definition: boarddesignrulecheckmessages.h:205
The DrcMsgOpenBoardOutlinePolygon class.
Definition: boarddesignrulecheckmessages.h:217
DrcMsgOpenBoardOutlinePolygon(const DrcMsgOpenBoardOutlinePolygon &other) noexcept
Definition: boarddesignrulecheckmessages.h:226
virtual ~DrcMsgOpenBoardOutlinePolygon() noexcept
Definition: boarddesignrulecheckmessages.h:229
The DrcMsgOverlappingDevices class.
Definition: boarddesignrulecheckmessages.h:670
virtual ~DrcMsgOverlappingDevices() noexcept
Definition: boarddesignrulecheckmessages.h:683
DrcMsgOverlappingDevices(const DrcMsgOverlappingDevices &other) noexcept
Definition: boarddesignrulecheckmessages.h:681
The DrcMsgSilkscreenClearanceViolation class.
Definition: boarddesignrulecheckmessages.h:930
DrcMsgSilkscreenClearanceViolation(const DrcMsgSilkscreenClearanceViolation &other) noexcept
Definition: boarddesignrulecheckmessages.h:942
virtual ~DrcMsgSilkscreenClearanceViolation() noexcept
Definition: boarddesignrulecheckmessages.h:945
The DrcMsgUnconnectedJunction class.
Definition: boarddesignrulecheckmessages.h:282
virtual ~DrcMsgUnconnectedJunction() noexcept
Definition: boarddesignrulecheckmessages.h:295
DrcMsgUnconnectedJunction(const DrcMsgUnconnectedJunction &other) noexcept
Definition: boarddesignrulecheckmessages.h:293
The DrcMsgUnusedLayer class.
Definition: boarddesignrulecheckmessages.h:1018
DrcMsgUnusedLayer(const DrcMsgUnusedLayer &other) noexcept
Definition: boarddesignrulecheckmessages.h:1025
virtual ~DrcMsgUnusedLayer() noexcept
Definition: boarddesignrulecheckmessages.h:1027
The DrcMsgUselessVia class.
Definition: boarddesignrulecheckmessages.h:977
virtual ~DrcMsgUselessVia() noexcept
Definition: boarddesignrulecheckmessages.h:989
DrcMsgUselessVia(const DrcMsgUselessVia &other) noexcept
Definition: boarddesignrulecheckmessages.h:987
The DrcMsgUselessZone class.
Definition: boarddesignrulecheckmessages.h:955
DrcMsgUselessZone(const DrcMsgUselessZone &other) noexcept
Definition: boarddesignrulecheckmessages.h:965
virtual ~DrcMsgUselessZone() noexcept
Definition: boarddesignrulecheckmessages.h:967
The Layer class provides all supported geometry layers.
Definition: layer.h:42
The Length class is used to represent a length (for example 12.75 millimeters)
Definition: length.h:83
The RuleCheckMessage class.
Definition: rulecheckmessage.h:45
The SExpression class.
Definition: sexpression.h:69
static std::unique_ptr< SExpression > createList(const QString &name)
Definition: sexpression.cpp:399
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition: uuid.h:58
Definition: occmodel.cpp:77
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition: length.h:812
type_safe::constrained_type< Path, NonEmptyPathConstraint, NonEmptyPathVerifier > NonEmptyPath
Definition: path.h:222
type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier > UnsignedLength
Definition: length.h:696
Definition: boarddesignrulecheckdata.h:111
Definition: boarddesignrulecheckdata.h:155
Definition: boarddesignrulecheckdata.h:129
PositiveLength diameter
Definition: boarddesignrulecheckdata.h:131
Definition: boarddesignrulecheckdata.h:49
Definition: boarddesignrulecheckdata.h:142
QString netName
Definition: boarddesignrulecheckdata.h:153
Definition: boarddesignrulecheckdata.h:95
Definition: boarddesignrulecheckdata.h:104
Definition: boarddesignrulecheckdata.h:74
QString netName
Definition: boarddesignrulecheckdata.h:77
Definition: boarddesignrulecheckdata.h:119
Definition: boarddesignrulecheckdata.h:54
Definition: boarddesignrulecheckdata.h:61
PositiveLength drillDiameter
Definition: boarddesignrulecheckdata.h:65
Definition: boarddesignrulecheckdata.h:135
Input data structure for librepcb::BoardDesignRuleCheck.
Definition: boarddesignrulecheckdata.h:48
Definition: boarddesignrulecheckmessages.h:40
static DrcHoleRef via(const Data::Segment &segment, const Data::Via &via)
Definition: boarddesignrulecheckmessages.h:82
QString mNetName
Definition: boarddesignrulecheckmessages.h:96
bool isPadHole() const noexcept
Definition: boarddesignrulecheckmessages.h:43
static DrcHoleRef padHole(const Data::Device &device, const Data::Pad &pad, const Data::Hole &hole)
Definition: boarddesignrulecheckmessages.h:73
const QString & getNetName() const noexcept
Definition: boarddesignrulecheckmessages.h:46
static DrcHoleRef boardHole(const Data::Hole &hole)
Definition: boarddesignrulecheckmessages.h:61
const Data::Hole * mHole
Definition: boarddesignrulecheckmessages.h:91
const Data::Pad * getPad() const noexcept
Definition: boarddesignrulecheckmessages.h:47
PositiveLength getDiameter() const noexcept
Definition: boarddesignrulecheckmessages.h:48
void serialize(SExpression &node) const
Definition: boarddesignrulecheckmessages.cpp:73
static DrcHoleRef deviceHole(const Data::Device &device, const Data::Hole &hole)
Definition: boarddesignrulecheckmessages.h:66
const Data::Via * mVia
Definition: boarddesignrulecheckmessages.h:93
const Data::Pad * mPad
Definition: boarddesignrulecheckmessages.h:95
const Data::Device * mDevice
Definition: boarddesignrulecheckmessages.h:94
bool isPlated() const noexcept
Definition: boarddesignrulecheckmessages.h:45
const Data::Segment * mSegment
Definition: boarddesignrulecheckmessages.h:92
bool isViaHole() const noexcept
Definition: boarddesignrulecheckmessages.h:44
Definition: boarddesignrulecheckmessages.h:378
static Object pad(const Data::Pad &pad, const Data::Device &device)
Definition: boarddesignrulecheckmessages.h:382
bool operator==(const Object &rhs) const
Definition: boarddesignrulecheckmessages.h:432
QString mNetName
Definition: boarddesignrulecheckmessages.h:453
const Data::Plane * mPlane
Definition: boarddesignrulecheckmessages.h:445
static Object plane(const Data::Plane &plane)
Definition: boarddesignrulecheckmessages.h:404
const Data::Polygon * mPolygon
Definition: boarddesignrulecheckmessages.h:446
static Object polygon(const Data::Polygon &polygon, const Data::Device *device)
Definition: boarddesignrulecheckmessages.h:410
const Data::StrokeText * mStrokeText
Definition: boarddesignrulecheckmessages.h:448
static Object via(const Data::Via &via, const Data::Segment &segment)
Definition: boarddesignrulecheckmessages.h:397
const Data::Circle * mCircle
Definition: boarddesignrulecheckmessages.h:447
QString getName() const
Definition: boarddesignrulecheckmessages.cpp:491
void serialize(SExpression &node) const
Definition: boarddesignrulecheckmessages.cpp:520
static Object strokeText(const Data::StrokeText &txt, const Data::Device *device)
Definition: boarddesignrulecheckmessages.h:424
const Data::Trace * mTrace
Definition: boarddesignrulecheckmessages.h:443
static Object circle(const Data::Circle &circle, const Data::Device *device)
Definition: boarddesignrulecheckmessages.h:417
const Data::Via * mVia
Definition: boarddesignrulecheckmessages.h:444
const Data::Pad * mPad
Definition: boarddesignrulecheckmessages.h:442
const Data::Device * mDevice
Definition: boarddesignrulecheckmessages.h:452
static Object trace(const Data::Trace &trace, const Data::Segment &segment)
Definition: boarddesignrulecheckmessages.h:389
const Data::Segment * mSegment
Definition: boarddesignrulecheckmessages.h:451
Definition: boarddesignrulecheckmessages.h:130
QString getName() const
Definition: boarddesignrulecheckmessages.cpp:123
static Anchor junction(const Data::Segment &segment, const Data::Junction &junction)
Definition: boarddesignrulecheckmessages.h:140
void serialize(SExpression &node) const
Definition: boarddesignrulecheckmessages.cpp:141
const Data::Via * mVia
Definition: boarddesignrulecheckmessages.h:161
const Data::Junction * mJunction
Definition: boarddesignrulecheckmessages.h:160
const Data::Pad * mPad
Definition: boarddesignrulecheckmessages.h:157
static Anchor pad(const Data::Device &device, const Data::Pad &pad)
Definition: boarddesignrulecheckmessages.h:134
static Anchor via(const Data::Segment &segment, const Data::Via &via)
Definition: boarddesignrulecheckmessages.h:147
const Data::Device * mDevice
Definition: boarddesignrulecheckmessages.h:156
const Data::Segment * mSegment
Definition: boarddesignrulecheckmessages.h:159