Skip to content

Commit

Permalink
Merge pull request #2088 from gforney/partshow
Browse files Browse the repository at this point in the history
smokeview source: add option to display values besides selected parti…
  • Loading branch information
gforney authored Nov 6, 2024
2 parents ef0887c + 7b644f0 commit 7ef3b40
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Source/smokeview/IOpart.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,26 @@ void DrawPart(const partdata *parti, int mode){

if(datacopy->partclassbase->vis_type == PART_POINTS){
if(select_part == 1 && selected_part_index > 0 && mode == DRAWSCENE){
#ifdef pp_PART_SHOW
float *rvals=NULL;

if(itype>=0)rvals = datacopy->rvals + itype*datacopy->npoints_file;
#endif
for(j = 0; j < datacopy->npoints_file; j += partdrawskip){
if(vis[j] == 1 && datacopy->tags[j]==selected_part_index){
char taglabel[32];
char taglabel[64];


#ifdef pp_PART_SHOW
if(itype >= 0){
sprintf(taglabel, "%i: %f", selected_part_index, rvals[j]);
}
else{
sprintf(taglabel, "%i", selected_part_index);
}
#else
sprintf(taglabel, "%i", selected_part_index);
#endif
Output3Text(foregroundcolor, xpos[j], ypos[j], zpos[j], taglabel);
}
}
Expand Down
1 change: 1 addition & 0 deletions Source/smokeview/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#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

#ifdef pp_FRAME // turn on each frame type if pp_FRAME is set
#define pp_BOUNDFRAME // turn on frame code for boundary files
Expand Down

0 comments on commit 7ef3b40

Please sign in to comment.