Topologic  0.8.9
Cluster.h
1 // This file is part of Topologic software library.
2 // Copyright(C) 2019, Cardiff University and University College London
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
13 //
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <https://www.gnu.org/licenses/>.
16 
17 #pragma once
18 
19 #include <Topology.h>
20 
21 #include <TopologicCore/include/Cluster.h>
22 
23 namespace Topologic
24 {
25  ref class Vertex;
26  ref class Edge;
27  ref class Wire;
28  ref class Face;
29  ref class Shell;
30  ref class Cell;
31  ref class CellComplex;
32 
36 
37  public ref class Cluster : Topology
38  {
39 
40  public:
46  static Cluster^ ByTopologies(System::Collections::Generic::IEnumerable<Topology^>^ topologies);
47 
53 #ifdef TOPOLOGIC_DYNAMO
54  [IsVisibleInDynamoLibrary(false)]
55 #endif
56  Cluster^ AddTopology(Topology^ topology);
57 
63 #ifdef TOPOLOGIC_DYNAMO
64  [IsVisibleInDynamoLibrary(false)]
65 #endif
66  Cluster^ RemoveTopology(Topology^ topology);
67 
72  property Object^ BasicGeometry
73  {
74  virtual Object^ get() override;
75  }
76 
81  property List<Shell^>^ Shells
82  {
83  List<Shell^>^ get();
84  }
85 
90  property List<Face^>^ Faces
91  {
92  List<Face^>^ get();
93  }
94 
99  property List<Wire^>^ Wires
100  {
101  List<Wire^>^ get();
102  }
103 
108  property List<Edge^>^ Edges
109  {
110  List<Edge^>^ get();
111  }
112 
117  property List<Vertex^>^ Vertices
118  {
119  List<Vertex^>^ get();
120  }
121 
126  property List<Cell^>^ Cells
127  {
128  List<Cell^>^ get();
129  }
130 
135  property List<CellComplex^>^ CellComplexes
136  {
137  List<CellComplex^>^ get();
138  }
139 
144  static int Type();
145 
146  public protected:
147  Cluster();
148 
153  Cluster(const std::shared_ptr<TopologicCore::Cluster>& kpCoreCluster);
154 
159  virtual std::shared_ptr<TopologicCore::TopologicalQuery> GetCoreTopologicalQuery() override;
160 
161  protected:
162  virtual ~Cluster();
163 
167  std::shared_ptr<TopologicCore::Cluster>* m_pCoreCluster;
168  };
169 }
List< CellComplex^>^ CellComplexes
Returns the CellComplexes constituent to the Cluster.
Definition: Cluster.h:135
A Topology is an abstract superclass that includes constructors, properties and methods used by other...
Definition: Topology.h:53
Cluster ^ RemoveTopology(Topology^ topology)
Removes Topology from a Cluster and returns the resulting Topology.
Definition: Cluster.cpp:64
Cluster ^ AddTopology(Topology^ topology)
Adds Topology to a Cluster and returns the resulting Topology.
Definition: Cluster.cpp:52
static Cluster ^ ByTopologies(System::Collections::Generic::IEnumerable< Topology^>^ topologies)
Creates a Cluster by a set of Topologies.
Definition: Cluster.cpp:31
List< Wire^>^ Wires
Returns the Wires constituent to the Cluster.
Definition: Cluster.h:99
static int Type()
Returns the type associated to Cluster.
Definition: Cluster.cpp:93
virtual std::shared_ptr< TopologicCore::TopologicalQuery > GetCoreTopologicalQuery() override
Definition: Cluster.cpp:112
List< Cell^>^ Cells
Returns the Cells constituent to the Cluster.
Definition: Cluster.h:126
List< Vertex^>^ Vertices
Returns the Vertices constituent to the Cluster.
Definition: Cluster.h:117
List< Shell^>^ Shells
Returns the Shells constituent to the Cluster.
Definition: Cluster.h:81
List< Edge^>^ Edges
Returns the Edges constituent to the Cluster.
Definition: Cluster.h:108
List< Face^>^ Faces
Returns the Faces constituent to the Cluster.
Definition: Cluster.h:90
Topologic is an open-source software modelling library enabling hierarchical and topological represen...
Definition: About.h:23
A Cluster is a collection of any topologic entities. It may be contiguous or not and may be manifold ...
Definition: Cluster.h:37
std::shared_ptr< TopologicCore::Cluster > * m_pCoreCluster
Definition: Cluster.h:167
Object^ BasicGeometry
Creates a geometry from Cluster.
Definition: Cluster.h:72