Topologic  0.8.9
TopologyUtility.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 "Shell.h"
20 
21 namespace Topologic {
25  namespace Utilities {
29  public ref class TopologyUtility
30  {
31  public:
32 
41  static Topology^ Translate(
42  Topology^ topology,
43 #ifdef TOPOLOGIC_DYNAMO
44  [Autodesk::DesignScript::Runtime::DefaultArgument("0.0")]
45 #endif
46  double x,
47 #ifdef TOPOLOGIC_DYNAMO
48  [Autodesk::DesignScript::Runtime::DefaultArgument("0.0")]
49 #endif
50  double y,
51 #ifdef TOPOLOGIC_DYNAMO
52  [Autodesk::DesignScript::Runtime::DefaultArgument("0.0")]
53 #endif
54  double z);
55 
66  static Topology^ Rotate(Topology^ topology,
67  Vertex^ origin,
68 #ifdef TOPOLOGIC_DYNAMO
69  [Autodesk::DesignScript::Runtime::DefaultArgument("0.0")]
70 #endif
71  double xVector,
72 #ifdef TOPOLOGIC_DYNAMO
73  [Autodesk::DesignScript::Runtime::DefaultArgument("0.0")]
74 #endif
75  double yVector,
76 #ifdef TOPOLOGIC_DYNAMO
77  [Autodesk::DesignScript::Runtime::DefaultArgument("0.0")]
78 #endif
79  double zVector,
80 #ifdef TOPOLOGIC_DYNAMO
81  [Autodesk::DesignScript::Runtime::DefaultArgument("0.0")]
82 #endif
83  double degree);
84 
94  static Topology^ Scale(Topology^ topology, Vertex^ origin,
95 #ifdef TOPOLOGIC_DYNAMO
96  [Autodesk::DesignScript::Runtime::DefaultArgument("1.0")]
97 #endif
98  double xFactor,
99 #ifdef TOPOLOGIC_DYNAMO
100  [Autodesk::DesignScript::Runtime::DefaultArgument("1.0")]
101 #endif
102  double yFactor,
103 #ifdef TOPOLOGIC_DYNAMO
104  [Autodesk::DesignScript::Runtime::DefaultArgument("1.0")]
105 #endif
106  double zFactor);
107 
125 #ifdef TOPOLOGIC_DYNAMO
126  [IsVisibleInDynamoLibrary(false)]
127 #endif
128  static Topology^ Transform(Topology^ topology,
129  double translationX, double translationY, double translationZ,
130  double rotation11, double rotation12, double rotation13,
131  double rotation21, double rotation22, double rotation23,
132  double rotation31, double rotation32, double rotation33);
133 
134 
142  static List<Topology^>^ AdjacentTopologies(Topology^ topology, Topology^ parentTopology, int typeFilter);
143  public protected:
144  TopologyUtility() {}
145 
146 
147  };
148  }
149 }
A Vertex is a zero-dimensional entity equivalent to a geometry point.
Definition: Vertex.h:31
A Topology is an abstract superclass that includes constructors, properties and methods used by other...
Definition: Topology.h:53
static Topology ^ Translate(Topology^ topology, double x, double y, double z)
Translates (moves) a Topology a certain distance according to XYZ values.
Definition: TopologyUtility.cpp:29
static List< Topology^> ^ AdjacentTopologies(Topology^ topology, Topology^ parentTopology, int typeFilter)
Returns a list of Topologies that are the adjacent to the input Topology.
Definition: TopologyUtility.cpp:89
TopologyUtility includes geometric methods relevant to any Topology.
Definition: TopologyUtility.h:29
static Topology ^ Rotate(Topology^ topology, Vertex^ origin, double xVector, double yVector, double zVector, double degree)
Rotates a Topology given an origin, XYZ vectors and an angle.
Definition: TopologyUtility.cpp:40
Topologic is an open-source software modelling library enabling hierarchical and topological represen...
Definition: About.h:23
static Topology ^ Transform(Topology^ topology, double translationX, double translationY, double translationZ, double rotation11, double rotation12, double rotation13, double rotation21, double rotation22, double rotation23, double rotation31, double rotation32, double rotation33)
Transforms a Topology according to translation and rotation factors.
Definition: TopologyUtility.cpp:69
static Topology ^ Scale(Topology^ topology, Vertex^ origin, double xFactor, double yFactor, double zFactor)
Scales a Topology according to an origin and XYZ factors.
Definition: TopologyUtility.cpp:56