0020128: EDF SMESH 926 : Quadratic conversion of BLSURF mesh

Additional improvement for Convert to/from quadratic functions documentation
This commit is contained in:
vsr 2009-11-24 09:38:30 +00:00
parent 235f0b122d
commit 6a9f64b313
2 changed files with 48 additions and 2 deletions

View File

@ -37,4 +37,6 @@ The following dialog box will appear:
<li>Click the \b Apply or \b OK button.</li>
</ol>
<br><b>See Also</b> a sample TUI Script of a \ref tui_quadratic "Convert to/from quadratic" operation.
*/

View File

@ -815,4 +815,48 @@ isDone = pattern.MakeMesh(Mesh_1.GetMesh(), 0, 0)
if (isDone != 1): print 'MakeMesh :', pattern.GetErrorCode()
\endcode
<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
*/