BRL-CAD

These are definitions specific to libbrep, used throughout the library. More...

Collaboration diagram for Definitions:

Files

file  defines.h
 

Data Structures

struct  BrepTrimPoint
 

Macros

#define BREP_MAX_ITERATIONS   100
 
#define BREP_INTERSECTION_ROOT_EPSILON   1e-6
 
#define BREP_INTERSECTION_ROOT_SETTLE   1e-2
 
#define BREP_GRAZING_DOT_TOL   0.000017453
 
#define DO_VECTOR   1
 
#define BREP_MAX_FT_DEPTH   8
 
#define BREP_MAX_LN_DEPTH   20
 
#define SIGN(x)   ((x) >= 0 ? 1 : -1)
 
#define BREP_SURFACE_FLATNESS   0.85
 
#define BREP_SURFACE_STRAIGHTNESS   0.75
 
#define BREP_MAX_FCP_ITERATIONS   50
 
#define BREP_FCP_ROOT_EPSILON   1e-5
 
#define BREP_BB_CRV_PNT_CNT   10
 
#define BREP_CURVE_FLATNESS   0.95
 
#define BREP_SURF_SUB_FACTOR   1
 
#define BREP_TRIM_SUB_FACTOR   1
 
#define BREP_EDGE_MISS_TOLERANCE   5e-3
 
#define BREP_SAME_POINT_TOLERANCE   1e-6
 
#define BREP_UV_DIST_FUZZ   0.000001
 
#define ON_PRINT4(p)   "[" << (p)[0] << ", " << (p)[1] << ", " << (p)[2] << ", " << (p)[3] << "]"
 
#define ON_PRINT3(p)   "(" << (p)[0] << ", " << (p)[1] << ", " << (p)[2] << ")"
 
#define ON_PRINT2(p)   "(" << (p)[0] << ", " << (p)[1] << ")"
 
#define PT(p)   ON_PRINT3(p)
 
#define PT2(p)   ON_PRINT2(p)
 
#define IVAL(_ival)   "[" << (_ival).m_t[0] << ", " << (_ival).m_t[1] << "]"
 
#define TRACE(s)
 
#define TRACE1(s)
 
#define TRACE2(s)
 

Detailed Description

These are definitions specific to libbrep, used throughout the library.

Macro Definition Documentation

◆ BREP_MAX_ITERATIONS

#define BREP_MAX_ITERATIONS   100

Maximum number of newton iterations on root finding

Definition at line 101 of file defines.h.

◆ BREP_INTERSECTION_ROOT_EPSILON

#define BREP_INTERSECTION_ROOT_EPSILON   1e-6

Root finding threshold

Definition at line 104 of file defines.h.

◆ BREP_INTERSECTION_ROOT_SETTLE

#define BREP_INTERSECTION_ROOT_SETTLE   1e-2

Definition at line 107 of file defines.h.

◆ BREP_GRAZING_DOT_TOL

#define BREP_GRAZING_DOT_TOL   0.000017453

Jungle Gym epsilon tighten BREP grazing tolerance to 0.000017453(0.001 degrees) was using RT_DOT_TOL at 0.001 (0.05 degrees)

Definition at line 112 of file defines.h.

◆ DO_VECTOR

#define DO_VECTOR   1

Use vector operations? For debugging

Definition at line 115 of file defines.h.

◆ BREP_MAX_FT_DEPTH

#define BREP_MAX_FT_DEPTH   8

Maximum per-surface BVH depth

Definition at line 118 of file defines.h.

◆ BREP_MAX_LN_DEPTH

#define BREP_MAX_LN_DEPTH   20

Definition at line 119 of file defines.h.

◆ SIGN

#define SIGN (   x)    ((x) >= 0 ? 1 : -1)

Definition at line 121 of file defines.h.

◆ BREP_SURFACE_FLATNESS

#define BREP_SURFACE_FLATNESS   0.85

Surface flatness parameter, Abert says between 0.8-0.9

Definition at line 124 of file defines.h.

◆ BREP_SURFACE_STRAIGHTNESS

#define BREP_SURFACE_STRAIGHTNESS   0.75

Definition at line 125 of file defines.h.

◆ BREP_MAX_FCP_ITERATIONS

#define BREP_MAX_FCP_ITERATIONS   50

Max newton iterations when finding closest point

Definition at line 128 of file defines.h.

◆ BREP_FCP_ROOT_EPSILON

#define BREP_FCP_ROOT_EPSILON   1e-5

Root finding epsilon

Definition at line 131 of file defines.h.

◆ BREP_BB_CRV_PNT_CNT

#define BREP_BB_CRV_PNT_CNT   10

trim curve point sampling count for isLinear() check and possibly

  • growing bounding box

Definition at line 136 of file defines.h.

◆ BREP_CURVE_FLATNESS

#define BREP_CURVE_FLATNESS   0.95

Definition at line 138 of file defines.h.

◆ BREP_SURF_SUB_FACTOR

#define BREP_SURF_SUB_FACTOR   1

subdivision size factors

Definition at line 141 of file defines.h.

◆ BREP_TRIM_SUB_FACTOR

#define BREP_TRIM_SUB_FACTOR   1

Definition at line 142 of file defines.h.

◆ BREP_EDGE_MISS_TOLERANCE

#define BREP_EDGE_MISS_TOLERANCE   5e-3

The EDGE_MISS_TOLERANCE setting is critical in a couple of ways - too small and the allowed uncertainty region near edges will be smaller than the actual uncertainty needed for accurate solid raytracing, too large and trimming will not be adequate. May need to adapt this to the scale of the model, perhaps using bounding box size to key off of.

Definition at line 153 of file defines.h.

◆ BREP_SAME_POINT_TOLERANCE

#define BREP_SAME_POINT_TOLERANCE   1e-6

Definition at line 155 of file defines.h.

◆ BREP_UV_DIST_FUZZ

#define BREP_UV_DIST_FUZZ   0.000001

Definition at line 158 of file defines.h.

◆ ON_PRINT4

#define ON_PRINT4 (   p)    "[" << (p)[0] << ", " << (p)[1] << ", " << (p)[2] << ", " << (p)[3] << "]"

Definition at line 161 of file defines.h.

◆ ON_PRINT3

#define ON_PRINT3 (   p)    "(" << (p)[0] << ", " << (p)[1] << ", " << (p)[2] << ")"

Definition at line 162 of file defines.h.

◆ ON_PRINT2

#define ON_PRINT2 (   p)    "(" << (p)[0] << ", " << (p)[1] << ")"

Definition at line 163 of file defines.h.

◆ PT

#define PT (   p)    ON_PRINT3(p)

Definition at line 164 of file defines.h.

◆ PT2

#define PT2 (   p)    ON_PRINT2(p)

Definition at line 165 of file defines.h.

◆ IVAL

#define IVAL (   _ival)    "[" << (_ival).m_t[0] << ", " << (_ival).m_t[1] << "]"

Definition at line 166 of file defines.h.

◆ TRACE

#define TRACE (   s)

Definition at line 167 of file defines.h.

◆ TRACE1

#define TRACE1 (   s)

Definition at line 168 of file defines.h.

◆ TRACE2

#define TRACE2 (   s)

Definition at line 169 of file defines.h.