Revision: 78175
http://sourceforge.net/p/brlcad/code/78175
Author: starseeker
Date: 2021-02-04 17:16:26 +0000 (Thu, 04 Feb 2021)
Log Message:
-----------
Add a note addressing tor's issue with non uniform matrices and why we're
handling it as we are. (Duplicating push's behavior and letting the low level
primitive routines deal with it, and not considering a failure to apply such a
matrix a push failure.)
Modified Paths:
--------------
brlcad/trunk/src/libged/npush/npush.cpp
Modified: brlcad/trunk/src/libged/npush/npush.cpp
===================================================================
--- brlcad/trunk/src/libged/npush/npush.cpp 2021-02-04 16:28:11 UTC (rev
78174)
+++ brlcad/trunk/src/libged/npush/npush.cpp 2021-02-04 17:16:26 UTC (rev
78175)
@@ -863,6 +863,28 @@
if (dpi.apply_to_solid) {
// If there is a non-IDN matrix, this is where we apply it
// First step, check for validity.
+ //
+ // Note: tor has a specific restriction in that it needs a uniform
+ // matrix - if I'm deciphering the code in rt_tor_import5
+ // correctly, it handles this by simply ignoring a non-conforming
+ // matrix on import. As currently implemented, this limitation
+ // applies whether the matrix is above the torus in a given tree or
+ // an attempt is made to apply the matrix directly to the solid's
+ // parameters.
+ //
+ // Because the same bn_mat_is_non_unif matrix is ignored for a tor
+ // regardless of where the problem matrix is in the tree, trying to
+ // apply this matrix to the tor is not currently considered a
+ // "failure" - previously a "push" operation on such a tor would
+ // complete, clear the matrix from the tree, and simply skip
+ // applying the updates to the torus. This certainly is a failure
+ // to make the specified changes to the torus, but since the desired
+ // shape was never achieved in the tree with or without the matrix
+ // above it, the geometry the raytracer reports has not changed and
+ // the realized shape pre and post push is consistent.
+ //
+ // Accordingly, we're deliberately NOT checking for the tor+non_unif
+ // case in this validation step.
if (bn_mat_ck(dpi.dp->d_namep, dpi.mat) < 0) {
if (s->msgs) {
char *ps = db_path_to_string(dfp);
@@ -874,6 +896,7 @@
return;
}
+
if (s->verbosity > 3 && !bn_mat_is_identity(dpi.mat) && s->msgs) {
bn_mat_print_vls(dpi.dp->d_namep, dpi.mat, s->msgs);
bn_mat_print_vls("curr_mat", *curr_mat, s->msgs);
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