Path: blob/devel/ElmerGUI/netgen/libsrc/geom2d/splinegeometry2.hpp
3206 views
12OLD IMPLEMENTATION, NOT USED ANYMORE!34567#ifndef FILE_SPLINEGEOMETRY28#define FILE_SPLINEGEOMETRY2910/**************************************************************************/11/* File: splinegeometry2.hpp */12/* Author: Joachim Schoeberl */13/* Date: 24. Jul. 96 */14/**************************************************************************/1516#include "splinegeometry.hpp"1718#ifdef OLDSPLINEGEOMETRY192021///22extern void LoadBoundarySplines (const char * filename,23ARRAY<GeomPoint2d> & geompoints,24ARRAY<SplineSegment*> & splines,25double & elto0);26///27extern void PartitionBoundary (const ARRAY<SplineSegment*> & splines,28double h, double elto0,29Mesh & mesh2d);303132class CSGScanner;3334class SplineGeometry2d35{36ARRAY<GeomPoint2d> geompoints;37ARRAY<SplineSegment*> splines;38double elto0;394041private:42void AppendSegment(SplineSegment * spline, const int leftdomain, const int rightdomain,43const int bc,44const double reffac, const bool hprefleft, const bool hprefright,45const int copyfrom);4647public:48~SplineGeometry2d();4950void Load (const char * filename);51void CSGLoad (CSGScanner & scan);52void PartitionBoundary (double h, Mesh & mesh2d);5354void CopyEdgeMesh (int from, int to, Mesh & mesh2d, Point3dTree & searchtree);5556const ARRAY<SplineSegment*> & GetSplines () const57{ return splines; }5859int GetNSplines (void) const { return splines.Size(); }60string GetSplineType (const int i) const { return splines[i]->GetType(); }61SplineSegment & GetSpline (const int i) {return *splines[i];}62const SplineSegment & GetSpline (const int i) const {return *splines[i];}6364void GetBoundingBox (Box<2> & box) const;6566int GetNP () const { return geompoints.Size(); }67const GeomPoint2d & GetPoint(int i) const { return geompoints[i]; }6869void SetGrading (const double grading);70void AppendPoint (const double x, const double y, const double reffac = 1., const bool hpref = false);7172void AppendLineSegment (const int n1, const int n2,73const int leftdomain, const int rightdomain, const int bc = -1,74const double reffac = 1.,75const bool hprefleft = false, const bool hprefright = false,76const int copyfrom = -1);77void AppendSplineSegment (const int n1, const int n2, const int n3,78const int leftdomain, const int rightdomain, const int bc = -1,79const double reffac = 1.,80const bool hprefleft = false, const bool hprefright = false,81const int copyfrom = -1);82void AppendCircleSegment (const int n1, const int n2, const int n3,83const int leftdomain, const int rightdomain, const int bc = -1,84const double reffac = 1.,85const bool hprefleft = false, const bool hprefright = false,86const int copyfrom = -1);87void AppendDiscretePointsSegment (const ARRAY< Point<2> > & points,88const int leftdomain, const int rightdomain, const int bc = -1,89const double reffac = 1.,90const bool hprefleft = false, const bool hprefright = false,91const int copyfrom = -1);9293};949596void MeshFromSpline2D (SplineGeometry2d & geometry,97Mesh *& mesh,98MeshingParameters & mp);99100#endif101102#endif103104105