Revision: 78111
http://sourceforge.net/p/brlcad/code/78111
Author: starseeker
Date: 2021-01-23 13:48:50 +0000 (Sat, 23 Jan 2021)
Log Message:
-----------
comment adjustments
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-22 22:02:34 UTC (rev
78110)
+++ brlcad/trunk/src/libged/npush/npush.cpp 2021-01-23 13:48:50 UTC (rev
78111)
@@ -834,8 +834,6 @@
//
// Step one is to iterate over the instances. If a new iname has been
// assigned, the existing object needs to be copied under the new name.
- // Once all db objects needed are in place (in unaltered form) we walk a
- // final time and updating combs and primitives accordingly.
std::set<dp_i>::iterator in_it;
for (in_it = instset.begin(); in_it != instset.end(); in_it++) {
const dp_i &dpi = *in_it;
@@ -845,6 +843,9 @@
std::cout << "Copy " << dpi.dp->d_namep << " to " << dpi.iname <<
"\n";
}
+ // Once all db objects needed are in place (in unaltered form) we walk a
+ // final time and updating combs and primitives accordingly.
+ //
// For each instance in the comb tree, try to find the corresponding dp_i
// in the instset (matrix + dp find search - create a dp_i to supply to
find, capture
// the iterator of the search result. If not == end(), it will have the
dp_i with
@@ -854,6 +855,13 @@
// assign the dp_i matrix. If the leaf is a solid and the flag is set,
// assign IDN matrix and update solid parameters.
//
+ // The details of this final tree walk are critically important - if a
tree leaf
+ // has a new iname, that name is what the tree walk must use for
processing the
+ // branch - NOT the original name in the tree instance. This is why the
final
+ // tree walk can't proceed until all the objects are in place - the
db_lookup
+ // and internal representation queries of the tree walk must all succeed,
even
+ // 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.
std::map<struct directory *, std::vector<dp_i>> dpref;
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