Salome HOME
0020128: EDF SMESH 926 : Quadratic conversion of BLSURF mesh
authorvsr <vsr@opencascade.com>
Tue, 24 Nov 2009 09:38:30 +0000 (09:38 +0000)
committervsr <vsr@opencascade.com>
Tue, 24 Nov 2009 09:38:30 +0000 (09:38 +0000)
Additional improvement for Convert to/from quadratic functions documentation

doc/salome/gui/SMESH/input/convert_to_from_quadratic_mesh.doc
doc/salome/gui/SMESH/input/tui_modifying_meshes.doc

index 072a91f7a2340e80faad891b883f5d03e52c2e97..5409f487e78c64c7ae7b030b4c05a36790111a5a 100644 (file)
@@ -37,4 +37,6 @@ The following dialog box will appear:
 <li>Click the \b Apply or \b OK button.</li>
 </ol>
 
-*/
\ No newline at end of file
+<br><b>See Also</b> a sample TUI Script of a \ref tui_quadratic "Convert to/from quadratic" operation.
+
+*/
index bc7b78c89e2da15d8db4ccdb8f1259e74a28f274..66b6361fa0b724214ad4fc2481bc234471388625 100644 (file)
@@ -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
+<br>
+\anchor tui_quadratic
+<h2>Convert mesh to/from quadratic</h2>
+
+\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
+
+*/