Geom Software - C++ Programming and Geometry Libraries
Fade2.5D Documentation pages v1.63
MeshGenParams.h
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 
18 
19 #pragma once
20 #include "common.h"
21 #include "Zone2.h"
22 
23 #if GEOM_PSEUDO3D==GEOM_TRUE
24  namespace GEOM_FADE25D {
25 #elif GEOM_PSEUDO3D==GEOM_FALSE
26  namespace GEOM_FADE2D {
27 #else
28  #error GEOM_PSEUDO3D is not defined
29 #endif
30 
31 
32 
33 class Fade_2D; // Forward
34 template <typename T> inline void unusedParameter(const T&){} // Avoids compiler warnings
35 
36 
37 
50 class CLASS_DECLSPEC MeshGenParams
51 {
52 public:
53  explicit MeshGenParams(Zone2* pZone_):
54 #if GEOM_PSEUDO3D==GEOM_TRUE
55  // *** The following two parameters exist only in Fade2.5D ***
56  pHeightGuideTriangulation(NULL),
57  maxHeightError(DBL_MAX),
58 #endif
59  pZone(pZone_),
60  minAngleDegree(20.0),
61  minEdgeLength(1e-3),
62  maxEdgeLength(DBL_MAX),
63  maxTriangleArea(DBL_MAX),
64  bAllowConstraintSplitting(true),
65  growFactor(DBL_MAX),
66  growFactorMinArea(1e-3),
67  capAspectLimit(10.0),
68  gridLength(0.0),
69  bKeepExistingSteinerPoints(true),
70  command(0) // command is for development purposes
71 
72  {
73  if( pZone->getZoneLocation()!=ZL_INSIDE &&
74  pZone->getZoneLocation()!=ZL_BOUNDED )
75  {
76  std::cerr<<"\n\n\nMeshGenParams::MeshGenParams(..), ERROR: \n\tbehavior since Fade 1.39: The zoneLocation must be ZL_INSIDE or ZL_BOUNDED. Please convert the zone using pZone->convertToBoundedZone(..)\n\n"<<std::endl;
77  assert(false);
78  return;
79  }
80  }
81 
82  virtual ~MeshGenParams()
83  {
84 #if GEOM_PSEUDO3D==GEOM_TRUE
85  gridVector=Vector2(1.0,0.0,0.0);
86 #else
87  gridVector=Vector2(1.0,0.0);
88 #endif
89  }
90 
91 
92 
105  virtual double getMaxTriangleArea(Triangle2* pT)
106  {
107  unusedParameter(pT); // avoids useless compiler warnings
108  return maxTriangleArea;
109  }
110 
111 
124  virtual double getMaxEdgeLength(Triangle2* pT)
125  {
126  unusedParameter(pT); // avoids useless compiler warnings
127  return maxEdgeLength;
128  }
129 
130 
131  // *** The following two parameters exist only in Fade2.5D ***
132 #if GEOM_PSEUDO3D==GEOM_TRUE
133 
143 
150 #endif
151 
152 
153 
154 
158 
164 
171 
181 
182 
191 
192 
198 
205  double growFactor;
206 
214 
220 
221 
236 
250  double gridLength;
251 
262 
267  int command;
268 };
269 
270 
271 } // NAMESPACE
virtual double getMaxEdgeLength(Triangle2 *pT)
getMaxEdgeLength(Triangle2* pT)
Definition: MeshGenParams.h:124
Fade_2D * pHeightGuideTriangulation
pHeightGuideTriangulation
Definition: MeshGenParams.h:142
double maxEdgeLength
Maximum edge length.
Definition: MeshGenParams.h:180
double minEdgeLength
Minimum edge length.
Definition: MeshGenParams.h:170
Zone2 is an exactly defined area of a triangulation.
Definition: Zone2.h:49
double capAspectLimit
capAspectLimit
Definition: MeshGenParams.h:219
double minAngleDegree
Minimum interior triangle angle.
Definition: MeshGenParams.h:163
Delaunay triangulation - the main class.
Definition: Fade_2D.h:63
double maxTriangleArea
maxTriangleArea
Definition: MeshGenParams.h:190
virtual double getMaxTriangleArea(Triangle2 *pT)
getMaxTriangleArea(Triangle2* pT)
Definition: MeshGenParams.h:105
Vector2 gridVector
gridVector
Definition: MeshGenParams.h:235
double gridLength
gridLength
Definition: MeshGenParams.h:250
Vector.
Definition: Vector2.h:37
Parameters for the mesh generator.
Definition: MeshGenParams.h:50
Zone2 * pZone
Zone to be meshed.
Definition: MeshGenParams.h:157
bool bAllowConstraintSplitting
bAllowConstraintSplitting
Definition: MeshGenParams.h:197
int command
Command.
Definition: MeshGenParams.h:267
Triangle.
Definition: Triangle2.h:48
double growFactor
growFactor
Definition: MeshGenParams.h:205
double maxHeightError
maxHeightError
Definition: MeshGenParams.h:149
Definition: Bbox2.h:23
bool bKeepExistingSteinerPoints
Steiner points from previous refinements.
Definition: MeshGenParams.h:261
double growFactorMinArea
growFactorMinArea
Definition: MeshGenParams.h:213