bn_tol Struct Reference
[Tolerances]

Support for uniform tolerances. More...

#include <bn.h>


Data Fields

unsigned long magic
double dist
 >= 0
double dist_sq
 dist * dist
double perp
 nearly 0
double para
 nearly 1


Detailed Description

Support for uniform tolerances.

B N _ T O L

A handy way of passing around the tolerance information needed to perform approximate floating-point calculations on geometry.

dist & dist_sq establish the distance tolerance.

If two points are closer together than dist, then they are to be considered the same point. For example:

                point_t a,b;
                vect_t  diff;
                VSUB2( diff, a, b );
                if( MAGNITUDE(diff) < tol->dist )       a & b are the same.
        or, more efficiently:
                if( MAQSQ(diff) < tol->dist_sq )
perp & para establish the angular tolerance.

If two rays emanate from the same point, and their dot product is nearly one, then the two rays are the same, while if their dot product is nearly zero, then they are perpendicular. For example:

                vect_t  a,b;
                if( fabs(VDOT(a,b)) >= tol->para )      a & b are parallel
                if( fabs(VDOT(a,b)) <= tol->perp )      a & b are perpendicular

Note:
tol->dist_sq = tol->dist * tol->dist;
tol->para = 1 - tol->perp;

Definition at line 137 of file bn.h.


Field Documentation

unsigned long magic
 

Definition at line 138 of file bn.h.

Referenced by classify_sketch_loops(), nmg_dangling_face(), nmg_do_radial_flips(), rt_nmg_import(), rt_nmg_import5(), wdb_dbopen(), and wdb_init_obj().

double dist
 

>= 0

Definition at line 139 of file bn.h.

Referenced by bn_between(), bn_coplanar(), bn_dist_pt2_lseg2(), bn_dist_pt3_lseg3(), bn_distsq_pt3_lseg3(), bn_isect_line2_line2(), bn_isect_line2_lseg2(), bn_isect_line3_line3(), bn_isect_line3_plane(), bn_isect_line_lseg(), bn_isect_lseg2_lseg2(), bn_isect_lseg3_lseg3(), bn_mat_is_equal(), bn_math_cmd(), classify_seg(), classify_sketch_loops(), isect_ray_planar_face(), nmg_assess_vu(), nmg_break_eg_on_v(), nmg_ck_fu_verts(), nmg_ck_v_in_2fus(), nmg_ck_vert_on_fus(), nmg_class_lu_fu(), nmg_class_pt_fu_except(), nmg_class_pt_lu_except(), nmg_class_pt_s(), nmg_classify_pt_loop(), nmg_cut_lu_into_coplanar_and_non(), nmg_dangling_face(), nmg_do_radial_flips(), nmg_edgeuse_on_line_tabulate(), nmg_extrude_shell(), nmg_face_cutjoin(), nmg_faces_can_be_intersected(), nmg_get_interior_pt(), nmg_is_crack_outie(), nmg_is_vertex_on_inter(), nmg_isect_eu_fu(), nmg_isect_two_generic_faces(), nmg_loop_g(), nmg_repair_v_near_v(), nmg_shell_coplanar_face_merge(), nmg_two_face_fuse(), rt_arbn_plot(), rt_arbn_tess(), rt_arc2d_to_cnurb(), rt_ars_shot(), rt_ars_tess(), rt_boolweave(), rt_dist_line3_line3(), rt_dist_line3_lseg3(), rt_dsp_shot(), rt_ell_prep(), rt_ell_tess(), rt_ell_tnurb(), rt_line_on_plane(), rt_nmg_import(), rt_nmg_import5(), rt_nurb_add_hit(), rt_pg_shot(), rt_pg_to_bot(), rt_pr_tol(), rt_rec_shot(), rt_sph_prep(), rt_superell_prep(), rt_tgc_tess(), rt_tor_prep(), rt_tor_shot(), rt_weave0seg(), tesselate_pipe_linear(), tesselate_pipe_start(), wdb_dbopen(), wdb_init_obj(), and wdb_tol_cmd().

double dist_sq
 

dist * dist

Definition at line 140 of file bn.h.

Referenced by bn_2line3_colinear(), bn_3pts_distinct(), bn_dist_pt2_lseg2(), bn_dist_pt3_lseg3(), bn_distsq_pt3_lseg3(), bn_isect_line2_line2(), bn_isect_line2_lseg2(), bn_isect_line_lseg(), bn_isect_pt2_lseg2(), bn_isect_pt_lseg(), bn_mk_plane_3pts(), bn_pt2_pt2_equal(), bn_pt3_pt3_equal(), classify_sketch_loops(), nmg_2edgeuse_g_coincident(), nmg_assess_eu(), nmg_ck_eg_verts(), nmg_class_pt_lu_except(), nmg_cnurb_is_on_crv(), nmg_dangling_face(), nmg_do_radial_flips(), nmg_edgeuse_on_line_tabulate(), nmg_enlist_vu(), nmg_find_pt_in_lu(), nmg_find_pt_in_shell(), nmg_insert_vu_if_on_edge(), nmg_is_crack_outie(), nmg_is_eu_on_line3(), nmg_is_vertex_on_inter(), nmg_isect_eu_fu(), nmg_isect_line2_vertex2(), nmg_loop_is_ccw(), nmg_search_v_eg(), nmg_split_linear_trim(), nmg_split_trim(), rt_arb_setup(), rt_arb_tess(), rt_arb_tnurb(), rt_dist_line3_line3(), rt_dist_pt3_line3(), rt_nmg_import(), rt_nmg_import5(), rt_pr_tol(), wdb_dbopen(), wdb_init_obj(), and wdb_tol_cmd().

double perp
 

nearly 0

Definition at line 141 of file bn.h.

Referenced by bn_isect_line3_plane(), bn_mat_is_equal(), classify_sketch_loops(), nmg_dangling_face(), nmg_do_radial_flips(), nmg_loop_is_ccw(), rt_hf_prep(), rt_nmg_import(), rt_nmg_import5(), rt_pr_tol(), wdb_dbopen(), wdb_init_obj(), and wdb_tol_cmd().

double para
 

nearly 1

Definition at line 142 of file bn.h.

Referenced by bn_isect_line2_line2(), classify_sketch_loops(), nmg_dangling_face(), nmg_do_radial_flips(), nmg_shell_coplanar_face_merge(), rt_line_on_plane(), rt_nmg_import(), rt_nmg_import5(), rt_pr_tol(), wdb_dbopen(), wdb_init_obj(), and wdb_tol_cmd().


The documentation for this struct was generated from the following file:
Generated on Mon Sep 18 01:25:10 2006 for BRL-CAD by  doxygen 1.4.6