LubomirJagos / FreeCAD-OpenEMS-Export

Simple GUI plugin for FreeCAD to export current model for EM simulation in OpenEMS
GNU General Public License v3.0
61 stars 5 forks source link

FDTD-related files in dedicated folder #10

Closed MisterHW closed 1 year ago

MisterHW commented 1 year ago

Currently, the use of FreeCAD-OpenEMS-Export (and subsequent simulation) produces a set of files in the same folder as the .FCStd file.

Proposed solution:

Associated folders may contain a large amount of output data and should be added to .gitignore when the whole project is kept in a repository.

Related Topic: Handling Multiple Studies/Simulations

As of this writing, the user is presented with multiple buttons to load and save settings files:

image

To refine the load/save interactions, the role of a default file may need to be re-assessed. For example, modern IDEs start with a project selector / browser view, with the option to automatically load the most recent project upon startup.

During use (from personal experience), the Export dialog is frequently opened and closed, and thus unnecessary overhead (i.e. a prompt that asks the user to select a particular settings file to continue) needs to be avoided. At the same time, the load / save handling shouldn't have such a prominent place in the UI while at the same time lacking intuitiveness. When upon first start the user needs to press "New Simulation", the causality is established.

Currently, "New Simulation" is unintentional, as it is merely the dialog state before loading a settings file. Once a settings file is loaded, the dialog must be closed and re-started to flush it. Separating the selection of a simulation settings file and the rest of the dialog functionality would also clarify "Load" (during editing) as "re-load, discarding unsaved changes", and could probably be removed from the editing state altogether, as this workflow can be provided through "close without saving changes" followed by loading.

Finally, selecting one of the available simulation settings files would be obviated.

Thus, future improvements in handling multiple simulation settings files both clean up the project folder, and will come in handy when improving settings selection and load/save logic.

LubomirJagos commented 1 year ago

This issue was fixed now, only two buttons were left "Open Settings" and "Save Settings" which are asking which .ini file to open, afterwards when simulation is opened or save whe simulation files are generated, they are generated into separate folder with same name as settings .ini file name. On macro start if simulation is created without load or save at .m file generating user is asked to saved simulation if no, files are generated same way as now in current FreeCAD file folder.

So now issue with separate folders for simulations is solved, but keep in mind there is absolute path in openEMS .xml in tmp/ so if you copy your simulation folder anywhere on drive, you need to re-run .m file, everything in tmp/ is temporary :D

Here is picture how it looks like on example project for Inverted F antenna. image

inside simulation folder: image