Definitions.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (c) 2005 Imetric 3D GmbH                                    *
00003  *                                                                         *
00004  *   This file is part of the FreeCAD CAx development system.              *
00005  *                                                                         *
00006  *   This library is free software; you can redistribute it and/or         *
00007  *   modify it under the terms of the GNU Library General Public           *
00008  *   License as published by the Free Software Foundation; either          *
00009  *   version 2 of the License, or (at your option) any later version.      *
00010  *                                                                         *
00011  *   This library  is distributed in the hope that it will be useful,      *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU Library General Public License for more details.                  *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Library General Public     *
00017  *   License along with this library; see the file COPYING.LIB. If not,    *
00018  *   write to the Free Software Foundation, Inc., 59 Temple Place,         *
00019  *   Suite 330, Boston, MA  02111-1307, USA                                *
00020  *                                                                         *
00021  ***************************************************************************/
00022 
00023 
00024 #ifndef MESH_DEFINITIONS_H
00025 #define MESH_DEFINITIONS_H
00026 
00027 // default values
00028 #define MESH_MIN_PT_DIST           1.0e-6f
00029 #define MESH_MIN_EDGE_LEN          1.0e-3f
00030 #define MESH_MIN_EDGE_ANGLE        float(RAD(2.0))
00031 #define MESH_REMOVE_MIN_LEN        true
00032 #define MESH_REMOVE_G3_EDGES       true
00033 
00034 /*
00035  * general constant definitions
00036  */
00037 #define FLOAT_EPS   1.0e-4f 
00038 
00039 #ifndef  F_PI
00040 # define F_PI  3.1415926f
00041 #endif
00042 
00043 #ifndef  D_PI
00044 # define D_PI  3.141592653589793
00045 #endif
00046   
00047 #ifndef  FLOAT_MAX
00048 # define FLOAT_MAX 1e30f
00049 #endif
00050 
00051 #ifndef  DOUBLE_MAX
00052 # define DOUBLE_MAX 1.7976931348623157E+308    /* max decimal value of a "double"*/
00053 #endif
00054 
00055 #ifndef  DOUBLE_MIN
00056 # define DOUBLE_MIN 2.2250738585072014E-308    /* min decimal value of a "double"*/
00057 #endif
00058 
00059 /*
00060  * macros to convert between angles
00061  */
00062 #define RAD(D)    ((D) * D_PI / 180.0)
00063 #define DEGREE(R) ((R) * 180.0 / D_PI) 
00064 
00065 namespace MeshCore {
00066 
00071 class MeshExport MeshDefinitions
00072 {
00073 public:
00074   MeshDefinitions (void);
00075   virtual ~MeshDefinitions (void)
00076   {}
00077 
00078   static float  _fMinPointDistance;
00079   static float  _fMinPointDistanceP2;
00080   static float  _fMinPointDistanceD1;
00081 
00082   static float  _fMinEdgeLength;
00083   static bool  _bRemoveMinLength;
00084 
00085   static float _fMinEdgeAngle;
00086 
00087   static void  SetMinPointDistance (float fMin);
00088 };
00089 
00090 } // namespace MeshCore
00091 
00092 #endif // MESH_DEFINITIONS_H 

Generated on Wed Nov 23 19:00:05 2011 for FreeCAD by  doxygen 1.6.1