Topologic  0.8.9
EdgeUtility.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 "Edge.h"
20 
21 namespace Topologic {
25  namespace Utilities {
26 
30  public ref class EdgeUtility
31  {
32  public:
38  static Edge^ ByVertices(System::Collections::Generic::IEnumerable<Vertex^>^ vertices);
39 
52 #ifdef TOPOLOGIC_DYNAMO
53  [IsVisibleInDynamoLibrary(false)]
54 #endif
55  static Edge^ ByCircle(
56  Vertex^ centerPoint, double radius,
57  double xAxisX, double xAxisY, double xAxisZ,
58  double normalX, double normalY, double normalZ);
59 
73 #ifdef TOPOLOGIC_DYNAMO
74  [IsVisibleInDynamoLibrary(false)]
75 #endif
76  static Edge^ ByEllipse(
77  Vertex^ centerPoint, double majorRadius, double minorRadius,
78  double xAxisX, double xAxisY, double xAxisZ,
79  double normalX, double normalY, double normalZ);
80 
91 #ifdef TOPOLOGIC_DYNAMO
92  [IsVisibleInDynamoLibrary(false)]
93 #endif
94  static Edge^ ByNurbsCurve(
95  List<Vertex^>^ controlPoints,
96  List<double>^ knots,
97  List<double>^ weights,
98  int degree,
99  bool isPeriodic,
100  bool isRational);
101 
108  static double ParameterAtVertex(Edge^ edge, Vertex^ vertex);
109 
116  static Vertex^ VertexAtParameter(Edge^ edge, double u);
117 
124  static List<Wire^>^ AdjacentWires(Edge^ edge, Topology^ parentTopology);
125 
126  public protected:
127  EdgeUtility() {}
128  };
129  }
130 }
static Edge ^ ByCircle(Vertex^ centerPoint, double radius, double xAxisX, double xAxisY, double xAxisZ, double normalX, double normalY, double normalZ)
Creates an Edge by a circle.
Definition: EdgeUtility.cpp:45
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 Edge ^ ByVertices(System::Collections::Generic::IEnumerable< Vertex^>^ vertices)
Creates an Edge (of any type) by a set of Vertices.
Definition: EdgeUtility.cpp:27
EdgeUtility includes geometric methods relevant to an Edge.
Definition: EdgeUtility.h:30
An Edge is a one-dimensional entity defined by two vertices. It is important to note that while a top...
Definition: Edge.h:31
static List< Wire^> ^ AdjacentWires(Edge^ edge, Topology^ parentTopology)
Returns a list of Wires that are the adjacent to the input Edge.
Definition: EdgeUtility.cpp:103
static Edge ^ ByNurbsCurve(List< Vertex^>^ controlPoints, List< double >^ knots, List< double >^ weights, int degree, bool isPeriodic, bool isRational)
Creates an Edge by a NURBS curve.
Definition: EdgeUtility.cpp:59
Topologic is an open-source software modelling library enabling hierarchical and topological represen...
Definition: About.h:23
static Edge ^ ByEllipse(Vertex^ centerPoint, double majorRadius, double minorRadius, double xAxisX, double xAxisY, double xAxisZ, double normalX, double normalY, double normalZ)
Creates an Edge by an ellipse.
Definition: EdgeUtility.cpp:52
static double ParameterAtVertex(Edge^ edge, Vertex^ vertex)
Returns the parameter at a given Vertex on the Edge.
Definition: EdgeUtility.cpp:84
static Vertex ^ VertexAtParameter(Edge^ edge, double u)
Returns the Vertex at a given parameter of the Edge.
Definition: EdgeUtility.cpp:96