From 6a9f64b3135bd82f8fe5e5bd60dec40932621f82 Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 24 Nov 2009 09:38:30 +0000 Subject: [PATCH] 0020128: EDF SMESH 926 : Quadratic conversion of BLSURF mesh Additional improvement for Convert to/from quadratic functions documentation --- .../input/convert_to_from_quadratic_mesh.doc | 4 +- .../gui/SMESH/input/tui_modifying_meshes.doc | 46 ++++++++++++++++++- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/doc/salome/gui/SMESH/input/convert_to_from_quadratic_mesh.doc b/doc/salome/gui/SMESH/input/convert_to_from_quadratic_mesh.doc index 072a91f7a..5409f487e 100644 --- a/doc/salome/gui/SMESH/input/convert_to_from_quadratic_mesh.doc +++ b/doc/salome/gui/SMESH/input/convert_to_from_quadratic_mesh.doc @@ -37,4 +37,6 @@ The following dialog box will appear:
  • Click the \b Apply or \b OK button.
  • -*/ \ No newline at end of file +
    See Also a sample TUI Script of a \ref tui_quadratic "Convert to/from quadratic" operation. + +*/ diff --git a/doc/salome/gui/SMESH/input/tui_modifying_meshes.doc b/doc/salome/gui/SMESH/input/tui_modifying_meshes.doc index bc7b78c89..66b6361fa 100644 --- a/doc/salome/gui/SMESH/input/tui_modifying_meshes.doc +++ b/doc/salome/gui/SMESH/input/tui_modifying_meshes.doc @@ -815,4 +815,48 @@ isDone = pattern.MakeMesh(Mesh_1.GetMesh(), 0, 0) if (isDone != 1): print 'MakeMesh :', pattern.GetErrorCode() \endcode -*/ \ No newline at end of file +
    +\anchor tui_quadratic +

    Convert mesh to/from quadratic

    + +\code +import geompy +import smesh + +# create sphere of radius 100 + +Sphere = geompy.MakeSphereR( 100 ) +geompy.addToStudy( Sphere, "Sphere" ) + +# create simple trihedral mesh + +Mesh = smesh.Mesh(Sphere) +Regular_1D = Mesh.Segment() +Nb_Segments = Regular_1D.NumberOfSegments(5) +MEFISTO_2D = Mesh.Triangle() +Tetrahedron_Netgen = Mesh.Tetrahedron(algo=smesh.NETGEN) + +# compute mesh + +isDone = Mesh.Compute() + +# convert to quadratic +# theForce3d = 1; this results in the medium node lying at the +# middle of the line segments connecting start and end node of a mesh +# element + +Mesh.ConvertToQuadratic( theForce3d=1 ) + +# revert back to the non-quadratic mesh + +Mesh.ConvertFromQuadratic() + +# convert to quadratic +# theForce3d = 0; this results in the medium node lying at the +# geometrical edge from which the mesh element is built + +Mesh.ConvertToQuadratic( theForce3d=0 ) + +\endcode + +*/ -- 2.39.2