Fade2.5D Documentation pages v2.12
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 #include "Point2.h"
23 
24 
25 #if GEOM_PSEUDO3D==GEOM_TRUE
26  namespace GEOM_FADE25D {
27 #elif GEOM_PSEUDO3D==GEOM_FALSE
28  namespace GEOM_FADE2D {
29 #else
30  #error GEOM_PSEUDO3D is not defined
31 #endif
32 
33 
34 class Triangle2; // Forward
35 class Zone2; // Forward
36 class Fade_2D; // Forward
37 class ConstraintSegment2; // Forward
42 template <typename T> inline void unusedParameter(const T&){}
43 
44 
45 
58 class CLASS_DECLSPEC MeshGenParams
59 {
60 public:
61  explicit MeshGenParams(Zone2* pZone_):
62 #if GEOM_PSEUDO3D==GEOM_TRUE
63  // *** These two parameters exist only in Fade2.5D ***
64  pHeightGuideTriangulation(NULL),
65  maxHeightError(DBL_MAX),
66 #endif
67  pZone(pZone_),
68  minAngleDegree(20.0),
69  minEdgeLength(1e-3),
70  maxEdgeLength(DBL_MAX),
71  maxTriangleArea(DBL_MAX),
72  bAllowConstraintSplitting(true),
73  growFactor(DBL_MAX),
74  growFactorMinArea(1e-3),
75  capAspectLimit(10.0),
76  gridLength(0.0),
77  bKeepExistingSteinerPoints(true),
78  command(0), // command is for development purposes
79  bReproducibleResults(true), // use false for better performance
80  bGridMeshingLQ(false), // use true (only together with grid-meshing) for better performance
81  psLockedConstraintSegments(NULL)
82  {
83  verify();
84 #if GEOM_PSEUDO3D==GEOM_TRUE
85  gridVector=Vector2(1.0,0.0,0.0);
86  gridPoint=Point2(DBL_MAX,DBL_MAX,DBL_MAX);
87 #else
88  gridVector=Vector2(1.0,0.0);
89  gridPoint=Point2(DBL_MAX,DBL_MAX);
90 #endif
91  }
92 
93  virtual ~MeshGenParams();
94 
95 
96 
109  virtual double getMaxTriangleArea(Triangle2* pT)
110  {
111  unusedParameter(pT); // avoids useless compiler warnings
112  return maxTriangleArea;
113  }
114 
115 
128  virtual double getMaxEdgeLength(Triangle2* pT)
129  {
130  unusedParameter(pT); // avoids useless compiler warnings
131  return maxEdgeLength;
132  }
133 
134 
135  // *** The following two parameters exist only in Fade2.5D ***
136 #if GEOM_PSEUDO3D==GEOM_TRUE
147 
154 #endif
155 
156 
157 
158 
162 
168 
175 
185 
186 
195 
196 
202 
209  double growFactor;
210 
218 
224 
225 
240 
254  double gridLength;
255 
266 
271  int command;
272 
279  void addLockedConstraint(ConstraintSegment2* pConstraintSegment);
280 
281 
293 
302 
304  std::set<ConstraintSegment2*>* psLockedConstraintSegments;
305 
311 
313  void verify();
314 };
315 
316 
317 } // NAMESPACE
void unusedParameter(const T &)
Unused parameter.
Definition: MeshGenParams.h:42
A ConstraintSegment2 represents a Constraint Edge.
Definition: ConstraintSegment2.h:69
Fade_2D is the Delaunay triangulation class.
Definition: Fade_2D.h:73
Parameters for the mesh generator.
Definition: MeshGenParams.h:59
virtual double getMaxEdgeLength(Triangle2 *pT)
getMaxEdgeLength(Triangle2* pT)
Definition: MeshGenParams.h:128
bool bGridMeshingLQ
Low quality but high performance grid meshing.
Definition: MeshGenParams.h:301
Fade_2D * pHeightGuideTriangulation
pHeightGuideTriangulation
Definition: MeshGenParams.h:146
double growFactor
growFactor
Definition: MeshGenParams.h:209
double gridLength
gridLength
Definition: MeshGenParams.h:254
double minAngleDegree
Minimum interior triangle angle.
Definition: MeshGenParams.h:167
double maxEdgeLength
Maximum edge length.
Definition: MeshGenParams.h:184
Vector2 gridVector
gridVector
Definition: MeshGenParams.h:239
Zone2 * pZone
Zone to be meshed.
Definition: MeshGenParams.h:161
Point2 gridPoint
Grid Point.
Definition: MeshGenParams.h:310
double capAspectLimit
capAspectLimit
Definition: MeshGenParams.h:223
bool bKeepExistingSteinerPoints
Steiner points from previous refinements.
Definition: MeshGenParams.h:265
double maxHeightError
maxHeightError
Definition: MeshGenParams.h:153
bool bAllowConstraintSplitting
bAllowConstraintSplitting
Definition: MeshGenParams.h:201
double minEdgeLength
Minimum edge length.
Definition: MeshGenParams.h:174
void addLockedConstraint(ConstraintSegment2 *pConstraintSegment)
Constraint Segments that shall not be splitted.
bool bReproducibleResults
Reproducible results.
Definition: MeshGenParams.h:292
virtual double getMaxTriangleArea(Triangle2 *pT)
getMaxTriangleArea(Triangle2* pT)
Definition: MeshGenParams.h:109
double growFactorMinArea
growFactorMinArea
Definition: MeshGenParams.h:217
int command
Command.
Definition: MeshGenParams.h:271
double maxTriangleArea
maxTriangleArea
Definition: MeshGenParams.h:194
Point.
Definition: Point2.h:52
Triangle.
Definition: Triangle2.h:60
Vector.
Definition: Vector2.h:42
Zone2 is a certain defined area of a triangulation.
Definition: Zone2.h:95