Topologic  0.8.9
CellComplex.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/CellComplex.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 
35  public ref class CellComplex : Topology
36  {
37  public:
43  static CellComplex^ ByCells(System::Collections::Generic::IEnumerable<Cell^>^ cells);
44 
50  static CellComplex^ ByFaces(System::Collections::Generic::IEnumerable<Face^>^ faces,
51 #ifdef TOPOLOGIC_DYNAMO
52  [Autodesk::DesignScript::Runtime::DefaultArgument("0.0001")]
53 #endif
54  double tolerance);
55 
60  property List<Cell^>^ Cells
61  {
62  List<Cell^>^ get();
63  }
64 
69  property List<Face^>^ Faces
70  {
71  List<Face^>^ get();
72  }
73 
78  property List<Shell^>^ Shells
79  {
80  List<Shell^>^ get();
81  }
82 
87  property List<Wire^>^ Wires
88  {
89  List<Wire^>^ get();
90  }
91 
96  property List<Edge^>^ Edges
97  {
98  List<Edge^>^ get();
99  }
100 
105  property List<Vertex^>^ Vertices
106  {
107  List<Vertex^>^ get();
108  }
109 
110 
116  {
117  Cell^ get();
118  }
119 
124  property List<Face^>^ InternalBoundaries
125  {
126  List<Face^>^ get();
127  }
128 
133  property List<Face^>^ NonManifoldFaces
134  {
135  List<Face^>^ get();
136  }
137 
142  property Object^ BasicGeometry
143  {
144  virtual Object^ get() override;
145  }
146 
151  static int Type();
152 
153  public protected:
154  CellComplex();
155 
159  CellComplex(const std::shared_ptr<TopologicCore::CellComplex>& kpCoreCellComplex);
160 
165  virtual std::shared_ptr<TopologicCore::TopologicalQuery> GetCoreTopologicalQuery() override;
166 
167  protected:
168  virtual ~CellComplex();
169 
173  std::shared_ptr<TopologicCore::CellComplex>* m_pCoreCellComplex;
174  };
175 }
static CellComplex ^ ByFaces(System::Collections::Generic::IEnumerable< Face^>^ faces, double tolerance)
Creates a CellComplex from the space enclosed by a set of Faces. Parts of the Faces which do not encl...
Definition: CellComplex.cpp:50
List< Face^>^ Faces
Returns the Faces constituent to the CellComplex.
Definition: CellComplex.h:69
List< Cell^>^ Cells
Returns the Cells constituent to the CellComplex.
Definition: CellComplex.h:60
A Topology is an abstract superclass that includes constructors, properties and methods used by other...
Definition: Topology.h:53
static int Type()
Returns the type associated to CellComplex.
Definition: CellComplex.cpp:239
virtual std::shared_ptr< TopologicCore::TopologicalQuery > GetCoreTopologicalQuery() override
Definition: CellComplex.cpp:258
List< Face^>^ NonManifoldFaces
Returns the non-manifold Faces of the CellComplex.
Definition: CellComplex.h:133
List< Wire^>^ Wires
Returns the Wires constituent to the CellComplex.
Definition: CellComplex.h:87
List< Shell^>^ Shells
Returns the Shells constituent to the CellComplex.
Definition: CellComplex.h:78
Object^ BasicGeometry
Creates a geometry from CellComplex.
Definition: CellComplex.h:142
std::shared_ptr< TopologicCore::CellComplex > * m_pCoreCellComplex
Definition: CellComplex.h:173
List< Vertex^>^ Vertices
Returns the Vertices constituent to the CellComplex.
Definition: CellComplex.h:105
Cell^ ExternalBoundary
Returns the external boundary (Cell) of the CellComplex.
Definition: CellComplex.h:115
Topologic is an open-source software modelling library enabling hierarchical and topological represen...
Definition: About.h:23
List< Edge^>^ Edges
Returns the Edges constituent to the CellComplex.
Definition: CellComplex.h:96
A Cell is a three-dimensional region defined by a collection of closed Shells. It may be manifold or ...
Definition: Cell.h:35
static CellComplex ^ ByCells(System::Collections::Generic::IEnumerable< Cell^>^ cells)
Creates a CellComplex by a set of Cells.
Definition: CellComplex.cpp:32
A CellComplex is a contiguous collection of Cells where adjacent Cells are connected by shared Faces...
Definition: CellComplex.h:35
List< Face^>^ InternalBoundaries
Returns the internal boundaries (Faces) of the CellComplex.
Definition: CellComplex.h:124