of smeshBuilder.Mesh class
"""
- docHelper = "Creates segment 1D algorithm for edges"
+ docHelper = "Create segment 1D algorithm for edges"
"""
doc string of the method
"""
Parameters:
l : for the length of segments that cut an edge
UseExisting : if == true - searches for an existing hypothesis created with
- the same parameters, else (default) - creates a new one
+ the same parameters, else (default) - Create a new one
p : precision, used for calculation of the number of segments.
The precision should be a positive, meaningful value within the range [0,1].
In general, the number of segments is calculated with the formula:
length : is optional maximal allowed length of segment, if it is omitted
the preestimated length is used that depends on geometry size
UseExisting : if ==true - searches for an existing hypothesis created with
- the same parameters, else (default) - creates a new one
+ the same parameters, else (default) - Create a new one
Returns:
an instance of StdMeshers_MaxLength hypothesis
hyp = self.Hypothesis("MaxLength", [length], UseExisting=UseExisting)
- if length > 0.0:
+ if isinstance(length,str) or length > 0:
# set given length
hyp.SetLength(length)
if not UseExisting:
maxSize: defines the maximal allowed segment length
deflection: defines the maximal allowed distance from a segment to an edge
UseExisting: if ==true - searches for an existing hypothesis created with
- the same parameters, else (default) - creates a new one
+ the same parameters, else (default) - Create a new one
Returns:
an instance of StdMeshers_Adaptive1D hypothesis
reversedEdges: is a list of edges to mesh using reversed orientation.
A list item can also be a tuple (edge, 1st_vertex_of_edge)
UseExisting: if ==true - searches for an existing hypothesis created with
- the same parameters, else (default) - creates a new one
+ the same parameters, else (default) - Create a new one
Returns:
an instance of StdMeshers_Arithmetic1D hypothesis
reversedEdges: is a list of edges to mesh using reversed orientation.
A list item can also be a tuple (edge, 1st_vertex_of_edge)
UseExisting: if ==true - searches for an existing hypothesis created with
- the same parameters, else (default) - creates a new one
+ the same parameters, else (default) - Create a new one
Returns:
an instance of StdMeshers_Geometric1D hypothesis
reversedEdges: is a list of edges to mesh using reversed orientation.
A list item can also be a tuple (edge, 1st_vertex_of_edge)
UseExisting: if ==true - searches for an existing hypothesis created with
- the same parameters, else (default) - creates a new one
+ the same parameters, else (default) - Create a new one
Returns:
an instance of StdMeshers_FixedPoints1D hypothesis
reversedEdges: is a list of edges to mesh using reversed orientation.
A list item can also be a tuple (edge, 1st_vertex_of_edge)
UseExisting: if ==true - searches for an existing hypothesis created with
- the same parameters, else (default) - creates a new one
+ the same parameters, else (default) - Create a new one
Returns:
an instance of StdMeshers_StartEndLength hypothesis
hyp.SetFineness( fineness )
return hyp
- def LengthNearVertex(self, length, vertex=0, UseExisting=0):
+ def LengthNearVertex(self, length, vertex=-1, UseExisting=0):
"""
Defines "SegmentLengthAroundVertex" hypothesis
Any other integer value means that the hypothesis will be set on the
whole 1D shape, where Mesh_Segment algorithm is assigned.
UseExisting: if ==true - searches for an existing hypothesis created with
- the same parameters, else (default) - creates a new one
+ the same parameters, else (default) - Create a new one
"""
import types
of smeshBuilder.Mesh class
"""
- docHelper = "Creates segment 1D algorithm for edges"
+ docHelper = "Create segment 1D algorithm for edges"
"""
doc string of the method
"""
class StdMeshersBuilder_Segment_Python(Mesh_Algorithm):
"""
- Defines a segment 1D algorithm for discretization of edges with Python function
- It is created by calling smeshBuilder.Mesh.Segment(smeshBuilder.PYTHON,geom=0)
+ Defines a segment 1D algorithm for discretization of edges with Python function.
+ It is created by calling smeshBuilder.Mesh.Segment(smeshBuilder.PYTHON,geom=0)
"""
"""
type of algorithm used with helper function in smeshBuilder.Mesh class
"""
- docHelper = "Creates segment 1D algorithm for edges"
+ docHelper = "Create segment 1D algorithm for edges"
"""
doc string of the method
"""
n: for the number of segments that cut an edge
func: for the python function that calculates the length of all segments
UseExisting: if ==true - searches for the existing hypothesis created with
- the same parameters, else (default) - creates a new one
+ the same parameters, else (default) - Create a new one
"""
compFun = lambda hyp, args: False
class StdMeshersBuilder_Triangle_MEFISTO(Mesh_Algorithm):
"""
- Triangle MEFISTO 2D algorithm
+ Triangle MEFISTO 2D algorithm.
It is created by calling smeshBuilder.Mesh.Triangle(smeshBuilder.MEFISTO,geom=0)
"""
flag pointing whether this algorithm should be used by default in dynamic method
of smeshBuilder.Mesh class
"""
- docHelper = "Creates triangle 2D algorithm for faces"
+ docHelper = "Create triangle 2D algorithm for faces"
"""
doc string of the method
"""
Parameters:
area: for the maximum area of each triangle
UseExisting: if ==true - searches for an existing hypothesis created with the
- same parameters, else (default) - creates a new one
+ same parameters, else (default) - Create a new one
"""
from salome.smesh.smeshBuilder import IsEqual
class StdMeshersBuilder_Quadrangle(Mesh_Algorithm):
"""
- Defines a quadrangle 2D algorithm
+ Defines a quadrangle 2D algorithm.
It is created by calling smeshBuilder.Mesh.Quadrangle(geom=0)
"""
flag pointing whether this algorithm should be used by default in dynamic method
of smeshBuilder.Mesh class
"""
- docHelper = "Creates quadrangle 2D algorithm for faces"
+ docHelper = "Create quadrangle 2D algorithm for faces"
"""
doc string of the method
"""
In the case if the defined QuadrangleParameters() refer to a sole face,
all given points must lie on this face, else the mesher fails.
UseExisting: if *True* - searches for the existing hypothesis created with
- the same parameters, else (default) - creates a new one
+ the same parameters, else (default) - Create a new one
"""
Parameters:
reversed: if True, transition area is located along the coarser meshed sides.
UseExisting: if ==true - searches for the existing hypothesis created with
- the same parameters, else (default) - creates a new one
+ the same parameters, else (default) - Create a new one
"""
if reversed:
Parameters:
UseExisting: if ==true - searches for the existing hypothesis created with
- the same parameters, else (default) - creates a new one
+ the same parameters, else (default) - Create a new one
"""
return self.QuadrangleParameters(QUAD_TRIANGLE_PREF,UseExisting=UseExisting)
Parameters:
UseExisting: if ==true - searches for the existing hypothesis created with
- the same parameters, else (default) - creates a new one
+ the same parameters, else (default) - Create a new one
"""
return self.QuadrangleParameters(QUAD_REDUCED,UseExisting=UseExisting)
Vertex can be either a GEOM_Object or a vertex ID within the
shape to mesh
UseExisting: if ==true - searches for the existing hypothesis created with
- the same parameters, else (default) - creates a new one
+ the same parameters, else (default) - Create a new one
"""
return self.QuadrangleParameters(QUAD_STANDARD,vertex,UseExisting)
class StdMeshersBuilder_Hexahedron(Mesh_Algorithm):
"""
- Defines a hexahedron 3D algorithm
+ Defines a hexahedron 3D algorithm.
It is created by calling smeshBuilder.Mesh.Hexahedron(geom=0)
"""
flag pointing whether this algorithm should be used by default in dynamic method
of smeshBuilder.Mesh class
"""
- docHelper = "Creates hexahedron 3D algorithm for volumes"
+ docHelper = "Create hexahedron 3D algorithm for volumes"
"""
doc string of the method
"""
class StdMeshersBuilder_Projection1D(Mesh_Algorithm):
"""
- Defines a projection 1D algorithm
+ Defines a projection 1D algorithm.
It is created by calling smeshBuilder.Mesh.Projection1D(geom=0)
"""
flag pointing whether this algorithm should be used by default in dynamic method
of smeshBuilder.Mesh class
"""
- docHelper = "Creates projection 1D algorithm for edges"
+ docHelper = "Create projection 1D algorithm for edges"
"""
doc string of the method
"""
srcV: a vertex of *edge* to associate with *tgtV* (optional)
tgtV: a vertex of *the edge* to which the algorithm is assigned, to associate with *srcV* (optional)
UseExisting: if ==true - searches for the existing hypothesis created with
- the same parameters, else (default) - creates a new one
+ the same parameters, else (default) - Create a new one
"""
from salome.smesh.smeshBuilder import AssureGeomPublished, Mesh
AssureGeomPublished( self.mesh, edge )
class StdMeshersBuilder_Projection2D(Mesh_Algorithm):
"""
- Defines a projection 2D algorithm
+ Defines a projection 2D algorithm.
It is created by calling smeshBuilder.Mesh.Projection2D(geom=0)
"""
flag pointing whether this algorithm should be used by default in dynamic method
of smeshBuilder.Mesh class
"""
- docHelper = "Creates projection 2D algorithm for faces"
+ docHelper = "Create projection 2D algorithm for faces"
"""
doc string of the method
"""
class StdMeshersBuilder_Projection1D2D(StdMeshersBuilder_Projection2D):
"""
- Defines a projection 1D-2D algorithm
+ Defines a projection 1D-2D algorithm.
It is created by calling smeshBuilder.Mesh.Projection1D2D(geom=0)
"""
"""
type of algorithm used with helper function in smeshBuilder.Mesh class
"""
- docHelper = "Creates projection 1D-2D algorithm for faces"
+ docHelper = "Create projection 1D-2D algorithm for faces"
"""
doc string of the method
"""
class StdMeshersBuilder_Projection3D(Mesh_Algorithm):
"""
- Defines a projection 3D algorithm
+ Defines a projection 3D algorithm.
It is created by calling smeshBuilder.Mesh.Projection3D(geom=0)
"""
"""
type of algorithm used with helper function in smeshBuilder.Mesh class
"""
- docHelper = "Creates projection 3D algorithm for volumes"
+ docHelper = "Create projection 3D algorithm for volumes"
"""
doc string of the method
"""
srcV2: a vertex of *solid* to associate with *tgtV1* (optional)
tgtV2: a vertex of *the solid* to which the algorithm is assigned,to associate with *srcV2* (optional)
UseExisting: if ==true - searches for the existing hypothesis created with
- the same parameters, else (default) - creates a new one
+ the same parameters, else (default) - Create a new one
Note:
association vertices must belong to one edge of a solid
"""
type of algorithm used with helper function in smeshBuilder.Mesh class
"""
- docHelper = "Creates prism 3D algorithm for volumes"
+ docHelper = "Create prism 3D algorithm for volumes"
"""
doc string of the method
"""
Parameters:
n: number of layers
UseExisting: if ==true - searches for the existing hypothesis created with
- the same parameters, else (default) - creates a new one
+ the same parameters, else (default) - Create a new one
"""
if self.algoType != "RadialPrism_3D":
print("Prism_3D algorithm doesn't support any hypothesis")
"""
type of algorithm used with helper function in smeshBuilder.Mesh class
"""
- docHelper = "Creates Raial Prism 3D algorithm for volumes"
+ docHelper = "Create Raial Prism 3D algorithm for volumes"
"""
doc string of the method
"""
Parameters:
n: number of layers
UseExisting: if ==true - searches for the existing hypothesis created with
- the same parameters, else (default) - creates a new one
+ the same parameters, else (default) - Create a new one
"""
if self.distribHyp:
self.mesh.GetMesh().RemoveHypothesis( self.geom, self.distribHyp )
class StdMeshersBuilder_RadialQuadrangle1D2D(StdMeshersBuilder_RadialAlgorithm):
"""
- Defines a Radial Quadrangle 1D-2D algorithm
+ Defines a Radial Quadrangle 1D-2D algorithm.
It is created by calling smeshBuilder.Mesh.Quadrangle(smeshBuilder.RADIAL_QUAD,geom=0)
"""
"""
type of algorithm used with helper function in smeshBuilder.Mesh class
"""
- docHelper = "Creates quadrangle 1D-2D algorithm for faces having a shape of disk or a disk segment"
+ docHelper = "Create quadrangle 1D-2D algorithm for faces having a shape of disk or a disk segment"
"""
doc string of the method
"""
class StdMeshersBuilder_QuadMA_1D2D(StdMeshersBuilder_RadialAlgorithm):
"""
- Defines a Quadrangle (Medial Axis Projection) 1D-2D algorithm
+ Defines a Quadrangle (Medial Axis Projection) 1D-2D algorithm .
It is created by calling smeshBuilder.Mesh.Quadrangle(smeshBuilder.QUAD_MA_PROJ,geom=0)
"""
"""
type of algorithm used with helper function in smeshBuilder.Mesh class
"""
- docHelper = "Creates quadrangle 1D-2D algorithm for faces"
+ docHelper = "Create quadrangle 1D-2D algorithm for faces"
"""
doc string of the method
"""
pass
class StdMeshersBuilder_PolygonPerFace(Mesh_Algorithm):
- """ Defines a Polygon Per Face 2D algorithm
+ """ Defines a Polygon Per Face 2D algorithm.
It is created by calling smeshBuilder.Mesh.Polygon(geom=0)
"""
flag pointing whether this algorithm should be used by default in dynamic method
of smeshBuilder.Mesh class
"""
- docHelper = "Creates polygon 2D algorithm for faces"
+ docHelper = "Create polygon 2D algorithm for faces"
"""
doc string of the method
"""
pass
class StdMeshersBuilder_UseExistingElements_1D(Mesh_Algorithm):
- """ Defines a Use Existing Elements 1D algorithm
+ """ Defines a Use Existing Elements 1D algorithm.
It is created by calling smeshBuilder.Mesh.UseExisting1DElements(geom=0)
"""
flag pointing whether this algorithm should be used by default in dynamic method
of smeshBuilder.Mesh class
"""
- docHelper = "Creates 1D algorithm for edges with reusing of existing mesh elements"
+ docHelper = "Create 1D algorithm for edges with reusing of existing mesh elements"
"""
doc string of the method
"""
toCopyMesh: if True, the whole mesh *groups* belong to is imported
toCopyGroups: if True, all groups of the mesh *groups* belong to are imported
UseExisting: if ==true - searches for the existing hypothesis created with
- the same parameters, else (default) - creates a new one
+ the same parameters, else (default) - Create a new one
"""
for group in groups:
from salome.smesh.smeshBuilder import AssureGeomPublished
pass # end of StdMeshersBuilder_UseExistingElements_1D class
class StdMeshersBuilder_UseExistingElements_1D2D(Mesh_Algorithm):
- """ Defines a Use Existing Elements 1D-2D algorithm
+ """ Defines a Use Existing Elements 1D-2D algorithm.
It is created by calling smeshBuilder.Mesh.UseExisting2DElements(geom=0)
"""
flag pointing whether this algorithm should be used by default in dynamic method
of smeshBuilder.Mesh class
"""
- docHelper = "Creates 1D-2D algorithm for faces with reusing of existing mesh elements"
+ docHelper = "Create 1D-2D algorithm for faces with reusing of existing mesh elements"
"""
doc string of the method
"""
toCopyMesh: if True, the whole mesh *groups* belong to is imported
toCopyGroups: if True, all groups of the mesh *groups* belong to are imported
UseExisting: if ==true - searches for the existing hypothesis created with
- the same parameters, else (default) - creates a new one
+ the same parameters, else (default) - Create a new one
"""
import SMESH
compFun = lambda hyp, args: ( hyp.GetSourceFaces() == args[0] and \
pass # end of StdMeshersBuilder_UseExistingElements_1D2D class
class StdMeshersBuilder_Cartesian_3D(Mesh_Algorithm):
- """ Defines a Body Fitting 3D algorithm
+ """ Defines a Body Fitting 3D algorithm.
It is created by calling smeshBuilder.Mesh.BodyFitted(geom=0)
"""
flag pointing whether this algorithm should be used by default in dynamic method
of smeshBuilder.Mesh class
"""
- docHelper = "Creates Body Fitting 3D algorithm for volumes"
+ docHelper = "Create Body Fitting 3D algorithm for volumes"
"""
doc string of the method
"""
- Functions f(t) defining grid spacing at each point on grid axis. If there are
several functions, they must be accompanied by relative coordinates of
points dividing the whole shape into ranges where the functions apply; points
- coodrinates should vary within (0.0, 1.0) range. Parameter *t* of the spacing
+ coordinates should vary within (0.0, 1.0) range. Parameter *t* of the spacing
function f(t) varies from 0.0 to 1.0 within a shape range.
Examples:
class StdMeshersBuilder_UseExisting_1D(Mesh_Algorithm):
""" Defines a stub 1D algorithm, which enables "manual" creation of nodes and
- segments usable by 2D algorithms
+ segments usable by 2D algorithms.
It is created by calling smeshBuilder.Mesh.UseExistingSegments(geom=0)
"""
"""
type of algorithm used with helper function in smeshBuilder.Mesh class
"""
- docHelper = "Creates 1D algorithm allowing batch meshing of edges"
+ docHelper = "Create 1D algorithm allowing batch meshing of edges"
"""
doc string of the method
"""
class StdMeshersBuilder_UseExisting_2D(Mesh_Algorithm):
""" Defines a stub 2D algorithm, which enables "manual" creation of nodes and
- faces usable by 3D algorithms
+ faces usable by 3D algorithms.
It is created by calling smeshBuilder.Mesh.UseExistingFaces(geom=0)
"""
"""
type of algorithm used with helper function in smeshBuilder.Mesh class
"""
- docHelper = "Creates 2D algorithm allowing batch meshing of faces"
+ docHelper = "Create 2D algorithm allowing batch meshing of faces"
"""
doc string of the method
"""