Revision: 70784 http://sourceforge.net/p/brlcad/code/70784 Author: starseeker Date: 2018-02-28 17:09:37 +0000 (Wed, 28 Feb 2018) Log Message: ----------- if we're going to shoot, need to make sure we're set up for it
Modified Paths: -------------- brlcad/trunk/src/libanalyze/nirt.cxx Modified: brlcad/trunk/src/libanalyze/nirt.cxx =================================================================== --- brlcad/trunk/src/libanalyze/nirt.cxx 2018-02-28 16:57:52 UTC (rev 70783) +++ brlcad/trunk/src/libanalyze/nirt.cxx 2018-02-28 17:09:37 UTC (rev 70784) @@ -2011,10 +2011,19 @@ nerr(nss, "Error: could not open file %s\n", argv[0]); return -1; } - - // TODO - rethink this container... - _nirt_init_ovlp(nss); + if (nss->i->need_reprep) { + /* If we need to (re)prep, do it now. Failure is an error. */ + if (_nirt_raytrace_prep(nss)) { + nerr(nss, "Error: raytrace prep failed!\n"); + return -1; + } + } else { + /* Based on current settings, tell the ap which rtip to use */ + nss->i->ap->a_rt_i = _nirt_get_rtip(nss); + nss->i->ap->a_resource = _nirt_get_resource(nss); + } + have_ray = 0; while (std::getline(ifs, line)) { struct nirt_diff *df; @@ -2033,8 +2042,14 @@ // Have ray already - execute current ray, store results in // diff database (if any diffs were found), then clear expected // results and old ray + for (int i = 0; i < 3; ++i) { + nss->i->ap->a_ray.r_pt[i] = nss->i->vals->orig[i]; + nss->i->ap->a_ray.r_dir[i] = nss->i->vals->dir[i]; + } + // TODO - rethink this container... + _nirt_init_ovlp(nss); (void)rt_shootray(nss->i->ap); - if (nss->i->diff->diffs.size() > 0) { + if (nss->i->diff->diffs.size() > 0) { nss->i->diffs.push_back(nss->i->diff); } else { delete nss->i->diff; @@ -2057,10 +2072,7 @@ bu_log("origin : %0.17f, %0.17f, %0.17f\n", V3ARGS(df->orig)); bu_log("direction: %0.17f, %0.17f, %0.17f\n", V3ARGS(df->dir)); _nirt_targ2grid(nss); - for (int i = 0; i < 3; ++i) { - nss->i->ap->a_ray.r_pt[i] = nss->i->vals->orig[i]; - nss->i->ap->a_ray.r_dir[i] = nss->i->vals->dir[i]; - } + _nirt_dir2ae(nss); nss->i->diff = df; cnt = 0; continue; @@ -3349,7 +3361,7 @@ n->diff_settings->report_overlap_dists = 1; n->diff_settings->report_overlap_obliq = 1; n->diff_settings->dist_delta_tol = BN_TOL_DIST; - n->diff_settings->obliq_delta_tol = VUNITIZE_TOL; + n->diff_settings->obliq_delta_tol = BN_TOL_DIST; n->diff_settings->los_delta_tol = BN_TOL_DIST; n->diff_settings->scaled_los_delta_tol = BN_TOL_DIST; 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