How to get algorithms and hypothesis in a python script?
How to get algorithms and hypothesis in a python script?
Hello,
As usual, I will first thank very much the whole Salome team for its work. Thanks to you, I can enjoy open CFD-meshing with a great pleasure
I particularly appreciate the new capability of Salome 6 to create automatic 3D prismatic layers and to export meshes into CGNS format !
Also the Publish/Unpublish tool in the geometry module is very useful.
OK, now my problem:
I would like to get the algorithms and hypotheses associated to given submesh.
All I have been able to do is to get the list of algorithms+hypothesis thanks to the function GetHypothesisList(), but I don't know how to know what is an algorithm and what is a hypothesis in this list.
An example of output for a 3D hexahedral submesh using viscous layers:
[, , , , ]
This list should be a list of SMESH_Hypothesis objects according to the documentation. And such objects should have a GetType() method (http://docs.salome-platform.org/salome_6_5_0/tui/SMESH/classSMESH__Hypothesis.html) if I well understand. But I cannot use it. I get the following error:
AttributeError: _objref_StdMeshers_Regular_1D instance has no attribute 'GetType'
Can anyone give some help?
A dumped study and a script in which I try to use the GetType() function are enclosed in a .zip file.
Thank you very much and best regards,
William
I particularly appreciate the new capability of Salome 6 to create automatic 3D prismatic layers and to export meshes into CGNS format !
Also the Publish/Unpublish tool in the geometry module is very useful.
OK, now my problem:
I would like to get the algorithms and hypotheses associated to given submesh.
All I have been able to do is to get the list of algorithms+hypothesis thanks to the function GetHypothesisList(), but I don't know how to know what is an algorithm and what is a hypothesis in this list.
An example of output for a 3D hexahedral submesh using viscous layers:
[, , , , ]
This list should be a list of SMESH_Hypothesis objects according to the documentation. And such objects should have a GetType() method (http://docs.salome-platform.org/salome_6_5_0/tui/SMESH/classSMESH__Hypothesis.html) if I well understand. But I cannot use it. I get the following error:
AttributeError: _objref_StdMeshers_Regular_1D instance has no attribute 'GetType'
Can anyone give some help?
A dumped study and a script in which I try to use the GetType() function are enclosed in a .zip file.
Thank you very much and best regards,
WilliamRe: How to get algorithms and hypothesis in a python script?
Hello William
GetType() method belongs to a low-level class ::SMESH_Hypothesis but what you get access to in Python is an omniORB generated wrapper whose interface is described in SMESH::SMESH_Hypothesis class. And a right method name is GetName() (that is rather strange in my opinion).
I changed your script to get all what you miss so far.
St.Michael
Re: How to get algorithms and hypothesis in a python script?
Powered by
Ploneboard
