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
|
|
|
|
from salome.smesh import smeshBuilder
|
2013-02-12 20:37:44 +06:00
|
|
|
|
2022-04-11 18:28:01 +05:00
|
|
|
geom_builder = geomBuilder.New()
|
|
|
|
smesh_builder = smeshBuilder.New()
|
2019-07-12 17:15:38 +05:00
|
|
|
|
2022-04-11 18:28:01 +05:00
|
|
|
# Get 1/4 part from the disk face.
|
|
|
|
Box_1 = geom_builder.MakeBoxDXDYDZ(100, 100, 100)
|
|
|
|
Disk_1 = geom_builder.MakeDiskR(100, 1)
|
|
|
|
Common_1 = geom_builder.MakeCommon(Disk_1, Box_1)
|
|
|
|
triaVertex = geom_builder.GetVertexNearPoint( Common_1, geom_builder.MakeVertex(0,0,0) )
|
|
|
|
geom_builder.addToStudy( Common_1, "Common_1" )
|
|
|
|
geom_builder.addToStudyInFather( Common_1, triaVertex, "triaVertex" )
|
2013-02-12 20:37:44 +06:00
|
|
|
|
|
|
|
# Set the Geometry for meshing
|
2022-04-11 18:28:01 +05:00
|
|
|
Mesh_1 = smesh_builder.Mesh(Common_1)
|
2013-02-12 20:37:44 +06:00
|
|
|
|
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()
|