0020978: EDF 1475 SMESH: Convert linear to quadratic on a submesh

+    def ConvertToQuadratic(self, theForce3d, theSubMesh=None):
+    def ConvertFromQuadratic(self, theSubMesh=None):
This commit is contained in:
eap 2011-03-16 15:39:18 +00:00
parent 8b06eac8bd
commit cfcd4f3b74

View File

@ -3059,19 +3059,26 @@ class Mesh:
## Converts the mesh to quadratic, deletes old elements, replacing ## Converts the mesh to quadratic, deletes old elements, replacing
# them with quadratic with the same id. # them with quadratic with the same id.
# @param theForce3d new node creation method: # @param theForce3d new node creation method:
# 0 - the medium node lies at the geometrical edge from which the mesh element is built # 0 - the medium node lies at the geometrical entity from which the mesh element is built
# 1 - the medium node lies at the middle of the line segments connecting start and end node of a mesh element # 1 - the medium node lies at the middle of the line segments connecting start and end node of a mesh element
# @param theSubMesh a group or a sub-mesh to convert; WARNING: in this case the mesh can become not conformal
# @ingroup l2_modif_tofromqu # @ingroup l2_modif_tofromqu
def ConvertToQuadratic(self, theForce3d): def ConvertToQuadratic(self, theForce3d, theSubMesh=None):
self.editor.ConvertToQuadratic(theForce3d) if theSubMesh:
self.editor.ConvertToQuadraticObject(theForce3d,theSubMesh)
else:
self.editor.ConvertToQuadratic(theForce3d)
## Converts the mesh from quadratic to ordinary, ## Converts the mesh from quadratic to ordinary,
# deletes old quadratic elements, \n replacing # deletes old quadratic elements, \n replacing
# them with ordinary mesh elements with the same id. # them with ordinary mesh elements with the same id.
# @return TRUE in case of success, FALSE otherwise. # @param theSubMesh a group or a sub-mesh to convert; WARNING: in this case the mesh can become not conformal
# @ingroup l2_modif_tofromqu # @ingroup l2_modif_tofromqu
def ConvertFromQuadratic(self): def ConvertFromQuadratic(self, theSubMesh=None):
return self.editor.ConvertFromQuadratic() if theSubMesh:
self.editor.ConvertFromQuadraticObject(theSubMesh)
else:
return self.editor.ConvertFromQuadratic()
## Creates 2D mesh as skin on boundary faces of a 3D mesh ## Creates 2D mesh as skin on boundary faces of a 3D mesh
# @return TRUE if operation has been completed successfully, FALSE otherwise # @return TRUE if operation has been completed successfully, FALSE otherwise