From c1986311a6beccbbea2f35d2013b04754ed2b5a0 Mon Sep 17 00:00:00 2001 From: gforney Date: Thu, 7 Nov 2024 16:52:27 -0500 Subject: [PATCH 01/12] smokeview source: add a placeholder debug blockage drawing routine --- Source/smokeview/callbacks.c | 3 ++- Source/smokeview/drawGeometry.c | 38 +++++++++++++++++++++++++++---- Source/smokeview/glui_display.cpp | 11 ++++++--- Source/smokeview/readsmv.c | 2 +- 4 files changed, 44 insertions(+), 10 deletions(-) diff --git a/Source/smokeview/callbacks.c b/Source/smokeview/callbacks.c index dfe550427..c5538ed86 100644 --- a/Source/smokeview/callbacks.c +++ b/Source/smokeview/callbacks.c @@ -2584,7 +2584,8 @@ void Keyboard(unsigned char key, int flag){ } break; case 'U': - use_new_drawface = 1 - use_new_drawface; + use_new_drawface++; + if(use_new_drawface > 2)use_new_drawface = 0; updatefacelists = 1; GLUIUpdateFastBlockageDraw(); if(use_new_drawface == 1)printf("fast blockage drawing\n"); diff --git a/Source/smokeview/drawGeometry.c b/Source/smokeview/drawGeometry.c index a29002cdc..33baf1ee9 100644 --- a/Source/smokeview/drawGeometry.c +++ b/Source/smokeview/drawGeometry.c @@ -2853,7 +2853,7 @@ void UpdateFaceListsWorker(void){ nface_transparent_double += n_transparent_double; nface_outlines += n_outlines; - if(use_new_drawface==0)continue; + if(use_new_drawface!=1)continue; meshi->nface_normals_single_DOWN_X=0; meshi->nface_normals_single_UP_X=0; @@ -3060,6 +3060,25 @@ void DrawSelectFaces(){ glVertex3fv(vertices+6);\ glVertex3fv(vertices+9); + +/* ------------------ DrawBlockagesDebug ------------------------ */ + +void DrawBlockagesDebug(void){ + int i; + + for(i = 0; i < nmeshes; i++){ + meshdata *meshi; + int j; + + meshi = meshinfo + i; + for(j = 0; jnbptrs; j++){ + blockagedata *bc; + + bc = meshi->blockageinfoptrs[j]; + } + } +} + /* ------------------ DrawFacesOLD ------------------------ */ // add option to turn off lighting when verifying smoke void DrawFacesOLD(){ @@ -4973,11 +4992,20 @@ void DrawBlockages(int mode, int trans_flag){ } } else{ - if(use_new_drawface==1){ - DrawFaces(); - } - else{ + switch(use_new_drawface){ + case 0: DrawFacesOLD(); + break; + case 1: + DrawFaces(); + break; + case 2: + void DrawBlockagesDebug(void); + DrawBlockagesDebug(); + break; + default: + assert(0); + break; } } } diff --git a/Source/smokeview/glui_display.cpp b/Source/smokeview/glui_display.cpp index 2c5d221d7..573ae04b3 100644 --- a/Source/smokeview/glui_display.cpp +++ b/Source/smokeview/glui_display.cpp @@ -121,7 +121,6 @@ GLUI_Checkbox *CHECKBOX_user_ticks_show_x=NULL; GLUI_Checkbox *CHECKBOX_user_ticks_show_y=NULL; GLUI_Checkbox *CHECKBOX_user_ticks_show_z=NULL; GLUI_Checkbox *CHECKBOX_tick_auto=NULL; -GLUI_Checkbox *CHECKBOX_label_1=NULL; GLUI_Checkbox *CHECKBOX_label_2=NULL; GLUI_Checkbox *CHECKBOX_label_3=NULL; GLUI_Checkbox *CHECKBOX_labels_flip=NULL; @@ -141,6 +140,7 @@ GLUI_Rollout *ROLLOUT_general=NULL; GLUI_Rollout *ROLLOUT_north = NULL; GLUI_Rollout *ROLLOUT_light2 = NULL; +GLUI_Panel *PANEL_blockage_drawing = NULL; GLUI_Panel *PANEL_boundingbox = NULL; GLUI_Panel *PANEL_titles=NULL; GLUI_Panel *PANEL_screen = NULL; @@ -175,6 +175,7 @@ GLUI_Panel *PANEL_texture_display = NULL; GLUI_RadioGroup *RADIO_show_geom_boundingbox = NULL; GLUI_RadioGroup *RADIO_timebar_overlap = NULL; GLUI_RadioGroup *RADIO_fontsize = NULL; +GLUI_RadioGroup *RADIOBUTTON_label_1 = NULL; GLUI_RadioButton *RADIOBUTTON_label_1a=NULL; GLUI_RadioButton *RADIOBUTTON_label_1b=NULL; GLUI_RadioButton *RADIOBUTTON_label_1c=NULL; @@ -305,7 +306,7 @@ extern "C" void GLUIUpdateTimebarOverlap(void){ /* ------------------ GLUIUpdateTimebarOverlap ------------------------ */ extern "C" void GLUIUpdateFastBlockageDraw(void){ - if(CHECKBOX_label_1 != NULL)CHECKBOX_label_1->set_int_val(use_new_drawface); + if(RADIOBUTTON_label_1 != NULL)RADIOBUTTON_label_1->set_int_val(use_new_drawface); } /* ------------------ DisplayRolloutCB ------------------------ */ @@ -880,7 +881,11 @@ extern "C" void GLUIDisplaySetup(int main_window){ glui_labels->add_radiobutton_to_group(RADIO_timebar_overlap,_("Never")); glui_labels->add_radiobutton_to_group(RADIO_timebar_overlap,_("Only if timebar hidden")); - CHECKBOX_label_1=glui_labels->add_checkbox_to_panel(PANEL_gen3,_("Fast blockage drawing"),&use_new_drawface,LABELS_drawface,GLUILabelsCB); + PANEL_blockage_drawing = glui_labels->add_panel_to_panel(PANEL_gen3,_("Blockage drawing")); + RADIOBUTTON_label_1 = glui_labels->add_radiogroup_to_panel(PANEL_blockage_drawing, &use_new_drawface, LABELS_drawface, GLUILabelsCB); + glui_labels->add_radiobutton_to_group(RADIOBUTTON_label_1, _("original")); + glui_labels->add_radiobutton_to_group(RADIOBUTTON_label_1, _("new")); + glui_labels->add_radiobutton_to_group(RADIOBUTTON_label_1, _("debug")); CHECKBOX_label_2=glui_labels->add_checkbox_to_panel(PANEL_gen3,_("Sort transparent faces"),&sort_transparent_faces,LABELS_drawface,GLUILabelsCB); CHECKBOX_label_3=glui_labels->add_checkbox_to_panel(PANEL_gen3,_("Hide overlaps"),&hide_overlaps,LABELS_hide_overlaps,GLUILabelsCB); diff --git a/Source/smokeview/readsmv.c b/Source/smokeview/readsmv.c index 3d6054695..d277d54a3 100644 --- a/Source/smokeview/readsmv.c +++ b/Source/smokeview/readsmv.c @@ -12870,7 +12870,7 @@ int ReadIni2(char *inifile, int localfile){ fgets(buffer, 255, stream); sscanf(buffer, "%i", &use_new_drawface); updatefacelists = 1; - ONEORZERO(use_new_drawface); + use_new_drawface = CLAMP(use_new_drawface, 0, 2); continue; } if(MatchINI(buffer, "TLOAD") == 1){ From f77598b461d5a1062538279a0dbd65480bc91e65 Mon Sep 17 00:00:00 2001 From: gforney Date: Thu, 7 Nov 2024 19:16:36 -0500 Subject: [PATCH 02/12] smv vv: add a cylinder test case --- vistest/obsts/cyl1.fds | 61 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 vistest/obsts/cyl1.fds diff --git a/vistest/obsts/cyl1.fds b/vistest/obsts/cyl1.fds new file mode 100644 index 000000000..a4d768fbf --- /dev/null +++ b/vistest/obsts/cyl1.fds @@ -0,0 +1,61 @@ +&HEAD CHID='cyl1', TITLE='cylinder test case' / + +&TIME T_END=0. / + +&MISC SIMULATION_MODE='DNS' / + +MESH XB=-0.15,-0.12,-0.15,-0.12,-0.02, 0.02, IJK=30,30,40, MULT_ID='mesh' / +&MESH XB=-0.15,-0.12,-0.15,-0.12,-0.02, 0.02, IJK=8,8,10, MULT_ID='mesh' / +&MULT ID='mesh', DX=0.03, DY=0.03, DZ=0.04, I_LOWER=2,I_UPPER=2, J_UPPER=1, K_UPPER=0 / + +&CLIP MINIMUM_DENSITY=0.01 / + +&SPEC ID='NITROGEN', BACKGROUND=T, MASS_FRACTION_0=0.77 / +&SPEC ID='METHANE' / +&SPEC ID='OXYGEN', MASS_FRACTION_0=0.23 / +&SPEC ID='WATER VAPOR' / +&SPEC ID='CARBON DIOXIDE' / + +&REAC ID='REACTION 1' + FUEL='METHANE' + A=1.3E8 + E=202506. + SPEC_ID_NU='METHANE','OXYGEN','CARBON DIOXIDE','WATER VAPOR' + NU=-1,-2,1,2 + SPEC_ID_N_S='METHANE','OXYGEN' + N_S=-0.3,1.3 / + +&SLCF PBY=0.001, QUANTITY='VELOCITY', VECTOR=.TRUE. / +&SLCF PBY=0.001, QUANTITY='TEMPERATURE', CELL_CENTERED=.TRUE. / +&SLCF PBY=0.001, QUANTITY='HRRPUV', CELL_CENTERED=.TRUE. / +&SLCF PBY=0.001, QUANTITY='TEMPERATURE' / +&SLCF PBY=0.001, QUANTITY='VOLUME FRACTION', SPEC_ID='OXYGEN', CELL_CENTERED=.TRUE. / +&SLCF PBY=0.001, QUANTITY='VOLUME FRACTION', SPEC_ID='CARBON DIOXIDE', CELL_CENTERED=.TRUE. / +&SLCF PBY=0.001, QUANTITY='VOLUME FRACTION', SPEC_ID='METHANE', CELL_CENTERED=.TRUE. / +&SLCF PBY=0.001, QUANTITY='EXTINCTION', CELL_CENTERED=.TRUE. / +&SLCF PBY=0.001, QUANTITY='RADIATION LOSS', CELL_CENTERED=.TRUE. / + +&MATL ID='STEEL', CONDUCTIVITY=54, DENSITY=7800, SPECIFIC_HEAT=0.465, EMISSIVITY=0.8 / + +&SURF ID='PAN', COLOR='GRAY 50', MATL_ID='STEEL', THICKNESS=0.003 / + +&SURF ID='POOL', COLOR='LIGHT BLUE', SPEC_ID(1)='METHANE', MASS_FLUX(1)=0.024, SPEC_ID(2)='OXYGEN', MASS_FLUX(2)=0.096, SPEC_ID(3)='NITROGEN', MASS_FLUX(3)=0.323, TMP_FRONT=1500., RAMP_T='hot' / + +&RAMP ID='hot', T= 0., F=0.0 / +&RAMP ID='hot', T= 1., F=1.0 / +&RAMP ID='hot', T= 2., F=1.0 / +&RAMP ID='hot', T= 3., F=1.0 / + +&VENT MB='ZMIN', SURF_ID='OPEN' / +&VENT MB='ZMAX', SURF_ID='OPEN' / +&VENT MB='YMIN', SURF_ID='OPEN' / +&VENT MB='YMAX', SURF_ID='OPEN' / +&VENT MB='XMIN', SURF_ID='OPEN' / +&VENT MB='XMAX', SURF_ID='OPEN' / + +&MULT ID='cube array', DX=0.001,DY=0.001,DZ=0.001, I_UPPER=280,J_UPPER=280,K_UPPER=19 / +&OBST XB=-0.140,-0.139,-0.140,-0.139,-0.020,-0.019, MULT_ID='cube array', SURF_ID='PAN', SHAPE='CYLINDER', RADIUS=0.14, HEIGHT=0.03, XYZ=0,0,-0.02, ORIENTATION=0,0,1/ + +VENT XB=-0.12,0.12,-0.12,0.12,0.00,0.00, SURF_ID='POOL', RADIUS=0.115, XYZ=0,0,0, SPREAD_RATE=1. / + +&TAIL / From 347b2feec6c6cbb09fab27a0371fadbc85158419 Mon Sep 17 00:00:00 2001 From: gforney Date: Thu, 7 Nov 2024 20:37:27 -0500 Subject: [PATCH 03/12] smokeview source: add a debug obst drawing routine --- Source/smokeview/IOgeometry.c | 78 ++++++++++++++++++++++++++++++--- Source/smokeview/drawGeometry.c | 25 +++++++++-- Source/smokeview/readsmv.c | 19 ++++++++ Source/smokeview/showscene.c | 2 +- Source/smokeview/smokeheaders.h | 3 +- Source/smokeview/structures.h | 2 +- 6 files changed, 115 insertions(+), 14 deletions(-) diff --git a/Source/smokeview/IOgeometry.c b/Source/smokeview/IOgeometry.c index b7ade1484..20b226bde 100644 --- a/Source/smokeview/IOgeometry.c +++ b/Source/smokeview/IOgeometry.c @@ -325,9 +325,73 @@ int HaveNonTextures(tridata **tris, int ntris){ return 0; } -/* ------------------ DrawBox ------------------------ */ +/* ------------------ DrawBoxShaded ------------------------ */ -void DrawBox(float *bb, float *box_color){ +void DrawBoxShaded(float *bb, float *box_color){ + float x0, x1, y0, y1, z0, z1; + + x0 = bb[0]; + x1 = bb[1]; + y0 = bb[2]; + y1 = bb[3]; + z0 = bb[4]; + z1 = bb[5]; + glColor3fv(box_color); + glBegin(GL_TRIANGLES); + + glNormal3f(-1.0, 0.0, 0.0); + glVertex3f(x0, y0, z0); + glVertex3f(x0, y1, z1); + glVertex3f(x0, y1, z0); + glVertex3f(x0, y0, z0); + glVertex3f(x0, y0, z1); + glVertex3f(x0, y1, z1); + + glNormal3f(1.0, 0.0, 0.0); + glVertex3f(x1, y0, z0); + glVertex3f(x1, y1, z0); + glVertex3f(x1, y1, z1); + glVertex3f(x1, y0, z0); + glVertex3f(x1, y1, z1); + glVertex3f(x1, y0, z1); + + glNormal3f(0.0, -1.0, 0.0); + glVertex3f(x0, y0, z0); + glVertex3f(x1, y0, z0); + glVertex3f(x1, y0, z1); + glVertex3f(x0, y0, z0); + glVertex3f(x1, y0, z1); + glVertex3f(x0, y0, z1); + + glNormal3f(0.0, 1.0, 0.0); + glVertex3f(x0, y1, z0); + glVertex3f(x1, y1, z1); + glVertex3f(x1, y1, z0); + glVertex3f(x0, y1, z0); + glVertex3f(x0, y1, z1); + glVertex3f(x1, y1, z1); + + glNormal3f(0.0, 0.0, -1.0); + glVertex3f(x1, y0, z0); + glVertex3f(x0, y0, z0); + glVertex3f(x1, y1, z0); + glVertex3f(x0, y0, z0); + glVertex3f(x0, y1, z0); + glVertex3f(x1, y1, z0); + + glNormal3f(0.0, 0.0, 1.0); + glVertex3f(x0, y0, z1); + glVertex3f(x1, y0, z1); + glVertex3f(x1, y1, z1); + glVertex3f(x0, y0, z1); + glVertex3f(x1, y1, z1); + glVertex3f(x0, y1, z1); + glEnd(); +} + +/* ------------------ DrawBoxOutline ------------------------ */ + +void DrawBoxOutline(float *bb, float *box_color){ glColor3fv(box_color); glLineWidth(geom_linewidth); glBegin(GL_LINES); @@ -377,7 +441,7 @@ void DrawBox(float *bb, float *box_color){ glEnd(); } -/* ------------------ DrawBox ------------------------ */ +/* ------------------ DrawBoxMinMax ------------------------ */ void DrawBoxMinMax(float *bbmin, float *bbmax, float *box_color){ float bb[6]; @@ -388,7 +452,7 @@ void DrawBoxMinMax(float *bbmin, float *bbmax, float *box_color){ bb[1] = bbmax[0]; bb[3] = bbmax[1]; bb[5] = bbmax[2]; - DrawBox(bb, box_color); + DrawBoxOutline(bb, box_color); } /* ------------------ DrawObstBoundingBox ------------------------ */ @@ -400,7 +464,7 @@ void DrawObstBoundingBox(void){ glPushMatrix(); glScalef(SCALE2SMV(1.0), SCALE2SMV(1.0), SCALE2SMV(1.0)); glTranslatef(-xbar0, -ybar0, -zbar0); - DrawBox(obst_bounding_box, foregroundcolor); + DrawBoxOutline(obst_bounding_box, foregroundcolor); glPopMatrix(); } @@ -429,12 +493,12 @@ void DrawGeomBoundingBox(float *boundingbox_color){ box_color = foregroundcolor; if(geomobjj->color!=NULL)box_color = geomobjj->color; if(boundingbox_color!=NULL)box_color = boundingbox_color; - DrawBox(geomobjj->bounding_box, box_color); + DrawBoxOutline(geomobjj->bounding_box, box_color); have_box = 1; } } if(have_box==0){ - DrawBox(geomi->bounding_box, foregroundcolor); + DrawBoxOutline(geomi->bounding_box, foregroundcolor); } } glPopMatrix(); diff --git a/Source/smokeview/drawGeometry.c b/Source/smokeview/drawGeometry.c index 33baf1ee9..4b1552344 100644 --- a/Source/smokeview/drawGeometry.c +++ b/Source/smokeview/drawGeometry.c @@ -3061,11 +3061,21 @@ void DrawSelectFaces(){ glVertex3fv(vertices+9); -/* ------------------ DrawBlockagesDebug ------------------------ */ +/* ------------------ DrawObstsDebug ------------------------ */ -void DrawBlockagesDebug(void){ +void DrawObstsDebug(void){ int i; + glPushMatrix(); + glScalef(SCALE2SMV(1.0),SCALE2SMV(1.0),SCALE2SMV(1.0)); + glTranslatef(-xbar0,-ybar0,-zbar0); + if(light_faces == 1){ + ENABLE_LIGHTING; + glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, &block_shininess); + glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, block_ambient2); + glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, block_specular2); + glEnable(GL_COLOR_MATERIAL); + } for(i = 0; i < nmeshes; i++){ meshdata *meshi; int j; @@ -3075,8 +3085,15 @@ void DrawBlockagesDebug(void){ blockagedata *bc; bc = meshi->blockageinfoptrs[j]; + void DrawBoxShaded(float *bb, float *box_color); + DrawBoxShaded(bc->xyz, bc->color); } } + if(light_faces == 1){ + glDisable(GL_COLOR_MATERIAL); + DISABLE_LIGHTING; + } + glPopMatrix(); } /* ------------------ DrawFacesOLD ------------------------ */ @@ -5000,8 +5017,8 @@ void DrawBlockages(int mode, int trans_flag){ DrawFaces(); break; case 2: - void DrawBlockagesDebug(void); - DrawBlockagesDebug(); + void DrawObstsDebug(void); + DrawObstsDebug(); break; default: assert(0); diff --git a/Source/smokeview/readsmv.c b/Source/smokeview/readsmv.c index d277d54a3..d60042dd4 100644 --- a/Source/smokeview/readsmv.c +++ b/Source/smokeview/readsmv.c @@ -6944,9 +6944,13 @@ void InitMeshBlockages(void){ int j; int counts[6]; int *is_extface; + float *xplt, *yplt, *zplt; meshi = meshinfo + i; if(meshi->nbptrs == 0)continue; + xplt = meshi->xplt_orig; + yplt = meshi->yplt_orig; + zplt = meshi->zplt_orig; is_extface = meshi->is_extface; for(j=0; j< 6; j++){ counts[j] = 0; @@ -6983,6 +6987,21 @@ void InitMeshBlockages(void){ bclist = meshi->bc_faces[4]; if(bc->ijk[4] == 0 && is_extface[4] == 0)bclist[counts[4]++] = bc; bclist = meshi->bc_faces[5]; if(bc->ijk[5] == meshi->kbar && is_extface[5] == 0)bclist[counts[5]++] = bc; } + for(j = 0;j < meshi->nbptrs;j++){ + blockagedata *bc; + float *xyz; + int *ijk; + + bc = meshi->blockageinfoptrs[j]; + xyz = bc->xyz; + ijk = bc->ijk; + xyz[0] = xplt[ijk[0]]; + xyz[1] = xplt[ijk[1]]; + xyz[2] = yplt[ijk[2]]; + xyz[3] = yplt[ijk[3]]; + xyz[4] = zplt[ijk[4]]; + xyz[5] = zplt[ijk[5]]; + } } } diff --git a/Source/smokeview/showscene.c b/Source/smokeview/showscene.c index 0aaa54863..5299f09f9 100644 --- a/Source/smokeview/showscene.c +++ b/Source/smokeview/showscene.c @@ -209,7 +209,7 @@ void ShowScene2(int mode){ glPushMatrix(); glScalef(SCALE2SMV(1.0), SCALE2SMV(1.0), SCALE2SMV(1.0)); glTranslatef(-xbar0, -ybar0, -zbar0); - DrawBox(meshclip, box_red); + DrawBoxOutline(meshclip, box_red); glPopMatrix(); } diff --git a/Source/smokeview/smokeheaders.h b/Source/smokeview/smokeheaders.h index ae9725b45..e94f04b98 100644 --- a/Source/smokeview/smokeheaders.h +++ b/Source/smokeview/smokeheaders.h @@ -39,7 +39,8 @@ EXTERNCPP void GLUIUpdateTextureDisplay(void); EXTERNCPP void GLUIUpdateLoadAllSlices(void); EXTERNCPP void GLUIUpdateMeshBounds(void); EXTERNCPP void DrawBoxMinMax(float *bbmin, float *bbmax, float *box_color); -EXTERNCPP void DrawBox(float *bb, float *box_color); +EXTERNCPP void DrawBoxOutline(float *bb, float *box_color); +EXTERNCPP void DrawBoxShaded(float *bb, float *box_color); EXTERNCPP void GLUIUpdateLoadWhenLoaded(void); EXTERNCPP void GLUIBoundsSetup(int main_window); EXTERNCPP void GLUIUpdatePartPointSize(void); diff --git a/Source/smokeview/structures.h b/Source/smokeview/structures.h index 2e0b20ad4..0200c42cc 100644 --- a/Source/smokeview/structures.h +++ b/Source/smokeview/structures.h @@ -346,7 +346,7 @@ typedef struct _xbdata { typedef struct _blockagedata { int ijk[6]; float xmin, xmax, ymin, ymax, zmin, zmax; - float xyzEXACT[6], xyzDELTA[18]; + float xyz[6], xyzEXACT[6], xyzDELTA[18]; struct _surfdata *surf[6]; struct _propdata *prop; int walltype,walltypeORIG; From 93024acff158eafdbf54c96d6dcd30b0f4875e34 Mon Sep 17 00:00:00 2001 From: gforney Date: Thu, 7 Nov 2024 22:15:42 -0500 Subject: [PATCH 04/12] smokeview source: add some blockage debug visualiation --- Source/smokeview/drawGeometry.c | 16 +++++++++++++++- Source/smokeview/glui_display.cpp | 4 ++++ Source/smokeview/smokeviewvars.h | 3 +++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/Source/smokeview/drawGeometry.c b/Source/smokeview/drawGeometry.c index 4b1552344..cdbd13f26 100644 --- a/Source/smokeview/drawGeometry.c +++ b/Source/smokeview/drawGeometry.c @@ -3079,9 +3079,23 @@ void DrawObstsDebug(void){ for(i = 0; i < nmeshes; i++){ meshdata *meshi; int j; + int jmin, jmax; meshi = meshinfo + i; - for(j = 0; jnbptrs; j++){ + jmin = 0; + jmax = meshi->nbptrs-1; + if(mesh_index_debug >= 0 && mesh_index_debug < nmeshes){ + if(mesh_index_debug!=i)continue; + if(min_blockage_index_debug >= 0 && min_blockage_index_debug < meshi->nbptrs){ + if(max_blockage_index_debug >= 0 && max_blockage_index_debug < meshi->nbptrs){ + if(min_blockage_index_debug <= max_blockage_index_debug){ + jmin = min_blockage_index_debug; + jmax = max_blockage_index_debug; + } + } + } + } + for(j = jmin; j<=jmax; j++){ blockagedata *bc; bc = meshi->blockageinfoptrs[j]; diff --git a/Source/smokeview/glui_display.cpp b/Source/smokeview/glui_display.cpp index 573ae04b3..5306862f4 100644 --- a/Source/smokeview/glui_display.cpp +++ b/Source/smokeview/glui_display.cpp @@ -886,6 +886,10 @@ extern "C" void GLUIDisplaySetup(int main_window){ glui_labels->add_radiobutton_to_group(RADIOBUTTON_label_1, _("original")); glui_labels->add_radiobutton_to_group(RADIOBUTTON_label_1, _("new")); glui_labels->add_radiobutton_to_group(RADIOBUTTON_label_1, _("debug")); + glui_labels->add_spinner_to_panel(PANEL_blockage_drawing, "mesh:", GLUI_SPINNER_INT, &mesh_index_debug); + glui_labels->add_spinner_to_panel(PANEL_blockage_drawing, "min blockage index:", GLUI_SPINNER_INT, &min_blockage_index_debug); + glui_labels->add_spinner_to_panel(PANEL_blockage_drawing, "max blockage index:", GLUI_SPINNER_INT, &max_blockage_index_debug); + CHECKBOX_label_2=glui_labels->add_checkbox_to_panel(PANEL_gen3,_("Sort transparent faces"),&sort_transparent_faces,LABELS_drawface,GLUILabelsCB); CHECKBOX_label_3=glui_labels->add_checkbox_to_panel(PANEL_gen3,_("Hide overlaps"),&hide_overlaps,LABELS_hide_overlaps,GLUILabelsCB); diff --git a/Source/smokeview/smokeviewvars.h b/Source/smokeview/smokeviewvars.h index ba5d896c0..2ea0e9483 100644 --- a/Source/smokeview/smokeviewvars.h +++ b/Source/smokeview/smokeviewvars.h @@ -1816,6 +1816,9 @@ SVEXTERN int SVDECL(use_new_drawface, 1); #else SVEXTERN int SVDECL(use_new_drawface, 0); #endif +SVEXTERN int SVDECL(mesh_index_debug, -1); +SVEXTERN int SVDECL(min_blockage_index_debug, -1); +SVEXTERN int SVDECL(max_blockage_index_debug, -1); #ifdef INMAIN SVEXTERN unsigned char rgb_below_min[3]={255-64,255-64,255-64}, rgb_above_max[3]={0,0,0}; #else From 172c0ed7740a8a7f4da225c37dca780c3a0f1aed Mon Sep 17 00:00:00 2001 From: gforney Date: Fri, 8 Nov 2024 09:35:31 -0500 Subject: [PATCH 05/12] smokeview source: add an obst debug drawing option that only draws hidden blockage faces --- Source/smokeview/IOgeometry.c | 108 +++++++++++++++++------------- Source/smokeview/c_api.c | 2 +- Source/smokeview/callbacks.c | 16 +++-- Source/smokeview/drawGeometry.c | 13 ++-- Source/smokeview/glui_display.cpp | 7 +- Source/smokeview/options.h | 2 +- Source/smokeview/readsmv.c | 17 +++-- Source/smokeview/smokeheaders.h | 2 +- Source/smokeview/smokeviewvars.h | 6 +- vistest/obsts/cyl1.fds | 4 +- 10 files changed, 106 insertions(+), 71 deletions(-) diff --git a/Source/smokeview/IOgeometry.c b/Source/smokeview/IOgeometry.c index 20b226bde..3f97280a0 100644 --- a/Source/smokeview/IOgeometry.c +++ b/Source/smokeview/IOgeometry.c @@ -327,7 +327,7 @@ int HaveNonTextures(tridata **tris, int ntris){ /* ------------------ DrawBoxShaded ------------------------ */ -void DrawBoxShaded(float *bb, float *box_color){ +void DrawBoxShaded(float *bb, int flag, int *hidden6, float *box_color){ float x0, x1, y0, y1, z0, z1; x0 = bb[0]; @@ -339,53 +339,65 @@ void DrawBoxShaded(float *bb, float *box_color){ glColor3fv(box_color); glBegin(GL_TRIANGLES); - glNormal3f(-1.0, 0.0, 0.0); - glVertex3f(x0, y0, z0); - glVertex3f(x0, y1, z1); - glVertex3f(x0, y1, z0); - glVertex3f(x0, y0, z0); - glVertex3f(x0, y0, z1); - glVertex3f(x0, y1, z1); - - glNormal3f(1.0, 0.0, 0.0); - glVertex3f(x1, y0, z0); - glVertex3f(x1, y1, z0); - glVertex3f(x1, y1, z1); - glVertex3f(x1, y0, z0); - glVertex3f(x1, y1, z1); - glVertex3f(x1, y0, z1); - - glNormal3f(0.0, -1.0, 0.0); - glVertex3f(x0, y0, z0); - glVertex3f(x1, y0, z0); - glVertex3f(x1, y0, z1); - glVertex3f(x0, y0, z0); - glVertex3f(x1, y0, z1); - glVertex3f(x0, y0, z1); - - glNormal3f(0.0, 1.0, 0.0); - glVertex3f(x0, y1, z0); - glVertex3f(x1, y1, z1); - glVertex3f(x1, y1, z0); - glVertex3f(x0, y1, z0); - glVertex3f(x0, y1, z1); - glVertex3f(x1, y1, z1); - - glNormal3f(0.0, 0.0, -1.0); - glVertex3f(x1, y0, z0); - glVertex3f(x0, y0, z0); - glVertex3f(x1, y1, z0); - glVertex3f(x0, y0, z0); - glVertex3f(x0, y1, z0); - glVertex3f(x1, y1, z0); - - glNormal3f(0.0, 0.0, 1.0); - glVertex3f(x0, y0, z1); - glVertex3f(x1, y0, z1); - glVertex3f(x1, y1, z1); - glVertex3f(x0, y0, z1); - glVertex3f(x1, y1, z1); - glVertex3f(x0, y1, z1); + if(flag==2||(flag==3&&hidden6[0]==0)){ + glNormal3f(-1.0, 0.0, 0.0); + glVertex3f(x0, y0, z0); + glVertex3f(x0, y1, z1); + glVertex3f(x0, y1, z0); + glVertex3f(x0, y0, z0); + glVertex3f(x0, y0, z1); + glVertex3f(x0, y1, z1); + } + + if(flag==2||(flag==3&&hidden6[1]==0)){ + glNormal3f(1.0, 0.0, 0.0); + glVertex3f(x1, y0, z0); + glVertex3f(x1, y1, z0); + glVertex3f(x1, y1, z1); + glVertex3f(x1, y0, z0); + glVertex3f(x1, y1, z1); + glVertex3f(x1, y0, z1); + } + + if(flag==2||(flag==3&&hidden6[2]==0)){ + glNormal3f(0.0, -1.0, 0.0); + glVertex3f(x0, y0, z0); + glVertex3f(x1, y0, z0); + glVertex3f(x1, y0, z1); + glVertex3f(x0, y0, z0); + glVertex3f(x1, y0, z1); + glVertex3f(x0, y0, z1); + } + + if(flag==2||(flag==3&&hidden6[3]==0)){ + glNormal3f(0.0, 1.0, 0.0); + glVertex3f(x0, y1, z0); + glVertex3f(x1, y1, z1); + glVertex3f(x1, y1, z0); + glVertex3f(x0, y1, z0); + glVertex3f(x0, y1, z1); + glVertex3f(x1, y1, z1); + } + + if(flag==2||(flag==3&&hidden6[4]==0)){ + glNormal3f(0.0, 0.0, -1.0); + glVertex3f(x1, y0, z0); + glVertex3f(x0, y0, z0); + glVertex3f(x1, y1, z0); + glVertex3f(x0, y0, z0); + glVertex3f(x0, y1, z0); + glVertex3f(x1, y1, z0); + } + + if(flag==2||(flag==3&&hidden6[5]==0)){ + glNormal3f(0.0, 0.0, 1.0); + glVertex3f(x0, y0, z1); + glVertex3f(x1, y0, z1); + glVertex3f(x1, y1, z1); + glVertex3f(x0, y0, z1); + glVertex3f(x1, y1, z1); + glVertex3f(x0, y1, z1); + } glEnd(); } diff --git a/Source/smokeview/c_api.c b/Source/smokeview/c_api.c index aceb716ee..736303b16 100644 --- a/Source/smokeview/c_api.c +++ b/Source/smokeview/c_api.c @@ -2468,7 +2468,7 @@ int SetTicklinewidth(float v) { } // TICKLINEWIDTH int SetUsenewdrawface(int v) { - use_new_drawface = v; + blockage_draw_option = v; return 0; } // USENEWDRAWFACE diff --git a/Source/smokeview/callbacks.c b/Source/smokeview/callbacks.c index c5538ed86..7ad3a6829 100644 --- a/Source/smokeview/callbacks.c +++ b/Source/smokeview/callbacks.c @@ -2584,12 +2584,20 @@ void Keyboard(unsigned char key, int flag){ } break; case 'U': - use_new_drawface++; - if(use_new_drawface > 2)use_new_drawface = 0; + blockage_draw_option++; +#ifdef pp_OBST_DEBUG + if(blockage_draw_option > 3)blockage_draw_option = 0; +#else + if(blockage_draw_option > 1)blockage_draw_option = 0; +#endif updatefacelists = 1; GLUIUpdateFastBlockageDraw(); - if(use_new_drawface == 1)printf("fast blockage drawing\n"); - if(use_new_drawface == 0)printf("original blockage drawing\n"); + if(blockage_draw_option == 0)printf("original blockage drawing\n"); + if(blockage_draw_option == 1)printf("fast blockage drawing\n"); +#ifdef pp_OBST_DEBUG + if(blockage_draw_option == 2)printf("debug blockage drawing\n"); + if(blockage_draw_option == 3)printf("debug blockage drawing, draw only hidden faces\n"); +#endif break; case '|': projection_type = 1-projection_type; diff --git a/Source/smokeview/drawGeometry.c b/Source/smokeview/drawGeometry.c index cdbd13f26..db258e3d9 100644 --- a/Source/smokeview/drawGeometry.c +++ b/Source/smokeview/drawGeometry.c @@ -2853,7 +2853,7 @@ void UpdateFaceListsWorker(void){ nface_transparent_double += n_transparent_double; nface_outlines += n_outlines; - if(use_new_drawface!=1)continue; + if(blockage_draw_option!=1)continue; meshi->nface_normals_single_DOWN_X=0; meshi->nface_normals_single_UP_X=0; @@ -3061,6 +3061,7 @@ void DrawSelectFaces(){ glVertex3fv(vertices+9); +#ifdef pp_OBST_DEBUG /* ------------------ DrawObstsDebug ------------------------ */ void DrawObstsDebug(void){ @@ -3099,8 +3100,8 @@ void DrawObstsDebug(void){ blockagedata *bc; bc = meshi->blockageinfoptrs[j]; - void DrawBoxShaded(float *bb, float *box_color); - DrawBoxShaded(bc->xyz, bc->color); + void DrawBoxShaded(float *bb, int flag, int *hidden6, float *box_color); + DrawBoxShaded(bc->xyz, blockage_draw_option, bc->hidden6, bc->color); } } if(light_faces == 1){ @@ -3109,6 +3110,7 @@ void DrawObstsDebug(void){ } glPopMatrix(); } +#endif /* ------------------ DrawFacesOLD ------------------------ */ // add option to turn off lighting when verifying smoke @@ -5023,17 +5025,20 @@ void DrawBlockages(int mode, int trans_flag){ } } else{ - switch(use_new_drawface){ + switch(blockage_draw_option){ case 0: DrawFacesOLD(); break; case 1: DrawFaces(); break; +#ifdef pp_OBST_DEBUG case 2: + case 3: void DrawObstsDebug(void); DrawObstsDebug(); break; +#endif default: assert(0); break; diff --git a/Source/smokeview/glui_display.cpp b/Source/smokeview/glui_display.cpp index 5306862f4..6f22ed8ac 100644 --- a/Source/smokeview/glui_display.cpp +++ b/Source/smokeview/glui_display.cpp @@ -306,7 +306,7 @@ extern "C" void GLUIUpdateTimebarOverlap(void){ /* ------------------ GLUIUpdateTimebarOverlap ------------------------ */ extern "C" void GLUIUpdateFastBlockageDraw(void){ - if(RADIOBUTTON_label_1 != NULL)RADIOBUTTON_label_1->set_int_val(use_new_drawface); + if(RADIOBUTTON_label_1 != NULL)RADIOBUTTON_label_1->set_int_val(blockage_draw_option); } /* ------------------ DisplayRolloutCB ------------------------ */ @@ -882,13 +882,16 @@ extern "C" void GLUIDisplaySetup(int main_window){ glui_labels->add_radiobutton_to_group(RADIO_timebar_overlap,_("Only if timebar hidden")); PANEL_blockage_drawing = glui_labels->add_panel_to_panel(PANEL_gen3,_("Blockage drawing")); - RADIOBUTTON_label_1 = glui_labels->add_radiogroup_to_panel(PANEL_blockage_drawing, &use_new_drawface, LABELS_drawface, GLUILabelsCB); + RADIOBUTTON_label_1 = glui_labels->add_radiogroup_to_panel(PANEL_blockage_drawing, &blockage_draw_option, LABELS_drawface, GLUILabelsCB); glui_labels->add_radiobutton_to_group(RADIOBUTTON_label_1, _("original")); glui_labels->add_radiobutton_to_group(RADIOBUTTON_label_1, _("new")); +#ifdef pp_OBST_DEBUG glui_labels->add_radiobutton_to_group(RADIOBUTTON_label_1, _("debug")); + glui_labels->add_radiobutton_to_group(RADIOBUTTON_label_1, _("debug - draw only hidden faces")); glui_labels->add_spinner_to_panel(PANEL_blockage_drawing, "mesh:", GLUI_SPINNER_INT, &mesh_index_debug); glui_labels->add_spinner_to_panel(PANEL_blockage_drawing, "min blockage index:", GLUI_SPINNER_INT, &min_blockage_index_debug); glui_labels->add_spinner_to_panel(PANEL_blockage_drawing, "max blockage index:", GLUI_SPINNER_INT, &max_blockage_index_debug); +#endif CHECKBOX_label_2=glui_labels->add_checkbox_to_panel(PANEL_gen3,_("Sort transparent faces"),&sort_transparent_faces,LABELS_drawface,GLUILabelsCB); CHECKBOX_label_3=glui_labels->add_checkbox_to_panel(PANEL_gen3,_("Hide overlaps"),&hide_overlaps,LABELS_hide_overlaps,GLUILabelsCB); diff --git a/Source/smokeview/options.h b/Source/smokeview/options.h index 13ec7a074..a6fbe84be 100644 --- a/Source/smokeview/options.h +++ b/Source/smokeview/options.h @@ -14,7 +14,7 @@ //#define pp_FDS // create a 1 mesh input file #define pp_HIDDEN6 // handle hidden6 info on obst line #define pp_PART_SHOW // add option to show selected particle values as well as tags -#define pp_NEWFACE // use new DrawFace routine by default +#define pp_OBST_DEBUG // use new DrawFace routine by default #ifdef pp_FRAME // turn on each frame type if pp_FRAME is set #define pp_BOUNDFRAME // turn on frame code for boundary files diff --git a/Source/smokeview/readsmv.c b/Source/smokeview/readsmv.c index d60042dd4..33c6d1ed8 100644 --- a/Source/smokeview/readsmv.c +++ b/Source/smokeview/readsmv.c @@ -12881,17 +12881,23 @@ int ReadIni2(char *inifile, int localfile){ fgets(buffer, 255, stream); sscanf(buffer, "%i %f %i", &scaled_font3d_height, &scaled_font3d_height2width, &scaled_font3d_thickness); } -#ifdef pp_NEWFACE +#ifdef pp_OBST_DEBUG if(MatchINI(buffer, "NEWDRAWFACE") == 1){ + fgets(buffer, 255, stream); + sscanf(buffer, "%i", &blockage_draw_option); + updatefacelists = 1; + blockage_draw_option = CLAMP(blockage_draw_option, 0, 3); + continue; + } #else if(MatchINI(buffer, "USENEWDRAWFACE") == 1){ -#endif fgets(buffer, 255, stream); sscanf(buffer, "%i", &use_new_drawface); updatefacelists = 1; - use_new_drawface = CLAMP(use_new_drawface, 0, 2); + use_new_drawface = CLAMP(use_new_drawface, 0, 1); continue; } +#endif if(MatchINI(buffer, "TLOAD") == 1){ fgets(buffer, 255, stream); sscanf(buffer, "%i %f %i %f %i %i", &use_tload_begin, &tload_begin, &use_tload_end, &tload_end, &use_tload_skip, &tload_skip); @@ -17007,12 +17013,13 @@ void WriteIni(int flag,char *filename){ fprintf(fileout, " %f\n", streaklinewidth); fprintf(fileout, "TICKLINEWIDTH\n"); fprintf(fileout, " %f\n", ticklinewidth); -#ifdef pp_NEWFACE +#ifdef pp_OBST_DEBUG fprintf(fileout, "NEWDRAWFACE\n"); + fprintf(fileout, " %i\n", blockage_draw_option); #else fprintf(fileout, "USENEWDRAWFACE\n"); + fprintf(fileout, " %i\n", blockage_draw_option); #endif - fprintf(fileout, " %i\n", use_new_drawface); fprintf(fileout, "VECCONTOURS\n"); fprintf(fileout, " %i %i\n", show_node_slices_and_vectors,show_cell_slices_and_vectors); fprintf(fileout, "VECLENGTH\n"); diff --git a/Source/smokeview/smokeheaders.h b/Source/smokeview/smokeheaders.h index e94f04b98..fb16d407e 100644 --- a/Source/smokeview/smokeheaders.h +++ b/Source/smokeview/smokeheaders.h @@ -40,7 +40,7 @@ EXTERNCPP void GLUIUpdateLoadAllSlices(void); EXTERNCPP void GLUIUpdateMeshBounds(void); EXTERNCPP void DrawBoxMinMax(float *bbmin, float *bbmax, float *box_color); EXTERNCPP void DrawBoxOutline(float *bb, float *box_color); -EXTERNCPP void DrawBoxShaded(float *bb, float *box_color); +EXTERNCPP void DrawBoxShaded(float *bb, int flag, int *hidden6, float *box_color); EXTERNCPP void GLUIUpdateLoadWhenLoaded(void); EXTERNCPP void GLUIBoundsSetup(int main_window); EXTERNCPP void GLUIUpdatePartPointSize(void); diff --git a/Source/smokeview/smokeviewvars.h b/Source/smokeview/smokeviewvars.h index 2ea0e9483..c0340d6b8 100644 --- a/Source/smokeview/smokeviewvars.h +++ b/Source/smokeview/smokeviewvars.h @@ -1811,10 +1811,10 @@ SVEXTERN float texture_origin[3]; #endif SVEXTERN int vslicecolorbarflag; -#ifdef pp_NEWFACE -SVEXTERN int SVDECL(use_new_drawface, 1); +#ifdef pp_OBST_DEBUG +SVEXTERN int SVDECL(blockage_draw_option, 1); #else -SVEXTERN int SVDECL(use_new_drawface, 0); +SVEXTERN int SVDECL(blockage_draw_option, 0); #endif SVEXTERN int SVDECL(mesh_index_debug, -1); SVEXTERN int SVDECL(min_blockage_index_debug, -1); diff --git a/vistest/obsts/cyl1.fds b/vistest/obsts/cyl1.fds index a4d768fbf..19fec901e 100644 --- a/vistest/obsts/cyl1.fds +++ b/vistest/obsts/cyl1.fds @@ -4,8 +4,8 @@ &MISC SIMULATION_MODE='DNS' / -MESH XB=-0.15,-0.12,-0.15,-0.12,-0.02, 0.02, IJK=30,30,40, MULT_ID='mesh' / -&MESH XB=-0.15,-0.12,-0.15,-0.12,-0.02, 0.02, IJK=8,8,10, MULT_ID='mesh' / +&MESH XB=-0.15,-0.12,-0.15,-0.12,-0.02, 0.02, IJK=30,30,40, MULT_ID='mesh' / +MESH XB=-0.15,-0.12,-0.15,-0.12,-0.02, 0.02, IJK=8,8,10, MULT_ID='mesh' / &MULT ID='mesh', DX=0.03, DY=0.03, DZ=0.04, I_LOWER=2,I_UPPER=2, J_UPPER=1, K_UPPER=0 / &CLIP MINIMUM_DENSITY=0.01 / From 1f55321539a9dd4b18fe614c8c18d33a1ebd08ac Mon Sep 17 00:00:00 2001 From: gforney Date: Fri, 8 Nov 2024 09:37:00 -0500 Subject: [PATCH 06/12] smokeview source: remove pp_HIDDEN6 directive --- Source/smokeview/options.h | 1 - Source/smokeview/update.c | 4 ---- 2 files changed, 5 deletions(-) diff --git a/Source/smokeview/options.h b/Source/smokeview/options.h index a6fbe84be..145c23dea 100644 --- a/Source/smokeview/options.h +++ b/Source/smokeview/options.h @@ -12,7 +12,6 @@ #define pp_GPU // support the GPU #define pp_THREAD // turn on multi-threading //#define pp_FDS // create a 1 mesh input file -#define pp_HIDDEN6 // handle hidden6 info on obst line #define pp_PART_SHOW // add option to show selected particle values as well as tags #define pp_OBST_DEBUG // use new DrawFace routine by default diff --git a/Source/smokeview/update.c b/Source/smokeview/update.c index 6de95a39f..7d80c3bc9 100644 --- a/Source/smokeview/update.c +++ b/Source/smokeview/update.c @@ -3031,14 +3031,10 @@ void UpdateDisplay(void){ meshi = meshinfo + ig; void SetHiddenBlockages(meshdata *meshi); -#ifdef pp_HIDDEN6 if(have_hidden6 == 0){ if(ig == 0)printf("setting hidden blockages\n"); SetHiddenBlockages(meshi); } -#else - SetHiddenBlockages(meshi); -#endif for(j = 0; j < meshi->nbptrs; j++){ blockagedata *bc; From 41628d3470229aee60b977c30646108039bbc72e Mon Sep 17 00:00:00 2001 From: gforney Date: Fri, 8 Nov 2024 09:38:55 -0500 Subject: [PATCH 07/12] smokeview source: remove pp_PART_SHOW directive --- Source/smokeview/options.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Source/smokeview/options.h b/Source/smokeview/options.h index 145c23dea..45222ce57 100644 --- a/Source/smokeview/options.h +++ b/Source/smokeview/options.h @@ -12,7 +12,6 @@ #define pp_GPU // support the GPU #define pp_THREAD // turn on multi-threading //#define pp_FDS // create a 1 mesh input file -#define pp_PART_SHOW // add option to show selected particle values as well as tags #define pp_OBST_DEBUG // use new DrawFace routine by default #ifdef pp_FRAME // turn on each frame type if pp_FRAME is set From a7aa7c65b03edee13cbf56ad0f7ec8b6af291ddd Mon Sep 17 00:00:00 2001 From: gforney Date: Fri, 8 Nov 2024 10:04:13 -0500 Subject: [PATCH 08/12] smokeview source: minor edit --- Source/smokeview/options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/smokeview/options.h b/Source/smokeview/options.h index 45222ce57..c65dbb509 100644 --- a/Source/smokeview/options.h +++ b/Source/smokeview/options.h @@ -12,7 +12,7 @@ #define pp_GPU // support the GPU #define pp_THREAD // turn on multi-threading //#define pp_FDS // create a 1 mesh input file -#define pp_OBST_DEBUG // use new DrawFace routine by default +#define pp_OBST_DEBUG // use new DrawFace routine by default, add option to use debug obst drawing routines #ifdef pp_FRAME // turn on each frame type if pp_FRAME is set #define pp_BOUNDFRAME // turn on frame code for boundary files From bb2e857474be9fc105fa831ab0e4434ccc26f714 Mon Sep 17 00:00:00 2001 From: gforney Date: Fri, 8 Nov 2024 14:56:35 -0500 Subject: [PATCH 09/12] smokeview source: specify min and number of blockages (rather than min and max) when drawing debug blockages --- Source/smokeview/IOgeometry.c | 60 +++++++++++++++++++++++++++++++ Source/smokeview/drawGeometry.c | 2 ++ Source/smokeview/glui_display.cpp | 2 +- Source/smokeview/smokeviewvars.h | 2 +- 4 files changed, 64 insertions(+), 2 deletions(-) diff --git a/Source/smokeview/IOgeometry.c b/Source/smokeview/IOgeometry.c index 3f97280a0..968f57faf 100644 --- a/Source/smokeview/IOgeometry.c +++ b/Source/smokeview/IOgeometry.c @@ -347,6 +347,16 @@ void DrawBoxShaded(float *bb, int flag, int *hidden6, float *box_color){ glVertex3f(x0, y0, z0); glVertex3f(x0, y0, z1); glVertex3f(x0, y1, z1); + + if(flag == 3 && hidden6[0] == 0){ + glNormal3f(1.0, 0.0, 0.0); + glVertex3f(x0, y0, z0); + glVertex3f(x0, y1, z0); + glVertex3f(x0, y1, z1); + glVertex3f(x0, y0, z0); + glVertex3f(x0, y1, z1); + glVertex3f(x0, y0, z1); + } } if(flag==2||(flag==3&&hidden6[1]==0)){ @@ -357,6 +367,16 @@ void DrawBoxShaded(float *bb, int flag, int *hidden6, float *box_color){ glVertex3f(x1, y0, z0); glVertex3f(x1, y1, z1); glVertex3f(x1, y0, z1); + + if(flag == 3 && hidden6[1] == 0){ + glNormal3f(-1.0, 0.0, 0.0); + glVertex3f(x1, y0, z0); + glVertex3f(x1, y1, z1); + glVertex3f(x1, y1, z0); + glVertex3f(x1, y0, z0); + glVertex3f(x1, y0, z1); + glVertex3f(x1, y1, z1); + } } if(flag==2||(flag==3&&hidden6[2]==0)){ @@ -367,6 +387,16 @@ void DrawBoxShaded(float *bb, int flag, int *hidden6, float *box_color){ glVertex3f(x0, y0, z0); glVertex3f(x1, y0, z1); glVertex3f(x0, y0, z1); + + if(flag == 3 && hidden6[2] == 0){ + glNormal3f(0.0, 1.0, 0.0); + glVertex3f(x0, y0, z0); + glVertex3f(x1, y0, z1); + glVertex3f(x1, y0, z0); + glVertex3f(x0, y0, z0); + glVertex3f(x0, y0, z1); + glVertex3f(x1, y0, z1); + } } if(flag==2||(flag==3&&hidden6[3]==0)){ @@ -377,6 +407,16 @@ void DrawBoxShaded(float *bb, int flag, int *hidden6, float *box_color){ glVertex3f(x0, y1, z0); glVertex3f(x0, y1, z1); glVertex3f(x1, y1, z1); + + if(flag == 3 && hidden6[3] == 0){ + glNormal3f(0.0, -1.0, 0.0); + glVertex3f(x0, y1, z0); + glVertex3f(x1, y1, z0); + glVertex3f(x1, y1, z1); + glVertex3f(x0, y1, z0); + glVertex3f(x1, y1, z1); + glVertex3f(x0, y1, z1); + } } if(flag==2||(flag==3&&hidden6[4]==0)){ @@ -387,6 +427,16 @@ void DrawBoxShaded(float *bb, int flag, int *hidden6, float *box_color){ glVertex3f(x0, y0, z0); glVertex3f(x0, y1, z0); glVertex3f(x1, y1, z0); + + if(flag == 3 && hidden6[4] == 0){ + glNormal3f(0.0, 0.0, 1.0); + glVertex3f(x1, y0, z0); + glVertex3f(x1, y1, z0); + glVertex3f(x0, y0, z0); + glVertex3f(x0, y0, z0); + glVertex3f(x1, y1, z0); + glVertex3f(x0, y1, z0); + } } if(flag==2||(flag==3&&hidden6[5]==0)){ @@ -397,6 +447,16 @@ void DrawBoxShaded(float *bb, int flag, int *hidden6, float *box_color){ glVertex3f(x0, y0, z1); glVertex3f(x1, y1, z1); glVertex3f(x0, y1, z1); + + if(flag == 3 && hidden6[5] == 0){ + glNormal3f(0.0, 0.0, -1.0); + glVertex3f(x0, y0, z1); + glVertex3f(x1, y1, z1); + glVertex3f(x1, y0, z1); + glVertex3f(x0, y0, z1); + glVertex3f(x0, y1, z1); + glVertex3f(x1, y1, z1); + } } glEnd(); } diff --git a/Source/smokeview/drawGeometry.c b/Source/smokeview/drawGeometry.c index db258e3d9..0aee17215 100644 --- a/Source/smokeview/drawGeometry.c +++ b/Source/smokeview/drawGeometry.c @@ -3086,7 +3086,9 @@ void DrawObstsDebug(void){ jmin = 0; jmax = meshi->nbptrs-1; if(mesh_index_debug >= 0 && mesh_index_debug < nmeshes){ + int max_blockage_index_debug; if(mesh_index_debug!=i)continue; + max_blockage_index_debug = min_blockage_index_debug + n_blockages_debug - 1; if(min_blockage_index_debug >= 0 && min_blockage_index_debug < meshi->nbptrs){ if(max_blockage_index_debug >= 0 && max_blockage_index_debug < meshi->nbptrs){ if(min_blockage_index_debug <= max_blockage_index_debug){ diff --git a/Source/smokeview/glui_display.cpp b/Source/smokeview/glui_display.cpp index 6f22ed8ac..47375546d 100644 --- a/Source/smokeview/glui_display.cpp +++ b/Source/smokeview/glui_display.cpp @@ -890,7 +890,7 @@ extern "C" void GLUIDisplaySetup(int main_window){ glui_labels->add_radiobutton_to_group(RADIOBUTTON_label_1, _("debug - draw only hidden faces")); glui_labels->add_spinner_to_panel(PANEL_blockage_drawing, "mesh:", GLUI_SPINNER_INT, &mesh_index_debug); glui_labels->add_spinner_to_panel(PANEL_blockage_drawing, "min blockage index:", GLUI_SPINNER_INT, &min_blockage_index_debug); - glui_labels->add_spinner_to_panel(PANEL_blockage_drawing, "max blockage index:", GLUI_SPINNER_INT, &max_blockage_index_debug); + glui_labels->add_spinner_to_panel(PANEL_blockage_drawing, "number of blockages:", GLUI_SPINNER_INT, &n_blockages_debug); #endif CHECKBOX_label_2=glui_labels->add_checkbox_to_panel(PANEL_gen3,_("Sort transparent faces"),&sort_transparent_faces,LABELS_drawface,GLUILabelsCB); diff --git a/Source/smokeview/smokeviewvars.h b/Source/smokeview/smokeviewvars.h index c0340d6b8..8052bced4 100644 --- a/Source/smokeview/smokeviewvars.h +++ b/Source/smokeview/smokeviewvars.h @@ -1818,7 +1818,7 @@ SVEXTERN int SVDECL(blockage_draw_option, 0); #endif SVEXTERN int SVDECL(mesh_index_debug, -1); SVEXTERN int SVDECL(min_blockage_index_debug, -1); -SVEXTERN int SVDECL(max_blockage_index_debug, -1); +SVEXTERN int SVDECL(n_blockages_debug, 0); #ifdef INMAIN SVEXTERN unsigned char rgb_below_min[3]={255-64,255-64,255-64}, rgb_above_max[3]={0,0,0}; #else From 414843521f2391889fbbac0141f0e4bd7ca62a89 Mon Sep 17 00:00:00 2001 From: gforney Date: Fri, 8 Nov 2024 21:24:50 -0500 Subject: [PATCH 10/12] smv vv: add an ini file for the cyl1 test case --- vistest/obsts/cyl1.ini | 642 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 642 insertions(+) create mode 100644 vistest/obsts/cyl1.ini diff --git a/vistest/obsts/cyl1.ini b/vistest/obsts/cyl1.ini new file mode 100644 index 000000000..9cacab80e --- /dev/null +++ b/vistest/obsts/cyl1.ini @@ -0,0 +1,642 @@ +# NIST Smokeview configuration file, Release Nov 8 2024 + + + ------------ global ini settings ------------ + + *** COLOR/LIGHTING *** + +BACKGROUNDCOLOR + 0.000000 0.000000 0.000000 +BLOCKCOLOR + 1.000000 0.800000 0.400000 +BLOCKSHININESS + 100.000000 +BLOCKSPECULAR + 0.000000 0.000000 0.000000 +BOUNDCOLOR + 0.500000 0.500000 0.500000 +COLORBAR + 12 1 -1 5 + 0.000299 0.000000 1.000000 + 0.245451 0.294577 0.942934 + 0.290415 0.458755 0.883579 + 0.257206 0.607984 0.820800 + 0.000159 0.752952 0.752946 + 0.224347 0.842371 0.564313 + 0.194393 0.938675 0.329380 + 0.360483 0.955550 0.000000 + 0.662853 0.821588 0.000000 + 0.823603 0.662262 0.000000 + 0.925208 0.461607 0.000000 + 1.000000 0.000000 0.000000 +COLOR2BAR + 8 + 1.000000 1.000000 1.000000 :white + 1.000000 1.000000 0.000000 :yellow + 0.000000 0.000000 1.000000 :blue + 1.000000 0.000000 0.000000 :red + 0.000000 1.000000 0.000000 :green + 1.000000 0.000000 1.000000 :magenta + 0.000000 1.000000 1.000000 :cyan + 0.000000 0.000000 0.000000 :black +COLORBAR_FLIP + 0 1 +COLORBAR_SPLIT + 0 0 0 64 64 255 + 0 192 0 255 0 0 + -1.000000 0.000000 1.000000 +CO2COLOR + 64 156 215 +DIRECTIONCOLOR + 0.152941 0.250980 0.545098 +FLIP + 1 +FOREGROUNDCOLOR + 1.000000 1.000000 1.000000 +GEOMSELECTCOLOR + 255 255 255 + 0 0 0 + 255 128 0 +HEATOFFCOLOR + 1.000000 0.000000 0.000000 +HEATONCOLOR + 1.000000 0.000000 0.000000 +ISOCOLORS + 10.000000 0.118000 1 1 : shininess, default opaqueness + 0.700000 0.700000 0.700000 : specular + 10 : number of levels + 0.957255 0.000392 0.957255 0.118039 : red, green, blue, alpha (opaqueness) + 0.750000 0.800000 0.800000 0.119608 + 0.000000 0.960000 0.280000 0.119608 + 0.000000 0.000000 1.000000 0.119608 + 0.000000 0.718750 1.000000 0.119608 + 0.000000 1.000000 0.562500 0.119608 + 0.171875 1.000000 0.000000 0.119608 + 0.890625 1.000000 0.000000 0.119608 + 1.000000 0.380952 0.000000 0.119608 + 1.000000 0.000000 0.000000 0.119608 +COLORTABLE + 2 + 210 180 140 255 % tan + 178 34 34 255 % firebrick +LIGHTING + 1 +LIGHTFACES + 1 +LIGHTANGLES0 + 45.000000 30.000000 1 +LIGHTANGLES1 + 135.000000 30.000000 1 +LIGHTPROP + 0.600000 0.600000 0.600000 + 0.498039 0.498039 0.498039 +OUTLINECOLOR + 0 255 255 +SENSORCOLOR + 1.000000 1.000000 0.000000 +SENSORNORMCOLOR + 1.000000 1.000000 0.000000 +SETBW + 0 0 +SPRINKOFFCOLOR + 1.000000 0.000000 0.000000 +SPRINKONCOLOR + 0.000000 1.000000 0.000000 +STATICPARTCOLOR + 0.000000 1.000000 0.000000 +TIMEBARCOLOR + 0.600000 0.600000 0.600000 +VENTCOLOR + 1.000000 0.000000 1.000000 + + *** SIZES/OFFSETS *** + +GEOMSAXIS + 1.000000 1.000000 +GRIDLINEWIDTH + 2.000000 +ISOLINEWIDTH + 2.000000 +ISOPOINTSIZE + 4.000000 +LINEWIDTH + 2.000000 +PARTPOINTSIZE + 4.000000 +PLOT3DLINEWIDTH + 2.000000 +PLOT3DPOINTSIZE + 4.000000 +SENSORABSSIZE + 0.038000 +SENSORRELSIZE + 1.000000 +SLICEOFFSET + 0.100000 0.000000 1 +SMOOTHLINES + 1 +SPHERESEGS + 6 +SORTSLICES + 1 +SPRINKLERABSSIZE + 0.076000 +STREAKLINEWIDTH + 1.000000 +TICKLINEWIDTH + 2.000000 +NEWDRAWFACE + 2 +VECCONTOURS + 0 1 +VECLENGTH + 4 1.000000 1.000000 0 0 0 +VECTORLINEWIDTH + 1.000000 1.000000 +VECTORPOINTSIZE + 2.000000 +VENTLINEWIDTH + 2.000000 +VENTOFFSET + 0.100000 +WINDOWOFFSET + 45 +WINDOWWIDTH + 1384 +WINDOWHEIGHT + 1069 + + *** DATA LOADING *** + +CSV + 0 +LOADINC + 0 +NOPART + 1 +PARTFAST + 1 1 2 +RESEARCHMODE + 1 1 1.000000 4 0 4 0 0 0 0 +SLICEAVERAGE + 0 10.000000 0 +SLICEDATAOUT + 0 +USER_ROTATE + -4 0 0.250000 0.500000 0.333333 +ZIPSTEP + 1 + + *** VIEW PARAMETERS *** + +APERTURE + 2 +BLOCKLOCATION + 5 +BEAM + 1 4.000000 0 255 255 255 +BLENDMODE + 0 0 0 +BOUNDARYTWOSIDE + 0 +CLIP + 0.001000 3.000000 +CONTOURTYPE + 0 +CULLFACES + 1 +ENABLETEXTURELIGHTING + 0 +EYEVIEW + 0 +FONTSIZE + 0 +FIREPARAMS +FRAMERATEVALUE + 1000 +FREEZEVOLSMOKE + 0 0 +GEOMBOUNDARYPROPS + 1 0 0 5.000000 5.000000 2 +SHOWSLICEVALS + 0 0 0 +GEOMCELLPROPS + 2 + 2 2 2 + 1 0 1 5.000000 1 0 1 + 0 0 0 + 0 0 0 +GEOMDOMAIN + 1 1 +GEOMSHOW + 0 1 1 0 1 0 0.500000 2.000000 1 0 6.000000 0.000000 0.000100 + 0 0 0 0 + 1.000000 30.000000 0 0 2 0 +GVERSION + 0 +GVECDOWN + 1 +ISOTRAN2 + 4 +MESHVIS + 2 + 1 + 1 +NORTHANGLE + 0 + 0.000000 0.000000 0.100000 +OFFSETSLICE + 0 +OUTLINEMODE + 2 0 +P3DSURFACETYPE + 1 +P3DSURFACESMOOTH + 1 +PLOT2DHRRBOUNDS + 0 0.000000 0 1.000000 +PROJECTION + 0 +SCALEDFONT + 12 1.000000 1 + 32 1.000000 1 +SHOWALLTEXTURES + 1 +SHOWAXISLABELS + 0 +SHOWBLOCKLABEL + 0 +SHOWBLOCKS + 1 +SHOWBOUNDS + 0 0 +SHOWCADOPAQUE + 0 +SHOWCEILING + 0 +SHOWCHID + 0 +SHOWCOLORBARS + 1 0 +SHOWCVENTS + 0 0 +SHOWDUMMYVENTS + 1 +SHOWFIRECUTOFF + 0 +SHOWFLOOR + 0 +SHOWFRAME + 1 +SHOWFRAMELABEL + 0 +SHOWFRAMETIMELABEL + 1 +SHOWFRAMERATE + 0 +SHOWGRID + 4 +SHOWGRIDLOC + 1 +SHOWHMSTIMELABEL + 0 +SHOWHRRLABEL + 0 +SHOWISO + 1 +SHOWISONORMALS + 0 +SHOWLABELS + 0 +SHOWMEMLOAD + 0 +SHOWPARTTAG + 0 +SHOWOPENVENTS + 0 0 +SHOWOTHERVENTS + 1 +SHOWROOMS + 1 +SHOWSENSORS + 1 1 +SHOWSLICEINOBST + 0 +SHOWSMOKEPART + 2 +SHOWSPRINKPART + 1 +SHOWSTREAK + 0 0 1 -2 +SHOWTERRAIN + 0 0 +SHOWTHRESHOLD + 0 0 400.000000 +SHOWTICKS + 0 +SHOWTIMEBAR + 1 2 +SHOWTIMELABEL + 1 +SHOWTITLE + 0 0 0 +SHOWTRACERSALWAYS + 0 +SHOWTRANSPARENT + 0 +SHOWTRIANGLES + 1 0 0 0 1 1 1 +SHOWTRANSPARENTVENTS + 1 +SHOWTRIANGLECOUNT + 0 +SHOWVENTFLOW + 1 0 1 1 1 +SHOWTARGETS + 1 +SHOWVENTS + 1 +SHOWWALLS + 0 0 +SKIPEMBEDSLICE + 0 +SLICEDUP + 1 0 1 +SMOKESENSORS + 1 0 +STARTUPLANG + en +STEREO + 0 +SURFINC + 0 +TERRAINPARMS + 90 50 50 + 200 200 200 + 1.000000 +TITLESAFE + 0 +TRAINERVIEW + 1 +TRANSPARENT + 1 0.800000 1 1 +TREEPARMS + 3 0 0 1 +TWOSIDEDVENTS + 1 0 +VECTORSKIP + 1 +VISBOUNDARYTYPE + 1 1 1 1 1 1 1 0 0 +WINDROSEDEVICE + 0 1 1 0 0 0 1 0 1 + 8 12 0 0.012000 5 25 +WINDROSEMERGE + 0 0.000000 0.000000 0.000000 0.000000 +ZOOM + 2 1.000000 + + *** MISC *** + +SHOWSLICEVALS + 0 +INPUT_FILE + cyl1.fds +LABELSTARTUPVIEW + view 1 +RENDERCLIP + 0 0 0 0 0 +RENDERFILELABEL + 0 +RENDERFILETYPE + 0 0 2 +MOVIEFILETYPE +MOVIEFILETYPE + 0 10 5000 1 17 +MOVIEPARMS + 0 10 0 +RENDEROPTION + 993 1 512 +UNITCLASSES + 6 + 0 + 0 + 0 + 0 + 0 + 0 +SHOWGRAVVECTOR + 0 + + *** 3D SMOKE INFO *** + +COLORBARTYPE + 0 % Rainbow +COLORMAP + CO2 1 CO2 +EXTREMECOLORS + 0 0 0 0 0 0 +FIRECOLOR + 255 128 0 +FIRECOLORMAP + FIRE 1 fire +FIREDEPTH + 3.000000 10.000000 3.000000 0 0 +HRRPUVCUTOFF + 200.000000 +SHOWEXTREMEDATA + 0 0 0 +SLICESKIP + 1 1 1 1 +SMOKECOLOR + 0 0 0 1 +SMOKECULL + 0 +SMOKEFIREPROP + 1 0 +SMOKEPROP +0.000000 +SMOKESKIP + 0 1 1 1 1 +USEGPU + 0 +VOLSMOKE + 0 1 1 0 1 + 20.000000 600.000000 2000.000000 3.000000 8700.000000 1.000000 1.000000 + + *** ZONE FIRE PARAMETRES *** + +SHOWHAZARDCOLORS + 0 +SHOWZONEPLANE + 2 1 +SHOWSZONE + 0 +SHOWZONEFIRE + 1 + + *** TOUR INFO *** + +SHOWAVATAR + 1 +SHOWPATHNODES + 0 +SHOWTOURROUTE + 0 +TOURCOLORS + 1.000000 0.000000 0.000000 :selected path line + 1.000000 0.000000 0.000000 :selected path line knots + 0.000000 1.000000 0.000000 :selected knot + -1.000000 -1.000000 -1.000000 :path line + -1.000000 -1.000000 -1.000000 :path knots + -1.000000 -1.000000 -1.000000 :text + 1.000000 0.000000 0.000000 :avatar +VIEWALLTOURS + 0 +VIEWTIMES + 0.000000 0.010000 1000 +VIEWTOURFROMPATH + 0 0 0.000000 + + ------------ local ini settings ------------ + +BOUNDARYOFFSET + 0.000000 +DEVICEVECTORDIMENSIONS + 1.000000 0.100000 0.200000 0.200000 +DEVICEBOUNDS + 0.000000 1.000000 +DEVICEORIENTATION + 0 1.000000 +GRIDPARMS + 1 1 1 + 18 30 0 +GSLICEPARMS + 0 0 0 0 + -0.075000 -0.120000 0.000000 + 0.000000 90.000000 +LOADFILESATSTARTUP + 0 +MSCALE + 1.000000 1.000000 1.000000 +COMPRESSAUTO + 0 +PARTSKIP + 1 +PROPINDEX + 2 + 0 0 + 1 0 +SHOOTER + -0.090000 -0.150000 -0.020000 + 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 + 1.000000 0.000000 4.000000 + 10 1 100 0 0 + 1.000000 1.000000 +SHOWDEVICES + 8 0 0 + sensor + human_fixed + human_altered_with_data + ellipsoid + disk + fire_fighter + airpack + helmit +SHOWDEVICEPLOTS + 0 1 1 0.150000 1.000000 5.000000 0.000000 0.000000 0.000000 1.200000 +SHOWGENPLOTXLABEL + 0, 0.000000 + +SHOWGENPLOTS + 0 + 1 1 0 1 1 0 0.000000 1 1 +GENPLOTLABELS + 0 +SHOWDEVICEVALS + 0 0 0 0 0 0 1 1 0 +SHOWHRRPLOT + 1 0 -1.000000 0.150000 0 +SHOWMISSINGOBJECTS + 1 +SHOWSLICEPLOT + 0.000000 0.000000 0.000000 0.150000 0 1 0.000000 0.000000 0.000000 0 1 +SMOKE3DCUTOFFS + 1.000000 200.000000 +SHOWGEOMTERRAIN +0 1 0 0 1 +TOURCIRCLE +-0.075000 -0.120000 0.000000 -0.075000 -0.120000 0.000000 0.112424 0.000000 +TOURINDEX + -1 +USERTICKS + 0 1 5 1 1 1 1.000000 1 + -0.090000 -0.150000 -0.020000 + -0.090000 -0.150000 -0.020000 + -0.060000 -0.090000 0.020000 + 1.000000 1.000000 1.000000 + 1 1 1 +XYZCLIP + 0 + 0 -0.090030 0 -0.059970 + 0 -0.150060 0 -0.089940 + 0 -0.020040 0 0.020040 + + *** TIME/DATA BOUNDS *** + (0/1 min max skip (1=set, 0=unset) + +C_PLOT3D + 0 +CACHE_DATA + 1 1 1 1 +LOADMESH + 0 0 + 0 -0.090000 0 -0.060000 + 0 -0.150000 0 -0.090000 + 0 -0.020000 0 0.020000 +PATCHDATAOUT + 0 0.000000 0.010000 -0.090000 -0.060000 -0.150000 -0.090000 -0.020000 0.020000 +TIMEOFFSET + 0.000000 +TLOAD + 0 0.000000 0 1.000000 0 0 +V_TARGET + 0 1.000000 0 0.000000 +VIEWPOINT5 + 0 -4 2 + 0.288434 0.159502 0.095752 1.000000 2 + 0.000000 0.000000 0.000000 0 + 0.250000 0.500000 0.333333 + -2.000000 -2.000000 + 1.000000 0.000000 0.000000 0.000000 + 0.000000 1.000000 0.000000 0.000000 + 0.000000 0.000000 1.000000 0.000000 + 0.000000 0.000000 0.000000 1.000000 + 0 0 0 0 0 0 0 + -0.090030 -0.150060 -0.020040 -0.059970 -0.089940 0.020040 + view 1 + + +# FDS/Smokeview Environment +# ------------------------- + +# Smokeview Build: SMV-6.9.3-1319-gbb2e857-patch +# Smokeview Build Date: Nov 8 2024 +# FDS Version: FDS-6.9.1-1229-gef7598f-master +# FDS Build: FDS-6.9.1-1229-gef7598f-master +# Platform: WIN64 + + +# Graphics Environment +# -------------------- + +# OpenGL Version: 4.6.0 - Build 31.0.101.4032 +# GLSL Version: 4.60 - Build 31.0.101.4032 +# Red bits:8 +# Green bits:8 +# Blue bits:8 +# Alpha bits:8 +# Depth bits:24 +# max texture size:16384 + From 4174c9c7f467e23822ca5d573bd270835a46127c Mon Sep 17 00:00:00 2001 From: gforney Date: Fri, 8 Nov 2024 23:19:30 -0500 Subject: [PATCH 11/12] smokeview source: fix to new blockage drawing routine (was leaving holes in some cases) --- Source/smokeview/drawGeometry.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Source/smokeview/drawGeometry.c b/Source/smokeview/drawGeometry.c index 0aee17215..0b92017b9 100644 --- a/Source/smokeview/drawGeometry.c +++ b/Source/smokeview/drawGeometry.c @@ -2879,12 +2879,17 @@ void UpdateFaceListsWorker(void){ facei->dup=0; faceim1 = meshi->face_normals_single[iface-1]; if( - facei->imax-facei->imin<=1&&facei->jmax-facei->jmin<=1&&facei->kmax-facei->kmin<=1&& // only hide duplicate one cell faces - faceim1->imin==facei->imin&&faceim1->imax==facei->imax&& - faceim1->jmin==facei->jmin&&faceim1->jmax==facei->jmax&& - faceim1->kmin==facei->kmin&&faceim1->kmax==facei->kmax&&faceim1->dir!=facei->dir + facei->imax-facei->imin<=1&& + facei->jmax-facei->jmin<=1&& + facei->kmax-facei->kmin<=1&& // only hide duplicate one cell faces + faceim1->imin==facei->imin&& + faceim1->imax==facei->imax&& + faceim1->jmin==facei->jmin&& + faceim1->jmax==facei->jmax&& + faceim1->kmin==facei->kmin&& + faceim1->kmax==facei->kmax&& + faceim1->dir!=facei->dir ){ - if(*(faceim1->showtimelist_handle)==NULL)faceim1->dup=1; if(*(facei->showtimelist_handle)==NULL){ facei->dup=1; nhidden++; From c2dfcd2814e5bdb712a17cef5cda613a84085184 Mon Sep 17 00:00:00 2001 From: gforney Date: Fri, 8 Nov 2024 23:53:27 -0500 Subject: [PATCH 12/12] smokeview source: fix gnu compiler warning --- Source/smokeview/drawGeometry.c | 1 - Source/smokeview/smokeheaders.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/smokeview/drawGeometry.c b/Source/smokeview/drawGeometry.c index 0b92017b9..fc626677b 100644 --- a/Source/smokeview/drawGeometry.c +++ b/Source/smokeview/drawGeometry.c @@ -5042,7 +5042,6 @@ void DrawBlockages(int mode, int trans_flag){ #ifdef pp_OBST_DEBUG case 2: case 3: - void DrawObstsDebug(void); DrawObstsDebug(); break; #endif diff --git a/Source/smokeview/smokeheaders.h b/Source/smokeview/smokeheaders.h index fb16d407e..e453743a0 100644 --- a/Source/smokeview/smokeheaders.h +++ b/Source/smokeview/smokeheaders.h @@ -361,6 +361,7 @@ EXTERNCPP void GeneratePartHistograms(void); FILE_SIZE LoadAllMSlicesMT(int last_slice, multislicedata *mslicei, int *fcount); EXTERNCPP void DrawObstBoundingBox(void); +EXTERNCPP void DrawObstDebug(void); EXTERNCPP void DrawGeomBoundingBox(float *boundingbox_color); EXTERNCPP void ClassifyGeom(geomdata *geomi, int *geom_frame_index);