Revision: 65143
http://sourceforge.net/p/brlcad/code/65143
Author: starseeker
Date: 2015-06-01 23:43:39 +0000 (Mon, 01 Jun 2015)
Log Message:
-----------
Fix midpoint calculation.
Modified Paths:
--------------
brlcad/trunk/src/libanalyze/raydiff.c
brlcad/trunk/src/libged/gdiff.c
Modified: brlcad/trunk/src/libanalyze/raydiff.c
===================================================================
--- brlcad/trunk/src/libanalyze/raydiff.c 2015-06-01 22:18:55 UTC (rev
65142)
+++ brlcad/trunk/src/libanalyze/raydiff.c 2015-06-01 23:43:39 UTC (rev
65143)
@@ -115,12 +115,12 @@
state->have_diffs = 1;
if (state->left && !bu_strncmp(part->pt_regionp->reg_name+1,
state->left_name, strlen(state->left_name))) {
RDIFF_ADD_DSEG(state->left, in_pt, out_pt);
- bu_log("LEFT diff vol (%s) (len: %f): %g %g %g -> %g %g %g\n",
part->pt_regionp->reg_name, part_len, V3ARGS(in_pt), V3ARGS(out_pt));
+ /*bu_log("LEFT diff vol (%s) (len: %f): %g %g %g -> %g %g
%g\n", part->pt_regionp->reg_name, part_len, V3ARGS(in_pt), V3ARGS(out_pt));*/
continue;
}
if (state->right && !bu_strncmp(part->pt_regionp->reg_name+1,
state->right_name, strlen(state->right_name))) {
RDIFF_ADD_DSEG(state->right, in_pt, out_pt);
- bu_log("RIGHT diff vol (%s) (len: %f): %g %g %g -> %g %g %g\n",
part->pt_regionp->reg_name, part_len, V3ARGS(in_pt), V3ARGS(out_pt));
+ /*bu_log("RIGHT diff vol (%s) (len: %f): %g %g %g -> %g %g
%g\n", part->pt_regionp->reg_name, part_len, V3ARGS(in_pt), V3ARGS(out_pt));*/
continue;
}
/* If we aren't collecting segments, we already have our final
answer */
@@ -135,8 +135,8 @@
HIDDEN int
raydiff_overlap(struct application *ap,
struct partition *pp,
- struct region *reg1,
- struct region *reg2,
+ struct region *UNUSED(reg1),
+ struct region *UNUSED(reg2),
struct partition *UNUSED(hp))
{
point_t in_pt, out_pt;
@@ -150,7 +150,7 @@
if (overlap_len > state->tol) {
RDIFF_ADD_DSEG(state->both, in_pt, out_pt);
- bu_log("OVERLAP (%s and %s) (len: %f): %g %g %g -> %g %g %g\n",
reg1->reg_name, reg2->reg_name, overlap_len, V3ARGS(in_pt), V3ARGS(out_pt));
+ /*bu_log("OVERLAP (%s and %s) (len: %f): %g %g %g -> %g %g %g\n",
reg1->reg_name, reg2->reg_name, overlap_len, V3ARGS(in_pt), V3ARGS(out_pt));*/
}
return 0;
@@ -230,7 +230,7 @@
/* Now we've got the bounding box - set up the grids */
VMOVE(min, rtip->mdl_min);
VMOVE(max, rtip->mdl_max);
- VSET(mid, (max[0] - min[0])/2, (max[1] - min[1])/2, (max[2] - min[2])/2);
+ VSET(mid, (max[0] + min[0])/2, (max[1] + min[1])/2, (max[2] + min[2])/2);
BU_GET(xdata, struct rt_pattern_data);
VSET(xdata->center_pt, min[0] - 0.1 * min[0], mid[1], mid[2]);
Modified: brlcad/trunk/src/libged/gdiff.c
===================================================================
--- brlcad/trunk/src/libged/gdiff.c 2015-06-01 22:18:55 UTC (rev 65142)
+++ brlcad/trunk/src/libged/gdiff.c 2015-06-01 23:43:39 UTC (rev 65143)
@@ -140,10 +140,10 @@
if ((argc - bu_optind) != 2) {
return GED_ERROR;
}
-
+/*
bu_log("left: %s", argv[bu_optind]);
bu_log("right: %s", argv[bu_optind+1]);
-
+*/
analyze_raydiff(&results, gedp->ged_wdbp->dbip, argv[bu_optind],
argv[bu_optind+1], &tol);
{
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits