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

Zoom level not saved correctly to view in .ini #1432

Open
obscureed opened this issue Sep 9, 2022 · 1 comment
Open

Zoom level not saved correctly to view in .ini #1432

obscureed opened this issue Sep 9, 2022 · 1 comment

Comments

@obscureed
Copy link

Here are some steps to recreate a bug in smokeview:
(1) Run the attached FDS model in FDS6.7.9. (This is tunnel0003.fds, renamed as tunnel0003.txt, but I have seen this bug in several models.)
(2) Open the results in the corresponding SMV6.7.21. Rotate the view using the left mouse button. Zoom out by holding down SHIFT and dragging the left mouse button downwards -- I'm not sure, but I think it is critical that this zoom method is used (rather than, for example, dragging the middle mouse button). Try to reach a view with a memorable zoom level -- for example, all of the model is just in view. Press ALT-g to raise the Motion/View/Render dialog. Name the view (for example "view1" in the Edit: line), press "Add", press "Apply at startup", press "Save settings", press "Close". Right-click on the smokeview window and quit.
(3) Open the results again in smokeview. There are two problems: First, smokeview takes longer than usual to load (maybe 20 seconds -- possibly less if you nudge the system somehow, for example pressing RETURN in the bash window or changing something in the X display). This time is not reported in the "Startup time" message to stdout; the delay appears to happen before the "reading tunnel0003.smv" message. (Actually, the messages to screen sometimes seem to not update themselves without a nudge, but this is an intermittent fault.) Second, the view that is applied is an incorrect, zoomed-in version of the saved view.

It is the second problem that bothers me more. I think this bug applies not only to the "Apply at startup" view -- various views can be saved incorrectly. During step (2), in the first session of smokeview, the views are reconstructed correctly by selecting or by the "Cycle User" button (if you expand the steps to include several saved views). The views seem to be held correctly in memory but not reconstructed correctly via the saved .ini file. It (sometimes) applies to both perspective and orthographic views.

I do not know if this behaviour is new or old -- I only recently found the SHIFT+leftmouse method of zooming, and I find it more convenient than holding the middle mouse button.

By the way, there is another odd quirk of saving views. Often, when I press "Add" in the Viewpoints part of that dialog, the displayed view jumps to a zoomed-out version of the added view. This is slightly inconvenient, but I can just re-select the view that I have just added. The view has been added as intended. This quirk has been around for many versions, but it feels possibly relevant here. It is possible that a view reached in step (2) with SHIFT-leftmouse does not show the quirk -- the whole business is slightly difficult to replicate. I can live with the jumping-out quirk, but having a view saved incorrectly to .ini means that I produce useless images. As I mentioned, I think one workaround might be to use middle-button zooming.

@obscureed
Copy link
Author

Sorry, I didn't attach the FDS model -- here it is (renamed from tunnel0003.fds to tunnel0003.txt).
Here it is as text:

&HEAD CHID='tunnel0003', TITLE='tunnel0003'  /
/
!!!DUMP DT_DEVC=1.00, DT_SLCF=1.00, DT_PART=1.00, DT_ISOF=1.00, DT_HRR=1.00, DT_CTRL=1.00, /
&DUMP NFRAMES=5 /
/
&DUMP SUPPRESS_DIAGNOSTICS=.FALSE. /
&DEVC  XYZ= 1.10,0.80,1., QUANTITY='TIME',ID='devc_time'  /
&TIME T_BEGIN=0., T_END=5., RESTRICT_TIME_STEP=.FALSE./
/
&MESH   XB =    0.000,   2.900,   0.000,   4.000,   0.000,   2.400, IJK=29,40,24, MPI_PROCESS=0 ID='mesh_1' /
&MESH   XB =    0.000,   2.900,   4.000,   8.000,   0.000,   2.400, IJK=29,40,24, MPI_PROCESS=1 ID='mesh_2' /
&MESH   XB =    0.000,   2.900,   8.000,  12.000,   0.000,   2.400, IJK=29,40,24, MPI_PROCESS=2 ID='mesh_3' /
/
&MATL ID= 'CONCRETE',  FYI='Typical Concrete', CONDUCTIVITY =1.4, SPECIFIC_HEAT=0.84, DENSITY=2100    /
&SURF ID= 'WALL', RGB=186,199,218, MATL_ID= 'CONCRETE',  THICKNESS=0.25, DEFAULT=.TRUE.   /
/
&REAC  ID ='POLYURETHANE_REAC',
C  = 1.0, H  = 1.7, O  = 0.3, N  = 0.08, CO_YIELD = 0.042,
SOOT_YIELD = 0.10,
HEAT_OF_COMBUSTION = 20000,
&SPEC ID='SOOT', MASS_EXTINCTION_COEFFICIENT=8700.0  /
/
&SURF ID='fire',  HRRPUA= 346.021 COLOR='RED' /
&VENT XB=    0.200,   1.900,   1.800,   3.500,   0.000,   0.000, SURF_ID='fire',  XYZ=   1.050,   2.650,   0.000, /
/
&SURF  ID='surf_extr_1',  COLOR='ORCHID',  VEL=   2.0 /
&VENT XB=   0.000,   2.000,  12.000,  12.000,   0.000,   2.400, SURF_ID='surf_extr_1',  /
/
&VENT XB=   0.000,   2.000,   0.000,   0.000,   0.000,   2.400, SURF_ID='OPEN',  /
/
&OBST XB=   2.000,   2.100,   0.000,  12.000,   0.000,   2.400, SURF_ID='WALL',  RGB=155,155,155, TRANSPARENCY=   1.000 /
/
&ZONE XYZ=   2.500,   6.600,   0.400, /
/
&SLCF PBZ=   1.500, QUANTITY='PRESSURE', /
&SLCF PBZ=   1.800, QUANTITY='PRESSURE', /
&SLCF PBZ=   1.800, QUANTITY='PRESSURE ZONE', /
/
&TAIL

tunnel0003.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant