/usr/share/netgen/libsrc/csg/spline3d.hpp is in netgen-headers 4.9.13.dfsg-8build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | namespace netgen
{
///
class splinesegment3d
{
///
Point<3> p1, p2, p3;
public:
///
splinesegment3d (const Point<3> & ap1, const Point<3> & ap2,
const Point<3> & ap3);
///
void Evaluate (double t, Point<3> & p) const;
///
void EvaluateTangent (double t, Vec<3> & tang) const;
///
const Point<3> & P1() const { return p1; }
///
const Point<3> & P2() const { return p2; }
///
const Point<3> & P3() const { return p3; }
};
///
class spline3d
{
///
Array<splinesegment3d *> segments;
public:
///
spline3d () { };
///
void AddSegment (const Point<3> & ap1, const Point<3> & ap2, const Point<3> & ap3);
///
int GetNumSegments () const { return segments.Size(); }
///
double ProjectToSpline (Point<3> & p) const;
///
double ProjectToSpline (Point<3> & p, double t) const;
///
void Evaluate (double t, Point<3> & p) const;
///
void EvaluateTangent (double t, Vec<3> & tang) const;
///
const Point<3> & P1(int i) const { return segments.Get(i)->P1(); }
///
const Point<3> & P2(int i) const { return segments.Get(i)->P2(); }
///
const Point<3> & P3(int i) const { return segments.Get(i)->P3(); }
};
///
class splinetube : public Surface
{
///
const spline3d & middlecurve;
///
double r;
/// Vec<3> ex, ey, ez;
Vec<2> e2x, e2y;
///
Point<3> cp;
public:
///
splinetube (const spline3d & amiddlecurve, double ar);
///
virtual void DefineTangentialPlane (const Point<3> & ap1, const Point<3> & ap2);
///
virtual void ToPlane (const Point<3> & p, Point<2> & pplain, double h, int & zone) const;
///
virtual void FromPlane (const Point<2> & pplain, Point<3> & p, double h) const;
///
virtual void Project (Point<3> & p) const;
// virtual int RootInBox (const box3d & box) const { return 0; }
/// 0 .. no, 1 .. yes, 2 .. maybe
virtual int BoxInSolid (const BoxSphere<3> & box) const;
/// 0 .. no, 1 .. yes, 2 .. maybe
virtual double CalcFunctionValue (const Point<3> & point) const;
///
virtual void CalcGradient (const Point<3> & point, Vec<3> & grad) const;
///
virtual double HesseNorm () const { return 0.5 / r; }
///
virtual Point<3> GetSurfacePoint () const;
///
virtual void Print (ostream & str) const;
};
}
|