Fade2D Documentation pages v1.90
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 "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 class ConstraintSegment2; // Forward
39 template <typename T> inline void unusedParameter(const T&){}
40 
41 
42 
55 class CLASS_DECLSPEC MeshGenParams
56 {
57 public:
58  explicit MeshGenParams(Zone2* pZone_):
59 #if GEOM_PSEUDO3D==GEOM_TRUE
60  // *** These two parameters exist only in Fade2.5D ***
61  pHeightGuideTriangulation(NULL),
62  maxHeightError(DBL_MAX),
63 #endif
64  pZone(pZone_),
65  minAngleDegree(20.0),
66  minEdgeLength(1e-3),
67  maxEdgeLength(DBL_MAX),
68  maxTriangleArea(DBL_MAX),
69  bAllowConstraintSplitting(true),
70  growFactor(DBL_MAX),
71  growFactorMinArea(1e-3),
72  capAspectLimit(10.0),
73  gridLength(0.0),
74  bKeepExistingSteinerPoints(true),
75  command(0), // command is for development purposes
76  psLockedConstraintSegments(NULL)
77  {
78  if( pZone->getZoneLocation()!=ZL_INSIDE &&
79  pZone->getZoneLocation()!=ZL_BOUNDED )
80  {
81  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;
82  assert(false);
83  return;
84  }
85 #if GEOM_PSEUDO3D==GEOM_TRUE
86  gridVector=Vector2(1.0,0.0,0.0);
87 #else
88  gridVector=Vector2(1.0,0.0);
89 #endif
90  }
91 
92  virtual ~MeshGenParams();
93 
94 
95 
108  virtual double getMaxTriangleArea(Triangle2* pT)
109  {
110  unusedParameter(pT); // avoids useless compiler warnings
111  return maxTriangleArea;
112  }
113 
114 
127  virtual double getMaxEdgeLength(Triangle2* pT)
128  {
129  unusedParameter(pT); // avoids useless compiler warnings
130  return maxEdgeLength;
131  }
132 
133 
134  // *** The following two parameters exist only in Fade2.5D ***
135 #if GEOM_PSEUDO3D==GEOM_TRUE
145  Fade_2D* pHeightGuideTriangulation;
146 
152  double maxHeightError;
153 #endif
154 
155 
156 
157 
161 
167 
174 
184 
185 
194 
195 
201 
208  double growFactor;
209 
217 
223 
224 
239 
253  double gridLength;
254 
265 
270  int command;
271 
278  void addLockedConstraint(ConstraintSegment2* pConstraintSegment);
279 
280 
281 
283  std::set<ConstraintSegment2*>* psLockedConstraintSegments;
284 };
285 
286 
287 } // NAMESPACE
void unusedParameter(const T &)
Unused parameter.
Definition: MeshGenParams.h:39
A ConstraintSegment2 represents a Constraint Edge.
Definition: ConstraintSegment2.h:69
Fade_2D is the Delaunay triangulation main class.
Definition: Fade_2D.h:71
Parameters for the mesh generator.
Definition: MeshGenParams.h:56
double capAspectLimit
capAspectLimit
Definition: MeshGenParams.h:222
Zone2 * pZone
Zone to be meshed.
Definition: MeshGenParams.h:160
double growFactor
growFactor
Definition: MeshGenParams.h:208
double gridLength
gridLength
Definition: MeshGenParams.h:253
bool bAllowConstraintSplitting
bAllowConstraintSplitting
Definition: MeshGenParams.h:200
void addLockedConstraint(ConstraintSegment2 *pConstraintSegment)
Constraint Segments that shall not be splitted.
Vector2 gridVector
gridVector
Definition: MeshGenParams.h:238
virtual double getMaxTriangleArea(Triangle2 *pT)
getMaxTriangleArea(Triangle2* pT)
Definition: MeshGenParams.h:108
bool bKeepExistingSteinerPoints
Steiner points from previous refinements.
Definition: MeshGenParams.h:264
double growFactorMinArea
growFactorMinArea
Definition: MeshGenParams.h:216
double maxTriangleArea
maxTriangleArea
Definition: MeshGenParams.h:193
double maxEdgeLength
Maximum edge length.
Definition: MeshGenParams.h:183
double minEdgeLength
Minimum edge length.
Definition: MeshGenParams.h:173
virtual double getMaxEdgeLength(Triangle2 *pT)
getMaxEdgeLength(Triangle2* pT)
Definition: MeshGenParams.h:127
int command
Command.
Definition: MeshGenParams.h:270
double minAngleDegree
Minimum interior triangle angle.
Definition: MeshGenParams.h:166
Triangle.
Definition: Triangle2.h:59
Vector.
Definition: Vector2.h:38
Zone2 is a certain defined area of a triangulation.
Definition: Zone2.h:91