5 #ifndef _MGTolerance_HH_
6 #define _MGTolerance_HH_
19 #define MG_MAX_TOL_STACK_SIZE 10
62 MG_DLL_DECLR
friend bool MGMZero (
double data);
69 MG_DLL_DECLR
friend bool MGAEqual (
double data1,
double data2);
75 MG_DLL_DECLR
friend bool MGAZero(
double data);
78 MG_DLL_DECLR
friend bool MGREqual (
double data1,
double data2);
83 MG_DLL_DECLR
friend bool MGREqual2(
double data1,
double data2);
89 MG_DLL_DECLR
friend bool MGREqual_base(
double data1,
double data2,
double base_length);
95 MG_DLL_DECLR
friend bool MGRZero(
double data);
103 MG_DLL_DECLR
friend bool MGRZero2(
double data,
double base_length);
104 MG_DLL_DECLR
friend bool MGRZero2(
double data,
const MGEReal& base_length);
110 MG_DLL_DECLR
friend bool MGRight_angle(
double cos_data);
117 MG_DLL_DECLR
friend bool MGZero_angle (
double data);
140 static double set_mach_zero(
double );
145 static double set_wc_zero(
double );
150 static double set_rc_zero(
double );
155 static double set_angle_zero(
double );
160 static double set_line_zero(
double );
165 static double set_max_knot_ratio(
double );
177 static double mach_zero() {
return instance().m_mach_zero;};
180 static double wc_zero() {
return instance().m_wc_zero;};
186 static double rc_zero() {
return instance().m_rc_zero;};
195 static double line_zero(){
return instance().m_line_zero;};
201 int dump_size()
const;
216 double m_wc_zero_sqr;
221 double m_rc_zero_sqr;
228 double m_max_knot_ratio;
251 extern MG_DLL_DECLR
double MGAngle(
double ca
int stack_length() const
Return currently used tolerance stack length.
Definition: Tolerance.h:132
MG_DLL_DECLR double MGAngle(double ca, double)
Compute radian angle from cosine and sine value.
MGIfstream is a class to read the serialized data generated by MGOfstream.
Definition: Ifstream.h:30
std::ostream & operator<<(std::ostream &ostrm, const MGisect &is)
Debug Function.
Definition: isect.h:95
MGTolerance is a class to hold various tolerance data used in MGCL.
Definition: Tolerance.h:46
#define MG_MAX_TOL_STACK_SIZE
Definition: Tolerance.h:19
static double rc_zero_sqr()
Return square of relative zero.
Definition: Tolerance.h:189
static double wc_zero_sqr()
Return square of world zero.
Definition: Tolerance.h:183
MGEReal is extended real number to define infinity.
Definition: EReal.h:22
static double mach_zero()
Return machine zero.
Definition: Tolerance.h:177
MGOfstream is a class to serialize all of the subclasses of MGGel.
Definition: Ofstream.h:31
static double rc_zero()
Return relative zero.
Definition: Tolerance.h:186
static double angle_zero()
Return angle zero.
Definition: Tolerance.h:192
static double max_knot_ratio()
Return maximum knot ratio.
Definition: Tolerance.h:198
int max_stack_size() const
Return maximum tolerance stack size.
Definition: Tolerance.h:135
static double line_zero()
Return line zero.
Definition: Tolerance.h:195
static double wc_zero()
Return world zero.
Definition: Tolerance.h:180