Skip to content

Commit

Permalink
Move arb-only logic to arb function
Browse files Browse the repository at this point in the history
  • Loading branch information
starseeker committed Jan 3, 2025
1 parent 6dfd26e commit 3cbdf8d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/mged/edsol.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,17 +508,6 @@ sedit(struct mged_state *s)
}
}

/* must re-calculate the face plane equations for arbs */
if (s->edit_state.es_int.idb_type == ID_ARB8) {
struct bu_vls error_msg = BU_VLS_INIT_ZERO;
struct rt_arb_internal *arb = (struct rt_arb_internal *)s->edit_state.es_int.idb_ptr;
RT_ARB_CK_MAGIC(arb);

if (rt_arb_calc_planes(&error_msg, arb, es_type, es_peqn, &s->tol.tol) < 0)
Tcl_AppendResult(s->interp, bu_vls_addr(&error_msg), (char *)0);
bu_vls_free(&error_msg);
}

/* If the keypoint changed location, find about it here */
if (!es_keyfixed)
get_solid_keypoint(s, &es_keypoint, &es_keytag, &s->edit_state.es_int, es_mat);
Expand Down
9 changes: 9 additions & 0 deletions src/mged/primitives/edarb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1326,6 +1326,15 @@ mged_arb_edit(struct mged_state *s, int edflag)
break;
}

/* must re-calculate the face plane equations for arbs */
struct bu_vls error_msg = BU_VLS_INIT_ZERO;
struct rt_arb_internal *arb = (struct rt_arb_internal *)s->edit_state.es_int.idb_ptr;
RT_ARB_CK_MAGIC(arb);

if (rt_arb_calc_planes(&error_msg, arb, es_type, es_peqn, &s->tol.tol) < 0)
Tcl_AppendResult(s->interp, bu_vls_addr(&error_msg), (char *)0);
bu_vls_free(&error_msg);

return 0;
}

Expand Down

0 comments on commit 3cbdf8d

Please sign in to comment.