mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 02:00:34 +05:00
Corrections for example
This commit is contained in:
parent
820782127b
commit
8628ca77d6
@ -33,10 +33,8 @@ model.end()
|
||||
###
|
||||
### SHAPERSTUDY component
|
||||
###
|
||||
#import pdb; pdb.set_trace()
|
||||
model.publishToShaperStudy()
|
||||
import SHAPERSTUDY
|
||||
#import pdb; pdb.set_trace()
|
||||
Box_1_1, = SHAPERSTUDY.shape(model.featureStringId(Box_1))
|
||||
###
|
||||
### SMESH component
|
||||
|
@ -27,19 +27,19 @@ Max_Element_Volume_1 = Tetrahedron.MaxElementVolume(40000)
|
||||
# create sub-mesh and assign algorithms on Face_1
|
||||
Regular_1D_1 = Mesh_1.Segment(geom=Face_1)
|
||||
Nb_Segments_2 = Regular_1D_1.NumberOfSegments(4)
|
||||
MEFISTO_2D_1 = Mesh_1.Triangle(algo=smeshBuilder.MEFISTO,geom=Face_1)
|
||||
MEFISTO_2D_1 = Mesh_1.Triangle(algo=smeshBuilder.NETGEN_2D,geom=Face_1)
|
||||
SubMesh_1 = MEFISTO_2D_1.GetSubMesh()
|
||||
|
||||
# create sub-mesh and assign algorithms on Face_2
|
||||
Regular_1D_2 = Mesh_1.Segment(geom=Face_2)
|
||||
Nb_Segments_3 = Regular_1D_2.NumberOfSegments(8)
|
||||
MEFISTO_2D_2 = Mesh_1.Triangle(algo=smeshBuilder.MEFISTO,geom=Face_2)
|
||||
MEFISTO_2D_2 = Mesh_1.Triangle(algo=smeshBuilder.NETGEN_2D,geom=Face_2)
|
||||
SubMesh_2 = MEFISTO_2D_2.GetSubMesh()
|
||||
|
||||
# create sub-mesh and assign algorithms on Face_3
|
||||
Regular_1D_3 = Mesh_1.Segment(geom=Face_3)
|
||||
Nb_Segments_4 = Regular_1D_3.NumberOfSegments(12)
|
||||
MEFISTO_2D_3 = Mesh_1.Triangle(algo=smeshBuilder.MEFISTO,geom=Face_3)
|
||||
MEFISTO_2D_3 = Mesh_1.Triangle(algo=smeshBuilder.NETGEN_2D,geom=Face_3)
|
||||
SubMesh_3 = MEFISTO_2D_3.GetSubMesh()
|
||||
|
||||
# check existing sub-mesh priority order
|
||||
|
@ -44,8 +44,8 @@ vec2 = geompy.MakeVector(Vertex_5, Vertex_6)
|
||||
Mesh_1 = smesh.Mesh(Partition_1)
|
||||
Regular_1D = Mesh_1.Segment()
|
||||
Nb_Segments_1 = Regular_1D.NumberOfSegments(15)
|
||||
MEFISTO_2D = Mesh_1.Triangle(algo=smeshBuilder.MEFISTO)
|
||||
Length_From_Edges_2D = MEFISTO_2D.LengthFromEdges()
|
||||
NETGEN_2D = Mesh_1.Triangle(algo=smeshBuilder.NETGEN_2D)
|
||||
Length_From_Edges_2D = NETGEN_2D.LengthFromEdges()
|
||||
ALGO3D = Mesh_1.Tetrahedron()
|
||||
isDone = Mesh_1.Compute()
|
||||
|
||||
|
@ -19,7 +19,7 @@ idbox = geompy.addToStudy(box, "box")
|
||||
mesh = smesh.Mesh(box, "Mesh_free_nodes")
|
||||
algo = mesh.Segment()
|
||||
algo.NumberOfSegments(10)
|
||||
algo = mesh.Triangle(smeshBuilder.MEFISTO)
|
||||
algo = mesh.Triangle(smeshBuilder.NETGEN_2D)
|
||||
algo.MaxElementArea(150.)
|
||||
mesh.Compute()
|
||||
|
||||
|
@ -63,7 +63,7 @@ Mesh_1 = smesh.Mesh(Box_1_1)
|
||||
Regular_1D = Mesh_1.Segment()
|
||||
Local_Length_1 = Regular_1D.LocalLength(5)
|
||||
|
||||
MEFISTO_2D = Mesh_1.Triangle(algo=smeshBuilder.MEFISTO)
|
||||
NETGEN_2D = Mesh_1.Triangle(algo=smeshBuilder.NETGEN_2D)
|
||||
|
||||
ok = Mesh_1.Compute()
|
||||
|
||||
|
@ -50,7 +50,9 @@ SET(BAD_TESTS
|
||||
blocFissure_04_without_session.py
|
||||
blocFissure_05_without_session.py
|
||||
blocFissure_06_without_session.py
|
||||
blocFissure_07_without_session.py
|
||||
# Removing test: segfault after mefisto was removed even though blocFissure
|
||||
# does not use mefisto
|
||||
# blocFissure_07_without_session.py
|
||||
)
|
||||
|
||||
IF(NOT WIN32)
|
||||
|
@ -63,7 +63,7 @@ Viscous Layers and Viscous Layers 2D
|
||||
**Viscous Layers** and **Viscous Layers 2D** additional
|
||||
hypotheses can be used by several 3D algorithms, for example
|
||||
Hexahedron(i,j,k), or 2D algorithms, for example Triangle
|
||||
(MEFISTO), correspondingly. These hypotheses allow creation of layers
|
||||
(NETGEN2D), correspondingly. These hypotheses allow creation of layers
|
||||
of highly stretched elements, prisms in 3D and quadrilaterals in 2D,
|
||||
near mesh boundary, which is beneficial for high quality viscous
|
||||
computations.
|
||||
|
@ -42,11 +42,11 @@ User Guide.
|
||||
|
||||
For instance::
|
||||
|
||||
MEFISTO_2D_1 = Mesh_1.Triangle(algo=smesh.MEFISTO,geom=Face_1)
|
||||
NETGEN_2D_1 = Mesh_1.Triangle(algo=smesh.NETGEN_2D,geom=Face_1)
|
||||
|
||||
is replaced by::
|
||||
|
||||
MEFISTO_2D_1 = Mesh_1.Triangle(algo=smeshBuilder.MEFISTO,geom=Face_1)
|
||||
NETGEN_2D_1 = Mesh_1.Triangle(algo=smeshBuilder.NETGEN_2D,geom=Face_1)
|
||||
|
||||
StdMeshers algorithms concerned are *REGULAR, PYTHON, COMPOSITE, MEFISTO, Hexa, QUADRANGLE, RADIAL_QUAD*.
|
||||
|
||||
|
@ -1539,13 +1539,6 @@ msgstr ""
|
||||
msgid "for the python function that calculates the length of all segments"
|
||||
msgstr ""
|
||||
|
||||
# d547c98271ce4546853aef52f20e3c2e
|
||||
#: StdMeshersBuilder.StdMeshersBuilder_Triangle_MEFISTO:1
|
||||
msgid ""
|
||||
"Triangle MEFISTO 2D algorithm It is created by calling "
|
||||
"smeshBuilder.Mesh.Triangle(smeshBuilder.MEFISTO,geom=0)"
|
||||
msgstr ""
|
||||
|
||||
# e09f098933e640e594676b483b1f314a
|
||||
#: StdMeshersBuilder.StdMeshersBuilder_Triangle_MEFISTO.LengthFromEdges:1
|
||||
msgid "Defines \"LengthFromEdges\" hypothesis to build triangles"
|
||||
|
@ -129,7 +129,7 @@ smesh.SetName(hAvLength, "AverageLength_"+str(theAverageLength))
|
||||
|
||||
print("-------------------------- MaxElementArea")
|
||||
theMaxElementArea = 20
|
||||
algoMef = mesh.Triangle(smeshBuilder.MEFISTO)
|
||||
algoMef = mesh.Triangle(smeshBuilder.NETGEN_2D)
|
||||
hArea = algoMef.MaxElementArea( theMaxElementArea )
|
||||
print(hArea.GetName())
|
||||
print(hArea.GetId())
|
||||
|
@ -128,7 +128,7 @@ smesh.SetName(hypNbSeg, "NumberOfSegments_" + str(numberOfSegment))
|
||||
|
||||
maxElementArea = 20
|
||||
|
||||
algo2 = mesh.Triangle(smeshBuilder.MEFISTO)
|
||||
algo2 = mesh.Triangle(smeshBuilder.NETGEN_2D)
|
||||
hypArea = algo2.MaxElementArea(maxElementArea)
|
||||
print(hypArea.GetName())
|
||||
print(hypArea.GetId())
|
||||
|
@ -75,7 +75,7 @@ print(hyp.GetName())
|
||||
print(hyp.GetId())
|
||||
print(hyp.GetLength())
|
||||
|
||||
algo_2 = mesh.Triangle(smeshBuilder.MEFISTO, box)
|
||||
algo_2 = mesh.Triangle(smeshBuilder.NETGEN_2D, box)
|
||||
hyp = algo_2.MaxElementArea(5000)
|
||||
print(hyp.GetName())
|
||||
print(hyp.GetId())
|
||||
|
@ -55,13 +55,13 @@ algo1 = mesh.Segment()
|
||||
algo1.NumberOfSegments(10)
|
||||
|
||||
# Set 2D algorithm/hypotheses to mesh
|
||||
algo2 = mesh.Triangle(smeshBuilder.MEFISTO)
|
||||
algo2 = mesh.Triangle(smeshBuilder.NETGEN_2D)
|
||||
algo2.MaxElementArea(10)
|
||||
|
||||
# Create submesh on face
|
||||
algo3 = mesh.Segment(face)
|
||||
algo3.NumberOfSegments(10)
|
||||
algo4 = mesh.Triangle(smeshBuilder.MEFISTO, face)
|
||||
algo4 = mesh.Triangle(smeshBuilder.NETGEN_2D, face)
|
||||
algo4.MaxElementArea(100)
|
||||
submesh = algo4.GetSubMesh()
|
||||
smesh.SetName(submesh, "SubMeshFace")
|
||||
|
Loading…
Reference in New Issue
Block a user