Skip to content

Commit

Permalink
Put MGED functab changes back
Browse files Browse the repository at this point in the history
In branch this time, restore the reorganization/refactoring work on MGED
so we can test and refine without breaking CI for main.

This reverts commit 2a705a7.
  • Loading branch information
starseeker committed Jan 22, 2025
1 parent 2a705a7 commit 7df21a0
Show file tree
Hide file tree
Showing 87 changed files with 15,701 additions and 10,440 deletions.
48 changes: 41 additions & 7 deletions src/mged/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,14 @@ set(
chgmodel.c
chgtree.c
chgview.c
cmd.c
clone.c
cmd.c
color_scheme.c
columns.c
dm-generic.c
dodraw.c
doevent.c
dozoom.c
edarb.c
edars.c
edpipe.c
edsol.c
f_db.c
facedef.c
Expand All @@ -38,6 +35,34 @@ set(
overlay.c
plot.c
predictor.c
primitives/edarb.c
primitives/edars.c
primitives/edbot.c
primitives/edbspline.c
primitives/edcline.c
primitives/eddatum.c
primitives/eddsp.c
primitives/edebm.c
primitives/edehy.c
primitives/edell.c
primitives/edepa.c
primitives/edeto.c
primitives/edextrude.c
primitives/edgrip.c
primitives/edhalf.c
primitives/edhyp.c
primitives/edmetaball.c
primitives/ednmg.c
primitives/edpart.c
primitives/edpipe.c
primitives/edrhc.c
primitives/edrpc.c
primitives/edsuperell.c
primitives/edtgc.c
primitives/edtor.c
primitives/edvol.c
primitives/generic.c
primitives/table.cpp
rect.c
rtif.c
scroll.c
Expand Down Expand Up @@ -76,7 +101,11 @@ set(
# but I'm not sure if that would be a problem for scripting with mged.exe on
# Windows so leave it for now...
if(BRLCAD_ENABLE_TCL)
set(MGED_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../libtermio)
set(MGED_INCLUDE_DIRS
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/primitives
${CMAKE_CURRENT_SOURCE_DIR}/../libtermio
)
brlcad_addexec(mged "${MGED_SOURCES}" "${mged_libs}")
if(TK_LIBRARY)
target_compile_definitions(mged PRIVATE HAVE_TK=1)
Expand Down Expand Up @@ -108,17 +137,22 @@ set(
f_cmd.h
menu.h
mged.h
mged.ico
mged.rc
mged_dm.h
mged_wdb.h
primitives/edarb.h
primitives/edbspline.h
primitives/mged_functab.h
sedit.h
mged.ico
mged.rc
)
cmakefiles(${mged_ignore_files})


# Local Variables:
# tab-width: 8
# mode: cmake
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8

2 changes: 1 addition & 1 deletion src/mged/adc.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* A D C . C
* BRL-CAD
*
* Copyright (c) 1985-2024 United States Government as represented by
* Copyright (c) 1985-2025 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion src/mged/arbs.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* A R B S . C
* BRL-CAD
*
* Copyright (c) 1986-2024 United States Government as represented by
* Copyright (c) 1986-2025 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This program is free software; you can redistribute it and/or
Expand Down
6 changes: 4 additions & 2 deletions src/mged/attach.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* A T T A C H . C
* BRL-CAD
*
* Copyright (c) 1985-2024 United States Government as represented by
* Copyright (c) 1985-2025 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This program is free software; you can redistribute it and/or
Expand Down Expand Up @@ -51,11 +51,13 @@
#include "./sedit.h"
#include "./mged_dm.h"


/* Ew. Globals. */

/* Geometry display instances used by MGED */
struct bu_ptbl active_dm_set = BU_PTBL_INIT_ZERO; /* set of active display managers */
struct mged_dm *mged_dm_init_state = NULL;


extern struct _color_scheme default_color_scheme;
extern void share_dlist(struct mged_dm *dlp2); /* defined in share.c */
int mged_default_dlist = 0; /* This variable is available via Tcl for controlling use of display lists */
Expand Down
21 changes: 8 additions & 13 deletions src/mged/axes.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* A X E S . C
* BRL-CAD
*
* Copyright (c) 1998-2024 United States Government as represented by
* Copyright (c) 1998-2025 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This program is free software; you can redistribute it and/or
Expand Down Expand Up @@ -33,11 +33,6 @@
#include "./mged.h"
#include "./mged_dm.h"


extern point_t es_keypoint;
extern point_t e_axes_pos;
extern point_t curr_e_axes_pos;

/* local sp_hook function */
static void ax_set_dirty_flag(const struct bu_structparse *, const char *, void *, const char *, void *);

Expand Down Expand Up @@ -105,14 +100,14 @@ draw_e_axes(struct mged_state *s)
mat_t rot_mat;
struct bv_axes gas;

if (GEOM_EDIT_STATE == ST_S_EDIT) {
MAT4X3PNT(v_ap1, view_state->vs_gvp->gv_model2view, e_axes_pos);
MAT4X3PNT(v_ap2, view_state->vs_gvp->gv_model2view, curr_e_axes_pos);
} else if (GEOM_EDIT_STATE == ST_O_EDIT) {
if (s->edit_state.global_editing_state == ST_S_EDIT) {
MAT4X3PNT(v_ap1, view_state->vs_gvp->gv_model2view, s->s_edit.e_axes_pos);
MAT4X3PNT(v_ap2, view_state->vs_gvp->gv_model2view, s->s_edit.curr_e_axes_pos);
} else if (s->edit_state.global_editing_state == ST_O_EDIT) {
point_t m_ap2;

MAT4X3PNT(v_ap1, view_state->vs_gvp->gv_model2view, es_keypoint);
MAT4X3PNT(m_ap2, modelchanges, es_keypoint);
MAT4X3PNT(v_ap1, view_state->vs_gvp->gv_model2view, s->s_edit.e_keypoint);
MAT4X3PNT(m_ap2, s->s_edit.model_changes, s->s_edit.e_keypoint);
MAT4X3PNT(v_ap2, view_state->vs_gvp->gv_model2view, m_ap2);
} else
return;
Expand All @@ -135,7 +130,7 @@ draw_e_axes(struct mged_state *s)
VMOVE(gas.label_color, color_scheme->cs_edit_axes_label2);
gas.line_width = axes_state->ax_edit_linewidth2;

bn_mat_mul(rot_mat, view_state->vs_gvp->gv_rotation, acc_rot_sol);
bn_mat_mul(rot_mat, view_state->vs_gvp->gv_rotation, s->s_edit.acc_rot_sol);
dm_draw_hud_axes(DMP, view_state->vs_gvp->gv_size, rot_mat, &gas);
}

Expand Down
Loading

0 comments on commit 7df21a0

Please sign in to comment.