netgen/libsrc/csg/edgeflw.hpp

113 lines
2.7 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,
2019-07-09 13:39:16 +05:00
const NgArray<SpecialPoint> & specpoints,
2009-09-07 17:50:13 +06:00
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;
2019-07-09 13:39:16 +05:00
NgArray<SpecialPoint> & specpoints;
2009-09-07 17:50:13 +06:00
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;
2014-08-30 06:15:59 +06:00
MeshingParameters & mparam;
2009-01-13 04:40:13 +05:00
2009-09-07 17:50:13 +06:00
public:
EdgeCalculation (const CSGeometry & ageometry,
2019-07-09 13:39:16 +05:00
NgArray<SpecialPoint> & aspecpoints,
2014-08-30 06:15:59 +06:00
MeshingParameters & amparam);
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,
2019-07-09 13:39:16 +05:00
// const NgArray<SpecialPoint> & hsp,
const NgArray<int> & hsp,
2009-09-07 17:50:13 +06:00
double h, const Mesh & mesh,
2019-07-09 13:39:16 +05:00
NgArray<Point<3> > & edgepoints,
NgArray<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,
2019-07-09 13:39:16 +05:00
const NgArray<Point<3> > & edgepoints,
NgArray<Segment> & refedges,
NgArray<bool> & refedgesinv);
void StoreEdge (const NgArray<Segment> & refedges,
const NgArray<bool> & refedgesinv,
const NgArray<Point<3> > & edgepoints,
const NgArray<double> & curvelength,
2009-09-07 17:50:13 +06:00
int layer,
Mesh & mesh);
2019-07-09 13:39:16 +05:00
void StoreShortEdge (const NgArray<Segment> & refedges,
const NgArray<bool> & refedgesinv,
const NgArray<Point<3> > & edgepoints,
const NgArray<double> & curvelength,
2009-09-07 17:50:13 +06:00
int layer,
Mesh & mesh);
2019-07-09 13:39:16 +05:00
void CopyEdge (const NgArray<Segment> & refedges,
const NgArray<bool> & refedgesinv,
2009-09-07 17:50:13 +06: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);
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