GithubHelp home page GithubHelp logo

QoL Improvement: Make CfdAnalysis' "Output Directory" dynamic based on the Project Name, instead of "/tmp/case" as default about cfdof HOT 13 CLOSED

eduncan911 avatar eduncan911 commented on July 1, 2024 1
QoL Improvement: Make CfdAnalysis' "Output Directory" dynamic based on the Project Name, instead of "/tmp/case" as default

from cfdof.

Comments (13)

oliveroxtoby avatar oliveroxtoby commented on July 1, 2024 1

This is a good idea. I'll try to put it in soon, or you're welcome to submit a pull request.

from cfdof.

oliveroxtoby avatar oliveroxtoby commented on July 1, 2024 1

hi @oliveroxtoby I am nearly finished this implementation, however notice that in CfdPreferences.py, the function loadSettings() is actually never called, which is kind of weird. One would assume this is used to persist the changes (not working for this Feature Request yet, assume because of this).

It's not called by CfdOF but it is called by FreeCAD when the preferences page is loaded.

from cfdof.

eduncan911 avatar eduncan911 commented on July 1, 2024

@oliveroxtoby nice! as a follow-up, I dove deep into FEM recently. And, it has everything I mentioned above as well as "smarter than me" logic with even more options.

Maybe follow this Workbench?

image

The "Custom directory" option being the same as CfdOF's Properties View current option.

But note the other two dynamic ones. I especially like the "beside FCStd file" option.

from cfdof.

eduncan911 avatar eduncan911 commented on July 1, 2024

There's also something else... the FEM workbench also defaults to "search in known binary directories" for all the dependencies, instead of requiring their location.

This makes the FEM workbench work out of the box with CAE Linux - since everything is installed. For CfdOF, I have to go find each binary and specify them.

Just some suggestions to improve the the user's experience. :)

image

from cfdof.

icojb25 avatar icojb25 commented on July 1, 2024

hi @oliveroxtoby any idea what the call is to get the project base label is? Is this accessible via the obj passed to the CfdAnalysis.py class?

def makeCfdAnalysis(name):
""" Create a Cfd Analysis group object """
obj = FreeCAD.ActiveDocument.addObject("App::DocumentObjectGroupPython", name)
CfdAnalysis(obj)

from cfdof.

oliveroxtoby avatar oliveroxtoby commented on July 1, 2024

hi @oliveroxtoby any idea what the call is to get the project base label is? Is this accessible via the obj passed to the CfdAnalysis.py class?

FreeCAD.ActiveDocument.Label ?

from cfdof.

oliveroxtoby avatar oliveroxtoby commented on July 1, 2024

But note the other two dynamic ones. I especially like the "beside FCStd file" option.

@icojb25 just a note in case you end up implementing this aspect of it. CfdOF does currently store files in this location if the user enters a relative path in the analysis object properties - see CfdTools.getOutputPath(). So probably this code can be reused.

from cfdof.

oliveroxtoby avatar oliveroxtoby commented on July 1, 2024

There's also something else... the FEM workbench also defaults to "search in known binary directories" for all the dependencies, instead of requiring their location.

This makes the FEM workbench work out of the box with CAE Linux - since everything is installed. For CfdOF, I have to go find each binary and specify them.

@eduncan911 CfdOF does actually have default locations for the dependencies, which are searched if no location is given on the Preferences page. However I don't know what these are for CAE Linux, so if you could supply these we can simply add them to the defaults.

from cfdof.

icojb25 avatar icojb25 commented on July 1, 2024

But note the other two dynamic ones. I especially like the "beside FCStd file" option.

@icojb25 just a note in case you end up implementing this aspect of it. CfdOF does currently store files in this location if the user enters a relative path in the analysis object properties - see CfdTools.getOutputPath(). So probably this code can be reused.

Hi @oliveroxtoby i can chip away at it over the week. Do we want to add these options in the Preferences panel?

from cfdof.

oliveroxtoby avatar oliveroxtoby commented on July 1, 2024

Hi @oliveroxtoby i can chip away at it over the week. Do we want to add these options in the Preferences panel?

Thank you, that would be great.I don't think we need to have the distinction between custom directory and tmp directories (I think we can just have the custom directory defaulting to tmp directory as we do now), but adding an option in preferences like the 'Beside .FCStd file' one would be nice. And then also saving in a subdirectory with the name of the document label, as the first post alludes to.

from cfdof.

icojb25 avatar icojb25 commented on July 1, 2024

hi @oliveroxtoby
I am nearly finished this implementation, however notice that in CfdPreferences.py, the function loadSettings() is actually never called, which is kind of weird. One would assume this is used to persist the changes (not working for this Feature Request yet, assume because of this).

Can you confirm? I dont see this method called anywhere in the code ... yet it seems to be the persistence method that should be used.

from cfdof.

icojb25 avatar icojb25 commented on July 1, 2024

@eduncan911 @oliveroxtoby Take a look at this and see if it works as intended. Enjoy the long weekend.

from cfdof.

eduncan911 avatar eduncan911 commented on July 1, 2024

@eduncan911 @oliveroxtoby Take a look at this and see if it works as intended. Enjoy the long weekend.

Apologies for the delay. Im between projects, so will check as soon as the next one comes!

from cfdof.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.