porting to smesh 8.3
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: porting to smesh 8.3
This git commit 1b7224cdf9 fixes the order of the elements. However, when creating e.g. a FEM mesh from a cone then a lot of elements are missing.
EDIT: Link to old thread about wrong order: https://forum.freecadweb.org/viewtopic.php?f=18&t=16312
EDIT: Link to old thread about wrong order: https://forum.freecadweb.org/viewtopic.php?f=18&t=16312
Re: porting to smesh 8.3
thanks @wmayer. I will try to apply the mentioned patches...
cherry-picking works only if the directory structure matches.
any ideas how to deal with the different directory structures? I don't see an easy way to get commits from freecad to smesh...bernd wrote: I do not like patches, I like git. Our smesh is a certain commit of original smesh. Get this original smesh and merge our commits. Then try to rebase to newer original smesh until you are on 8.3. Just an idea?
cherry-picking works only if the directory structure matches.
Re: porting to smesh 8.3
I applied the two commits, but the problem is still therewmayer wrote: ↑Sat May 05, 2018 9:29 pm FYI, this issue is back: https://forum.freecadweb.org/viewtopic. ... 40#p135981
So, this means that git commit 5c791306d and git commit 1b08ae0 must be added to the external smesh.
With this commit meshing with netgen seems to be broken. At least for the external smesh.
Re: porting to smesh 8.3
FYI, here are my changes: https://github.com/wwmayer/SMESH/commits/smesh_win32
Re: porting to smesh 8.3
As said above these commits are needed to make reading in a file on Windows that has been created on Linux. The problem are the CR and LF.I applied the two commits, but the problem is still there
Without the fix reading in such a file on Windows the system starts to freeze and allocate all RAM. This can take several minutes and makes your system unusable.
Exactly. Writing a UNV file would be working again but creating a FEM mesh from a shape leads to an incomplete mesh.With this commit meshing with netgen seems to be broken. At least for the external smesh.
So, far the problem seems to be only the export of UNV files but not the import. When I create a correct file with the bundled smesh then the imported file using external smesh shows the same good result. And when I load a file with the bundled smesh that has been created with the external smesh then everything looks messy, too.
Re: porting to smesh 8.3
ah you are already working on this smesh8.3. Great!wmayer wrote:FYI, here are my changes: https://github.com/wwmayer/SMESH/commits/smesh_win32
As said above these commits are needed to make reading in a file on Windows that has been created on Linux. The problem are the CR and LF.
Without the fix reading in such a file on Windows the system starts to freeze and allocate all RAM. This can take several minutes and makes your system unusable.
Yes I also came to the conclusion the export is the failing part. The UNV-files seem to have different node ordering.So, far the problem seems to be only the export of UNV files but not the import. When I create a correct file with the bundled smesh then the imported file using external smesh shows the same good result. And when I load a file with the bundled smesh that has been created with the external smesh then everything looks messy, too.
The diff of the node-orders of a simple 10node tetrahedron looks like this: (this was generated with git diff on the two unv-files.
Code: Select all
- 1 7 3 6 2 5 8 10
- 9 4
+ 1 3 2 4 7 6 5 8
+ 10 9
Re: porting to smesh 8.3
the test can be simplified. Maybe the problem is not really related to unv?
nothing is shown for me with py3/smesh8.3/qt5.
edit.: with the fixes from @wmayer this works...
Code: Select all
import Fem
tetra10 = Fem.FemMesh()
tetra10.addNode(6, 12, 18, 1)
tetra10.addNode(0, 0, 18, 2)
tetra10.addNode(12, 0, 18, 3)
tetra10.addNode(6, 6, 0, 4)
tetra10.addNode(3, 6, 18, 5)
tetra10.addNode(6, 0, 18, 6)
tetra10.addNode(9, 6, 18, 7)
tetra10.addNode(6, 9, 9, 8)
tetra10.addNode(3, 3, 9, 9)
tetra10.addNode(9, 3, 9, 10)
tetra10.addVolume([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
Fem.show(tetra10)
edit.: with the fixes from @wmayer this works...
Re: porting to smesh 8.3
Which fix do you mean? The one about the enum size?
Re: porting to smesh 8.3
Simple by using your branch for smesh8.3:
https://github.com/wwmayer/SMESH/commits/smesh_win32
https://github.com/wwmayer/SMESH/commits/smesh_win32
Re: porting to smesh 8.3
Really? For my configuration Py3+smesh8.3+Qt5+Win64 it doesn't show anything. When I look at the property editor of the FEM object then it says that it has 10 nodes but 0 volumes. But when I look at the created object in the Python console then it says it has 1 volume. So, the volume is lost when trying to display it.looo wrote: ↑Wed May 09, 2018 7:55 am Simple by using your branch for smesh8.3:
https://github.com/wwmayer/SMESH/commits/smesh_win32