Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smokeview source: add option to display values besides selected parti… #2088

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading