Commit d5971429 authored by Michael Turner's avatar Michael Turner

more documentation and remove duplicate function from surf

parent 951f2442
......@@ -97,6 +97,9 @@ public:
*/
virtual Array<OneD, NekDouble> D2(NekDouble t) = 0;
/**
* @brief Calculates the radius of curvature of the curve at point t
*/
virtual NekDouble Curvature(NekDouble t) = 0;
/**
......@@ -126,10 +129,11 @@ public:
}
/*
* @brief returns the ids of neigbouring surfaces
* @brief returns the ids of surfaces bound by this curve as well as their
* Orientation with respect to the loop of curves
*/
std::vector<std::pair<CADSurfSharedPtr, CADOrientation::Orientation> >
GetAdjSurf()
GetAdjSurf()
{
return m_adjSurfs;
}
......@@ -166,6 +170,10 @@ public:
virtual NekDouble loct(Array<OneD, NekDouble> xyz,
NekDouble &t) = 0;
/**
* @brief Returns the orientation of the curve with respect to a given
* surface by id surf
*/
CADOrientation::Orientation GetOrienationWRT(int surf)
{
for (int i = 0; i < m_adjSurfs.size(); i++)
......@@ -180,7 +188,16 @@ public:
return CADOrientation::eUnknown;
}
/**
* @brief Returns the normal to the curve which is orientate with respect
* to the surface surf
*/
virtual Array<OneD, NekDouble> NormalWRT(NekDouble t, int surf) = 0;
/**
* @brief Returns the normal to a curve, it will always point in the concave
* direction
*/
virtual Array<OneD, NekDouble> N(NekDouble t) = 0;
protected:
......
......@@ -70,6 +70,9 @@ public:
{
}
/**
* @brief Static function which orientates the edge loop on a surface
*/
static void OrientateEdges(
CADSurfSharedPtr surf, std::vector<CADSystem::EdgeLoopSharedPtr> &ein);
......@@ -81,6 +84,9 @@ public:
return m_edges;
}
/**
* @brief Set the edge loop
*/
void SetEdges(std::vector<CADSystem::EdgeLoopSharedPtr> ein)
{
m_edges = ein;
......@@ -134,6 +140,9 @@ public:
*/
virtual NekDouble locuv(Array<OneD, NekDouble> p, Array<OneD, NekDouble> &uv) = 0;
/**
* @brief Returns the bounding box of the surface
*/
virtual Array<OneD, NekDouble> BoundingBox() = 0;
/**
......@@ -141,6 +150,9 @@ public:
*/
virtual NekDouble Curvature(Array<OneD, NekDouble> uv) = 0;
/**
* @brief Is the surface defined by a planar surface (i.e not nurbs and is flat)
*/
virtual bool IsPlanar() = 0;
/**
......@@ -151,24 +163,12 @@ public:
return m_orientation;
}
void SetName(std::string i)
{
m_name = i;
}
std::string GetName()
{
return m_name;
}
protected:
/// List of bounding edges in loops with orientation.
std::vector<CADSystem::EdgeLoopSharedPtr> m_edges;
/// Function which tests the the value of uv used is within the surface
virtual void Test(Array<OneD, NekDouble> uv) = 0;
std::string m_name;
};
typedef std::shared_ptr<CADSurf> CADSurfSharedPtr;
......
......@@ -107,6 +107,9 @@ public:
}
}
/**
* @brief Calcuate the distance to a vertex from a point l(x,y,z)
*/
virtual NekDouble DistanceTo(Array<OneD, NekDouble> l) = 0;
void AddAdjCurve(CADCurveSharedPtr c)
......@@ -114,6 +117,9 @@ public:
curves.push_back(c);
}
/**
* @brief Get list of CAD curves which are bound by this vertex
*/
std::vector<CADCurveSharedPtr> GetAdjCurves()
{
return curves;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment