Revision: 71632 http://sourceforge.net/p/brlcad/code/71632 Author: starseeker Date: 2018-08-30 11:37:03 +0000 (Thu, 30 Aug 2018) Log Message: ----------- Back out the timing tolerance - agree with Sean this isn't the right way to approach this, was mostly the quickest way to attempt timeout testing with NMG (which proved to have other problems - stopping NMG midstream an still cleaning up memory doesn't seem to be a simple process.)
Modified Paths: -------------- brlcad/trunk/include/bn/tol.h brlcad/trunk/include/nmg.h brlcad/trunk/src/libanalyze/tests/raydiff.c brlcad/trunk/src/libanalyze/tests/solid_partitions.c brlcad/trunk/src/libbg/obr.c brlcad/trunk/src/libbg/polygon.c brlcad/trunk/src/libbg/tri_tri.c brlcad/trunk/src/libbg/util.c brlcad/trunk/src/libbn/tests/plane_dist.c brlcad/trunk/src/libbn/tests/plane_isect.c brlcad/trunk/src/libbn/tests/plane_pt.c brlcad/trunk/src/libged/facetize.c brlcad/trunk/src/libged/gdiff.c brlcad/trunk/src/libged/pnts.cpp brlcad/trunk/src/libged/shape_recognition.cpp brlcad/trunk/src/libnmg/bool.c brlcad/trunk/src/libnmg/eval.c brlcad/trunk/src/libnmg/fuse.c brlcad/trunk/src/libnmg/misc.c brlcad/trunk/src/librt/db_diff.c brlcad/trunk/src/librt/db_fullpath.c brlcad/trunk/src/librt/primitives/extrude/extrude.c brlcad/trunk/src/librt/primitives/nmg/nmg.c brlcad/trunk/src/librt/primitives/nmg/nmg_mirror.c brlcad/trunk/src/librt/search.c brlcad/trunk/src/libtclcad/libfuncs.c Modified: brlcad/trunk/include/bn/tol.h =================================================================== --- brlcad/trunk/include/bn/tol.h 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/include/bn/tol.h 2018-08-30 11:37:03 UTC (rev 71632) @@ -75,8 +75,6 @@ double dist_sq; /**< @brief dist * dist */ double perp; /**< @brief nearly 0 */ double para; /**< @brief nearly 1 */ - double tstart; /**< @brief timestamp for start of process */ - double tmax; /**< @brief maximum time (in milliseconds) */ }; /** @@ -93,8 +91,6 @@ (_p)->dist_sq = 0.0; \ (_p)->perp = 0.0; \ (_p)->para = 1.0; \ - (_p)->tstart = 0.0; \ - (_p)->tmax = 0.0; \ } /** @@ -101,7 +97,7 @@ * macro suitable for declaration statement zero-initialization of a * bn_tol struct. */ -#define BN_TOL_INIT_ZERO { BN_TOL_MAGIC, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0 } +#define BN_TOL_INIT_ZERO { BN_TOL_MAGIC, 0.0, 0.0, 0.0, 1.0 } /** * returns truthfully whether a bn_tol struct has been initialized. Modified: brlcad/trunk/include/nmg.h =================================================================== --- brlcad/trunk/include/nmg.h 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/include/nmg.h 2018-08-30 11:37:03 UTC (rev 71632) @@ -73,7 +73,6 @@ #include "bu/log.h" #include "bu/magic.h" #include "bu/ptbl.h" -#include "bu/time.h" #include "bn/plane.h" #include "bn/tol.h" #include "bn/vlist.h" @@ -222,15 +221,6 @@ #define NMG_CK_VERTEXUSE_A_EITHER(_p) NMG_CK2MAG(_p, NMG_VERTEXUSE_A_PLANE_MAGIC, NMG_VERTEXUSE_A_CNURB_MAGIC, "vertexuse_a_plane|vertexuse_a_cnurb") #define NMG_CK_LIST(_p) BU_CKMAG(_p, BU_LIST_HEAD_MAGIC, "bu_list") -/* Timeout bailouts */ -#define NMG_TIMEOUT(_fname, _ftol) do { \ - if (_ftol->tmax > 0 && ((bu_gettime() - _ftol->tstart) > _ftol->tmax)) { \ - int delta = (int)((bu_gettime() - tol->tstart)/1e6); \ - bu_log("%s: operation timed out, operation has lasted %d seconds, > threshold (%d)\n", _fname, delta, (int)(tol->tmax/1e6)); \ - bu_bomb("operation timed out\n"); \ - } } while (0) - - /* Used only in nmg_mod.c */ #define NMG_TEST_EDGEUSE(_p) \ if (!(_p)->l.forw || !(_p)->l.back || !(_p)->eumate_p || \ Modified: brlcad/trunk/src/libanalyze/tests/raydiff.c =================================================================== --- brlcad/trunk/src/libanalyze/tests/raydiff.c 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/src/libanalyze/tests/raydiff.c 2018-08-30 11:37:03 UTC (rev 71632) @@ -32,7 +32,7 @@ struct db_i *dbip = DBI_NULL; struct directory *dp1 = RT_DIR_NULL; struct directory *dp2 = RT_DIR_NULL; - struct bn_tol tol = {BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1.0e-6, 1.0 - 1.0e-6, 0.0, 0.0 }; + struct bn_tol tol = {BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1.0e-6, 1.0 - 1.0e-6 }; struct analyze_raydiff_results *results; if (argc != 4) { Modified: brlcad/trunk/src/libanalyze/tests/solid_partitions.c =================================================================== --- brlcad/trunk/src/libanalyze/tests/solid_partitions.c 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/src/libanalyze/tests/solid_partitions.c 2018-08-30 11:37:03 UTC (rev 71632) @@ -34,8 +34,8 @@ int ncpus = bu_avail_cpus(); struct db_i *dbip = DBI_NULL; struct directory *dp = RT_DIR_NULL; - struct bn_tol tol = {BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1.0e-6, 1.0 - 1.0e-6, 0.0, 0.0 }; - struct bn_tol rtol = {BN_TOL_MAGIC, 10, 0.5 * 0.5, 1.0e-6, 1.0 - 1.0e-6, 0.0, 0.0 }; + struct bn_tol tol = {BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1.0e-6, 1.0 - 1.0e-6 }; + struct bn_tol rtol = {BN_TOL_MAGIC, 10, 0.5 * 0.5, 1.0e-6, 1.0 - 1.0e-6 }; struct resource resp; struct rt_gen_worker_vars state; struct rt_i *rtip; Modified: brlcad/trunk/src/libbg/obr.c =================================================================== --- brlcad/trunk/src/libbg/obr.c 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/src/libbg/obr.c 2018-08-30 11:37:03 UTC (rev 71632) @@ -136,7 +136,7 @@ i = 0; while (i < pnt_cnt) { - const struct bn_tol tol = {BN_TOL_MAGIC, BN_TOL_DIST / 2, BN_TOL_DIST *BN_TOL_DIST / 4, 1e-6, 1 - 1e-6, 0.0, 0.0}; + const struct bn_tol tol = {BN_TOL_MAGIC, BN_TOL_DIST / 2, BN_TOL_DIST *BN_TOL_DIST / 4, 1e-6, 1 - 1e-6}; fastf_t dist_sq; fastf_t pca[2]; point_t A_3D, B_3D, curr_pnt_3D; Modified: brlcad/trunk/src/libbg/polygon.c =================================================================== --- brlcad/trunk/src/libbg/polygon.c 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/src/libbg/polygon.c 2018-08-30 11:37:03 UTC (rev 71632) @@ -576,7 +576,7 @@ double hole_largest_x = -DBL_MAX; point2d_t hpnt, ep, e1, e2, isect; vect_t hdir; - struct bn_tol ltol = {BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1e-6, 1.0 - 1e-6, 0.0, 0.0 }; + struct bn_tol ltol = {BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1e-6, 1.0 - 1e-6 }; V2SETALL(e1,0); V2SETALL(e2,0); V2SETALL(isect,0); Modified: brlcad/trunk/src/libbg/tri_tri.c =================================================================== --- brlcad/trunk/src/libbg/tri_tri.c 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/src/libbg/tri_tri.c 2018-08-30 11:37:03 UTC (rev 71632) @@ -187,7 +187,7 @@ point_t E1, E2, N; plane_t P1, P2; static const struct bn_tol tol = { - BN_TOL_MAGIC, EPSILON, EPSILON*EPSILON, 1e-6, 1-1e-6, 0.0, 0.0 + BN_TOL_MAGIC, EPSILON, EPSILON*EPSILON, 1e-6, 1-1e-6 }; /* compute plane of triangle (V0, V1, V2) */ Modified: brlcad/trunk/src/libbg/util.c =================================================================== --- brlcad/trunk/src/libbg/util.c 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/src/libbg/util.c 2018-08-30 11:37:03 UTC (rev 71632) @@ -60,7 +60,7 @@ point_t p_farthest = VINIT_ZERO; int p_farthest_index = 0; vect_t normal = VINIT_ZERO; - const struct bn_tol tol = {BN_TOL_MAGIC, BN_TOL_DIST/2.0, BN_TOL_DIST*BN_TOL_DIST/4.0, 1.0e-6, 1.0-1.0e-6, 0.0, 0.0}; + const struct bn_tol tol = {BN_TOL_MAGIC, BN_TOL_DIST/2.0, BN_TOL_DIST*BN_TOL_DIST/4.0, 1.0e-6, 1.0-1.0e-6}; /* Step 1 - find center point */ VSETALL(*origin_pnt, 0.0); Modified: brlcad/trunk/src/libbn/tests/plane_dist.c =================================================================== --- brlcad/trunk/src/libbn/tests/plane_dist.c 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/src/libbn/tests/plane_dist.c 2018-08-30 11:37:03 UTC (rev 71632) @@ -28,7 +28,7 @@ #include "bn.h" -#define TOL_INIT { BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1e-6, 1.0 - 1e-6, 0.0, 0.0 } +#define TOL_INIT { BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1e-6, 1.0 - 1e-6 } static int Modified: brlcad/trunk/src/libbn/tests/plane_isect.c =================================================================== --- brlcad/trunk/src/libbn/tests/plane_isect.c 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/src/libbn/tests/plane_isect.c 2018-08-30 11:37:03 UTC (rev 71632) @@ -28,7 +28,7 @@ #include "bn.h" -#define TOL_INIT { BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1e-6, 1.0 - 1e-6, 0.0, 0.0 } +#define TOL_INIT { BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1e-6, 1.0 - 1e-6 } static int Modified: brlcad/trunk/src/libbn/tests/plane_pt.c =================================================================== --- brlcad/trunk/src/libbn/tests/plane_pt.c 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/src/libbn/tests/plane_pt.c 2018-08-30 11:37:03 UTC (rev 71632) @@ -28,7 +28,7 @@ #include "bn.h" -#define TOL_INIT { BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1e-6, 1.0 - 1e-6, 0.0, 0.0 } +#define TOL_INIT { BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1e-6, 1.0 - 1e-6 } static int Modified: brlcad/trunk/src/libged/facetize.c =================================================================== --- brlcad/trunk/src/libged/facetize.c 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/src/libged/facetize.c 2018-08-30 11:37:03 UTC (rev 71632) @@ -627,11 +627,7 @@ struct db_tree_state init_state; union tree *facetize_tree; struct model *nmg_model; - struct bn_tol *tol; - BU_GET(tol, struct bn_tol); - BN_TOL_INIT(tol); - _ged_facetize_log_nmg(o); db_init_db_tree_state(&init_state, gedp->ged_wdbp->dbip, gedp->ged_wdbp->wdb_resp); @@ -638,18 +634,8 @@ /* Establish tolerances */ init_state.ts_ttol = &gedp->ged_wdbp->wdb_ttol; + init_state.ts_tol = &gedp->ged_wdbp->wdb_tol; - /* We're going to use timeout (potentially) on NMG, so take the wdb - * tol as a starting point and set the timing info */ - tol->dist = gedp->ged_wdbp->wdb_tol.dist; - tol->dist_sq = gedp->ged_wdbp->wdb_tol.dist_sq; - tol->perp = gedp->ged_wdbp->wdb_tol.perp; - tol->para = gedp->ged_wdbp->wdb_tol.para; - tol->tstart = bu_gettime(); - tol->tmax = o->max_time * 1e6; - - init_state.ts_tol = tol; - facetize_tree = (union tree *)0; nmg_model = nmg_mm(); init_state.ts_m = &nmg_model; @@ -673,7 +659,7 @@ return NULL; } BU_UNSETJUMP; - if (failed || i < 0 || (tol->tmax > 0 && ((bu_gettime() - tol->tstart) > tol->tmax))) { + if (failed || i < 0) { /* Destroy NMG */ nmg_km(nmg_model); _ged_facetize_log_default(o); @@ -683,7 +669,7 @@ if (facetize_tree) { if (!BU_SETJUMP) { /* try */ - failed = nmg_boolean(facetize_tree, nmg_model, &RTG.rtg_vlfree, tol, &rt_uniresource); + failed = nmg_boolean(facetize_tree, nmg_model, &RTG.rtg_vlfree, &gedp->ged_wdbp->wdb_tol, &rt_uniresource); } else { /* catch */ BU_UNSETJUMP; @@ -706,7 +692,6 @@ db_free_tree(facetize_tree, &rt_uniresource); } - BU_PUT(tol, struct bn_tol); _ged_facetize_log_default(o); return (failed) ? NULL : nmg_model; } @@ -880,7 +865,7 @@ int decimation_succeeded = 0; struct db_i *dbip = gedp->ged_wdbp->dbip; struct rt_db_internal in_intern; - struct bn_tol btol = {BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1e-6, 1.0 - 1e-6, 0.0, 0.0 }; + struct bn_tol btol = {BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1e-6, 1.0 - 1e-6 }; struct rt_pnts_internal *pnts; struct rt_bot_internal *bot = NULL; struct pnt_normal *pn, *pl; @@ -1115,7 +1100,7 @@ struct directory *dp; struct db_i *dbip = gedp->ged_wdbp->dbip; struct rt_db_internal in_intern; - struct bn_tol btol = {BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1e-6, 1.0 - 1e-6, 0.0, 0.0 }; + struct bn_tol btol = {BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1e-6, 1.0 - 1e-6 }; struct rt_pnts_internal *pnts; struct rt_bot_internal *bot = NULL; struct pnt_normal *pn, *pl; Modified: brlcad/trunk/src/libged/gdiff.c =================================================================== --- brlcad/trunk/src/libged/gdiff.c 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/src/libged/gdiff.c 2018-08-30 11:37:03 UTC (rev 71632) @@ -38,7 +38,7 @@ { size_t i; struct analyze_raydiff_results *results; - struct bn_tol tol = {BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1.0e-6, 1.0 - 1.0e-6, 0.0, 0.0 }; + struct bn_tol tol = {BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1.0e-6, 1.0 - 1.0e-6 }; int do_diff_raytrace = 1; int view_left = 0; Modified: brlcad/trunk/src/libged/pnts.cpp =================================================================== --- brlcad/trunk/src/libged/pnts.cpp 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/src/libged/pnts.cpp 2018-08-30 11:37:03 UTC (rev 71632) @@ -59,7 +59,7 @@ vect_t v1pp, v2pp, v3pp = {0.0, 0.0, 0.0}; vect_t v1fp, v2fp, v3fp = {0.0, 0.0, 0.0}; mat_t rot; - struct bn_tol btol = {BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1e-6, 1.0 - 1e-6, 0.0, 0.0 }; + struct bn_tol btol = {BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1e-6, 1.0 - 1e-6 }; VSET(n1, 0, 0, 1); VSET(v1, 0, ty1, 0); @@ -269,7 +269,7 @@ int flags = 0; double avg_thickness = 0.0; struct rt_db_internal internal; - struct bn_tol btol = {BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1e-6, 1.0 - 1e-6, 0.0, 0.0 }; + struct bn_tol btol = {BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1e-6, 1.0 - 1e-6 }; struct rt_pnts_internal *pnts = NULL; const char *pnt_prim= NULL; const char *obj_name = NULL; Modified: brlcad/trunk/src/libged/shape_recognition.cpp =================================================================== --- brlcad/trunk/src/libged/shape_recognition.cpp 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/src/libged/shape_recognition.cpp 2018-08-30 11:37:03 UTC (rev 71632) @@ -535,7 +535,7 @@ // Verify that the resulting csg tree and the original B-Rep pass a difference test. if (verify) { ON_BoundingBox bbox; - struct bn_tol tol = {BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1.0e-6, 1.0 - 1.0e-6, 0.0, 0.0 }; + struct bn_tol tol = {BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1.0e-6, 1.0 - 1.0e-6 }; brep->GetBoundingBox(bbox); tol.dist = (bbox.Diagonal().Length() / 100.0); bu_vls_printf(log, "Analyzing %s csg conversion, tol %f...\n", dp->d_namep, tol.dist); Modified: brlcad/trunk/src/libnmg/bool.c =================================================================== --- brlcad/trunk/src/libnmg/bool.c 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/src/libnmg/bool.c 2018-08-30 11:37:03 UTC (rev 71632) @@ -40,7 +40,6 @@ #include "vmath.h" #include "bu/malloc.h" -#include "bu/time.h" #include "bn/plot3.h" #include "nmg.h" @@ -696,16 +695,10 @@ } nmg_shell_coplanar_face_merge(sA, tol, 1, vlfree); - - NMG_TIMEOUT("nmg_bool()", tol); - nmg_shell_coplanar_face_merge(sB, tol, 1, vlfree); - NMG_TIMEOUT("nmg_bool()", tol); - nmg_model_fuse(m, vlfree, tol); - if (nmg_check_closed_shell(sA, tol)) { if (nmg_debug & DEBUG_BOOL && nmg_debug & DEBUG_PLOTEM) { @@ -770,8 +763,6 @@ /* Perform shell/shell intersections */ nmg_crackshells(sA, sB, vlfree, tol); - NMG_TIMEOUT("nmg_bool()", tol); - if (nmg_debug & DEBUG_BOOL) { bu_log("Just After Crackshells:\nShell A:\n"); nmg_pr_s_briefly(sA, 0); @@ -905,8 +896,6 @@ nmg_vmodel(m); } - NMG_TIMEOUT("nmg_bool()", tol); - nmg_m_reindex(m, 0); /* Allocate storage for classlist[]. Allocate each of the 8 class @@ -955,8 +944,6 @@ m->manifolds = (char *)NULL; } - NMG_TIMEOUT("nmg_bool()", tol); - if (nmg_debug & (DEBUG_GRAPHCL|DEBUG_PL_LOOP)) { nmg_class_nothing_broken = 1; Modified: brlcad/trunk/src/libnmg/eval.c =================================================================== --- brlcad/trunk/src/libnmg/eval.c 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/src/libnmg/eval.c 2018-08-30 11:37:03 UTC (rev 71632) @@ -51,7 +51,7 @@ }; -HIDDEN void nmg_eval_shell(struct shell *s, struct nmg_bool_state *bs, const struct bn_tol *tol); +HIDDEN void nmg_eval_shell(struct shell *s, struct nmg_bool_state *bs); HIDDEN void nmg_eval_plot(struct nmg_bool_state *bs, int num); @@ -228,10 +228,10 @@ bool_state.bs_tol = tol; bool_state.bs_isA = 1; - nmg_eval_shell(sA, &bool_state, tol); + nmg_eval_shell(sA, &bool_state); bool_state.bs_isA = 0; - nmg_eval_shell(sB, &bool_state, tol); + nmg_eval_shell(sB, &bool_state); if (nmg_debug & DEBUG_BOOLEVAL) { bu_log("nmg_evaluate_boolean(sA=%p, sB=%p, op=%d), evaluations done\n", @@ -353,7 +353,7 @@ * Note that there is no moving of items from one shell to another. */ HIDDEN void -nmg_eval_shell(register struct shell *s, struct nmg_bool_state *bs, const struct bn_tol *tol) +nmg_eval_shell(register struct shell *s, struct nmg_bool_state *bs) { struct faceuse *fu; struct faceuse *nextfu; @@ -380,8 +380,6 @@ NMG_CK_FACEUSE(fu); nextfu = BU_LIST_PNEXT(faceuse, fu); - NMG_TIMEOUT("nmg_eval_shell()", tol); - /* Faceuse mates will be handled at same time as OT_SAME fu */ if (fu->orientation != OT_SAME) { fu = nextfu; @@ -474,9 +472,6 @@ lu = nextlu; continue; } - - NMG_TIMEOUT("nmg_eval_shell()", tol); - NMG_CK_LOOP(lu->l_p); switch (nmg_eval_action(&lu->l_p->magic, bs)) { case BACTION_KILL: @@ -508,7 +503,6 @@ nexteu = BU_LIST_PNEXT(edgeuse, nexteu); /* Consider this edge */ - NMG_TIMEOUT("nmg_eval_shell()", tol); NMG_CK_EDGE(eu->e_p); switch (nmg_eval_action(&eu->e_p->magic, bs)) { case BACTION_KILL: @@ -553,7 +547,6 @@ vu = BU_LIST_PNEXT(vertexuse, &lu->down_hd); NMG_CK_VERTEXUSE(vu); NMG_CK_VERTEX(vu->v_p); - NMG_TIMEOUT("nmg_eval_shell()", tol); switch (nmg_eval_action(&vu->v_p->magic, bs)) { case BACTION_KILL: /* Eliminate the loopuse, and mate */ Modified: brlcad/trunk/src/libnmg/fuse.c =================================================================== --- brlcad/trunk/src/libnmg/fuse.c 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/src/libnmg/fuse.c 2018-08-30 11:37:03 UTC (rev 71632) @@ -39,7 +39,6 @@ #include "bu/malloc.h" #include "bu/sort.h" #include "bu/str.h" -#include "bu/time.h" #include "bn/mat.h" #include "nmg.h" @@ -1707,8 +1706,6 @@ if (fg1 == fg2) continue; /* Already shared */ - NMG_TIMEOUT("nmg_model_face_fuse()", tol); - if (nmg_two_face_fuse(f1, f2, tol) > 0) total++; } @@ -1850,8 +1847,6 @@ int code; struct edgeuse *new_eu; - NMG_TIMEOUT("nmg_break_e_on_v()", tol); - v = *vp; if (va == v) continue; if (vb == v) continue; @@ -1871,7 +1866,6 @@ continue; } - if (nmg_debug & (DEBUG_BOOL|DEBUG_BASIC)) bu_log("nmg_break_e_on_v(): breaking eu %p (e=%p) at vertex %p\n", (void *)eu, (void *)eu->e_p, (void *)v); @@ -1962,30 +1956,21 @@ } } - NMG_TIMEOUT("nmg_model_fuse()", tol); - /* Step 2 -- the face geometry */ if (nmg_debug & DEBUG_BASIC) bu_log("nmg_model_fuse: faces\n"); total += nmg_model_face_fuse(m, vlfree, tol); - NMG_TIMEOUT("nmg_model_fuse()", tol); - /* Step 3 -- edges */ if (nmg_debug & DEBUG_BASIC) bu_log("nmg_model_fuse: edges\n"); total += nmg_edge_fuse(&m->magic, vlfree, tol); - - NMG_TIMEOUT("nmg_model_fuse()", tol); - /* Step 4 -- edge geometry */ if (nmg_debug & DEBUG_BASIC) bu_log("nmg_model_fuse: edge geometries\n"); total += nmg_edge_g_fuse(&m->magic, vlfree, tol); - NMG_TIMEOUT("nmg_model_fuse()", tol); - if (nmg_debug & DEBUG_BASIC && total > 0) bu_log("nmg_model_fuse(): %d entities fused\n", total); return total; Modified: brlcad/trunk/src/libnmg/misc.c =================================================================== --- brlcad/trunk/src/libnmg/misc.c 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/src/libnmg/misc.c 2018-08-30 11:37:03 UTC (rev 71632) @@ -4147,7 +4147,6 @@ for (BU_LIST_FOR (eu, edgeuse, &lu->down_hd)) { /* build two lists, one of winged edges, the other not */ - NMG_TIMEOUT("nmg_decompose_shell()", tol); if (nmg_radial_face_count(eu, s) > 2) bu_ptbl_ins_unique(&shared_edges, (long *)eu); else @@ -4191,7 +4190,6 @@ for (BU_LIST_FOR (eu, edgeuse, &lu->down_hd)) { /* build two lists, one of winged edges, the other not */ - NMG_TIMEOUT("nmg_decompose_shell()", tol); if (nmg_radial_face_count(eu, s) > 2) bu_ptbl_ins_unique(&shared_edges, (long *)eu); else @@ -4237,7 +4235,6 @@ for (i=0; i<BU_PTBL_LEN(&shared_edges); i++) { int faces_at_edge=0; size_t k; - NMG_TIMEOUT("nmg_decompose_shell()", tol); /* Construct a list of shells for this edge. * shells_at_edge[i] is the number of edgeuses of this @@ -4297,7 +4294,6 @@ for (i=0; i<BU_PTBL_LEN(&shared_edges); i++) { struct faceuse *fu_of_eu1; int found_missed_face=0; - NMG_TIMEOUT("nmg_decompose_shell()", tol); eu = (struct edgeuse *)BU_PTBL_GET(&shared_edges, i); NMG_CK_EDGEUSE(eu); @@ -4385,7 +4381,6 @@ /* push all edgeuses of "fu" onto the stack */ for (BU_LIST_FOR (lu, loopuse, &fu->lu_hd)) { NMG_CK_LOOPUSE(lu); - NMG_TIMEOUT("nmg_decompose_shell()", tol); if (BU_LIST_FIRST_MAGIC(&lu->down_hd) != NMG_EDGEUSE_MAGIC) continue; @@ -4433,7 +4428,6 @@ continue; for (BU_LIST_FOR (eu, edgeuse, &lu->down_hd)) { /* build two lists, one of winged edges, the other not */ - NMG_TIMEOUT("nmg_decompose_shell()", tol); if (nmg_radial_face_count(eu, s) > 2) bu_ptbl_ins_unique(&shared_edges, (long *)eu); else @@ -4475,7 +4469,6 @@ fu = BU_LIST_FIRST(faceuse, &s->fu_hd); while (BU_LIST_NOT_HEAD(fu, &s->fu_hd)) { struct faceuse *next_fu; - NMG_TIMEOUT("nmg_decompose_shell()", tol); next_fu = BU_LIST_NEXT(faceuse, &fu->l); while (BU_LIST_NOT_HEAD(next_fu, &s->fu_hd) && next_fu->orientation != OT_SAME) Modified: brlcad/trunk/src/librt/db_diff.c =================================================================== --- brlcad/trunk/src/librt/db_diff.c 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/src/librt/db_diff.c 2018-08-30 11:37:03 UTC (rev 71632) @@ -341,7 +341,7 @@ /* object type isn't a normal parameter attribute, so add it as such */ if (el->intern->idb_minor_type == DB5_MINORTYPE_BRLCAD_ARB8) { - struct bn_tol arb_tol = {BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1e-6, 1.0 - 1e-6, 0.0, 0.0 }; + struct bn_tol arb_tol = {BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1e-6, 1.0 - 1e-6 }; bu_avs_add(el->params, "DB5_MINORTYPE", type_to_str(el->intern, rt_arb_std_type(el->intern, &arb_tol))); } else { bu_avs_add(el->params, "DB5_MINORTYPE", el->intern->idb_meth->ft_label); Modified: brlcad/trunk/src/librt/db_fullpath.c =================================================================== --- brlcad/trunk/src/librt/db_fullpath.c 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/src/librt/db_fullpath.c 2018-08-30 11:37:03 UTC (rev 71632) @@ -255,7 +255,7 @@ { size_t i; int type; - const struct bn_tol tol = {BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1e-6, 1.0 - 1e-6, 0.0, 0.0 }; + const struct bn_tol tol = {BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1e-6, 1.0 - 1e-6 }; if (!full_path) return; Modified: brlcad/trunk/src/librt/primitives/extrude/extrude.c =================================================================== --- brlcad/trunk/src/librt/primitives/extrude/extrude.c 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/src/librt/primitives/extrude/extrude.c 2018-08-30 11:37:03 UTC (rev 71632) @@ -71,9 +71,7 @@ RT_LEN_TOL, RT_LEN_TOL*RT_LEN_TOL, 0.0, - 1.0, - 0.0, - 0.0 + 1.0 }; Modified: brlcad/trunk/src/librt/primitives/nmg/nmg.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg.c 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/src/librt/primitives/nmg/nmg.c 2018-08-30 11:37:03 UTC (rev 71632) @@ -36,7 +36,6 @@ #include "vmath.h" #include "bu/cv.h" -#include "bu/time.h" #include "bg/polygon.h" #include "nmg.h" #include "rt/db4.h" @@ -4668,9 +4667,7 @@ /* Handle a boolean operation node. First get its leaves. */ tl = nmg_booltree_evaluate(tp->tr_b.tb_left, vlfree, tol, resp); - NMG_TIMEOUT("nmg_booltree_evaluate()", tol); tr = nmg_booltree_evaluate(tp->tr_b.tb_right, vlfree, tol, resp); - NMG_TIMEOUT("nmg_booltree_evaluate()", tol); if (tl) { RT_CK_TREE(tl); @@ -4793,8 +4790,6 @@ nmg_merge_models(tl->tr_d.td_r->m_p, tr->tr_d.td_r->m_p); } - NMG_TIMEOUT("nmg_booltree_evaluate()", tol); - /* input r1 and r2 are destroyed, output is new region */ reg = nmg_do_bool(tl->tr_d.td_r, tr->tr_d.td_r, op, vlfree, tol); Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_mirror.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_mirror.c 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_mirror.c 2018-08-30 11:37:03 UTC (rev 71632) @@ -55,7 +55,7 @@ static point_t origin = {0.0, 0.0, 0.0}; static const struct bn_tol tol = { - BN_TOL_MAGIC, 0.0005, 0.0005*0.0005, 1e-6, 1-1e-6, 0.0, 0.0 + BN_TOL_MAGIC, 0.0005, 0.0005*0.0005, 1e-6, 1-1e-6 }; RT_CK_DB_INTERNAL(ip); Modified: brlcad/trunk/src/librt/search.c =================================================================== --- brlcad/trunk/src/librt/search.c 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/src/librt/search.c 2018-08-30 11:37:03 UTC (rev 71632) @@ -995,7 +995,7 @@ struct directory *dp; int type_match = 0; int type; - const struct bn_tol arb_tol = {BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1.0e-6, 1.0 - 1.0e-6, 0.0, 0.0 }; + const struct bn_tol arb_tol = {BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST * BN_TOL_DIST, 1.0e-6, 1.0 - 1.0e-6 }; dp = DB_FULL_PATH_CUR_DIR(db_node->path); if (!dp) return 0; Modified: brlcad/trunk/src/libtclcad/libfuncs.c =================================================================== --- brlcad/trunk/src/libtclcad/libfuncs.c 2018-08-30 07:42:42 UTC (rev 71631) +++ brlcad/trunk/src/libtclcad/libfuncs.c 2018-08-30 11:37:03 UTC (rev 71632) @@ -440,7 +440,7 @@ fastf_t dist; int ret; static const struct bn_tol tol = { - BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST*BN_TOL_DIST, 1e-6, 1-1e-6, 0.0, 0.0 + BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST*BN_TOL_DIST, 1e-6, 1-1e-6 }; if (argc != 4) { @@ -499,7 +499,7 @@ vect_t c = VINIT_ZERO; int i; static const struct bn_tol tol = { - BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST*BN_TOL_DIST, 1e-6, 1-1e-6, 0.0, 0.0 + BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST*BN_TOL_DIST, 1e-6, 1-1e-6 }; if (argc != 5) { @@ -556,7 +556,7 @@ vect_t dir, c; int i; static const struct bn_tol tol = { - BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST*BN_TOL_DIST, 1e-6, 1-1e-6, 0.0, 0.0 + BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST*BN_TOL_DIST, 1e-6, 1-1e-6 }; if (argc != 5) { bu_vls_printf(&result, @@ -979,7 +979,7 @@ mat_t o; vect_t from, to; static const struct bn_tol tol = { - BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST*BN_TOL_DIST, 1e-6, 1-1e-6, 0.0, 0.0 + BN_TOL_MAGIC, BN_TOL_DIST, BN_TOL_DIST*BN_TOL_DIST, 1e-6, 1-1e-6 }; if (argc < 3 || bn_decode_vect(from, argv[1]) < 3 || This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits