netgen/libsrc/csg/edgeflw.hpp

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