Compare commits
76
Commits
editchecks
...
rel8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a1bd81a5e | ||
|
|
0aa7609393 | ||
|
|
ab7b16902d | ||
|
|
4d9ffadaad | ||
|
|
8f7dc55f13 | ||
|
|
e822107a0c | ||
|
|
a20a5f73a5 | ||
|
|
a41a338928 | ||
|
|
dd221b929f | ||
|
|
edaad7c71c | ||
|
|
2615ec872f | ||
|
|
356e362186 | ||
|
|
bbfa5ae04c | ||
|
|
c8f7063569 | ||
|
|
033b4220bd | ||
|
|
cb85742ecb | ||
|
|
e922a74d2f | ||
|
|
a3465f7e5f | ||
|
|
6dfb3c4acd | ||
|
|
4cfeefa471 | ||
|
|
028adc49f6 | ||
|
|
3368e0fc5b | ||
|
|
b0eb772c21 | ||
|
|
81aebac404 | ||
|
|
4710a299ee | ||
|
|
96a383df9a | ||
|
|
c566325766 | ||
|
|
d246ada570 | ||
|
|
3f9b0eadf0 | ||
|
|
0ac6e2b6f8 | ||
|
|
18fe5c27e0 | ||
|
|
006aff5ccb | ||
|
|
2938dc32e6 | ||
|
|
7441ace368 | ||
|
|
a14235c21a | ||
|
|
8b4b132998 | ||
|
|
a2eb1d7053 | ||
|
|
576e42d467 | ||
|
|
dfb7e7256f | ||
|
|
3946bb97f5 | ||
|
|
a54373391d | ||
|
|
f02d9a1276 | ||
|
|
5e6458cc7b | ||
|
|
222e2f5660 | ||
|
|
0d34165941 | ||
|
|
be8713a118 | ||
|
|
6278b0a236 | ||
|
|
740375f940 | ||
|
|
4fd6e41f83 | ||
|
|
0de82dac9f | ||
|
|
07f517d32a | ||
|
|
35a506e59c | ||
|
|
87f476bc5b | ||
|
|
8c23a6c2e1 | ||
|
|
cda9251819 | ||
|
|
6f1b76a51c | ||
|
|
c78692d17a | ||
|
|
e3b768dedf | ||
|
|
111dedb70c | ||
|
|
8ba5fd9e89 | ||
|
|
96699461aa | ||
|
|
a05314f257 | ||
|
|
6c12c93d5e | ||
|
|
77ae2ff423 | ||
|
|
73cb8a50c2 | ||
|
|
560bba2675 | ||
|
|
f023683ca5 | ||
|
|
bcfa0eaf60 | ||
|
|
cf37de9681 | ||
|
|
44e2761e88 | ||
|
|
ba82a4c175 | ||
|
|
4f71deda9f | ||
|
|
d36c697803 | ||
|
|
df6f53363d | ||
|
|
9a1d54855b | ||
|
|
f1a110e4a2 |
@@ -2094,6 +2094,8 @@ set(toplevel_DOCFILES
|
||||
)
|
||||
BRLCAD_ADDDATA(toplevel_DOCFILES ".")
|
||||
|
||||
CMAKEFILES(REL8.txt)
|
||||
|
||||
# Now that everything is configured, print a summary of the build
|
||||
# settings.
|
||||
if(NOT BRLCAD_DISABLE_SUMMARY)
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
Release 8 notes:
|
||||
|
||||
Idea: For every primitive written out to a .g database, include as a standard
|
||||
component a version id so (for example) we can have multiple different versions
|
||||
of brep data storage, and have the libg I/O system be able to handle it (or
|
||||
skip it) cleanly. db_upgrade would take an older .g and assign version 1 to
|
||||
all existing primitives writing out the new version. A downgrade would either
|
||||
down-convert (if possible) or skip and report when version 1 isn't an option.
|
||||
This would make .g files backwards incompatible since the on-disk serialization
|
||||
would change for every object, but with versioning it should (hopefully) be the
|
||||
last time we would need to do that.
|
||||
|
||||
Idea: Reorder the ad-hoc list of librt primitive ids to be grouped by
|
||||
mathematical surface order. Minor, but would make that code a bit cleaner.
|
||||
|
||||
Remove the global region_id based material table (rt_material_head and related
|
||||
code). There are other ways to achieve this result (search -exec assignment of
|
||||
colors, for example) and it's not an intuitive mechanism for folks who don't
|
||||
know where/how to look for it. db_upgrade can be updated to do the attr color
|
||||
assignments to produce a .g that doesn't need it, so there will be a clear and
|
||||
automatic migration path as well.
|
||||
|
||||
@@ -35,12 +35,11 @@
|
||||
|
||||
extern "C++" {
|
||||
|
||||
enum op_type {
|
||||
BOOLEAN_UNION = 0,
|
||||
BOOLEAN_INTERSECT = 1,
|
||||
BOOLEAN_DIFF = 2,
|
||||
BOOLEAN_XOR = 3
|
||||
};
|
||||
enum op_type {
|
||||
BOOLEAN_UNION = 0,
|
||||
BOOLEAN_INTERSECT = 1,
|
||||
BOOLEAN_DIFF = 2
|
||||
};
|
||||
|
||||
/**
|
||||
* Evaluate NURBS boolean operations.
|
||||
|
||||
+8
-9
@@ -39,17 +39,16 @@ __BEGIN_DECLS
|
||||
#define OP_UNION MKOP(2) /**< @brief Binary: L union R */
|
||||
#define OP_INTERSECT MKOP(3) /**< @brief Binary: L intersect R */
|
||||
#define OP_SUBTRACT MKOP(4) /**< @brief Binary: L subtract R */
|
||||
#define OP_XOR MKOP(5) /**< @brief Binary: L xor R, not both*/
|
||||
#define OP_REGION MKOP(6) /**< @brief Leaf: tr_stp -> combined_tree_state */
|
||||
#define OP_NOP MKOP(7) /**< @brief Leaf with no effect */
|
||||
#define OP_REGION MKOP(5) /**< @brief Leaf: tr_stp -> combined_tree_state */
|
||||
#define OP_NOP MKOP(6) /**< @brief Leaf with no effect */
|
||||
/* Internal to library routines */
|
||||
#define OP_NOT MKOP(8) /**< @brief Unary: not L */
|
||||
#define OP_GUARD MKOP(9) /**< @brief Unary: not L, or else! */
|
||||
#define OP_XNOP MKOP(10) /**< @brief Unary: L, mark region */
|
||||
#define OP_NMG_TESS MKOP(11) /**< @brief Leaf: tr_stp -> nmgregion */
|
||||
#define OP_NOT MKOP(7) /**< @brief Unary: not L */
|
||||
#define OP_GUARD MKOP(8) /**< @brief Unary: not L, or else! */
|
||||
#define OP_XNOP MKOP(9) /**< @brief Unary: L, mark region */
|
||||
#define OP_NMG_TESS MKOP(10) /**< @brief Leaf: tr_stp -> nmgregion */
|
||||
/* LIBWDB import/export interface to combinations */
|
||||
#define OP_DB_LEAF MKOP(12) /**< @brief Leaf of combination, db fmt */
|
||||
#define OP_FREE MKOP(13) /**< @brief Unary: L has free chain */
|
||||
#define OP_DB_LEAF MKOP(11) /**< @brief Leaf of combination, db fmt */
|
||||
#define OP_FREE MKOP(12) /**< @brief Unary: L has free chain */
|
||||
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -64,7 +64,6 @@ describe_tree(union tree *tree,
|
||||
{
|
||||
struct bu_vls left = BU_VLS_INIT_ZERO;
|
||||
struct bu_vls right = BU_VLS_INIT_ZERO;
|
||||
const char op_xor='^';
|
||||
char op='\0';
|
||||
|
||||
BU_CK_VLS(str);
|
||||
@@ -97,8 +96,6 @@ describe_tree(union tree *tree,
|
||||
case OP_SUBTRACT: /* subtraction operator node */
|
||||
op = DB_OP_SUBTRACT;
|
||||
goto binary;
|
||||
case OP_XOR: /* exclusive "or" operator node */
|
||||
op = op_xor;
|
||||
binary: /* common for all binary nodes */
|
||||
describe_tree(tree->tr_b.tb_left, &left);
|
||||
describe_tree(tree->tr_b.tb_right, &right);
|
||||
|
||||
@@ -132,7 +132,6 @@ conv_tree(struct directory **d, int depth, int UNUSED(parent_branch), struct dir
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
/* convert right */
|
||||
ret = conv_tree(d, depth+1, 1, &right, &rightstep, t->tr_b.tb_right, sc);
|
||||
right_ret = ret;
|
||||
|
||||
@@ -102,7 +102,6 @@ _db_tree_get_child(union tree *tp) {
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
ret = _db_tree_get_child(tp->tr_b.tb_left);
|
||||
if (ret != TREE_NULL) return ret;
|
||||
return _db_tree_get_child(tp->tr_b.tb_right);
|
||||
|
||||
@@ -114,7 +114,6 @@ _db_tree_get_child(union tree *tp) {
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
ret = _db_tree_get_child(tp->tr_b.tb_left);
|
||||
if (ret != TREE_NULL) return ret;
|
||||
return _db_tree_get_child(tp->tr_b.tb_right);
|
||||
|
||||
Vendored
-3
@@ -251,7 +251,6 @@ describe_tree(tree *tree, bu_vls *str)
|
||||
{
|
||||
bu_vls left = BU_VLS_INIT_ZERO;
|
||||
bu_vls right = BU_VLS_INIT_ZERO;
|
||||
const char op_xor='^';
|
||||
char op='\0';
|
||||
|
||||
BU_CK_VLS(str);
|
||||
@@ -285,8 +284,6 @@ describe_tree(tree *tree, bu_vls *str)
|
||||
case OP_SUBTRACT: /* subtraction operator node */
|
||||
op = DB_OP_SUBTRACT;
|
||||
goto binary;
|
||||
case OP_XOR: /* exclusive "or" operator node */
|
||||
op = op_xor;
|
||||
binary: /* common for all binary nodes */
|
||||
describe_tree(tree->tr_b.tb_left, &left);
|
||||
describe_tree(tree->tr_b.tb_right, &right);
|
||||
|
||||
@@ -251,7 +251,6 @@ pop_find_nodes( union tree *tp)
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
crossover_parent = &tp->tr_b.tb_left;
|
||||
n1 = pop_find_nodes(tp->tr_b.tb_left);
|
||||
if (n1 == crossover_node) {
|
||||
@@ -377,7 +376,6 @@ pop_functree(struct db_i *dbi_p, struct db_i *dbi_c,
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
/* mutate CSG operation */
|
||||
if (mutate)
|
||||
if (node_idx == crossover_node) {
|
||||
@@ -454,8 +452,8 @@ pop_gop(int gop, char *parent1_id, char *parent2_id, char *child1_id, char *chil
|
||||
|
||||
crossover_op = crossover_point->tr_op;
|
||||
|
||||
if (crossover_op & (OP_UNION | OP_XOR | OP_SUBTRACT| OP_INTERSECT))
|
||||
crossover_op = (OP_UNION | OP_XOR | OP_SUBTRACT| OP_INTERSECT);
|
||||
if (crossover_op & (OP_UNION | OP_SUBTRACT| OP_INTERSECT))
|
||||
crossover_op = (OP_UNION | OP_SUBTRACT| OP_INTERSECT);
|
||||
|
||||
crossover_node = db_count_tree_nodes(crossover_point, 0);
|
||||
if (pop_find_nodes(parent2->tree) == crossover_node) {
|
||||
|
||||
@@ -3701,18 +3701,16 @@ categorize_trimmed_faces(
|
||||
switch (face_location) {
|
||||
case INSIDE_BREP:
|
||||
if (operation == BOOLEAN_INTERSECT ||
|
||||
operation == BOOLEAN_XOR ||
|
||||
(operation == BOOLEAN_DIFF && i >= face_count1))
|
||||
{
|
||||
splitted[j]->m_belong_to_final = TrimmedFace::BELONG;
|
||||
}
|
||||
if (operation == BOOLEAN_DIFF || operation == BOOLEAN_XOR) {
|
||||
if (operation == BOOLEAN_DIFF) {
|
||||
splitted[j]->m_rev = true;
|
||||
}
|
||||
break;
|
||||
case OUTSIDE_BREP:
|
||||
if (operation == BOOLEAN_UNION ||
|
||||
operation == BOOLEAN_XOR ||
|
||||
(operation == BOOLEAN_DIFF && i < face_count1))
|
||||
{
|
||||
splitted[j]->m_belong_to_final = TrimmedFace::BELONG;
|
||||
|
||||
@@ -100,7 +100,6 @@ brep_conversion_tree(const struct db_i *dbip, const union tree *oldtree, union t
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
/* convert right */
|
||||
comb = new rt_comb_internal;
|
||||
newtree->tr_b.tb_right = new tree;
|
||||
|
||||
@@ -619,7 +619,6 @@ brep_csg_conversion_tree(struct ged *gedp, struct bu_vls *log, struct bu_attribu
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
/* convert right */
|
||||
//bu_log("convert right\n");
|
||||
newtree->tr_b.tb_right = new tree;
|
||||
|
||||
@@ -40,7 +40,6 @@ tikz_tree(struct ged *gedp, struct bu_vls *tikz, const union tree *oldtree, stru
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
/* convert right */
|
||||
ret = tikz_tree(gedp, tikz, oldtree->tr_b.tb_right, color, cnt);
|
||||
/* fall through */
|
||||
|
||||
@@ -575,7 +575,6 @@ copy_v5_comb_tree(struct ged_clone_state *state, union tree *tree, size_t idx)
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
/* copy right */
|
||||
copy_v5_comb_tree(state, tree->tr_b.tb_right, idx);
|
||||
|
||||
|
||||
@@ -197,7 +197,6 @@ adjust_names(union tree *trp,
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
adjust_names(trp->tr_b.tb_left, dbip,
|
||||
name_map, used_names, cc_data);
|
||||
adjust_names(trp->tr_b.tb_right, dbip,
|
||||
|
||||
@@ -128,7 +128,6 @@ _ged_cyclic_search_subtree(struct db_full_path *path, int curr_bool, union tree
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
if (tp->tr_op == OP_UNION) bool_val = 2;
|
||||
if (tp->tr_op == OP_INTERSECT) bool_val = 3;
|
||||
if (tp->tr_op == OP_SUBTRACT) bool_val = 4;
|
||||
@@ -240,7 +239,6 @@ _ged_lint_comb_find_missing(struct _ged_missing_data *mdata, const char *parent,
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
_ged_lint_comb_find_missing(mdata, parent, dbip, tp->tr_b.tb_right);
|
||||
/* fall through */
|
||||
case OP_NOT:
|
||||
|
||||
@@ -123,7 +123,6 @@ get_aabb(db_i &db, const db_full_path &path)
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
stack.push(current.tr_b.tb_left);
|
||||
stack.push(current.tr_b.tb_right);
|
||||
break;
|
||||
|
||||
@@ -272,7 +272,6 @@ tree_solids(union tree *tp, struct tree_bark *tb, int op, struct resource *resp)
|
||||
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
/* XXX this can get us in trouble if 1 solid is subtracted
|
||||
* from less than all the "union" solids of the region.
|
||||
*/
|
||||
|
||||
@@ -189,7 +189,6 @@ tree_parse(struct bu_list *UNUSED(br), union tree *tr)
|
||||
case OP_UNION: break;
|
||||
case OP_INTERSECT: break;
|
||||
case OP_SUBTRACT: break;
|
||||
case OP_XOR: break;
|
||||
case OP_REGION: break;
|
||||
case OP_NOP: break;
|
||||
/* Internal to library routines */
|
||||
|
||||
@@ -71,7 +71,6 @@ rt_bound_tree(const union tree *tp, fastf_t *tree_min, fastf_t *tree_max)
|
||||
(void *)tp, tp->tr_op);
|
||||
return -1;
|
||||
|
||||
case OP_XOR:
|
||||
case OP_UNION:
|
||||
/* BINARY type -- expand to contain both */
|
||||
if (rt_bound_tree(tp->tr_b.tb_left, tree_min, tree_max) < 0 ||
|
||||
@@ -284,7 +283,6 @@ rt_traverse_tree(struct rt_i *rtip, const union tree *tp, fastf_t *tree_min, fas
|
||||
bu_log("rt_traverse_tree(%p): unknown op=x%x\n", (void *)tp, (tp->tr_op));
|
||||
return -1;
|
||||
|
||||
case OP_XOR:
|
||||
case OP_UNION:
|
||||
/* BINARY type -- expand to contain both */
|
||||
if (rt_traverse_tree(rtip, tp->tr_b.tb_left, tree_min, tree_max) < 0 ||
|
||||
|
||||
@@ -682,7 +682,6 @@ bool_max_raynum(register const union tree *tp, register const struct partition *
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
{
|
||||
int a = bool_max_raynum(tp->tr_b.tb_left, pp);
|
||||
int b = bool_max_raynum(tp->tr_b.tb_right, pp);
|
||||
@@ -1195,7 +1194,6 @@ bool_test_tree(register const union tree *tp, register const struct bu_bitv *sol
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
if (!bool_test_tree(tp->tr_b.tb_left, solidbits, regionp, pp))
|
||||
return 0;
|
||||
return bool_test_tree(tp->tr_b.tb_right, solidbits, regionp, pp);
|
||||
@@ -1257,9 +1255,6 @@ rt_bool_growstack(register struct resource *resp)
|
||||
* Using a stack to recall state, evaluate a boolean expression
|
||||
* without recursion.
|
||||
*
|
||||
* For use with XOR, a pointer to the "first valid subtree" would
|
||||
* be a useful addition, for rt_boolregions().
|
||||
*
|
||||
* Returns -
|
||||
* !0 tree is BOOL_TRUE
|
||||
* 0 tree is BOOL_FALSE
|
||||
@@ -1272,8 +1267,6 @@ bool_eval(register union tree *treep, struct partition *partp, struct resource *
|
||||
/* resource pointer for this CPU */
|
||||
{
|
||||
static union tree tree_not[MAX_PSW]; /* for OP_NOT nodes */
|
||||
static union tree tree_guard[MAX_PSW]; /* for OP_GUARD nodes */
|
||||
static union tree tree_xnop[MAX_PSW]; /* for OP_XNOP nodes */
|
||||
register union tree **sp;
|
||||
register int ret;
|
||||
register union tree **stackend;
|
||||
@@ -1281,7 +1274,6 @@ bool_eval(register union tree *treep, struct partition *partp, struct resource *
|
||||
RT_CK_TREE(treep);
|
||||
RT_CK_PT(partp);
|
||||
RT_CK_RESOURCE(resp);
|
||||
|
||||
while ((sp = resp->re_boolstack) == (union tree **)0)
|
||||
rt_bool_growstack(resp);
|
||||
stackend = &(resp->re_boolstack[resp->re_boolslen]);
|
||||
@@ -1307,7 +1299,6 @@ stack:
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
*sp++ = treep;
|
||||
if (sp >= stackend) {
|
||||
register int off = sp - resp->re_boolstack;
|
||||
@@ -1358,47 +1349,6 @@ pop:
|
||||
/* Special operation for subtraction */
|
||||
ret = !ret;
|
||||
goto pop;
|
||||
case OP_XOR:
|
||||
if (ret) {
|
||||
/* lhs was true, rhs better not be or we have an
|
||||
* overlap condition. Rewrite as guard node followed
|
||||
* by rhs.
|
||||
*/
|
||||
tree_guard[resp->re_cpu].tr_op = OP_GUARD;
|
||||
treep = treep->tr_b.tb_right;
|
||||
*sp++ = treep; /* temp val for guard node */
|
||||
*sp++ = &tree_guard[resp->re_cpu];
|
||||
} else {
|
||||
/* lhs was false, rewrite as xnop node and result of
|
||||
* rhs.
|
||||
*/
|
||||
tree_xnop[resp->re_cpu].tr_op = OP_XNOP;
|
||||
treep = treep->tr_b.tb_right;
|
||||
*sp++ = treep; /* temp val for xnop */
|
||||
*sp++ = &tree_xnop[resp->re_cpu];
|
||||
}
|
||||
goto stack;
|
||||
case OP_GUARD:
|
||||
/*
|
||||
* Special operation for XOR. lhs was true. If rhs
|
||||
* subtree was true, an overlap condition exists (both
|
||||
* sides of the XOR are BOOL_TRUE). Return error
|
||||
* condition. If subtree is false, then return BOOL_TRUE
|
||||
* (from lhs).
|
||||
*/
|
||||
if (ret) {
|
||||
/* stacked temp val: rhs */
|
||||
return -1; /* GUARD error */
|
||||
}
|
||||
ret = BOOL_TRUE;
|
||||
sp--; /* pop temp val */
|
||||
goto pop;
|
||||
case OP_XNOP:
|
||||
/*
|
||||
* Special NOP for XOR. lhs was false.
|
||||
*/
|
||||
sp--; /* pop temp val */
|
||||
goto pop;
|
||||
default:
|
||||
bu_log("bool_eval: bad pop op [%d]\n", treep->tr_op);
|
||||
return BOOL_TRUE; /* screw up output */
|
||||
|
||||
@@ -117,7 +117,6 @@ db_tree_counter(const union tree *tp, struct db_tree_counter_state *tcsp)
|
||||
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
/* This node is known to be a binary op */
|
||||
tcsp->n_oper++;
|
||||
tcsp->non_union_seen = 1;
|
||||
@@ -140,7 +139,6 @@ db_tree_counter(const union tree *tp, struct db_tree_counter_state *tcsp)
|
||||
#define DB5COMB_TOKEN_UNION 2
|
||||
#define DB5COMB_TOKEN_INTERSECT 3
|
||||
#define DB5COMB_TOKEN_SUBTRACT 4
|
||||
#define DB5COMB_TOKEN_XOR 5
|
||||
#define DB5COMB_TOKEN_NOT 6
|
||||
|
||||
struct rt_comb_v5_serialize_state {
|
||||
@@ -238,13 +236,6 @@ rt_comb_v5_serialize(
|
||||
if (ssp->exprp)
|
||||
*ssp->exprp++ = DB5COMB_TOKEN_SUBTRACT;
|
||||
return;
|
||||
case OP_XOR:
|
||||
/* This node is known to be a binary op */
|
||||
rt_comb_v5_serialize(tp->tr_b.tb_left, ssp);
|
||||
rt_comb_v5_serialize(tp->tr_b.tb_right, ssp);
|
||||
if (ssp->exprp)
|
||||
*ssp->exprp++ = DB5COMB_TOKEN_XOR;
|
||||
return;
|
||||
|
||||
default:
|
||||
bu_log("rt_comb_v5_serialize: bad op %d\n", tp->tr_op);
|
||||
@@ -683,7 +674,6 @@ rt_comb_import5(struct rt_db_internal *ip, const struct bu_external *ep,
|
||||
case DB5COMB_TOKEN_UNION:
|
||||
case DB5COMB_TOKEN_INTERSECT:
|
||||
case DB5COMB_TOKEN_SUBTRACT:
|
||||
case DB5COMB_TOKEN_XOR:
|
||||
/* These are all binary operators */
|
||||
tp->tr_b.tb_regionp = REGION_NULL;
|
||||
tp->tr_b.tb_right = *--sp;
|
||||
@@ -700,9 +690,6 @@ rt_comb_import5(struct rt_db_internal *ip, const struct bu_external *ep,
|
||||
case DB5COMB_TOKEN_SUBTRACT:
|
||||
tp->tr_b.tb_op = OP_SUBTRACT;
|
||||
break;
|
||||
case DB5COMB_TOKEN_XOR:
|
||||
tp->tr_b.tb_op = OP_XOR;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -69,7 +69,6 @@ conv_tree(ON_Brep **b, const union tree *t, const struct db_i *dbip)
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
/* convert right */
|
||||
old = right = ON_Brep::New();
|
||||
ret = conv_tree(&right, t->tr_b.tb_right, dbip);
|
||||
@@ -92,8 +91,6 @@ conv_tree(ON_Brep **b, const union tree *t, const struct db_i *dbip)
|
||||
ret = ON_Boolean(*b, left, right, BOOLEAN_INTERSECT);
|
||||
else if (t->tr_op == OP_SUBTRACT)
|
||||
ret = ON_Boolean(*b, left, right, BOOLEAN_DIFF);
|
||||
else if (t->tr_op == OP_XOR)
|
||||
ret = ON_Boolean(*b, left, right, BOOLEAN_XOR);
|
||||
else {
|
||||
bu_log("operation %d isn't supported yet.\n", t->tr_op);
|
||||
ret = -1;
|
||||
|
||||
@@ -120,7 +120,6 @@ db_tree_nleaves(const union tree *tp)
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
/* This node is known to be a binary op */
|
||||
return db_tree_nleaves(tp->tr_b.tb_left) +
|
||||
db_tree_nleaves(tp->tr_b.tb_right);
|
||||
@@ -742,9 +741,6 @@ db_tree_describe(
|
||||
if (!indented) bu_vls_spaces(vls, 2*lvl);
|
||||
bu_vls_printf(vls, "%c ", DB_OP_SUBTRACT);
|
||||
goto bin;
|
||||
case OP_XOR:
|
||||
if (!indented) bu_vls_spaces(vls, 2*lvl);
|
||||
bu_vls_strcat(vls, "^ ");
|
||||
bin:
|
||||
db_tree_describe(vls, tp->tr_b.tb_left, 1, lvl+1, mm2local);
|
||||
db_tree_describe(vls, tp->tr_b.tb_right, 0, lvl+1, mm2local);
|
||||
@@ -904,7 +900,6 @@ db_ck_left_heavy_tree(
|
||||
/* else fall through */
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
if (db_ck_left_heavy_tree(tp->tr_b.tb_right, no_unions) < 0)
|
||||
return -1;
|
||||
return db_ck_left_heavy_tree(tp->tr_b.tb_left, no_unions);
|
||||
@@ -933,7 +928,6 @@ db_ck_v4gift_tree(const union tree *tp)
|
||||
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
return db_ck_left_heavy_tree(tp, 1);
|
||||
|
||||
default:
|
||||
@@ -1167,7 +1161,6 @@ _db_comb_find_invalid(int *inv_cnt, struct db_i *dbip, union tree *tp)
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
_db_comb_find_invalid(inv_cnt, dbip, tp->tr_b.tb_right);
|
||||
/* fall through */
|
||||
case OP_NOT:
|
||||
@@ -1203,7 +1196,6 @@ _db_comb_get_children(struct directory **children, int *curr_ind, int curr_bool,
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
bool_op = tp->tr_op;
|
||||
_db_comb_get_children(children, curr_ind, bool_op, dbip, tp->tr_b.tb_right, bool_ops, mats);
|
||||
/* fall through */
|
||||
|
||||
@@ -371,7 +371,6 @@ db_apply_state_from_one_member(
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
ret = db_apply_state_from_one_member(tsp, pathp, cp, sofar,
|
||||
tp->tr_b.tb_left);
|
||||
if (ret != 0) return ret;
|
||||
@@ -407,7 +406,6 @@ db_find_named_leaf(union tree *tp, const char *cp)
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
ret = db_find_named_leaf(tp->tr_b.tb_left, cp);
|
||||
if (ret != TREE_NULL) return ret;
|
||||
return db_find_named_leaf(tp->tr_b.tb_right, cp);
|
||||
@@ -436,7 +434,6 @@ db_find_named_leafs_parent(int *side, union tree *tp, const char *cp)
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
if (tp->tr_b.tb_left->tr_op == OP_DB_LEAF) {
|
||||
if (BU_STR_EQUAL(cp, tp->tr_b.tb_left->tr_l.tl_name)) {
|
||||
*side = 1;
|
||||
@@ -483,7 +480,6 @@ db_tree_del_lhs(union tree *tp, struct resource *resp)
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
switch (tp->tr_b.tb_left->tr_op) {
|
||||
case OP_NOP:
|
||||
case OP_SOLID:
|
||||
@@ -530,7 +526,6 @@ db_tree_del_rhs(union tree *tp, struct resource *resp)
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
switch (tp->tr_b.tb_right->tr_op) {
|
||||
case OP_NOP:
|
||||
case OP_SOLID:
|
||||
@@ -627,7 +622,6 @@ db_tree_mul_dbleaf(union tree *tp, const mat_t mat)
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
db_tree_mul_dbleaf(tp->tr_b.tb_left, mat);
|
||||
db_tree_mul_dbleaf(tp->tr_b.tb_right, mat);
|
||||
break;
|
||||
@@ -669,7 +663,6 @@ db_tree_funcleaf(
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
db_tree_funcleaf(dbip, comb, comb_tree->tr_b.tb_left, leaf_func, user_ptr1, user_ptr2, user_ptr3, user_ptr4);
|
||||
db_tree_funcleaf(dbip, comb, comb_tree->tr_b.tb_right, leaf_func, user_ptr1, user_ptr2, user_ptr3, user_ptr4);
|
||||
break;
|
||||
@@ -952,7 +945,6 @@ _db_recurse_subtree(union tree *tp, struct db_tree_state *msp, struct db_full_pa
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
_db_recurse_subtree(tp->tr_b.tb_left, &memb_state, pathp, region_start_statepp, client_data);
|
||||
if (tp->tr_op == OP_SUBTRACT)
|
||||
memb_state.ts_sofar |= TS_SOFAR_MINUS;
|
||||
@@ -1239,7 +1231,6 @@ db_dup_subtree(const union tree *tp, struct resource *resp)
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
/* This node is known to be a binary op */
|
||||
new_tp->tr_b.tb_left = db_dup_subtree(tp->tr_b.tb_left, resp);
|
||||
new_tp->tr_b.tb_right = db_dup_subtree(tp->tr_b.tb_right, resp);
|
||||
@@ -1288,7 +1279,6 @@ db_ck_tree(const union tree *tp)
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
/* This node is known to be a binary op */
|
||||
db_ck_tree(tp->tr_b.tb_left);
|
||||
db_ck_tree(tp->tr_b.tb_right);
|
||||
@@ -1382,7 +1372,6 @@ db_free_tree(union tree *tp, struct resource *resp)
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
{
|
||||
union tree *fp;
|
||||
|
||||
@@ -1656,7 +1645,6 @@ db_count_tree_nodes(const union tree *tp, int count)
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
/* This node is known to be a binary op */
|
||||
count = db_count_tree_nodes(tp->tr_b.tb_left, count);
|
||||
count = db_count_tree_nodes(tp->tr_b.tb_right, count);
|
||||
@@ -1698,7 +1686,6 @@ db_is_tree_all_unions(const union tree *tp)
|
||||
case OP_SUBTRACT:
|
||||
return 0; /* nope */
|
||||
|
||||
case OP_XOR:
|
||||
case OP_NOT:
|
||||
case OP_GUARD:
|
||||
case OP_XNOP:
|
||||
@@ -1732,7 +1719,6 @@ db_count_subtree_regions(const union tree *tp)
|
||||
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
case OP_NOT:
|
||||
case OP_GUARD:
|
||||
case OP_XNOP:
|
||||
@@ -1787,7 +1773,6 @@ db_tally_subtree_regions(
|
||||
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
case OP_NOT:
|
||||
case OP_GUARD:
|
||||
case OP_XNOP:
|
||||
@@ -1924,7 +1909,6 @@ _db_walk_subtree(
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
/* This node is known to be a binary op */
|
||||
_db_walk_subtree(tp->tr_b.tb_left, region_start_statepp, leaf_func, client_data, resp);
|
||||
_db_walk_subtree(tp->tr_b.tb_right, region_start_statepp, leaf_func, client_data, resp);
|
||||
@@ -2525,8 +2509,6 @@ db_tree_list(struct bu_vls *vls, const union tree *tp)
|
||||
case OP_SUBTRACT:
|
||||
tree_list_append(vls, "-");
|
||||
goto bin;
|
||||
case OP_XOR:
|
||||
tree_list_append(vls, "^");
|
||||
bin:
|
||||
tree_list_sublist_begin(vls);
|
||||
count += db_tree_list(vls, tp->tr_b.tb_left);
|
||||
|
||||
@@ -66,7 +66,6 @@ db_traverse_subtree(union tree *tp,
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
db_traverse_subtree(tp->tr_b.tb_left, traverse_func, dtp);
|
||||
db_traverse_subtree(tp->tr_b.tb_right, traverse_func, dtp);
|
||||
break;
|
||||
@@ -185,7 +184,6 @@ db_functree_subtree(struct db_i *dbip,
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
db_functree_subtree(dbip, tp->tr_b.tb_left, comb_func, leaf_func, resp, client_data);
|
||||
db_functree_subtree(dbip, tp->tr_b.tb_right, comb_func, leaf_func, resp, client_data);
|
||||
break;
|
||||
|
||||
@@ -330,9 +330,6 @@ rt_pr_tree(register const union tree *tp, int lvl)
|
||||
case OP_SUBTRACT:
|
||||
bu_log("MINUS\n");
|
||||
break;
|
||||
case OP_XOR:
|
||||
bu_log("XOR\n");
|
||||
break;
|
||||
case OP_NOT:
|
||||
bu_log("NOT\n");
|
||||
break;
|
||||
@@ -342,7 +339,6 @@ rt_pr_tree(register const union tree *tp, int lvl)
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
/* BINARY type */
|
||||
rt_pr_tree(tp->tr_b.tb_left, lvl+1);
|
||||
rt_pr_tree(tp->tr_b.tb_right, lvl+1);
|
||||
@@ -421,14 +417,6 @@ rt_pr_tree_vls(struct bu_vls *vls, register const union tree *tp)
|
||||
rt_pr_tree_vls(vls, tp->tr_b.tb_right);
|
||||
bu_vls_strcat(vls, ") ");
|
||||
break;
|
||||
case OP_XOR:
|
||||
/* BINARY type */
|
||||
bu_vls_strcat(vls, " (");
|
||||
rt_pr_tree_vls(vls, tp->tr_b.tb_left);
|
||||
bu_vls_strcat(vls, ") ^ (");
|
||||
rt_pr_tree_vls(vls, tp->tr_b.tb_right);
|
||||
bu_vls_strcat(vls, ") ");
|
||||
break;
|
||||
case OP_NOT:
|
||||
/* UNARY tree */
|
||||
bu_vls_strcat(vls, " !(");
|
||||
@@ -603,13 +591,6 @@ rt_pr_tree_val(register const union tree *tp, const struct partition *partp, int
|
||||
rt_pr_tree_val(tp->tr_b.tb_right, partp, pr_name, lvl+1);
|
||||
bu_log(")");
|
||||
break;
|
||||
case OP_XOR:
|
||||
bu_log("(");
|
||||
rt_pr_tree_val(tp->tr_b.tb_left, partp, pr_name, lvl+1);
|
||||
bu_log(" XOR ");
|
||||
rt_pr_tree_val(tp->tr_b.tb_right, partp, pr_name, lvl+1);
|
||||
bu_log(")");
|
||||
break;
|
||||
|
||||
case OP_NOT:
|
||||
bu_log(" !");
|
||||
|
||||
@@ -1517,7 +1517,6 @@ rt_find_path(struct db_i *dbip,
|
||||
case OP_UNION:
|
||||
case OP_SUBTRACT:
|
||||
case OP_INTERSECT:
|
||||
case OP_XOR:
|
||||
/* binary, process both subtrees */
|
||||
rt_find_path(dbip, tp->tr_b.tb_left, end, paths, curr_path, resp);
|
||||
(*curr_path)->fp_len = curr_path_index;
|
||||
|
||||
@@ -170,7 +170,6 @@ db_fullpath_list_subtree(struct db_full_path *path, int curr_bool, union tree *t
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
if (tp->tr_op == OP_UNION)
|
||||
bool_val = 2;
|
||||
if (tp->tr_op == OP_INTERSECT)
|
||||
|
||||
@@ -89,7 +89,6 @@ _rt_tree_region_assign(union tree *tp, const struct region *regionp)
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
tp->tr_b.tb_regionp = (struct region *)regionp;
|
||||
_rt_tree_region_assign(tp->tr_b.tb_left, regionp);
|
||||
_rt_tree_region_assign(tp->tr_b.tb_right, regionp);
|
||||
@@ -689,7 +688,6 @@ _rt_tree_kill_dead_solid_refs(union tree *tp)
|
||||
(void *)tp, tp->tr_op);
|
||||
return;
|
||||
|
||||
case OP_XOR:
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
@@ -940,7 +938,6 @@ top:
|
||||
(void *)tp, tp->tr_op);
|
||||
return -1;
|
||||
|
||||
case OP_XOR:
|
||||
case OP_UNION:
|
||||
/* BINARY type -- rewrite tp as surviving side */
|
||||
left = tp->tr_b.tb_left;
|
||||
@@ -1071,7 +1068,6 @@ rt_optim_tree(union tree *tp, struct resource *resp)
|
||||
break;
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_XOR:
|
||||
/* Need to look at 3-level optimizations here, both sides */
|
||||
/* push both nodes - search left first */
|
||||
*sp++ = tp->tr_b.tb_right;
|
||||
@@ -1118,9 +1114,6 @@ rt_bit_tree(struct bit_tree *btp, const union tree *tp, size_t *len)
|
||||
case OP_INTERSECT:
|
||||
uop = UOP_INTERSECT;
|
||||
break;
|
||||
case OP_XOR:
|
||||
uop = UOP_XOR;
|
||||
break;
|
||||
default:
|
||||
bu_log("rt_bit_tree: bad op[%d]\n", tp->tr_op);
|
||||
exit(1);
|
||||
|
||||
@@ -601,7 +601,6 @@ copy_v5_comb_tree(union tree *tree, int idx)
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
/* copy right */
|
||||
copy_v5_comb_tree(tree->tr_b.tb_right, idx);
|
||||
/* fall through */
|
||||
|
||||
@@ -4711,7 +4711,6 @@ adjust_names(
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
adjust_names(interp, trp->tr_b.tb_left, dbip,
|
||||
name_tbl, used_names_tbl, cc_data);
|
||||
adjust_names(interp, trp->tr_b.tb_right, dbip,
|
||||
|
||||
@@ -192,7 +192,6 @@ void BrlcadTreeWalker::brlcad_functree_subtree(union tree *tp,
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
m_objStack.push_back(StackNode(tp->tr_op));
|
||||
// add union to treeFlags & push new value
|
||||
m_treeFlags.push_back(m_treeFlags.back()|FLAG_UNION);
|
||||
|
||||
@@ -151,7 +151,6 @@ class BrlcadTreeWalker
|
||||
case OP_UNION : return FLAG_UNION;
|
||||
case OP_SUBTRACT : return FLAG_SUBTRACT;
|
||||
case OP_INTERSECT : return FLAG_INTERSECT;
|
||||
case OP_XOR : return FLAG_XOR;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,6 @@ db_find_subregion(int *ret, union tree *tp, struct db_i *dbip, int *depth, int m
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
db_find_subregion(ret, tp->tr_b.tb_right, dbip, depth, max_depth, traverse_func);
|
||||
break;
|
||||
case OP_NOT:
|
||||
@@ -411,7 +410,6 @@ db_find_subtree(int *ret, const char *name, union tree *tp, struct db_i *dbip, i
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_SUBTRACT:
|
||||
case OP_XOR:
|
||||
db_find_subtree(ret, name, tp->tr_b.tb_right, dbip, depth, max_depth, combinternals, traverse_func);
|
||||
/* fall through */
|
||||
case OP_NOT:
|
||||
|
||||
@@ -1507,7 +1507,6 @@ collect_soltabs(struct bu_ptbl *stp_list, union tree *tr)
|
||||
switch (tr->tr_op) {
|
||||
case OP_UNION:
|
||||
case OP_INTERSECT:
|
||||
case OP_XOR:
|
||||
collect_soltabs(stp_list, tr->tr_b.tb_left);
|
||||
collect_soltabs(stp_list, tr->tr_b.tb_right);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user