KiCad PCB EDA Suite
Loading...
Searching...
No Matches
conn_islands.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * 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 <https://www.gnu.org/licenses/>.
18 */
19
20#pragma once
21
23#include <map>
24
25namespace SCH_CONNECTIVITY
26{
35
37{
41 std::vector<PORT_FACT> ports;
42 std::optional<SEG> segment;
43 std::vector<PIN_GEOMETRY> pins;
44 std::vector<KIID> jumperedWith;
45 bool operator==( const ITEM_GEOMETRY& ) const = default;
46};
47
49{
50 std::vector<ITEM_GEOMETRY> items;
51 std::vector<KIID> attachedDirectives;
52 bool operator==( const SCREEN_GEOMETRY& ) const = default;
53};
54
56
60struct ISLAND
61{
63 bool hasWire = false;
64 bool hasBusLine = false;
65 std::vector<KIID> vertices;
66 std::vector<KIID> items;
67 std::vector<std::pair<KIID, KIID>> adjacency;
68 std::map<KIID, uint8_t> dangling;
69 std::vector<std::pair<KIID, KIID>> busEntryLinks;
70 std::vector<std::pair<KIID, KIID>> ncContacts;
71 bool operator==( const ISLAND& ) const = default;
72};
73
76{
77 std::vector<ISLAND> islands;
78 bool operator==( const SCREEN_ISLANDS& ) const = default;
79};
80
88SCREEN_ISLANDS BuildScreenIslands( const SCREEN_GEOMETRY& aGeometry, const std::vector<std::pair<KIID, int>>& aUnits );
89} // namespace SCH_CONNECTIVITY
Definition kiid.h:46
KIID niluuid(0)
Value keys and the key session of the schematic connectivity engine.
SCREEN_GEOMETRY GeometryOf(const SCREEN_FACTS &aFacts)
SCREEN_ISLANDS BuildScreenIslands(const SCREEN_GEOMETRY &aFacts, const std::vector< std::pair< KIID, int > > &aUnits)
Kindless geometry for one unit signature.
ELECTRICAL_PINTYPE
The symbol library pin object electrical types used in ERC tests.
Definition pin_type.h:32
@ PT_UNSPECIFIED
unknown electrical properties: creates always a warning when connected
Definition pin_type.h:41
The smallest set of items on one screen that the drawing connects.
bool operator==(const ISLAND &) const =default
std::vector< std::pair< KIID, KIID > > adjacency
std::vector< std::pair< KIID, KIID > > busEntryLinks
std::vector< std::pair< KIID, KIID > > ncContacts
std::vector< KIID > items
std::map< KIID, uint8_t > dangling
std::vector< KIID > vertices
KIID anchor
The smallest KIID in items, which names the island.
std::optional< SEG > segment
std::vector< PIN_GEOMETRY > pins
std::vector< PORT_FACT > ports
bool operator==(const ITEM_GEOMETRY &) const =default
std::vector< KIID > jumperedWith
bool operator==(const PIN_GEOMETRY &) const =default
The value copy of one screen.
Definition conn_facts.h:251
bool operator==(const SCREEN_GEOMETRY &) const =default
std::vector< KIID > attachedDirectives
std::vector< ITEM_GEOMETRY > items
The islands of one screen and unit signature, sorted by anchor.
bool operator==(const SCREEN_ISLANDS &) const =default
std::vector< ISLAND > islands
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition typeinfo.h:70
@ TYPE_NOT_INIT
Definition typeinfo.h:73
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:683