35#ifndef NEKTAR_SPATIALDOMAINS_CADSYSTEM_CADCURVE
36#define NEKTAR_SPATIALDOMAINS_CADSYSTEM_CADCURVE
147 void SetAdjSurf(std::pair<CADSurfSharedPtr, CADOrientation::Orientation> i)
173 void SetVert(std::vector<CADVertSharedPtr> &falVert)
209 std::array<NekDouble, 3> &xyz) = 0;
#define SPATIAL_DOMAINS_EXPORT
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
base class for CAD curves.
virtual std::array< NekDouble, 6 > BoundingBox(NekDouble scale)=0
Returns the bounding box of a curve enlarged by 5e-3mm * scale.
virtual NekDouble tAtArcLength(NekDouble s)=0
Calculates the parametric coordinate and arclength location defined by s.
virtual NekDouble Curvature(NekDouble t)=0
Calculates the radius of curvature of the curve at point t.
virtual std::array< NekDouble, 3 > N(NekDouble t)=0
Returns the normal to a curve, it will always point in the concave direction.
void SetVert(std::vector< CADVertSharedPtr > &falVert)
assign ids of end vertices in main cad
std::vector< CADVertSharedPtr > m_mainVerts
list of end vertices
CADCurve()
Default constructor.
NekDouble GetTotLength()
returns lenght of the curve
std::array< NekDouble, 3 > NormalWRT(NekDouble t, int surf)
Returns the normal to the curve which is orientate with respect to the surface surf.
virtual void GetBounds(NekDouble &tmin, NekDouble &tmax)=0
Returns the minimum and maximum parametric coords t of the curve.
virtual NekDouble Length(NekDouble ti, NekDouble tf)=0
Calculates the arclength between the two paremetric points ti and tf. ti must be less than tf.
CADOrientation::Orientation GetOrienationWRT(int surf)
Returns the orientation of the curve with respect to a given surface by id surf.
std::vector< CADVertSharedPtr > GetVertex()
get the vertices that are the ends of the curve, which are in the main cad list
NekDouble m_length
Length of edge.
virtual void P(NekDouble t, NekDouble &x, NekDouble &y, NekDouble &z)=0
Gets the location (x,y,z) in an array out of the curve at point t.
virtual NekDouble GetMinDistance(std::array< NekDouble, 3 > &xyz)=0
Locates a point xyz in the parametric space. returns the distance to the point.
virtual std::array< NekDouble, 2 > GetBounds()=0
Returns the minimum and maximum parametric coords t of the curve.
std::vector< std::pair< std::weak_ptr< CADSurf >, CADOrientation::Orientation > > GetAdjSurf()
returns the ids of surfaces bound by this curve as well as their Orientation with respect to the loop...
std::vector< std::pair< std::weak_ptr< CADSurf >, CADOrientation::Orientation > > m_adjSurfs
List of surfaces which this curve belongs to.
virtual std::array< NekDouble, 9 > D2(NekDouble t)=0
Gets the second derivatives at t.
virtual std::array< NekDouble, 6 > GetMinMax()=0
Gets the start and end of the curve.
virtual std::array< NekDouble, 3 > P(NekDouble t)=0
Gets the location (x,y,z) in an array out of the curve at point t.
virtual NekDouble loct(std::array< NekDouble, 3 > xyz, NekDouble &t, NekDouble cf, NekDouble cl)=0
locates a point in the parametric space. returns the distance to the point and passes t by reference ...
virtual NekDouble loct(std::array< NekDouble, 3 > xyz, NekDouble &t)=0
locates a point in the parametric space. returns the distance to the point and passes t by reference ...
void SetAdjSurf(std::pair< CADSurfSharedPtr, CADOrientation::Orientation > i)
set the ids of the surfaces either side of the curve
CADType::cadType m_type
type of the cad object
base class for a cad surface
std::shared_ptr< CADCurve > CADCurveSharedPtr
std::shared_ptr< CADVert > CADVertSharedPtr
LibUtilities::NekFactory< std::string, CADCurve > CADCurveFactory
std::shared_ptr< CADSurf > CADSurfSharedPtr
CADCurveFactory & GetCADCurveFactory()