How to use C3D10 instead of C3D4 elements?

About the development of the FEM module/workbench.

Moderator: bernd

wmayer
Site Admin
Posts: 16864
Joined: Thu Feb 19, 2009 10:32 am

Re: How to use C3D10 instead of C3D4 elements?

Postby wmayer » Wed Apr 29, 2015 11:55 am

FYI, with this snippet you can see that the widget is really broken:

Code: Select all

mw=Gui.getMainWindow()
from PySide import QtGui
dw=mw.findChildren(QtGui.QDockWidget)

for i in dw:
  print i.windowTitle()

i=dw[6]
i.toggleViewAction().text()

w=i.widget()
type(w) # => <class 'MeshGmsh'>
dir(w) # => []
The dir() method returns an empty list. Here all methods of a QWidget must be listed. And that's why the Python error <no attribute "event"> is raised. But it's still not clear by what exactly this is caused.
User avatar
psicofil
Posts: 154
Joined: Thu Dec 15, 2011 11:02 pm

Re: How to use C3D10 instead of C3D4 elements?

Postby psicofil » Sat May 02, 2015 4:23 pm

Thanks PrzemoF, wmayer and bernd to review and fix the code. He poured me a lot to learn how to make a cleaner code :) . I uploaded the changes in my repository.
I changed some things like not include the option optimized-ho, because it does not work in all cases.
Additionally, add the option to Create Mechanical Analysis from mesh.
Regards
Sorry for my bad English
Ing. Gomez Lucio
Scope Ingenieria (scopeingenieria.com)
drei
Posts: 479
Joined: Sun May 11, 2014 7:47 pm
Location: Mexico
Contact:

Re: How to use C3D10 instead of C3D4 elements?

Postby drei » Tue Jun 02, 2015 4:16 am

@psicofil
Would it be possible to add your macro directly into master? I'd love to see it added as an option when someone wants to do a mesh, since netgen just won't work directly with FreeCAD under linux.
Need help? Feel free to ask, but please read the guidelines first
User avatar
PrzemoF
Posts: 3076
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: How to use C3D10 instead of C3D4 elements?

Postby PrzemoF » Tue Jun 02, 2015 7:49 am

drei wrote:@psicofil[..] I'd love to see it added as an option when someone wants to do a mesh, since netgen just won't work directly with FreeCAD under linux.
Just FYI, I've heard that netgen works with ubuntu and I got it working under fedora with a simple tweak that has to be ironed out before it's merged into master. More here [1]. The post with the hack for fedora [2]

[1] viewtopic.php?t=3863
[2] viewtopic.php?f=4&t=3863#p88918