Revision: 78117
          http://sourceforge.net/p/brlcad/code/78117
Author:   starseeker
Date:     2021-01-25 15:50:04 +0000 (Mon, 25 Jan 2021)
Log Message:
-----------
Look at how each instance needs to be edited.

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-01-25 15:42:44 UTC (rev 
78116)
+++ brlcad/trunk/src/libged/npush/npush.cpp     2021-01-25 15:50:04 UTC (rev 
78117)
@@ -777,14 +777,6 @@
           continue;
        if (dpi.iname.length()) {
            std::cout << "Copy " << dpi.dp->d_namep << " to " << dpi.iname << 
"\n";
-           if (dpi.is_leaf && !bn_mat_is_equal(dpi.mat, bn_mat_identity, 
s.tol)) {
-               bn_mat_print("applied", dpi.mat);
-           }
-       } else {
-           if (dpi.is_leaf && !bn_mat_is_equal(dpi.mat, bn_mat_identity, 
s.tol)) {
-               std::cout << "Push " << dpi.dp->d_namep << "\n";
-               bn_mat_print("applied", dpi.mat);
-           }
        }
     }
 
@@ -808,7 +800,28 @@
     // if the internal trees and parameters still need to be updated.
     //
     // TODO: Check the existing push and xpush codes for how to alter the comb 
trees.
-
+    for (in_it = s.instances.begin(); in_it != s.instances.end(); in_it++) {
+       const dp_i &dpi = *in_it;
+       if (!dpi.push_obj)
+          continue;
+       if (dpi.iname.length()) {
+           if (!dpi.is_leaf && (dpi.dp->d_flags & RT_DIR_COMB)) {
+               std::cout << dpi.iname << " tree edited && matrix to IDN\n";
+           }
+           if (dpi.is_leaf && !bn_mat_is_equal(dpi.mat, bn_mat_identity, 
s.tol)) {
+               std::cout << dpi.iname << "\n";
+               bn_mat_print("applied", dpi.mat);
+           }
+       } else {
+           if (!dpi.is_leaf && (dpi.dp->d_flags & RT_DIR_COMB)) {
+               std::cout << dpi.dp->d_namep << " matrix to IDN\n";
+           }
+           if (dpi.is_leaf && !bn_mat_is_equal(dpi.mat, bn_mat_identity, 
s.tol)) {
+               std::cout << dpi.dp->d_namep << "\n";
+               bn_mat_print("applied", dpi.mat);
+           }
+       }
+    }
     return GED_OK;
 }
 

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

Reply via email to