netgen/libsrc/geom2d/splinegeometry2.hpp

104 lines
3.2 KiB
C++
Raw Normal View History

2009-01-13 04:40:13 +05:00
OLD IMPLEMENTATION, NOT USED ANYMORE!
#ifndef FILE_SPLINEGEOMETRY2
#define FILE_SPLINEGEOMETRY2
/**************************************************************************/
/* File: splinegeometry2.hpp */
/* Author: Joachim Schoeberl */
/* Date: 24. Jul. 96 */
/**************************************************************************/
#include "splinegeometry.hpp"
#ifdef OLDSPLINEGEOMETRY
///
extern void LoadBoundarySplines (const char * filename,
2009-01-25 17:35:25 +05:00
Array<GeomPoint2d> & geompoints,
Array<SplineSegment*> & splines,
2009-01-13 04:40:13 +05:00
double & elto0);
///
2009-01-25 17:35:25 +05:00
extern void PartitionBoundary (const Array<SplineSegment*> & splines,
2009-01-13 04:40:13 +05:00
double h, double elto0,
Mesh & mesh2d);
class CSGScanner;
class SplineGeometry2d
{
2009-01-25 17:35:25 +05:00
Array<GeomPoint2d> geompoints;
Array<SplineSegment*> splines;
2009-01-13 04:40:13 +05:00
double elto0;
private:
void AppendSegment(SplineSegment * spline, const int leftdomain, const int rightdomain,
const int bc,
const double reffac, const bool hprefleft, const bool hprefright,
const int copyfrom);
public:
~SplineGeometry2d();
void Load (const char * filename);
void CSGLoad (CSGScanner & scan);
void PartitionBoundary (double h, Mesh & mesh2d);
void CopyEdgeMesh (int from, int to, Mesh & mesh2d, Point3dTree & searchtree);
2009-01-25 17:35:25 +05:00
const Array<SplineSegment*> & GetSplines () const
2009-01-13 04:40:13 +05:00
{ return splines; }
int GetNSplines (void) const { return splines.Size(); }
string GetSplineType (const int i) const { return splines[i]->GetType(); }
SplineSegment & GetSpline (const int i) {return *splines[i];}
const SplineSegment & GetSpline (const int i) const {return *splines[i];}
void GetBoundingBox (Box<2> & box) const;
int GetNP () const { return geompoints.Size(); }
const GeomPoint2d & GetPoint(int i) const { return geompoints[i]; }
void SetGrading (const double grading);
void AppendPoint (const double x, const double y, const double reffac = 1., const bool hpref = false);
void AppendLineSegment (const int n1, const int n2,
const int leftdomain, const int rightdomain, const int bc = -1,
const double reffac = 1.,
const bool hprefleft = false, const bool hprefright = false,
const int copyfrom = -1);
void AppendSplineSegment (const int n1, const int n2, const int n3,
const int leftdomain, const int rightdomain, const int bc = -1,
const double reffac = 1.,
const bool hprefleft = false, const bool hprefright = false,
const int copyfrom = -1);
void AppendCircleSegment (const int n1, const int n2, const int n3,
const int leftdomain, const int rightdomain, const int bc = -1,
const double reffac = 1.,
const bool hprefleft = false, const bool hprefright = false,
const int copyfrom = -1);
2009-01-25 17:35:25 +05:00
void AppendDiscretePointsSegment (const Array< Point<2> > & points,
2009-01-13 04:40:13 +05:00
const int leftdomain, const int rightdomain, const int bc = -1,
const double reffac = 1.,
const bool hprefleft = false, const bool hprefright = false,
const int copyfrom = -1);
};
void MeshFromSpline2D (SplineGeometry2d & geometry,
2014-09-26 02:23:31 +06:00
shared_ptr<Mesh> & mesh,
2009-01-13 04:40:13 +05:00
MeshingParameters & mp);
#endif
#endif