From abc0e5301463c2ba8cd076ac563cb98723241558 Mon Sep 17 00:00:00 2001 From: gforney Date: Tue, 7 May 2024 18:11:06 -0400 Subject: [PATCH 1/8] smokeview source: change bounds intersection box logic to include mesh that intersects with any part of intersection box (rather than requiring entire mesh to intersect with intersection box) --- Source/smokeview/glui_bounds.cpp | 46 ++++++++++++++++++++++---------- Source/smokeview/smokeviewvars.h | 2 ++ 2 files changed, 34 insertions(+), 14 deletions(-) diff --git a/Source/smokeview/glui_bounds.cpp b/Source/smokeview/glui_bounds.cpp index e64e723eb9..a3c2042d58 100644 --- a/Source/smokeview/glui_bounds.cpp +++ b/Source/smokeview/glui_bounds.cpp @@ -3955,6 +3955,23 @@ void MeshBoundCB(int var){ case USEMESH_DRAW_MESH: break; case USEMESH_XYZ: + if(caseminptr==NULL){ + caseminptr = casemin; + casemaxptr = casemax; + memcpy(casemin, meshinfo->boxmin, 3*sizeof(float)); + memcpy(casemax, meshinfo->boxmax, 3*sizeof(float)); + for(i=1;iboxmin[0]); + casemin[1] = MIN(casemin[1], meshi->boxmin[1]); + casemin[2] = MIN(casemin[2], meshi->boxmin[2]); + casemax[0] = MAX(casemax[0], meshi->boxmax[0]); + casemax[1] = MAX(casemax[1], meshi->boxmax[1]); + casemax[2] = MAX(casemax[2], meshi->boxmax[2]); + } + } for(i = 0;i < nmeshes;i++){ meshdata *meshi; @@ -3962,14 +3979,8 @@ void MeshBoundCB(int var){ meshi->use = 1; } #define MESH_EPS 0.01 - if( - use_meshclip[0] == 0 && - use_meshclip[1] == 0 && - use_meshclip[2] == 0 && - use_meshclip[3] == 0 && - use_meshclip[4] == 0 && - use_meshclip[5] == 0 - )break; + if(use_meshclip[0] == 0 && use_meshclip[1] == 0 && use_meshclip[2] == 0 && + use_meshclip[3] == 0 && use_meshclip[4] == 0 && use_meshclip[5] == 0)break; for(i=0;i meshmin[0]+MESH_EPS){ + if(use_meshclip_min[0] == 0)meshclip_min[0] = casemin[0]; + if(use_meshclip_max[0] == 0)meshclip_min[0] = casemax[0]; + if(use_meshclip_min[1] == 0)meshclip_min[1] = casemin[1]; + if(use_meshclip_max[1] == 0)meshclip_min[1] = casemax[1]; + if(use_meshclip_min[2] == 0)meshclip_min[2] = casemin[2]; + if(use_meshclip_max[2] == 0)meshclip_min[2] = casemax[2]; + + if(use_meshclip_min[0] == 1 && meshmin[0] > meshclip_max[0]){ meshi->use = 0; continue; } - if(use_meshclip_min[1] == 1 && meshclip_min[1] > meshmin[1] + MESH_EPS){ + if(use_meshclip_max[0] == 1 && meshmax[0] < meshclip_min[0]){ meshi->use = 0; continue; } - if(use_meshclip_min[2] == 1 && meshclip_min[2] > meshmin[2] + MESH_EPS){ + if(use_meshclip_min[1] == 1 && meshmin[1] > meshclip_max[1]){ meshi->use = 0; continue; } - if(use_meshclip_max[0] == 1 && meshclip_max[0] < meshmax[0] - MESH_EPS){ + if(use_meshclip_max[1] == 1 && meshmax[1] < meshclip_min[1]){ meshi->use = 0; continue; } - if(use_meshclip_max[1] == 1 && meshclip_max[1] < meshmax[1] - MESH_EPS){ + if(use_meshclip_min[2] == 1 && meshmin[2] > meshclip_max[2]){ meshi->use = 0; continue; } - if(use_meshclip_max[2] == 1 && meshclip_max[2] < meshmax[2] - MESH_EPS){ + if(use_meshclip_max[2] == 1 && meshmax[2] < meshclip_min[2]){ meshi->use = 0; continue; } diff --git a/Source/smokeview/smokeviewvars.h b/Source/smokeview/smokeviewvars.h index 001ae5d6e2..660b1eccb3 100644 --- a/Source/smokeview/smokeviewvars.h +++ b/Source/smokeview/smokeviewvars.h @@ -468,6 +468,8 @@ SVEXTERN float SVDECL(customview_azimuth, 0.0), SVDECL(customview_elevation, 0.0 SVEXTERN int SVDECL(use_customview, 0); SVEXTERN screendata SVDECL(*screenglobal, NULL); +SVEXTERN float casemin[3], SVDECL(*caseminptr, NULL); +SVEXTERN float casemax[3], SVDECL(*casemaxptr, NULL); SVEXTERN int SVDECL(smoke_outline_type, SMOKE_OUTLINE_TRIANGLE); SVEXTERN int SVDECL(update_filesizes, 0); SVEXTERN int SVDECL(compute_smoke3d_planes_par, 0); From 0e899a82f2665c1e15538a6c65d0b09f159806bf Mon Sep 17 00:00:00 2001 From: gforney Date: Tue, 7 May 2024 21:26:32 -0400 Subject: [PATCH 2/8] smokeview source: fix to load clip code --- Source/smokeview/glui_bounds.cpp | 44 +++++++++----------------------- Source/smokeview/smokeviewvars.h | 2 -- 2 files changed, 12 insertions(+), 34 deletions(-) diff --git a/Source/smokeview/glui_bounds.cpp b/Source/smokeview/glui_bounds.cpp index a3c2042d58..4a161dd635 100644 --- a/Source/smokeview/glui_bounds.cpp +++ b/Source/smokeview/glui_bounds.cpp @@ -3955,23 +3955,6 @@ void MeshBoundCB(int var){ case USEMESH_DRAW_MESH: break; case USEMESH_XYZ: - if(caseminptr==NULL){ - caseminptr = casemin; - casemaxptr = casemax; - memcpy(casemin, meshinfo->boxmin, 3*sizeof(float)); - memcpy(casemax, meshinfo->boxmax, 3*sizeof(float)); - for(i=1;iboxmin[0]); - casemin[1] = MIN(casemin[1], meshi->boxmin[1]); - casemin[2] = MIN(casemin[2], meshi->boxmin[2]); - casemax[0] = MAX(casemax[0], meshi->boxmax[0]); - casemax[1] = MAX(casemax[1], meshi->boxmax[1]); - casemax[2] = MAX(casemax[2], meshi->boxmax[2]); - } - } for(i = 0;i < nmeshes;i++){ meshdata *meshi; @@ -3983,11 +3966,8 @@ void MeshBoundCB(int var){ use_meshclip[3] == 0 && use_meshclip[4] == 0 && use_meshclip[5] == 0)break; for(i=0;iboxmin; - meshmax = meshi->boxmax; float meshclip_min[3], meshclip_max[3]; int use_meshclip_min[3], use_meshclip_max[3]; meshclip_min[0] = meshclip[0]; @@ -4002,34 +3982,34 @@ void MeshBoundCB(int var){ use_meshclip_max[0] = use_meshclip[1]; use_meshclip_max[1] = use_meshclip[3]; use_meshclip_max[2] = use_meshclip[5]; - if(use_meshclip_min[0] == 0)meshclip_min[0] = casemin[0]; - if(use_meshclip_max[0] == 0)meshclip_min[0] = casemax[0]; - if(use_meshclip_min[1] == 0)meshclip_min[1] = casemin[1]; - if(use_meshclip_max[1] == 0)meshclip_min[1] = casemax[1]; - if(use_meshclip_min[2] == 0)meshclip_min[2] = casemin[2]; - if(use_meshclip_max[2] == 0)meshclip_min[2] = casemax[2]; + if(use_meshclip_min[0] == 0)meshclip_min[0] = xbar0FDS; + if(use_meshclip_max[0] == 0)meshclip_max[0] = xbarFDS; + if(use_meshclip_min[1] == 0)meshclip_min[1] = ybar0FDS; + if(use_meshclip_max[1] == 0)meshclip_max[1] = ybarFDS; + if(use_meshclip_min[2] == 0)meshclip_min[2] = zbar0FDS; + if(use_meshclip_max[2] == 0)meshclip_max[2] = zbarFDS; - if(use_meshclip_min[0] == 1 && meshmin[0] > meshclip_max[0]){ + if(use_meshclip_min[0] == 1 && meshclip_min[0] > meshi->boxmax[0]){ meshi->use = 0; continue; } - if(use_meshclip_max[0] == 1 && meshmax[0] < meshclip_min[0]){ + if(use_meshclip_max[0] == 1 && meshclip_max[0] < meshi->boxmin[0]){ meshi->use = 0; continue; } - if(use_meshclip_min[1] == 1 && meshmin[1] > meshclip_max[1]){ + if(use_meshclip_min[1] == 1 && meshclip_min[1] > meshi->boxmax[1]){ meshi->use = 0; continue; } - if(use_meshclip_max[1] == 1 && meshmax[1] < meshclip_min[1]){ + if(use_meshclip_max[1] == 1 && meshclip_max[1] < meshi->boxmin[1]){ meshi->use = 0; continue; } - if(use_meshclip_min[2] == 1 && meshmin[2] > meshclip_max[2]){ + if(use_meshclip_min[2] == 1 && meshclip_min[2] > meshi->boxmax[2]){ meshi->use = 0; continue; } - if(use_meshclip_max[2] == 1 && meshmax[2] < meshclip_min[2]){ + if(use_meshclip_max[2] == 1 && meshclip_max[2] < meshi->boxmin[2]){ meshi->use = 0; continue; } diff --git a/Source/smokeview/smokeviewvars.h b/Source/smokeview/smokeviewvars.h index 660b1eccb3..001ae5d6e2 100644 --- a/Source/smokeview/smokeviewvars.h +++ b/Source/smokeview/smokeviewvars.h @@ -468,8 +468,6 @@ SVEXTERN float SVDECL(customview_azimuth, 0.0), SVDECL(customview_elevation, 0.0 SVEXTERN int SVDECL(use_customview, 0); SVEXTERN screendata SVDECL(*screenglobal, NULL); -SVEXTERN float casemin[3], SVDECL(*caseminptr, NULL); -SVEXTERN float casemax[3], SVDECL(*casemaxptr, NULL); SVEXTERN int SVDECL(smoke_outline_type, SMOKE_OUTLINE_TRIANGLE); SVEXTERN int SVDECL(update_filesizes, 0); SVEXTERN int SVDECL(compute_smoke3d_planes_par, 0); From 596c82110091ac8937ba23deaffea63a0159f3f8 Mon Sep 17 00:00:00 2001 From: gforney Date: Wed, 8 May 2024 09:43:21 -0400 Subject: [PATCH 3/8] smokeview source: add buttons for selecting disjoint meshes for loading --- Source/smokeview/glui_bounds.cpp | 26 +++++++++++++++++++++----- Source/smokeview/glui_bounds.h | 1 + 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/Source/smokeview/glui_bounds.cpp b/Source/smokeview/glui_bounds.cpp index 4a161dd635..9970b9f461 100644 --- a/Source/smokeview/glui_bounds.cpp +++ b/Source/smokeview/glui_bounds.cpp @@ -2562,6 +2562,8 @@ GLUI_Panel *PANEL_plot3d=NULL; GLUI_Panel *PANEL_setmesh = NULL; GLUI_Panel *PANEL_mesh1 = NULL; GLUI_Panel *PANEL_mesh2 = NULL; +GLUI_Panel *PANEL_addmesh = NULL; +GLUI_Panel *PANEL_addremovemesh = NULL; GLUI_Panel *PANEL_boundary_temp_threshold=NULL; GLUI_Panel *PANEL_slice_buttonsA = NULL; GLUI_Panel *PANEL_slice_buttonsB = NULL; @@ -3927,6 +3929,14 @@ void MeshBoundCB(int var){ } MeshBoundCB(USEMESH_XYZ); break; + case USEMESH_REMOVE_ALL: + for(i = 0; i < nmeshes; i++){ + meshdata *meshi; + + meshi = meshinfo + i; + meshi->use = 0; + } + break; case USEMESH_SET_ONE: { meshdata *meshi; @@ -3938,6 +3948,7 @@ void MeshBoundCB(int var){ meshclip[1] = meshi->boxmax[0]; meshclip[3] = meshi->boxmax[1]; meshclip[5] = meshi->boxmax[2]; + meshi->use = 1; } for(i = 0;i < 6;i++){ use_meshclip[i] = 1; @@ -3945,7 +3956,6 @@ void MeshBoundCB(int var){ SPINNER_meshclip[i]->set_float_val(meshclip[i]); SPINNER_meshclip[i]->enable(); } - MeshBoundCB(USEMESH_XYZ); break; case USEMESH_DRAW_BOX: break; @@ -3961,7 +3971,6 @@ void MeshBoundCB(int var){ meshi = meshinfo + i; meshi->use = 1; } - #define MESH_EPS 0.01 if(use_meshclip[0] == 0 && use_meshclip[1] == 0 && use_meshclip[2] == 0 && use_meshclip[3] == 0 && use_meshclip[4] == 0 && use_meshclip[5] == 0)break; for(i=0;i meshi->boxmax[0]){ meshi->use = 0; continue; @@ -5255,9 +5263,17 @@ hvacductboundsCPP.setup("hvac", ROLLOUT_hvacduct, hvacductbounds_cpp, nhvacductb glui_bounds->add_column_to_panel(PANEL_mesh1, false); PANEL_setmesh = glui_bounds->add_panel_to_panel(PANEL_mesh1, "Set mesh(s)", true); - SPINNER_set_mesh = glui_bounds->add_spinner_to_panel(PANEL_setmesh, "set mesh", GLUI_SPINNER_INT, &set_mesh, USEMESH_SET_ONE, MeshBoundCB); + + PANEL_addmesh = glui_bounds->add_panel_to_panel(PANEL_setmesh, "", false); + SPINNER_set_mesh = glui_bounds->add_spinner_to_panel(PANEL_addmesh, "mesh:", GLUI_SPINNER_INT, &set_mesh); SPINNER_set_mesh->set_int_limits(1, nmeshes); - glui_bounds->add_button_to_panel(PANEL_setmesh, "all meshes", USEMESH_SET_ALL, MeshBoundCB); + glui_bounds->add_column_to_panel(PANEL_addmesh, false); + glui_bounds->add_button_to_panel(PANEL_addmesh, "Add", USEMESH_SET_ONE, MeshBoundCB); + + PANEL_addremovemesh = glui_bounds->add_panel_to_panel(PANEL_setmesh, "", false); + glui_bounds->add_button_to_panel(PANEL_addremovemesh, "Add all", USEMESH_SET_ALL, MeshBoundCB); + glui_bounds->add_column_to_panel(PANEL_addremovemesh, false); + glui_bounds->add_button_to_panel(PANEL_addremovemesh, "Remove all", USEMESH_REMOVE_ALL, MeshBoundCB); MeshBoundCB(USEMESH_USE_XYZ_ALL); glui_meshclip_defined = 1; diff --git a/Source/smokeview/glui_bounds.h b/Source/smokeview/glui_bounds.h index 7a525a1826..54d8797bba 100644 --- a/Source/smokeview/glui_bounds.h +++ b/Source/smokeview/glui_bounds.h @@ -84,6 +84,7 @@ #define USEMESH_SET_ONE 196 #define USEMESH_SET_ALL 195 #define USEMESH_LOAD_WHEN_LOADED 194 +#define USEMESH_REMOVE_ALL 229 #define ISO_TRANSPARENT_CONSTANT 0 #define ISO_TRANSPARENT_VARYING 1 From 52d32823515ffd185072eac8dab9ca6843b054cb Mon Sep 17 00:00:00 2001 From: gforney Date: Wed, 8 May 2024 10:51:42 -0400 Subject: [PATCH 4/8] smokeview source: add a button to remove a mesh --- Source/smokeview/glui_bounds.cpp | 30 +++++++++++++++++++++--------- Source/smokeview/glui_bounds.h | 1 + 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/Source/smokeview/glui_bounds.cpp b/Source/smokeview/glui_bounds.cpp index 9970b9f461..7a429a35ac 100644 --- a/Source/smokeview/glui_bounds.cpp +++ b/Source/smokeview/glui_bounds.cpp @@ -20,6 +20,8 @@ int GetValType(int type); void SliceInObstDialog2Menu(void); void GLUIPlot3DBoundCB(int var); +#define MESH_EPS 0.0001 + GLUI *glui_bounds=NULL; #define BOUND_VAL_TYPE 101 @@ -3957,6 +3959,14 @@ void MeshBoundCB(int var){ SPINNER_meshclip[i]->enable(); } break; + case USEMESH_REMOVE_ONE: + { + meshdata *meshi; + + meshi = meshinfo + set_mesh - 1; + meshi->use = 0; + } + break; case USEMESH_DRAW_BOX: break; case USEMESH_LOAD_WHEN_LOADED: @@ -3997,27 +4007,27 @@ void MeshBoundCB(int var){ if(use_meshclip_max[1] == 0)meshclip_max[1] = ybarFDS; if(use_meshclip_min[2] == 0)meshclip_min[2] = zbar0FDS; if(use_meshclip_max[2] == 0)meshclip_max[2] = zbarFDS; - if(use_meshclip_min[0] == 1 && meshclip_min[0] > meshi->boxmax[0]){ + if(use_meshclip_min[0] == 1 && meshclip_min[0] + MESH_EPS > meshi->boxmax[0]){ meshi->use = 0; continue; } - if(use_meshclip_max[0] == 1 && meshclip_max[0] < meshi->boxmin[0]){ + if(use_meshclip_max[0] == 1 && meshclip_max[0] - MESH_EPS < meshi->boxmin[0]){ meshi->use = 0; continue; } - if(use_meshclip_min[1] == 1 && meshclip_min[1] > meshi->boxmax[1]){ + if(use_meshclip_min[1] == 1 && meshclip_min[1] + MESH_EPS > meshi->boxmax[1]){ meshi->use = 0; continue; } - if(use_meshclip_max[1] == 1 && meshclip_max[1] < meshi->boxmin[1]){ + if(use_meshclip_max[1] == 1 && meshclip_max[1] - MESH_EPS < meshi->boxmin[1]){ meshi->use = 0; continue; } - if(use_meshclip_min[2] == 1 && meshclip_min[2] > meshi->boxmax[2]){ + if(use_meshclip_min[2] == 1 && meshclip_min[2] + MESH_EPS > meshi->boxmax[2]){ meshi->use = 0; continue; } - if(use_meshclip_max[2] == 1 && meshclip_max[2] < meshi->boxmin[2]){ + if(use_meshclip_max[2] == 1 && meshclip_max[2] - MESH_EPS < meshi->boxmin[2]){ meshi->use = 0; continue; } @@ -5223,7 +5233,7 @@ hvacductboundsCPP.setup("hvac", ROLLOUT_hvacduct, hvacductbounds_cpp, nhvacductb TimeBoundCB(TBOUNDS_USE); TimeBoundCB(TBOUNDS); - PANEL_mesh = glui_bounds->add_panel_to_panel(ROLLOUT_time, "Spatial bounds - load data for meshes that intersect box", true); + PANEL_mesh = glui_bounds->add_panel_to_panel(ROLLOUT_time, "Spatial bounds - Load data in specified meshes", true); PANEL_mesh_minmax = glui_bounds->add_panel_to_panel(PANEL_mesh, "", false); PANEL_mesh_min = glui_bounds->add_panel_to_panel(PANEL_mesh_minmax, "min box coords", true); glui_bounds->add_column_to_panel(PANEL_mesh_minmax, false); @@ -5256,8 +5266,8 @@ hvacductboundsCPP.setup("hvac", ROLLOUT_hvacduct, hvacductbounds_cpp, nhvacductb PANEL_mesh1 = glui_bounds->add_panel_to_panel(PANEL_mesh, "", false); CHECKBOX_show_intersection_box = glui_bounds->add_checkbox_to_panel(PANEL_mesh1, "show intersection box", &show_intersection_box, USEMESH_DRAW_BOX, MeshBoundCB); - CHECKBOX_show_intersected_meshes = glui_bounds->add_checkbox_to_panel(PANEL_mesh1, "show intersected meshes", &show_intersected_meshes, USEMESH_DRAW_MESH, MeshBoundCB); - glui_bounds->add_checkbox_to_panel(PANEL_mesh1, "show intersected mesh indices", &show_mesh_labels); + CHECKBOX_show_intersected_meshes = glui_bounds->add_checkbox_to_panel(PANEL_mesh1, "show specified meshes", &show_intersected_meshes, USEMESH_DRAW_MESH, MeshBoundCB); + glui_bounds->add_checkbox_to_panel(PANEL_mesh1, "show specified mesh indices", &show_mesh_labels); CHECKBOX_load_only_when_unloaded = glui_bounds->add_checkbox_to_panel(PANEL_mesh1, "Load a file only if unloaded", &load_only_when_unloaded, USEMESH_LOAD_WHEN_LOADED, MeshBoundCB); glui_bounds->add_column_to_panel(PANEL_mesh1, false); @@ -5269,6 +5279,8 @@ hvacductboundsCPP.setup("hvac", ROLLOUT_hvacduct, hvacductbounds_cpp, nhvacductb SPINNER_set_mesh->set_int_limits(1, nmeshes); glui_bounds->add_column_to_panel(PANEL_addmesh, false); glui_bounds->add_button_to_panel(PANEL_addmesh, "Add", USEMESH_SET_ONE, MeshBoundCB); + glui_bounds->add_column_to_panel(PANEL_addmesh, false); + glui_bounds->add_button_to_panel(PANEL_addmesh, "Remove", USEMESH_REMOVE_ONE, MeshBoundCB); PANEL_addremovemesh = glui_bounds->add_panel_to_panel(PANEL_setmesh, "", false); glui_bounds->add_button_to_panel(PANEL_addremovemesh, "Add all", USEMESH_SET_ALL, MeshBoundCB); diff --git a/Source/smokeview/glui_bounds.h b/Source/smokeview/glui_bounds.h index 54d8797bba..5237a1997b 100644 --- a/Source/smokeview/glui_bounds.h +++ b/Source/smokeview/glui_bounds.h @@ -85,6 +85,7 @@ #define USEMESH_SET_ALL 195 #define USEMESH_LOAD_WHEN_LOADED 194 #define USEMESH_REMOVE_ALL 229 +#define USEMESH_REMOVE_ONE 230 #define ISO_TRANSPARENT_CONSTANT 0 #define ISO_TRANSPARENT_VARYING 1 From 1d8dd8d9e7f1dbfed661674129ee049e1ef3b3f0 Mon Sep 17 00:00:00 2001 From: gforney Date: Wed, 8 May 2024 12:08:06 -0400 Subject: [PATCH 5/8] smokeview source: formatting edits to spatial bounds load dialog box --- Source/smokeview/glui_bounds.cpp | 135 ++++++++++++++++++++----------- Source/smokeview/smokeviewvars.h | 2 + 2 files changed, 90 insertions(+), 47 deletions(-) diff --git a/Source/smokeview/glui_bounds.cpp b/Source/smokeview/glui_bounds.cpp index 7a429a35ac..13d8f56214 100644 --- a/Source/smokeview/glui_bounds.cpp +++ b/Source/smokeview/glui_bounds.cpp @@ -2624,6 +2624,12 @@ GLUI_Panel *PANEL_slice_plot2de = NULL; GLUI_Panel *PANEL_slice_plot2df = NULL; GLUI_Panel *PANEL_autoload = NULL; GLUI_Panel *PANEL_loadbounds = NULL; +GLUI_Panel *PANEL_box_option = NULL; +GLUI_Panel *PANEL_box_specify = NULL; +GLUI_Panel *PANEL_box_specifya = NULL; +GLUI_Panel *PANEL_box_specifyb = NULL; +GLUI_Panel *PANEL_box_specifyab = NULL; +GLUI_Panel *PANEL_load_data = NULL; GLUI_Spinner *SPINNER_partdrawskip = NULL; GLUI_Spinner *SPINNER_sliceval_ndigits = NULL; @@ -2748,6 +2754,7 @@ GLUI_Checkbox *CHECKBOX_show_intersection_box=NULL; GLUI_Checkbox *CHECKBOX_show_intersected_meshes = NULL; GLUI_Checkbox *CHECKBOX_load_only_when_unloaded = NULL; +GLUI_RadioGroup *RADIO_intersect_option=NULL; GLUI_RadioGroup *RADIO_filetype=NULL; GLUI_RadioGroup *RADIO_sliceload_dir=NULL; GLUI_RadioGroup *RADIO_iso_setmin=NULL; @@ -4007,29 +4014,57 @@ void MeshBoundCB(int var){ if(use_meshclip_max[1] == 0)meshclip_max[1] = ybarFDS; if(use_meshclip_min[2] == 0)meshclip_min[2] = zbar0FDS; if(use_meshclip_max[2] == 0)meshclip_max[2] = zbarFDS; - if(use_meshclip_min[0] == 1 && meshclip_min[0] + MESH_EPS > meshi->boxmax[0]){ - meshi->use = 0; - continue; - } - if(use_meshclip_max[0] == 1 && meshclip_max[0] - MESH_EPS < meshi->boxmin[0]){ - meshi->use = 0; - continue; - } - if(use_meshclip_min[1] == 1 && meshclip_min[1] + MESH_EPS > meshi->boxmax[1]){ - meshi->use = 0; - continue; - } - if(use_meshclip_max[1] == 1 && meshclip_max[1] - MESH_EPS < meshi->boxmin[1]){ - meshi->use = 0; - continue; - } - if(use_meshclip_min[2] == 1 && meshclip_min[2] + MESH_EPS > meshi->boxmax[2]){ - meshi->use = 0; - continue; + if(glui_mesh_intersection_option == 0){ + if(use_meshclip_min[0] == 1 && meshclip_min[0] + MESH_EPS > meshi->boxmax[0]){ + meshi->use = 0; + continue; + } + if(use_meshclip_max[0] == 1 && meshclip_max[0] - MESH_EPS < meshi->boxmin[0]){ + meshi->use = 0; + continue; + } + if(use_meshclip_min[1] == 1 && meshclip_min[1] + MESH_EPS > meshi->boxmax[1]){ + meshi->use = 0; + continue; + } + if(use_meshclip_max[1] == 1 && meshclip_max[1] - MESH_EPS < meshi->boxmin[1]){ + meshi->use = 0; + continue; + } + if(use_meshclip_min[2] == 1 && meshclip_min[2] + MESH_EPS > meshi->boxmax[2]){ + meshi->use = 0; + continue; + } + if(use_meshclip_max[2] == 1 && meshclip_max[2] - MESH_EPS < meshi->boxmin[2]){ + meshi->use = 0; + continue; + } } - if(use_meshclip_max[2] == 1 && meshclip_max[2] - MESH_EPS < meshi->boxmin[2]){ - meshi->use = 0; - continue; + else{ + if(use_meshclip_max[0] == 1 && meshclip_max[0] + MESH_EPS < meshi->boxmax[0]){ + meshi->use = 0; + continue; + } + if(use_meshclip_min[0] == 1 && meshclip_min[0] - MESH_EPS > meshi->boxmin[0]){ + meshi->use = 0; + continue; + } + if(use_meshclip_max[1] == 1 && meshclip_max[1] + MESH_EPS < meshi->boxmax[1]){ + meshi->use = 0; + continue; + } + if(use_meshclip_min[1] == 1 && meshclip_min[1] - MESH_EPS > meshi->boxmin[1]){ + meshi->use = 0; + continue; + } + if(use_meshclip_max[2] == 1 && meshclip_max[2] + MESH_EPS < meshi->boxmax[2]){ + meshi->use = 0; + continue; + } + if(use_meshclip_min[2] == 1 && meshclip_min[2] - MESH_EPS > meshi->boxmin[2]){ + meshi->use = 0; + continue; + } } } UpdateBoundaryFiles(); @@ -5233,25 +5268,39 @@ hvacductboundsCPP.setup("hvac", ROLLOUT_hvacduct, hvacductbounds_cpp, nhvacductb TimeBoundCB(TBOUNDS_USE); TimeBoundCB(TBOUNDS); - PANEL_mesh = glui_bounds->add_panel_to_panel(ROLLOUT_time, "Spatial bounds - Load data in specified meshes", true); - PANEL_mesh_minmax = glui_bounds->add_panel_to_panel(PANEL_mesh, "", false); - PANEL_mesh_min = glui_bounds->add_panel_to_panel(PANEL_mesh_minmax, "min box coords", true); + PANEL_box_specify = glui_bounds->add_panel_to_panel(ROLLOUT_time, "Spatial bounds - Load data in specified meshes", true); + PANEL_box_specifyab = glui_bounds->add_panel_to_panel(PANEL_box_specify, "", false); + PANEL_box_specifya = glui_bounds->add_panel_to_panel(PANEL_box_specifyab, "", false); + glui_bounds->add_column_to_panel(PANEL_box_specifyab, false); + PANEL_load_data = glui_bounds->add_panel_to_panel(PANEL_box_specifyab, "Load data for meshes", true); + + CHECKBOX_show_intersection_box = glui_bounds->add_checkbox_to_panel(PANEL_box_specifya, "Show intersection box", &show_intersection_box, USEMESH_DRAW_BOX, MeshBoundCB); + CHECKBOX_show_intersected_meshes = glui_bounds->add_checkbox_to_panel(PANEL_box_specifya, "Show specified meshes", &show_intersected_meshes, USEMESH_DRAW_MESH, MeshBoundCB); + glui_bounds->add_checkbox_to_panel(PANEL_box_specifya, "Show specified mesh indices", &show_mesh_labels); + CHECKBOX_load_only_when_unloaded = glui_bounds->add_checkbox_to_panel(PANEL_box_specifya, "Load a file only if unloaded", &load_only_when_unloaded, USEMESH_LOAD_WHEN_LOADED, MeshBoundCB); + + RADIO_intersect_option = glui_bounds->add_radiogroup_to_panel(PANEL_load_data, &glui_mesh_intersection_option, USEMESH_XYZ, MeshBoundCB); + glui_bounds->add_radiobutton_to_group(RADIO_intersect_option, _("that intersect box")); + glui_bounds->add_radiobutton_to_group(RADIO_intersect_option, _("completely within box")); + + + PANEL_mesh = glui_bounds->add_panel_to_panel(PANEL_box_specify, "", false); + PANEL_mesh_minmax = glui_bounds->add_panel_to_panel(PANEL_mesh, "Specify meshes by setting intersection box"); + PANEL_meshxyz[0] = glui_bounds->add_panel_to_panel(PANEL_mesh_minmax, "", false); + PANEL_meshxyz[2] = glui_bounds->add_panel_to_panel(PANEL_mesh_minmax, "", false); + PANEL_meshxyz[4] = glui_bounds->add_panel_to_panel(PANEL_mesh_minmax, "", false); glui_bounds->add_column_to_panel(PANEL_mesh_minmax, false); - PANEL_mesh_max = glui_bounds->add_panel_to_panel(PANEL_mesh_minmax, "max box coords", true); - PANEL_meshxyz[0] = glui_bounds->add_panel_to_panel(PANEL_mesh_min, "", false); - PANEL_meshxyz[2] = glui_bounds->add_panel_to_panel(PANEL_mesh_min, "", false); - PANEL_meshxyz[4] = glui_bounds->add_panel_to_panel(PANEL_mesh_min, "", false); - PANEL_meshxyz[1] = glui_bounds->add_panel_to_panel(PANEL_mesh_max, "", false); - PANEL_meshxyz[3] = glui_bounds->add_panel_to_panel(PANEL_mesh_max, "", false); - PANEL_meshxyz[5] = glui_bounds->add_panel_to_panel(PANEL_mesh_max, "", false); + PANEL_meshxyz[1] = glui_bounds->add_panel_to_panel(PANEL_mesh_minmax, "", false); + PANEL_meshxyz[3] = glui_bounds->add_panel_to_panel(PANEL_mesh_minmax, "", false); + PANEL_meshxyz[5] = glui_bounds->add_panel_to_panel(PANEL_mesh_minmax, "", false); char lbl[6][6]; - strcpy(lbl[0], "X"); - strcpy(lbl[1], "X"); - strcpy(lbl[2], "Y"); - strcpy(lbl[3], "Y"); - strcpy(lbl[4], "Z"); - strcpy(lbl[5], "Z"); + strcpy(lbl[0], "xmin"); + strcpy(lbl[1], "xmax"); + strcpy(lbl[2], "ymin"); + strcpy(lbl[3], "ymax"); + strcpy(lbl[4], "zmin"); + strcpy(lbl[5], "zmax"); for(i=0;i<6;i++){ SPINNER_meshclip[i] = glui_bounds->add_spinner_to_panel(PANEL_meshxyz[i], lbl[i], GLUI_SPINNER_FLOAT, meshclip+i, USEMESH_XYZ, MeshBoundCB); glui_bounds->add_column_to_panel(PANEL_meshxyz[i], false); @@ -5264,15 +5313,7 @@ hvacductboundsCPP.setup("hvac", ROLLOUT_hvacduct, hvacductbounds_cpp, nhvacductb SPINNER_meshclip[4]->set_float_limits(zbar0FDS, zbarFDS); SPINNER_meshclip[5]->set_float_limits(zbar0FDS, zbarFDS); - PANEL_mesh1 = glui_bounds->add_panel_to_panel(PANEL_mesh, "", false); - CHECKBOX_show_intersection_box = glui_bounds->add_checkbox_to_panel(PANEL_mesh1, "show intersection box", &show_intersection_box, USEMESH_DRAW_BOX, MeshBoundCB); - CHECKBOX_show_intersected_meshes = glui_bounds->add_checkbox_to_panel(PANEL_mesh1, "show specified meshes", &show_intersected_meshes, USEMESH_DRAW_MESH, MeshBoundCB); - glui_bounds->add_checkbox_to_panel(PANEL_mesh1, "show specified mesh indices", &show_mesh_labels); - CHECKBOX_load_only_when_unloaded = glui_bounds->add_checkbox_to_panel(PANEL_mesh1, "Load a file only if unloaded", &load_only_when_unloaded, USEMESH_LOAD_WHEN_LOADED, MeshBoundCB); - - glui_bounds->add_column_to_panel(PANEL_mesh1, false); - - PANEL_setmesh = glui_bounds->add_panel_to_panel(PANEL_mesh1, "Set mesh(s)", true); + PANEL_setmesh = glui_bounds->add_panel_to_panel(PANEL_mesh, "or by specifying mesh(es) directly", true); PANEL_addmesh = glui_bounds->add_panel_to_panel(PANEL_setmesh, "", false); SPINNER_set_mesh = glui_bounds->add_spinner_to_panel(PANEL_addmesh, "mesh:", GLUI_SPINNER_INT, &set_mesh); diff --git a/Source/smokeview/smokeviewvars.h b/Source/smokeview/smokeviewvars.h index 001ae5d6e2..a75a63d2de 100644 --- a/Source/smokeview/smokeviewvars.h +++ b/Source/smokeview/smokeviewvars.h @@ -408,6 +408,8 @@ SVEXTERN int SVDECL(global_have_global_bound_file, 0); SVEXTERN FILE_SIZE SVDECL(global_part_boundsize, 0); SVEXTERN int SVDECL(nmemory_ids, 0); +SVEXTERN int SVDECL(glui_mesh_intersection_option, 0); + //--------------------------------------------------------------- SVEXTERN int SVDECL(partfast, 1); From 92a5f88a6ac96a4edd7c8193060e446eb3e766c5 Mon Sep 17 00:00:00 2001 From: gforney Date: Wed, 8 May 2024 13:44:43 -0400 Subject: [PATCH 6/8] smokeview source: formatting edits to data loading dialog box --- Source/smokeview/glui_bounds.cpp | 52 +++++++++++++++----------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/Source/smokeview/glui_bounds.cpp b/Source/smokeview/glui_bounds.cpp index 13d8f56214..88c2e62c53 100644 --- a/Source/smokeview/glui_bounds.cpp +++ b/Source/smokeview/glui_bounds.cpp @@ -2548,11 +2548,15 @@ GLUI_Rollout *ROLLOUT_isosurface = NULL; GLUI_Rollout *ROLLOUT_boundary_settings = NULL; GLUI_Rollout *ROLLOUT_particle_settings=NULL; GLUI_Rollout *ROLLOUT_particle_histogram = NULL; -GLUI_Panel *PANEL_keep_bound_data = NULL; -GLUI_Panel *PANEL_keep_plot3d_data = NULL; GLUI_Rollout *ROLLOUT_files = NULL; -GLUI_Rollout *ROLLOUT_split=NULL; +GLUI_Rollout *ROLLOUT_split=NULL; +GLUI_Rollout *ROLLOUT_autoload = NULL; +GLUI_Rollout *ROLLOUT_time1a = NULL; +GLUI_Rollout *ROLLOUT_box_specify = NULL; +GLUI_Panel *ROLLOUT_time2=NULL; +GLUI_Panel *PANEL_keep_bound_data = NULL; +GLUI_Panel *PANEL_keep_plot3d_data = NULL; GLUI_Panel *PANEL_vector1=NULL, *PANEL_vector2=NULL; GLUI_Panel *PANEL_partread = NULL; GLUI_Panel *PANEL_slice_misc=NULL, *PANEL_slice_vector=NULL, *PANEL_showslice=NULL; @@ -2602,8 +2606,6 @@ GLUI_Panel *PANEL_mesh_min = NULL; GLUI_Panel *PANEL_meshxyz[6]; GLUI_Panel *PANEL_mesh_max = NULL; GLUI_Panel *PANEL_mesh_minmax = NULL; -GLUI_Panel *PANEL_time2=NULL; -GLUI_Panel *PANEL_time1a=NULL; GLUI_Panel *PANEL_time2a=NULL; GLUI_Panel *PANEL_time2b=NULL; GLUI_Panel *PANEL_time2c=NULL; @@ -2622,10 +2624,8 @@ GLUI_Panel *PANEL_slice_plot2dc = NULL; GLUI_Panel *PANEL_slice_plot2dd = NULL; GLUI_Panel *PANEL_slice_plot2de = NULL; GLUI_Panel *PANEL_slice_plot2df = NULL; -GLUI_Panel *PANEL_autoload = NULL; GLUI_Panel *PANEL_loadbounds = NULL; GLUI_Panel *PANEL_box_option = NULL; -GLUI_Panel *PANEL_box_specify = NULL; GLUI_Panel *PANEL_box_specifya = NULL; GLUI_Panel *PANEL_box_specifyb = NULL; GLUI_Panel *PANEL_box_specifyab = NULL; @@ -5228,48 +5228,46 @@ hvacductboundsCPP.setup("hvac", ROLLOUT_hvacduct, hvacductbounds_cpp, nhvacductb PANEL_loadbounds = glui_bounds->add_panel_to_panel(ROLLOUT_time,"", GLUI_PANEL_NONE); - PANEL_autoload = glui_bounds->add_panel_to_panel(PANEL_loadbounds,_("Auto load")); - glui_bounds->add_checkbox_to_panel(PANEL_autoload, _("Auto load at startup"), &loadfiles_at_startup, STARTUP, BoundBoundCB); - glui_bounds->add_button_to_panel(PANEL_autoload, _("Save auto load file list"), SAVE_FILE_LIST, BoundBoundCB); - glui_bounds->add_button_to_panel(PANEL_autoload, _("Auto load now"), LOAD_FILES, BoundBoundCB); - - PANEL_time1a = glui_bounds->add_panel_to_panel(PANEL_loadbounds, "Set time", true); - SPINNER_timebounds = glui_bounds->add_spinner_to_panel(PANEL_time1a, _("Time:"), GLUI_SPINNER_FLOAT, &glui_time); - glui_bounds->add_spinner_to_panel(PANEL_time1a, _("Offset:"), GLUI_SPINNER_FLOAT, &timeoffset); - BUTTON_SETTIME = glui_bounds->add_button_to_panel(PANEL_time1a, _("Set"), SET_TIME, TimeBoundCB); + ROLLOUT_autoload = glui_bounds->add_rollout_to_panel(PANEL_loadbounds,_("Auto load"), false); + glui_bounds->add_checkbox_to_panel(ROLLOUT_autoload, _("Auto load at startup"), &loadfiles_at_startup, STARTUP, BoundBoundCB); + glui_bounds->add_button_to_panel(ROLLOUT_autoload, _("Save auto load file list"), SAVE_FILE_LIST, BoundBoundCB); + glui_bounds->add_button_to_panel(ROLLOUT_autoload, _("Auto load now"), LOAD_FILES, BoundBoundCB); - glui_bounds->add_column_to_panel(PANEL_loadbounds, false); + ROLLOUT_time1a = glui_bounds->add_rollout_to_panel(PANEL_loadbounds, "Set time", false); + SPINNER_timebounds = glui_bounds->add_spinner_to_panel(ROLLOUT_time1a, _("Time:"), GLUI_SPINNER_FLOAT, &glui_time); + glui_bounds->add_spinner_to_panel(ROLLOUT_time1a, _("Offset:"), GLUI_SPINNER_FLOAT, &timeoffset); + BUTTON_SETTIME = glui_bounds->add_button_to_panel(ROLLOUT_time1a, _("Set"), SET_TIME, TimeBoundCB); - PANEL_time2 = glui_bounds->add_panel_to_panel(PANEL_loadbounds, _("Time bounds"), true); + ROLLOUT_time2 = glui_bounds->add_rollout_to_panel(PANEL_loadbounds, _("Time bounds"), false); - glui_bounds->add_button_to_panel(PANEL_time2, _("Use FDS start/end times"), SET_FDS_TIMES, TimeBoundCB); + glui_bounds->add_button_to_panel(ROLLOUT_time2, _("Use FDS start/end times"), SET_FDS_TIMES, TimeBoundCB); - PANEL_time2a = glui_bounds->add_panel_to_panel(PANEL_time2, "", false); + PANEL_time2a = glui_bounds->add_panel_to_panel(ROLLOUT_time2, "", false); SPINNER_tload_begin = glui_bounds->add_spinner_to_panel(PANEL_time2a, _("min time"), GLUI_SPINNER_FLOAT, &tload_begin, TBOUNDS, TimeBoundCB); glui_bounds->add_column_to_panel(PANEL_time2a, false); CHECKBOX_use_tload_begin = glui_bounds->add_checkbox_to_panel(PANEL_time2a, "", &use_tload_begin, TBOUNDS_USE, TimeBoundCB); - PANEL_time2b = glui_bounds->add_panel_to_panel(PANEL_time2, "", false); + PANEL_time2b = glui_bounds->add_panel_to_panel(ROLLOUT_time2, "", false); SPINNER_tload_end = glui_bounds->add_spinner_to_panel(PANEL_time2b, _("max time"), GLUI_SPINNER_FLOAT, &tload_end, TBOUNDS, TimeBoundCB); glui_bounds->add_column_to_panel(PANEL_time2b, false); CHECKBOX_use_tload_end = glui_bounds->add_checkbox_to_panel(PANEL_time2b, "", &use_tload_end, TBOUNDS_USE, TimeBoundCB); - PANEL_time2c = glui_bounds->add_panel_to_panel(PANEL_time2, "", false); + PANEL_time2c = glui_bounds->add_panel_to_panel(ROLLOUT_time2, "", false); SPINNER_tload_skip = glui_bounds->add_spinner_to_panel(PANEL_time2c, _("frame skip"), GLUI_SPINNER_INT, &tload_skip, TBOUNDS, TimeBoundCB); glui_bounds->add_column_to_panel(PANEL_time2c, false); CHECKBOX_use_tload_skip = glui_bounds->add_checkbox_to_panel(PANEL_time2c, "", &use_tload_skip, TBOUNDS_USE, TimeBoundCB); SPINNER_tload_skip->set_int_limits(0, 1000); - glui_bounds->add_button_to_panel(PANEL_time2, _("Reload all data"), RELOAD_ALL_DATA, TimeBoundCB); + glui_bounds->add_button_to_panel(ROLLOUT_time2, _("Reload all data"), RELOAD_ALL_DATA, TimeBoundCB); #ifdef pp_LOAD_INC - glui_bounds->add_button_to_panel(PANEL_time2, _("Reload new data"), RELOAD_INCREMENTAL_DATA, TimeBoundCB); + glui_bounds->add_button_to_panel(ROLLOUT_time2, _("Reload new data"), RELOAD_INCREMENTAL_DATA, TimeBoundCB); #endif TimeBoundCB(TBOUNDS_USE); TimeBoundCB(TBOUNDS); - PANEL_box_specify = glui_bounds->add_panel_to_panel(ROLLOUT_time, "Spatial bounds - Load data in specified meshes", true); - PANEL_box_specifyab = glui_bounds->add_panel_to_panel(PANEL_box_specify, "", false); + ROLLOUT_box_specify = glui_bounds->add_rollout_to_panel(ROLLOUT_time, "Spatial bounds - Load data in specified meshes", false); + PANEL_box_specifyab = glui_bounds->add_panel_to_panel(ROLLOUT_box_specify, "", false); PANEL_box_specifya = glui_bounds->add_panel_to_panel(PANEL_box_specifyab, "", false); glui_bounds->add_column_to_panel(PANEL_box_specifyab, false); PANEL_load_data = glui_bounds->add_panel_to_panel(PANEL_box_specifyab, "Load data for meshes", true); @@ -5284,7 +5282,7 @@ hvacductboundsCPP.setup("hvac", ROLLOUT_hvacduct, hvacductbounds_cpp, nhvacductb glui_bounds->add_radiobutton_to_group(RADIO_intersect_option, _("completely within box")); - PANEL_mesh = glui_bounds->add_panel_to_panel(PANEL_box_specify, "", false); + PANEL_mesh = glui_bounds->add_panel_to_panel(ROLLOUT_box_specify, "", false); PANEL_mesh_minmax = glui_bounds->add_panel_to_panel(PANEL_mesh, "Specify meshes by setting intersection box"); PANEL_meshxyz[0] = glui_bounds->add_panel_to_panel(PANEL_mesh_minmax, "", false); PANEL_meshxyz[2] = glui_bounds->add_panel_to_panel(PANEL_mesh_minmax, "", false); From 501ac667b8cae6ee9e771d189fc8cf9e9d6cfc77 Mon Sep 17 00:00:00 2001 From: gforney Date: Wed, 8 May 2024 13:45:10 -0400 Subject: [PATCH 7/8] dummy commit --- Source/smokebot_trigger.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/smokebot_trigger.txt b/Source/smokebot_trigger.txt index 24e7a314cb..0d869ab12c 100644 --- a/Source/smokebot_trigger.txt +++ b/Source/smokebot_trigger.txt @@ -1,4 +1,4 @@ - master: dummy text to trigger smokebot + master: dummy text to trigger smokebot devel: dummy text to trigger smokebot devel2: dummy text to trigger smokebot test: dummy text to trigger smokebot From ae7065edfa0b3e1bd292014c74a0b03f68bca7b7 Mon Sep 17 00:00:00 2001 From: gforney Date: Wed, 8 May 2024 18:22:12 -0400 Subject: [PATCH 8/8] smokeview source: formatting edits to data loading dialog box --- Source/smokebot_trigger.txt | 2 +- Source/smokeview/glui_bounds.cpp | 44 +++++++++++++++++++++++++------- 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/Source/smokebot_trigger.txt b/Source/smokebot_trigger.txt index 0d869ab12c..780e3e5e7d 100644 --- a/Source/smokebot_trigger.txt +++ b/Source/smokebot_trigger.txt @@ -1,4 +1,4 @@ - master: dummy text to trigger smokebot + master: dummy text to trigger smokebot devel: dummy text to trigger smokebot devel2: dummy text to trigger smokebot test: dummy text to trigger smokebot diff --git a/Source/smokeview/glui_bounds.cpp b/Source/smokeview/glui_bounds.cpp index 88c2e62c53..95d41f23c6 100644 --- a/Source/smokeview/glui_bounds.cpp +++ b/Source/smokeview/glui_bounds.cpp @@ -2553,7 +2553,7 @@ GLUI_Rollout *ROLLOUT_split=NULL; GLUI_Rollout *ROLLOUT_autoload = NULL; GLUI_Rollout *ROLLOUT_time1a = NULL; GLUI_Rollout *ROLLOUT_box_specify = NULL; -GLUI_Panel *ROLLOUT_time2=NULL; +GLUI_Rollout *ROLLOUT_time2=NULL; GLUI_Panel *PANEL_keep_bound_data = NULL; GLUI_Panel *PANEL_keep_plot3d_data = NULL; @@ -2807,6 +2807,15 @@ GLUI_RadioButton *RADIOBUTTON_zone_permax=NULL; procdata boundprocinfo[10]; int nboundprocinfo = 0; +//*** loadprocinfo entries +#define LOAD_AUTO_ROLLOUT 0 +#define LOAD_TIMESET_ROLLOUT 1 +#define LOAD_TIMEBOUND_ROLLOUT 2 +#define LOAD_SPACEBOUND_ROLLOUT 3 + +procdata loadprocinfo[4]; +int nloadprocinfo = 0; + //*** isoprocinfo entries #define ISO_ROLLOUT_BOUNDS 0 #define ISO_ROLLOUT_SETTINGS 1 @@ -3279,6 +3288,12 @@ void IsoRolloutCB(int var){ GLUIToggleRollout(isoprocinfo, nisoprocinfo, var); } +/* ------------------ LoadRolloutCB ------------------------ */ + +void LoadRolloutCB(int var){ + GLUIToggleRollout(loadprocinfo, nloadprocinfo, var); +} + /* ------------------ BoundRolloutCB ------------------------ */ void BoundRolloutCB(int var){ @@ -5228,17 +5243,25 @@ hvacductboundsCPP.setup("hvac", ROLLOUT_hvacduct, hvacductbounds_cpp, nhvacductb PANEL_loadbounds = glui_bounds->add_panel_to_panel(ROLLOUT_time,"", GLUI_PANEL_NONE); - ROLLOUT_autoload = glui_bounds->add_rollout_to_panel(PANEL_loadbounds,_("Auto load"), false); + ROLLOUT_autoload = glui_bounds->add_rollout_to_panel(PANEL_loadbounds,_("Auto load"), false, LOAD_AUTO_ROLLOUT, LoadRolloutCB); + INSERT_ROLLOUT(ROLLOUT_autoload, glui_bounds); + ADDPROCINFO(loadprocinfo, nloadprocinfo, ROLLOUT_autoload, LOAD_AUTO_ROLLOUT, glui_bounds); + glui_bounds->add_checkbox_to_panel(ROLLOUT_autoload, _("Auto load at startup"), &loadfiles_at_startup, STARTUP, BoundBoundCB); glui_bounds->add_button_to_panel(ROLLOUT_autoload, _("Save auto load file list"), SAVE_FILE_LIST, BoundBoundCB); glui_bounds->add_button_to_panel(ROLLOUT_autoload, _("Auto load now"), LOAD_FILES, BoundBoundCB); - ROLLOUT_time1a = glui_bounds->add_rollout_to_panel(PANEL_loadbounds, "Set time", false); + ROLLOUT_time1a = glui_bounds->add_rollout_to_panel(PANEL_loadbounds, "Set time", false, LOAD_TIMESET_ROLLOUT, LoadRolloutCB); + INSERT_ROLLOUT(ROLLOUT_time1a, glui_bounds); + ADDPROCINFO(loadprocinfo, nloadprocinfo, ROLLOUT_time1a, LOAD_TIMESET_ROLLOUT, glui_bounds); + SPINNER_timebounds = glui_bounds->add_spinner_to_panel(ROLLOUT_time1a, _("Time:"), GLUI_SPINNER_FLOAT, &glui_time); glui_bounds->add_spinner_to_panel(ROLLOUT_time1a, _("Offset:"), GLUI_SPINNER_FLOAT, &timeoffset); BUTTON_SETTIME = glui_bounds->add_button_to_panel(ROLLOUT_time1a, _("Set"), SET_TIME, TimeBoundCB); - ROLLOUT_time2 = glui_bounds->add_rollout_to_panel(PANEL_loadbounds, _("Time bounds"), false); + ROLLOUT_time2 = glui_bounds->add_rollout_to_panel(PANEL_loadbounds, _("Set time limits"), false, LOAD_TIMEBOUND_ROLLOUT, LoadRolloutCB); + INSERT_ROLLOUT(ROLLOUT_time2, glui_bounds); + ADDPROCINFO(loadprocinfo, nloadprocinfo, ROLLOUT_time2, LOAD_TIMEBOUND_ROLLOUT, glui_bounds); glui_bounds->add_button_to_panel(ROLLOUT_time2, _("Use FDS start/end times"), SET_FDS_TIMES, TimeBoundCB); @@ -5266,11 +5289,14 @@ hvacductboundsCPP.setup("hvac", ROLLOUT_hvacduct, hvacductbounds_cpp, nhvacductb TimeBoundCB(TBOUNDS_USE); TimeBoundCB(TBOUNDS); - ROLLOUT_box_specify = glui_bounds->add_rollout_to_panel(ROLLOUT_time, "Spatial bounds - Load data in specified meshes", false); + ROLLOUT_box_specify = glui_bounds->add_rollout_to_panel(ROLLOUT_time, "Set spatial limits", false, LOAD_SPACEBOUND_ROLLOUT, LoadRolloutCB); + INSERT_ROLLOUT(ROLLOUT_box_specify, glui_bounds); + ADDPROCINFO(loadprocinfo, nloadprocinfo, ROLLOUT_box_specify, LOAD_SPACEBOUND_ROLLOUT, glui_bounds); + PANEL_box_specifyab = glui_bounds->add_panel_to_panel(ROLLOUT_box_specify, "", false); PANEL_box_specifya = glui_bounds->add_panel_to_panel(PANEL_box_specifyab, "", false); glui_bounds->add_column_to_panel(PANEL_box_specifyab, false); - PANEL_load_data = glui_bounds->add_panel_to_panel(PANEL_box_specifyab, "Load data for meshes", true); + PANEL_load_data = glui_bounds->add_panel_to_panel(PANEL_box_specifyab, "Load data for meshes that", true); CHECKBOX_show_intersection_box = glui_bounds->add_checkbox_to_panel(PANEL_box_specifya, "Show intersection box", &show_intersection_box, USEMESH_DRAW_BOX, MeshBoundCB); CHECKBOX_show_intersected_meshes = glui_bounds->add_checkbox_to_panel(PANEL_box_specifya, "Show specified meshes", &show_intersected_meshes, USEMESH_DRAW_MESH, MeshBoundCB); @@ -5278,12 +5304,12 @@ hvacductboundsCPP.setup("hvac", ROLLOUT_hvacduct, hvacductbounds_cpp, nhvacductb CHECKBOX_load_only_when_unloaded = glui_bounds->add_checkbox_to_panel(PANEL_box_specifya, "Load a file only if unloaded", &load_only_when_unloaded, USEMESH_LOAD_WHEN_LOADED, MeshBoundCB); RADIO_intersect_option = glui_bounds->add_radiogroup_to_panel(PANEL_load_data, &glui_mesh_intersection_option, USEMESH_XYZ, MeshBoundCB); - glui_bounds->add_radiobutton_to_group(RADIO_intersect_option, _("that intersect box")); - glui_bounds->add_radiobutton_to_group(RADIO_intersect_option, _("completely within box")); + glui_bounds->add_radiobutton_to_group(RADIO_intersect_option, _("intersect box")); + glui_bounds->add_radiobutton_to_group(RADIO_intersect_option, _("are completely within box")); PANEL_mesh = glui_bounds->add_panel_to_panel(ROLLOUT_box_specify, "", false); - PANEL_mesh_minmax = glui_bounds->add_panel_to_panel(PANEL_mesh, "Specify meshes by setting intersection box"); + PANEL_mesh_minmax = glui_bounds->add_panel_to_panel(PANEL_mesh, "Specify meshes by setting the intersection box"); PANEL_meshxyz[0] = glui_bounds->add_panel_to_panel(PANEL_mesh_minmax, "", false); PANEL_meshxyz[2] = glui_bounds->add_panel_to_panel(PANEL_mesh_minmax, "", false); PANEL_meshxyz[4] = glui_bounds->add_panel_to_panel(PANEL_mesh_minmax, "", false);