mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-12 21:07:27 +05:00
0020918: EDF 1447 SMESH: Mesh common borders
This commit is contained in:
parent
c7886f3dd2
commit
52e5b910d3
BIN
doc/salome/gui/SMESH/images/hyp_source_edges.png
Normal file
BIN
doc/salome/gui/SMESH/images/hyp_source_edges.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
doc/salome/gui/SMESH/images/hyp_source_faces.png
Normal file
BIN
doc/salome/gui/SMESH/images/hyp_source_faces.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
@ -62,6 +62,7 @@ license to be used within the Mesh module.
|
|||||||
There is also a number of more specific algorithms:
|
There is also a number of more specific algorithms:
|
||||||
<ul>
|
<ul>
|
||||||
<li>\subpage projection_algos_page "for meshing by projection of another mesh"</li>
|
<li>\subpage projection_algos_page "for meshing by projection of another mesh"</li>
|
||||||
|
<li>\subpage import_algos_page "for meshing by importing elements from another mesh"</li>
|
||||||
<li>\subpage radial_prism_algo_page "for meshing geometrical objects with cavities"</li>
|
<li>\subpage radial_prism_algo_page "for meshing geometrical objects with cavities"</li>
|
||||||
<li>\subpage segments_around_vertex_algo_page "for defining the local size of elements around a certain node"</li>
|
<li>\subpage segments_around_vertex_algo_page "for defining the local size of elements around a certain node"</li>
|
||||||
<li>\subpage prism_3d_algo_page "for meshing prismatic shapes"</li>
|
<li>\subpage prism_3d_algo_page "for meshing prismatic shapes"</li>
|
||||||
|
@ -551,9 +551,8 @@ mesh.Compute()
|
|||||||
\anchor tui_quadrangle_parameters
|
\anchor tui_quadrangle_parameters
|
||||||
<h2>Quadrangle Parameters example </h2>
|
<h2>Quadrangle Parameters example </h2>
|
||||||
\code
|
\code
|
||||||
import geompy
|
from smesh import *
|
||||||
import smesh
|
SetCurrentStudy(salome.myStudy)
|
||||||
import StdMeshers
|
|
||||||
|
|
||||||
# Get 1/4 part from the disk face.
|
# Get 1/4 part from the disk face.
|
||||||
Box_1 = geompy.MakeBoxDXDYDZ(100, 100, 100)
|
Box_1 = geompy.MakeBoxDXDYDZ(100, 100, 100)
|
||||||
@ -566,19 +565,67 @@ geompy.addToStudy( Common_1, "Common_1" )
|
|||||||
# Set the Geometry for meshing
|
# Set the Geometry for meshing
|
||||||
Mesh_1 = smesh.Mesh(Common_1)
|
Mesh_1 = smesh.Mesh(Common_1)
|
||||||
|
|
||||||
# Create Quadrangle parameters and define the Base Vertex.
|
|
||||||
Quadrangle_Parameters_1 = smesh.CreateHypothesis('QuadrangleParams')
|
|
||||||
Quadrangle_Parameters_1.SetTriaVertex( 8 )
|
|
||||||
|
|
||||||
# Define 1D hypothesis and cmpute the mesh
|
# Define 1D hypothesis and cmpute the mesh
|
||||||
Regular_1D = Mesh_1.Segment()
|
Regular_1D = Mesh_1.Segment()
|
||||||
Nb_Segments_1 = Regular_1D.NumberOfSegments(10)
|
Nb_Segments_1 = Regular_1D.NumberOfSegments(10)
|
||||||
Nb_Segments_1.SetDistrType( 0 )
|
Nb_Segments_1.SetDistrType( 0 )
|
||||||
status = Mesh_1.AddHypothesis(Quadrangle_Parameters_1)
|
|
||||||
Quadrangle_2D = Mesh_1.Quadrangle()
|
# Create Quadrangle parameters and define the Base Vertex.
|
||||||
|
Quadrangle_2D = Mesh_1.Quadrangle().TriangleVertex( 8 )
|
||||||
|
|
||||||
Mesh_1.Compute()
|
Mesh_1.Compute()
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
|
|
||||||
|
\anchor tui_import
|
||||||
|
<h2>"Use Existing Elements" example </h2>
|
||||||
|
\code
|
||||||
|
|
||||||
|
from smesh import *
|
||||||
|
SetCurrentStudy(salome.myStudy)
|
||||||
|
|
||||||
|
# Make a patritioned box
|
||||||
|
|
||||||
|
box = geompy.MakeBoxDXDYDZ(100,100,100)
|
||||||
|
|
||||||
|
N = geompy.MakeVectorDXDYDZ( 1,0,0 )
|
||||||
|
O = geompy.MakeVertex( 50,0,0 )
|
||||||
|
plane = geompy.MakePlane( O, N, 200 ) # plane YOZ
|
||||||
|
|
||||||
|
shape2boxes = geompy.MakeHalfPartition( box, plane )
|
||||||
|
boxes = geompy.SubShapeAllSorted(shape2boxes, geompy.ShapeType["SOLID"])
|
||||||
|
|
||||||
|
geompy.addToStudy( boxes[0], "boxes[0]")
|
||||||
|
geompy.addToStudy( boxes[1], "boxes[1]")
|
||||||
|
midFace0 = geompy.SubShapeAllSorted(boxes[0], geompy.ShapeType["FACE"])[5]
|
||||||
|
geompy.addToStudyInFather( boxes[0], midFace0, "middle Face")
|
||||||
|
midFace1 = geompy.SubShapeAllSorted(boxes[1], geompy.ShapeType["FACE"])[0]
|
||||||
|
geompy.addToStudyInFather( boxes[1], midFace1, "middle Face")
|
||||||
|
|
||||||
|
# Mesh one of boxes with quadrangles. It is a source mesh
|
||||||
|
|
||||||
|
srcMesh = Mesh(boxes[0], "source mesh") # box coloser to CS origin
|
||||||
|
nSeg1 = srcMesh.Segment().NumberOfSegments(4)
|
||||||
|
srcMesh.Quadrangle()
|
||||||
|
srcMesh.Compute()
|
||||||
|
srcFaceGroup = srcMesh.GroupOnGeom( midFace0, "src faces", FACE )
|
||||||
|
|
||||||
|
# Import faces from midFace0 to the target mesh
|
||||||
|
|
||||||
|
tgtMesh = Mesh(boxes[1], "target mesh")
|
||||||
|
importAlgo = tgtMesh.UseExisting2DElements(midFace1)
|
||||||
|
import2hyp = importAlgo.SourceFaces( [srcFaceGroup] )
|
||||||
|
tgtMesh.Segment().NumberOfSegments(3)
|
||||||
|
tgtMesh.Quadrangle()
|
||||||
|
tgtMesh.Compute()
|
||||||
|
|
||||||
|
# Import the whole source mesh with groups
|
||||||
|
import2hyp.SetCopySourceMesh(True,True)
|
||||||
|
tgtMesh.Compute()
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
|
||||||
\n Other meshing algorithms:
|
\n Other meshing algorithms:
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
58
doc/salome/gui/SMESH/input/use_existing_algos.doc
Normal file
58
doc/salome/gui/SMESH/input/use_existing_algos.doc
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
/*!
|
||||||
|
|
||||||
|
\page import_algos_page Use Existing Elements Algorithms
|
||||||
|
|
||||||
|
\n Use Existing Elements algorithms allow to define the mesh of a geometrical
|
||||||
|
object by the importing suitably located mesh elements from another
|
||||||
|
mesh. The mesh elements to import from the other mesh are to be contained in
|
||||||
|
groups. If several groups are used to mesh one geometry, validity of
|
||||||
|
nodal connectivity of result mesh must be assured by connectivity of
|
||||||
|
the source mesh; no geometrical checks are performed to merge
|
||||||
|
different nodes at same locations.
|
||||||
|
<br> The source elements must totally cover the meshed geometry.
|
||||||
|
The source elements lying partially over the geometry will not be used.
|
||||||
|
<br>
|
||||||
|
These algorithms can be used to mesh a very complex geometry part by
|
||||||
|
part, by storing meshes of parts in files and then fusing them
|
||||||
|
together using these algorithms.
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<b>Use Existing 1D Elements</b> algorithm allows to define the mesh of
|
||||||
|
a geometrical edge (or group of edges)
|
||||||
|
by the importing of mesh edges of another mesh contained in a group (or groups).
|
||||||
|
\n To apply this algorithm select the edge to be meshed (indicated in
|
||||||
|
the field \b Geometry of <b>Create mesh</b> dialog box),
|
||||||
|
<b>Use existing 1D elements</b> in the list of 1D algorithms and click the
|
||||||
|
<em>"Add Hypothesis"</em> button.
|
||||||
|
The following dialog box will appear:
|
||||||
|
|
||||||
|
\image html hyp_source_edges.png
|
||||||
|
|
||||||
|
In this menu you can define the \b Name of the algorithm, the
|
||||||
|
<b>Groups of Edges</b> to import elements from, <b> To copy mesh</b>
|
||||||
|
the selected <b>Groups of Edges</b> belong to as a whole and <b>To
|
||||||
|
copy groups</b> along with the whole mesh.
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<b>Use Existing 2D Elements</b> algorithm allows to define the mesh of
|
||||||
|
a geometrical face (or group of faces)
|
||||||
|
by the importing of mesh faces of another mesh contained in a group (or groups).
|
||||||
|
\n To apply this algorithm select the edge to be meshed (indicated in
|
||||||
|
the field \b Geometry of <b>Create mesh</b> dialog box),
|
||||||
|
<b>Use existing 2D elements</b> in the list of 2D algorithms and click the
|
||||||
|
<em>"Add Hypothesis"</em> button.
|
||||||
|
The following dialog box will appear:
|
||||||
|
|
||||||
|
\image html hyp_source_faces.png
|
||||||
|
|
||||||
|
In this menu you can define the \b Name of the algorithm, the
|
||||||
|
<b>Groups of Faces</b> to import elements from, <b> To copy mesh</b>
|
||||||
|
the selected <b>Groups of Fcaes</b> belong to as a whole and <b>To
|
||||||
|
copy groups</b> along with the whole mesh.
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<br><b>See Also</b> a sample TUI Script of a
|
||||||
|
\ref tui_import "Use Existing Elements Algorithms".
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user