Open frame3DD result file (*.OUT)

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Open frame3DD result file (*.OUT)

Post by bernd »

User avatar
johnwang
Veteran
Posts: 1382
Joined: Sun Jan 27, 2019 12:41 am

Re: Open frame3DD result file (*.OUT)

Post by johnwang »

bernd wrote: Thu Mar 05, 2020 6:06 am simplest workround, create one resultobject for each loadcase. Like in a frequecy analysis we create one result object for each mode shape. But you can use the same result mesh object for all result objects.
Got it. It would be perfect if the Show Result window could show which result load I chosed. The window title something like this Show result [Stastic1]

Two LCs
t12.jpg
t12.jpg (28.89 KiB) Viewed 1046 times

The second LC

t13.jpg
t13.jpg (84.72 KiB) Viewed 1046 times
hfc series CAE workbenches for FreeCAD (hfcNastran95, hfcMystran, hfcFrame3DD, hfcSU2 and more)
User avatar
johnwang
Veteran
Posts: 1382
Joined: Sun Jan 27, 2019 12:41 am

Re: Open frame3DD result file (*.OUT)

Post by johnwang »

To change the Show result window title, I went to Fem/femobjects/_FemResultMechanical.py

Code: Select all

class _TaskPanelFemResultShow:
    """The task panel for the post-processing"""

    def __init__(self, obj):
        self.result_obj = obj
        self.mesh_obj = self.result_obj.Mesh

        self.form = FreeCADGui.PySideUic.loadUi(
            FreeCAD.getHomePath() + "Mod/Fem/Resources/ui/ResultShow.ui"
        )
        
        #added this new line, but the obj.name is not right.
        self.form.setWindowTitle(obj.name)
What's the name of the obj?

I'd also like to add a few more buttons to automaticaly animate the displacement, need one Animation label,Start,Stop button. Even better a Loop checkbox, Pause, FWD,RWD button. Have I asked too much? LOL.
Last edited by johnwang on Fri Mar 06, 2020 12:44 am, edited 1 time in total.
hfc series CAE workbenches for FreeCAD (hfcNastran95, hfcMystran, hfcFrame3DD, hfcSU2 and more)
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Open frame3DD result file (*.OUT)

Post by Kunda1 »

johnwang wrote: Thu Mar 05, 2020 10:38 pm I'd also like to add a few more buttons to automaticaly animate the displacement, need one Animation label,Start,Stop button. Even better a Loop checkbox, Pause, FWD,RWD button. Have I asked too much? LOL.
You could scavenge some temporary ones from How_to_install_macros ? Or perhaps @bernd has a better idea ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
johnwang
Veteran
Posts: 1382
Joined: Sun Jan 27, 2019 12:41 am

Re: Open frame3DD result file (*.OUT)

Post by johnwang »

Kunda1 wrote: Fri Mar 06, 2020 12:16 am You could scavenge some temporary ones from How_to_install_macros ? Or perhaps @bernd has a better idea ?
I tried to add one button with this code below, but after click, it laspe the time and shows the final setting. Not show a few more middle steps.

Code: Select all

	#AniTest start
    def AniStart(self):
	
        numberFrames=10.
        dfm = FreeCAD.FEM_dialog["disp_factor_max"]
        for id in range(dfm+1):
            value=float(id)
            self.form.sb_displacement_factor.setValue(value)
            self.update_displacement()
            time.sleep(1./numberFrames) # modify the time here
	#AniTest end
_ViewProviderFemResultMechanical.py
(29.06 KiB) Downloaded 16 times
ResultShow_AniTest.ui
(16.74 KiB) Downloaded 22 times
hfc series CAE workbenches for FreeCAD (hfcNastran95, hfcMystran, hfcFrame3DD, hfcSU2 and more)
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Open frame3DD result file (*.OUT)

Post by bernd »

how about using github for code exchange?
User avatar
johnwang
Veteran
Posts: 1382
Joined: Sun Jan 27, 2019 12:41 am

Re: Open frame3DD result file (*.OUT)

Post by johnwang »

bernd wrote: Thu Mar 05, 2020 6:08 am to animate the result ... https://forum.freecadweb.org/viewtopic.php?f=18&t=39081
I worked out how this Marco works. Need to give it my resultObj's Name.

Code: Select all

mesh_obj =FreeCAD.ActiveDocument.getObject('Stastic0')
BTW

for changing Show result window title, obj.name should be obj.Name
hfc series CAE workbenches for FreeCAD (hfcNastran95, hfcMystran, hfcFrame3DD, hfcSU2 and more)
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Open frame3DD result file (*.OUT)

Post by bernd »

johnwang wrote: Thu Mar 05, 2020 10:38 pm What's the name of the obj?
obj.Name is the name and obj.Label is the label. If you rename the obj in tree view in FreeCAD gui you change the Label not the Name.

Would you post your updated version which creates one result obj for each load case?

bernd
User avatar
johnwang
Veteran
Posts: 1382
Joined: Sun Jan 27, 2019 12:41 am

Re: Open frame3DD result file (*.OUT)

Post by johnwang »

bernd wrote: Fri Mar 13, 2020 5:58 am
obj.Name is the name and obj.Label is the label. If you rename the obj in tree view in FreeCAD gui you change the Label not the Name.

Would you post your updated version which creates one result obj for each load case?

bernd
Try this please. https://github.com/ceanwang/hImportFC
hfc series CAE workbenches for FreeCAD (hfcNastran95, hfcMystran, hfcFrame3DD, hfcSU2 and more)
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Open frame3DD result file (*.OUT)

Post by Kunda1 »

Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply