Fade2D Documentation pages v1.97
Delaunay Features
MeshGenParams.h
Go to the documentation of this file.
1 // Copyright (C) Geom Software e.U, Bernhard Kornberger, Graz/Austria
2 //
3 // This file is part of the Fade2D library. The student license is free
4 // of charge and covers personal non-commercial research. Licensees
5 // holding a commercial license may use this file in accordance with
6 // the Commercial License Agreement.
7 //
8 // This software is provided AS IS with NO WARRANTY OF ANY KIND,
9 // INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS
10 // FOR A PARTICULAR PURPOSE.
11 //
12 // Please contact the author if any conditions of this licensing are
13 // not clear to you.
14 //
15 // Author: Bernhard Kornberger, bkorn (at) geom.at
16 // http://www.geom.at
17 
19 #pragma once
20 #include "common.h"
21 #include "Vector2.h"
22 
23 
24 #if GEOM_PSEUDO3D==GEOM_TRUE
25  namespace GEOM_FADE25D {
26 #elif GEOM_PSEUDO3D==GEOM_FALSE
27  namespace GEOM_FADE2D {
28 #else
29  #error GEOM_PSEUDO3D is not defined
30 #endif
31 
32 
33 class Triangle2; // Forward
34 class Zone2; // Forward
35 class Fade_2D; // Forward
36 class ConstraintSegment2; // Forward
41 template <typename T> inline void unusedParameter(const T&){}
42 
43 
44 
57 class CLASS_DECLSPEC MeshGenParams
58 {
59 public:
60  explicit MeshGenParams(Zone2* pZone_):
61 #if GEOM_PSEUDO3D==GEOM_TRUE
62  // *** These two parameters exist only in Fade2.5D ***
63  pHeightGuideTriangulation(NULL),
64  maxHeightError(DBL_MAX),
65 #endif
66  pZone(pZone_),
67  minAngleDegree(20.0),
68  minEdgeLength(1e-3),
69  maxEdgeLength(DBL_MAX),
70  maxTriangleArea(DBL_MAX),
71  bAllowConstraintSplitting(true),
72  growFactor(DBL_MAX),
73  growFactorMinArea(1e-3),
74  capAspectLimit(10.0),
75  gridLength(0.0),
76  bKeepExistingSteinerPoints(true),
77  command(0), // command is for development purposes
78  psLockedConstraintSegments(NULL)
79  {
80  verify();
81 #if GEOM_PSEUDO3D==GEOM_TRUE
82  gridVector=Vector2(1.0,0.0,0.0);
83 #else
84  gridVector=Vector2(1.0,0.0);
85 #endif
86  }
87 
88  virtual ~MeshGenParams();
89 
90 
91 
104  virtual double getMaxTriangleArea(Triangle2* pT)
105  {
106  unusedParameter(pT); // avoids useless compiler warnings
107  return maxTriangleArea;
108  }
109 
110 
123  virtual double getMaxEdgeLength(Triangle2* pT)
124  {
125  unusedParameter(pT); // avoids useless compiler warnings
126  return maxEdgeLength;
127  }
128 
129 
130  // *** The following two parameters exist only in Fade2.5D ***
131 #if GEOM_PSEUDO3D==GEOM_TRUE
141  Fade_2D* pHeightGuideTriangulation;
142 
148  double maxHeightError;
149 #endif
150 
151 
152 
153 
157 
163 
170 
180 
181 
190 
191 
197 
204  double growFactor;
205 
213 
219 
220 
235 
249  double gridLength;
250 
261 
266  int command;
267 
274  void addLockedConstraint(ConstraintSegment2* pConstraintSegment);
275 
276 
277 
279  std::set<ConstraintSegment2*>* psLockedConstraintSegments;
281  void verify();
282 };
283 
284 
285 } // NAMESPACE
void unusedParameter(const T &)
Unused parameter.
Definition: MeshGenParams.h:41
A ConstraintSegment2 represents a Constraint Edge.
Definition: ConstraintSegment2.h:69
Fade_2D is the Delaunay triangulation main class.
Definition: Fade_2D.h:73
Parameters for the mesh generator.
Definition: MeshGenParams.h:58
double capAspectLimit
capAspectLimit
Definition: MeshGenParams.h:218
Zone2 * pZone
Zone to be meshed.
Definition: MeshGenParams.h:156
double growFactor
growFactor
Definition: MeshGenParams.h:204
double gridLength
gridLength
Definition: MeshGenParams.h:249
bool bAllowConstraintSplitting
bAllowConstraintSplitting
Definition: MeshGenParams.h:196
void addLockedConstraint(ConstraintSegment2 *pConstraintSegment)
Constraint Segments that shall not be splitted.
Vector2 gridVector
gridVector
Definition: MeshGenParams.h:234
virtual double getMaxTriangleArea(Triangle2 *pT)
getMaxTriangleArea(Triangle2* pT)
Definition: MeshGenParams.h:104
bool bKeepExistingSteinerPoints
Steiner points from previous refinements.
Definition: MeshGenParams.h:260
double growFactorMinArea
growFactorMinArea
Definition: MeshGenParams.h:212
double maxTriangleArea
maxTriangleArea
Definition: MeshGenParams.h:189
double maxEdgeLength
Maximum edge length.
Definition: MeshGenParams.h:179
double minEdgeLength
Minimum edge length.
Definition: MeshGenParams.h:169
virtual double getMaxEdgeLength(Triangle2 *pT)
getMaxEdgeLength(Triangle2* pT)
Definition: MeshGenParams.h:123
int command
Command.
Definition: MeshGenParams.h:266
double minAngleDegree
Minimum interior triangle angle.
Definition: MeshGenParams.h:162
Triangle.
Definition: Triangle2.h:59
Vector.
Definition: Vector2.h:38
Zone2 is a certain defined area of a triangulation.
Definition: Zone2.h:92