netgen/libsrc/csg/edgeflw.hpp

111 lines
2.5 KiB
C++
Raw Normal View History

2009-01-13 04:40:13 +05:00
#ifndef FILE_EDGEFLW
#define FILE_EDGEFLW
/**************************************************************************/
/* File: edgeflw.hh */
/* Author: Joachim Schoeberl */
/* Date: 01. Okt. 95 */
/**************************************************************************/
2009-09-07 17:50:13 +06:00
namespace netgen
{
/*
2009-01-13 04:40:13 +05:00
2009-09-07 17:50:13 +06:00
Edge - following function and
Projection to edge of implicitly given edge
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
/**
Calculates edges.
The edges of a solid geometry are computed. Special
points have to be given.
*/
extern void CalcEdges (const CSGeometry & geometry,
const Array<SpecialPoint> & specpoints,
double h, Mesh & mesh);
2009-01-13 04:40:13 +05:00
2009-09-07 17:50:13 +06:00
class EdgeCalculation
{
const CSGeometry & geometry;
Array<SpecialPoint> & specpoints;
Point3dTree * searchtree;
Point3dTree * meshpoint_tree;
int cntedge;
2009-01-13 04:40:13 +05:00
2009-09-07 17:50:13 +06:00
double ideps;
2009-01-13 04:40:13 +05:00
2009-09-07 17:50:13 +06:00
public:
EdgeCalculation (const CSGeometry & ageometry,
Array<SpecialPoint> & aspecpoints);
2009-01-13 04:40:13 +05:00
2009-09-07 17:50:13 +06:00
~EdgeCalculation();
2009-01-13 04:40:13 +05:00
2009-09-07 17:50:13 +06:00
void SetIdEps(const double epsin) {ideps = epsin;}
2009-01-13 04:40:13 +05:00
2009-09-07 17:50:13 +06:00
void Calc(double h, Mesh & mesh);
2009-01-13 04:40:13 +05:00
2009-09-07 17:50:13 +06:00
private:
void CalcEdges1 (double h, Mesh & mesh);
2009-01-13 04:40:13 +05:00
2009-09-07 17:50:13 +06:00
void FollowEdge (int pi1, int & ep, int & pos,
// const Array<SpecialPoint> & hsp,
const Array<int> & hsp,
double h, const Mesh & mesh,
Array<Point<3> > & edgepoints,
Array<double> & curvelength);
2009-01-13 04:40:13 +05:00
2009-09-07 17:50:13 +06:00
void AnalyzeEdge (int s1, int s2, int s1_rep, int s2_rep, int pos, int layer,
const Array<Point<3> > & edgepoints,
Array<Segment> & refedges,
Array<bool> & refedgesinv);
void StoreEdge (const Array<Segment> & refedges,
const Array<bool> & refedgesinv,
2009-01-25 17:35:25 +05:00
const Array<Point<3> > & edgepoints,
2009-09-07 17:50:13 +06:00
const Array<double> & curvelength,
int layer,
Mesh & mesh);
void StoreShortEdge (const Array<Segment> & refedges,
const Array<bool> & refedgesinv,
const Array<Point<3> > & edgepoints,
const Array<double> & curvelength,
int layer,
Mesh & mesh);
void CopyEdge (const Array<Segment> & refedges,
const Array<bool> & refedgesinv,
int copyfromedge,
const Point<3> & fromstart, const Point<3> & fromend,
const Point<3> & tostart, const Point<3> & toend,
int copyedgeidentification,
int layer,
Mesh & mesh);
2009-01-13 04:40:13 +05:00
2009-09-07 17:50:13 +06:00
void SplitEqualOneSegEdges (Mesh & mesh);
void FindClosedSurfaces (double h, Mesh & mesh);
2009-01-13 04:40:13 +05:00
2009-09-07 17:50:13 +06:00
public:
bool point_on_edge_problem;
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
}
2009-01-13 04:40:13 +05:00
#endif