Topologic  0.8.9
Shell.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/Shell.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 Cell;
30 
34 
35  public ref class Shell : Topology
36  {
37  public:
42  property List<Cell^>^ Cells
43  {
44  List<Cell^>^ get();
45  }
46 
51  property List<Face^>^ Faces
52  {
53  List<Face^>^ get();
54  }
55 
60  property List<Wire^>^ Wires
61  {
62  List<Wire^>^ get();
63  }
64 
69  property List<Edge^>^ Edges
70  {
71  List<Edge^>^ get();
72  }
73 
78  property List<Vertex^>^ Vertices
79  {
80  List<Vertex^>^ get();
81  }
82 
87  property bool IsClosed {
88  bool get();
89  }
90 
97 #ifdef TOPOLOGIC_DYNAMO
98  static Shell^ ByFaces(System::Collections::Generic::IEnumerable<Face^>^ faces, [DefaultArgument("0.0001")] double tolerance);
99 #else
100  static Shell^ ByFaces(System::Collections::Generic::IEnumerable<Face^>^ faces, double tolerance);
101 #endif
102 
107  property Object^ BasicGeometry
108  {
109  virtual Object^ get() override;
110  }
111 
116  static int Type();
117 
118  public protected:
119  Shell();
120 
125  Shell(const std::shared_ptr<TopologicCore::Shell>& kpCoreShell);
126 
131  virtual std::shared_ptr<TopologicCore::TopologicalQuery> GetCoreTopologicalQuery() override;
132 
133  protected:
134  virtual ~Shell();
135 
139  std::shared_ptr<TopologicCore::Shell>* m_pCoreShell;
140  };
141 }
static Shell ^ ByFaces(System::Collections::Generic::IEnumerable< Face^>^ faces, double tolerance)
Creates a Shell by a set of connected Faces.
Definition: Shell.cpp:118
List< Cell^>^ Cells
Returns the Cells bounded by the Shell.
Definition: Shell.h:42
A Topology is an abstract superclass that includes constructors, properties and methods used by other...
Definition: Topology.h:53
A Shell is a contiguous collection of Faces, where adjacent Faces are connected by shared Edges...
Definition: Shell.h:35
List< Vertex^>^ Vertices
Returns the Vertices constituent to the Shell.
Definition: Shell.h:78
bool IsClosed
Checks if the Shell is closed.
Definition: Shell.h:87
List< Face^>^ Faces
Returns the Faces constituent to the Shell.
Definition: Shell.h:51
virtual std::shared_ptr< TopologicCore::TopologicalQuery > GetCoreTopologicalQuery() override
Definition: Shell.cpp:200
List< Edge^>^ Edges
Returns the Edges constituent to the Shell.
Definition: Shell.h:69
Topologic is an open-source software modelling library enabling hierarchical and topological represen...
Definition: About.h:23
std::shared_ptr< TopologicCore::Shell > * m_pCoreShell
Definition: Shell.h:139
Object^ BasicGeometry
Creates a geometry from Shell.
Definition: Shell.h:107
static int Type()
Returns the type associated to Shell.
Definition: Shell.cpp:181
List< Wire^>^ Wires
Returns the Wires constituent to the Shell.
Definition: Shell.h:60