2009-01-13 04:40:13 +05:00
|
|
|
#ifndef FILE_CURVE2D
|
|
|
|
#define FILE_CURVE2D
|
|
|
|
|
|
|
|
/**************************************************************************/
|
|
|
|
/* File: curve2d.hh */
|
|
|
|
/* Author: Joachim Schoeberl */
|
|
|
|
/* Date: 24. Jul. 96 */
|
|
|
|
/**************************************************************************/
|
|
|
|
|
2009-09-07 17:50:13 +06:00
|
|
|
namespace netgen
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2009-01-13 04:40:13 +05:00
|
|
|
|
Fix various typos
Found via `codespell -q 3 -S ./external_dependencies/pybind11 -L alledges,allright,ane,anormal,ans,apoints,ba,boxs,cancle,childs,co-ordinate,co-ordinates,daty,enty,filld,hel,identifyable,ist,linz,lod,ned,nd,selt,statics,suround,thev,thist,thisy,timere,upto,wel`
2022-03-26 03:21:48 +05:00
|
|
|
2D Curve representation
|
2009-01-13 04:40:13 +05:00
|
|
|
|
2009-09-07 17:50:13 +06:00
|
|
|
*/
|
2009-01-13 04:40:13 +05:00
|
|
|
|
|
|
|
|
|
|
|
|
2009-09-07 17:50:13 +06:00
|
|
|
///
|
|
|
|
class Curve2d : public Manifold
|
2009-01-13 04:40:13 +05:00
|
|
|
{
|
|
|
|
public:
|
2009-09-07 17:50:13 +06:00
|
|
|
///
|
|
|
|
virtual void Project (Point<2> & p) const = 0;
|
|
|
|
///
|
|
|
|
virtual void NormalVector (const Point<2> & p, Vec<2> & n) const = 0;
|
2009-01-13 04:40:13 +05:00
|
|
|
};
|
|
|
|
|
|
|
|
///
|
2009-09-07 17:50:13 +06:00
|
|
|
class CircleCurve2d : public Curve2d
|
|
|
|
{
|
|
|
|
///
|
|
|
|
Point<2> center;
|
|
|
|
///
|
|
|
|
double rad;
|
2009-01-13 04:40:13 +05:00
|
|
|
public:
|
2009-09-07 17:50:13 +06:00
|
|
|
///
|
|
|
|
CircleCurve2d (const Point<2> & acenter, double arad);
|
|
|
|
///
|
|
|
|
virtual void Project (Point<2> & p) const;
|
|
|
|
///
|
|
|
|
virtual void NormalVector (const Point<2> & p, Vec<2> & n) const;
|
2009-01-13 04:40:13 +05:00
|
|
|
};
|
|
|
|
|
|
|
|
///
|
2009-09-07 17:50:13 +06:00
|
|
|
class QuadraticCurve2d : public Curve2d
|
|
|
|
{
|
|
|
|
///
|
|
|
|
double cxx, cyy, cxy, cx, cy, c;
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
QuadraticCurve2d ();
|
|
|
|
///
|
|
|
|
void Read (istream & ist);
|
|
|
|
///
|
|
|
|
virtual void Project (Point<2> & p) const;
|
|
|
|
///
|
|
|
|
virtual void NormalVector (const Point<2> & p, Vec<2> & n) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2009-01-13 04:40:13 +05:00
|
|
|
#endif
|