Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ElmerCSC
GitHub Repository: ElmerCSC/elmerfem
Path: blob/devel/ElmerGUI/netgen/libsrc/csg/edgeflw.hpp
3206 views
1
#ifndef FILE_EDGEFLW
2
#define FILE_EDGEFLW
3
4
/**************************************************************************/
5
/* File: edgeflw.hh */
6
/* Author: Joachim Schoeberl */
7
/* Date: 01. Okt. 95 */
8
/**************************************************************************/
9
10
/*
11
12
Edge - following function and
13
Projection to edge of implicitly given edge
14
15
*/
16
17
18
/**
19
Calculates edges.
20
The edges of a solid geometry are computed. Special
21
points have to be given.
22
*/
23
extern void CalcEdges (const CSGeometry & geometry,
24
const ARRAY<SpecialPoint> & specpoints,
25
double h, Mesh & mesh);
26
27
28
29
30
31
class EdgeCalculation
32
{
33
const CSGeometry & geometry;
34
ARRAY<SpecialPoint> & specpoints;
35
Point3dTree * searchtree;
36
Point3dTree * meshpoint_tree;
37
int cntedge;
38
39
double ideps;
40
41
public:
42
EdgeCalculation (const CSGeometry & ageometry,
43
ARRAY<SpecialPoint> & aspecpoints);
44
45
~EdgeCalculation();
46
47
void SetIdEps(const double epsin) {ideps = epsin;}
48
49
void Calc(double h, Mesh & mesh);
50
51
52
private:
53
void CalcEdges1 (double h, Mesh & mesh);
54
55
56
void FollowEdge (int pi1, int & ep, int & pos,
57
// const ARRAY<SpecialPoint> & hsp,
58
const ARRAY<int> & hsp,
59
double h, const Mesh & mesh,
60
ARRAY<Point<3> > & edgepoints,
61
ARRAY<double> & curvelength);
62
63
64
void AnalyzeEdge (int s1, int s2, int s1_rep, int s2_rep, int pos, int layer,
65
const ARRAY<Point<3> > & edgepoints,
66
ARRAY<Segment> & refedges,
67
ARRAY<bool> & refedgesinv);
68
69
void StoreEdge (const ARRAY<Segment> & refedges,
70
const ARRAY<bool> & refedgesinv,
71
const ARRAY<Point<3> > & edgepoints,
72
const ARRAY<double> & curvelength,
73
int layer,
74
Mesh & mesh);
75
76
void StoreShortEdge (const ARRAY<Segment> & refedges,
77
const ARRAY<bool> & refedgesinv,
78
const ARRAY<Point<3> > & edgepoints,
79
const ARRAY<double> & curvelength,
80
int layer,
81
Mesh & mesh);
82
83
void CopyEdge (const ARRAY<Segment> & refedges,
84
const ARRAY<bool> & refedgesinv,
85
int copyfromedge,
86
const Point<3> & fromstart, const Point<3> & fromend,
87
const Point<3> & tostart, const Point<3> & toend,
88
int copyedgeidentification,
89
int layer,
90
Mesh & mesh);
91
92
93
void SplitEqualOneSegEdges (Mesh & mesh);
94
void FindClosedSurfaces (double h, Mesh & mesh);
95
96
97
public:
98
bool point_on_edge_problem;
99
100
};
101
102
103
104
#endif
105
106