2013-02-12 20:37:44 +06:00
|
|
|
# Quadrangle Parameters example 1 (meshing a face with 3 edges)
|
|
|
|
|
2013-04-04 13:08:19 +06:00
|
|
|
import salome
|
2021-08-12 14:38:10 +05:00
|
|
|
salome.salome_init_without_session()
|
2019-07-12 17:15:38 +05:00
|
|
|
|
2013-04-04 13:08:19 +06:00
|
|
|
from salome.geom import geomBuilder
|
2017-06-13 15:01:10 +05:00
|
|
|
geompy = geomBuilder.New()
|
2013-04-04 13:08:19 +06:00
|
|
|
|
|
|
|
from salome.smesh import smeshBuilder
|
2017-06-13 15:01:10 +05:00
|
|
|
smesh = smeshBuilder.New()
|
2013-02-12 20:37:44 +06:00
|
|
|
|
|
|
|
# Get 1/4 part from the disk face.
|
|
|
|
Box_1 = geompy.MakeBoxDXDYDZ(100, 100, 100)
|
|
|
|
Disk_1 = geompy.MakeDiskR(100, 1)
|
|
|
|
Common_1 = geompy.MakeCommon(Disk_1, Box_1)
|
2019-07-12 17:15:38 +05:00
|
|
|
triaVertex = geompy.GetVertexNearPoint( Common_1, geompy.MakeVertex(0,0,0) )
|
2013-02-12 20:37:44 +06:00
|
|
|
geompy.addToStudy( Common_1, "Common_1" )
|
2019-07-12 17:15:38 +05:00
|
|
|
geompy.addToStudyInFather( Common_1, triaVertex, "triaVertex" )
|
|
|
|
|
2013-02-12 20:37:44 +06:00
|
|
|
|
|
|
|
# Set the Geometry for meshing
|
|
|
|
Mesh_1 = smesh.Mesh(Common_1)
|
|
|
|
|
2019-07-12 17:15:38 +05:00
|
|
|
# Define 1D hypothesis
|
2013-02-12 20:37:44 +06:00
|
|
|
Regular_1D = Mesh_1.Segment()
|
|
|
|
Nb_Segments_1 = Regular_1D.NumberOfSegments(10)
|
|
|
|
|
|
|
|
# Create Quadrangle parameters and define the Base Vertex.
|
2019-07-12 17:15:38 +05:00
|
|
|
Quadrangle_2D = Mesh_1.Quadrangle().TriangleVertex( triaVertex )
|
2013-02-12 20:37:44 +06:00
|
|
|
|
2019-07-12 17:15:38 +05:00
|
|
|
# Compute the mesh
|
2013-02-12 20:37:44 +06:00
|
|
|
Mesh_1.Compute()
|