Revision: 78098
http://sourceforge.net/p/brlcad/code/78098
Author: starseeker
Date: 2021-01-21 16:04:35 +0000 (Thu, 21 Jan 2021)
Log Message:
-----------
Add comments
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-20 17:33:33 UTC (rev
78097)
+++ brlcad/trunk/src/libged/npush/npush.cpp 2021-01-21 16:04:35 UTC (rev
78098)
@@ -221,6 +221,7 @@
/* User-supplied flags controlling tree walking behavior */
int max_depth = 0;
bool stop_at_regions = false;
+ bool stop_at_shapes = false;
/* Primary containers holding information gathered during tree walk */
std::set<combtree_i> t_i;
@@ -454,14 +455,20 @@
return;
if (!survey) {
- if (!(dp->d_flags & RT_DIR_COMB) && (!s->max_depth ||
depth+1 <= s->max_depth)) {
- // If dp is a solid, we're not depth limited, and the
solid supports it we apply
- // the matrix to the primitive itself. The comb dp_i
instance will use the IDN matrix.
+ if (!(dp->d_flags & RT_DIR_COMB) && (!s->max_depth ||
depth+1 <= s->max_depth) && !s->stop_at_shapes) {
+ // If dp is a solid, we're not depth limited, we're not
+ // stopping above shapes, and the solid supports it we
+ // apply the matrix to the primitive itself. The comb
+ // reference will use the IDN matrix.
bu_log("Push leaf (finalize matrix or solid params):
%s->%s\n", parent_dp->d_namep, dp->d_namep);
dnew.apply_to_solid = true;
}
}
+ // If we haven't already inserted an identical instance, record
this new
+ // entry as being part of the tree. (Note that we're not
concerned with the
+ // boolean set aspects of the tree's definition here, only
unique volumes in
+ // space, so this set does not exactly mimic the original comb
tree structure.)
if (s->ct[combtree_ind].t.find(dnew) ==
s->ct[combtree_ind].t.end())
s->ct[combtree_ind].t.insert(dnew);
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