*SECTION PRINT implemented for volume elements

About the development of the FEM module/workbench.

Moderator: bernd

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

Re: *SECTION PRINT implemented for volume elements

Post by bernd »

compiles, but unit test failure ...

Code: Select all

import Test, femtest.app.test_object
Test.runTestsFromModule(femtest.app.test_object)

Code: Select all

>>> import Test, femtest.app.test_object
>>> Test.runTestsFromModule(femtest.app.test_object)
test_00print (femtest.app.test_object.TestObjectCreate) ... ok
test_femobjects_make (femtest.app.test_object.TestObjectCreate) ... FAIL
test_00print (femtest.app.test_object.TestObjectType) ... ok
test_femobjects_derivedfromfem (femtest.app.test_object.TestObjectType) ... FAIL
test_femobjects_derivedfromstd (femtest.app.test_object.TestObjectType) ... FAIL
test_femobjects_isoftype (femtest.app.test_object.TestObjectType) ... FAIL
test_femobjects_type (femtest.app.test_object.TestObjectType) ... FAIL

======================================================================
FAIL: test_femobjects_make (femtest.app.test_object.TestObjectCreate)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hugo/Documents/dev/freecad/freecadbhb_dev/build/Mod/Fem/femtest/app/test_object.py", line 134, in test_femobjects_make
    self.assertEqual(len(analysis.Group), count_defmake - 1)
AssertionError: 49 != 50

======================================================================
FAIL: test_femobjects_derivedfromfem (femtest.app.test_object.TestObjectType)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hugo/Documents/dev/freecad/freecadbhb_dev/build/Mod/Fem/femtest/app/test_object.py", line 1274, in test_femobjects_derivedfromfem
    self.assertEqual(len(doc.Objects), testtools.get_defmake_count(False))
AssertionError: 45 != 46

======================================================================
FAIL: test_femobjects_derivedfromstd (femtest.app.test_object.TestObjectType)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hugo/Documents/dev/freecad/freecadbhb_dev/build/Mod/Fem/femtest/app/test_object.py", line 1517, in test_femobjects_derivedfromstd
    self.assertEqual(len(doc.Objects), testtools.get_defmake_count(False))
AssertionError: 45 != 46

======================================================================
FAIL: test_femobjects_isoftype (femtest.app.test_object.TestObjectType)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hugo/Documents/dev/freecad/freecadbhb_dev/build/Mod/Fem/femtest/app/test_object.py", line 574, in test_femobjects_isoftype
    self.assertEqual(len(doc.Objects), testtools.get_defmake_count(False))
AssertionError: 45 != 46

======================================================================
FAIL: test_femobjects_type (femtest.app.test_object.TestObjectType)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hugo/Documents/dev/freecad/freecadbhb_dev/build/Mod/Fem/femtest/app/test_object.py", line 375, in test_femobjects_type
    self.assertEqual(len(doc.Objects), testtools.get_defmake_count(False))
AssertionError: 45 != 46

----------------------------------------------------------------------
Ran 7 tests in 1.251s

FAILED (failures=5)
>>> # App.setActiveDocument("TestObjectCreate")

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

Re: *SECTION PRINT implemented for volume elements

Post by bernd »

bernd wrote: Sat Feb 29, 2020 12:54 pm
bernd wrote: Sat Feb 29, 2020 11:22 am the following look strange to me, as tie was implemented already ???

https://github.com/berndhahnebach/FreeC ... 091251R245

https://github.com/berndhahnebach/FreeC ... 091251R262
ahh these are fixes which should be made in master? I will go for a separate commit to fix it.
git commit 6ec33d50a
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: *SECTION PRINT implemented for volume elements

Post by bernd »

separated the changes not related to section print

https://github.com/berndhahnebach/FreeC ... /4d07e1fab
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: *SECTION PRINT implemented for volume elements

Post by UR_ »

bernd wrote: Sat Feb 29, 2020 7:10 pm separated the changes not related to section print
AFAICR, dat file reading was added, because section print output from ccx goes into dat file.

After reading, text goes into text document, which should be a child of ccx result object.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: *SECTION PRINT implemented for volume elements

Post by bernd »

ahh ok ...

did some code refactor in FEM lately. I did change the section print code in this regard ... https://github.com/berndhahnebach/FreeC ... t/a14ef486

Would you give it a try? Recreation of the example file may need to be done.

bernd
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: *SECTION PRINT implemented for volume elements

Post by UR_ »

bernd wrote: Mon Mar 09, 2020 7:17 am Would you give it a try?
Had to change Fem.qrc to get a build.

git commit 7f4bd8c0d

But now, no avail due serialization issue https://forum.freecadweb.org/viewtopic.php?f=18&t=44021

I think, I have to wait until this topic is solved.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: *SECTION PRINT implemented for volume elements

Post by bernd »

back to normal ... means should work again ...
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: *SECTION PRINT implemented for volume elements

Post by UR_ »

bernd wrote: Wed Mar 11, 2020 5:55 am ... means should work again ...
Corrected one typo.

PR git commit 64aed40a1


test file updated:

eye.FCStd
(456.64 KiB) Downloaded 75 times

One issue left ATM. ccx_dat_file is no child of CCX_Results

Screenshot 001.png
Screenshot 001.png (27.24 KiB) Viewed 954 times

Should have a look at this.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: *SECTION PRINT implemented for volume elements

Post by bernd »

great

check view provider of result mechanical how to collect childs. Than do not add the dat obj to the analysis. It would be twice in tree.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: *SECTION PRINT implemented for volume elements

Post by bernd »

due to some changes in ccx writer lately, I hat do change some lines to get the section print rebased ...

new code looks like this:
https://github.com/berndhahnebach/FreeC ... d55d091251
Post Reply