Structured documentation¶
Creating meshes¶
|
Concatenate the given meshes into one mesh, optionally to meshToAppendTo. |
|
Create a mesh by copying a part of another mesh. |
Importing and exporting meshes¶
|
Create a Mesh object importing data from the given UNV file |
|
Create a Mesh object(s) importing data from the given MED file |
|
Create a Mesh object importing data from the given STL file |
|
Create Mesh objects importing data from the given CGNS file |
|
Create a Mesh object importing data from the given GMF file. |
|
Export the mesh in a file in MED format allowing to overwrite the file if it exists or add the exported data to its contents |
|
Export the mesh in a file in UNV format |
|
Export the mesh in a file in STL format |
|
Export the mesh in a file in CGNS format |
|
Export the mesh in a file in DAT format |
|
Export the mesh in a file in GMF format. |
Constructing meshes¶
|
Create a mesh. |
|
Set a name to the mesh |
|
Set priority of sub-meshes. |
|
Compute the mesh and return the status of the computation |
|
Evaluate size of prospective mesh on a shape |
|
Remove all nodes and elements generated on geometry. |
Return the mesh, that is an encapsulated instance of |
|
Return the shape associated to the mesh |
|
Return |
|
|
Return a list of error messages ( |
|
Return errors of hypotheses definition. |
|
Return a list of sub-shapes meshing of which failed, grouped into GEOM groups by error of an algorithm |
Return sub-mesh objects list in meshing order |
Defining Algorithms¶
|
Create segment 1D algorithm for edges |
|
Create quadrangle 1D-2D algorithm for faces |
|
Create hexahedron 3D algorithm for volumes |
|
Create prism 3D algorithm for volumes |
|
Create Body Fitting 3D algorithm for volumes |
|
Create projection 1D algorithm for edges |
|
Create projection 2D algorithm for faces |
|
Create projection 1D-2D algorithm for faces |
|
Create projection 3D algorithm for volumes |
|
Create 1D algorithm for edges with reusing of existing mesh elements |
|
Create 1D-2D algorithm for faces with reusing of existing mesh elements |
|
Create 1D algorithm allowing batch meshing of edges |
|
Create 2D algorithm allowing batch meshing of faces |
|
Compute a tetrahedral mesh using AutomaticLength + Triangle + Tetrahedron |
|
Compute an hexahedral mesh using AutomaticLength + Quadrangle + Hexahedron |
The base class to define meshing algorithms |
Defining hypotheses¶
1D Meshing Hypotheses¶
Defines “NumberOfSegments” hypothesis to cut an edge in a fixed number of segments |
|
Defines “LocalLength” hypothesis to cut an edge in several segments with the same length |
|
|
Defines “MaxSize” hypothesis to cut an edge into segments not longer than given value |
Defines “Arithmetic1D” hypothesis to cut an edge in several segments with a length |
|
Defines “GeometricProgression” hypothesis to cut an edge in several |
|
Defines “FixedPoints1D” hypothesis to cut an edge using parameter |
|
Defines “StartEndLength” hypothesis to cut an edge in several segments with increasing geometric length |
|
|
Defines “Adaptive” hypothesis to cut an edge into segments keeping segment size within the given range and considering (1) deflection of segments from the edge and (2) distance from segments to closest edges and faces to have segment length not longer than two times shortest distances to edges and faces. |
Defines “Deflection1D” hypothesis |
|
Defines “AutomaticLength” hypothesis |
|
Defines “PythonSplit1D” hypothesis |
2D Meshing Hypotheses¶
Defines “QuadrangleParameters” hypothesis |
|
Defines “QuadrangleParams” hypothesis with a type of quadrangulation that only |
|
Defines “QuadrangleParams” hypothesis with a type of quadrangulation that only |
|
Defines “QuadrangleParams” hypothesis with a type of quadrangulation that only |
|
Defines “QuadrangleParams” hypothesis with QUAD_STANDARD type of quadrangulation |
Additional Hypotheses¶
Defines “ViscousLayers” hypothesis to give parameters of layers of prisms to build near mesh boundary. |
|
Defines “ViscousLayers2D” hypothesis to give parameters of layers of quadrilateral elements to build near mesh boundary. |
|
Defines “Propagation” hypothesis that propagates 1D hypotheses |
|
|
Defines “Propagation of Node Distribution” hypothesis that propagates |
Defines “QuadraticMesh” hypothesis, forcing construction of quadratic edges. |
Constructing sub-meshes¶
|
Get a sub-mesh object associated to a geom geometrical object. |
|
Remove all nodes and elements of indicated shape |
Editing Meshes¶
|
Assign a hypothesis |
|
Unassign a hypothesis |
Remove all global hypotheses |
|
|
Get the list of hypotheses added on a geometry |
|
Return True if an algorithm or hypothesis is assigned to a given shape |
Grouping elements¶
|
Toggle auto color mode on the object. |
Get flag of object auto color mode. |
|
Check the group names for duplications. |
Creating groups¶
|
Create an empty standalone mesh group |
|
Create a mesh group based on the geometric object grp and give it a name. |
|
Create a mesh group based on the geometrical object grp and give it a name. |
|
Create a mesh group with given name based on the filter. |
|
Create a mesh group by the given ids of elements |
|
Create a mesh group by the given conditions |
|
Create a mesh group by the given criterion |
|
Create a mesh group by the given criteria (list of |
|
Create a mesh group by the given filter |
|
Distribute all faces of the mesh among groups using sharp edges and optionally existing 1D elements as group boundaries. |
|
Create a standalone group of entities basing on nodes of other groups. |
|
Convert group on geom into standalone group |
|
Get the list of groups existing in the mesh in the order of creation (starting from the oldest one) |
Get the number of groups existing in the mesh |
|
Get the list of names of groups existing in the mesh |
|
|
Find groups by name and type |
Operations on groups¶
|
Produce a union of two groups. |
|
Produce a union list of groups. |
|
Prodice an intersection of two groups. |
|
Produce an intersection of groups. |
|
Produce a cut of two groups. |
|
Produce a cut of groups. |
Deleting Groups¶
|
Remove a group |
|
Remove a group with its contents |
Mesh Information¶
Get the mesh statistic. |
|
Return a smeshBuilder instance created this mesh |
|
Return a geomBuilder instance |
|
|
Return a geometrical object on which the given element was built. |
Return the mesh dimension depending on the dimension of the underlying shape or, if the mesh is not based on any shape, basing on deimension of elements |
|
|
Get the mesh statistic. |
Return the number of nodes in the mesh |
|
Return the number of elements in the mesh |
|
Return the number of 0d elements in the mesh |
|
Return the number of ball discrete elements in the mesh |
|
Return the number of edges in the mesh |
|
|
Return the number of edges with the given order in the mesh |
Return the number of faces in the mesh |
|
|
Return the number of faces with the given order in the mesh |
Return the number of triangles in the mesh |
|
|
Return the number of triangles with the given order in the mesh |
Return the number of biquadratic triangles in the mesh |
|
Return the number of quadrangles in the mesh |
|
|
Return the number of quadrangles with the given order in the mesh |
Return the number of biquadratic quadrangles in the mesh |
|
|
Return the number of polygons of given order in the mesh |
Return the number of volumes in the mesh |
|
|
Return the number of volumes with the given order in the mesh |
Return the number of tetrahedrons in the mesh |
|
|
Return the number of tetrahedrons with the given order in the mesh |
Return the number of hexahedrons in the mesh |
|
|
Return the number of hexahedrons with the given order in the mesh |
Return the number of triquadratic hexahedrons in the mesh |
|
Return the number of pyramids in the mesh |
|
|
Return the number of pyramids with the given order in the mesh |
Return the number of prisms in the mesh |
|
|
Return the number of prisms with the given order in the mesh |
Return the number of hexagonal prisms in the mesh |
|
Return the number of polyhedrons in the mesh |
|
Return the number of submeshes in the mesh |
|
Return the list of mesh nodes IDs |
|
Return the list of all mesh elements IDs |
|
|
Return the list of IDs of mesh elements with the given type |
|
Return the type of mesh element or node |
Return the geometric type of mesh element |
|
Return the shape type of mesh element |
|
|
Return the list of sub-mesh elements IDs |
|
Return the list of sub-mesh nodes IDs |
|
Return type of elements on given shape |
|
Get XYZ coordinates of a node. |
|
Return list of IDs of inverse elements for the given node. |
|
Return the position of a node on the shape |
|
Return the position of an element on the shape |
|
Return the ID of the shape, on which the given node was generated. |
Return the ID of the shape, on which the given element was generated. |
|
Return the number of nodes of the given element |
|
|
Return the node ID the given (zero based) index for the given element. |
Return the IDs of nodes of the given element |
|
|
Return true if the given node is the medium node in the given quadratic element |
|
Return true if the given node is the medium node in one of quadratic elements |
|
Return the number of edges for the given element |
|
Return the number of faces for the given element |
|
Return nodes of given face (counted from zero) for given volumic element. |
|
Return three components of normal of given mesh face (or an empty array in KO case) |
|
Return an element based on all given nodes. |
|
Return elements including all given nodes. |
|
Return true if the given element is a polygon |
|
Return true if the given element is quadratic |
Return diameter of a ball discrete element or zero in case of an invalid id |
|
|
Return XYZ coordinates of the barycenter of the given element. |
|
Find the node closest to a point |
|
Find the elements where a point lays IN or ON |
|
Return point state in a closed 2D mesh in terms of TopAbs_State enumeration: smesh.TopAbs_IN, smesh.TopAbs_OUT, smesh.TopAbs_ON and smesh.TopAbs_UNKNOWN. |
|
Partition given 1D elements into groups of contiguous edges. |
Get the mesh description |
Quality controls and Filtering¶
Create an empty criterion |
|
|
Create a criterion by the given parameters Criterion structures allow to define complex filters by combining them with logical operations (AND / OR) (see example below) |
|
Create a filter with the given parameters |
|
Create a filter from criteria |
|
Create a numerical functor by its type |
|
Pass mesh elements through the given filter and return IDs of fitting elements |
|
Get maximum element length. |
|
Get aspect ratio of 2D or 3D element. |
|
Get warping angle of 2D element. |
|
Get minimum angle of 2D element. |
|
Get taper of 2D element. |
|
Get skew of 2D element. |
|
Return minimal and maximal value of a given functor. |
Check if a 2D mesh is manifold |
|
Check if orientation of 2D elements is coherent |
Measurements¶
|
Get minimum distance between two objects |
|
Get |
|
Get bounding box of the specified object(s) |
|
Get |
Get sum of lengths of all 1D elements in the mesh object. |
|
|
Get sum of areas of all 2D elements in the mesh object. |
Get sum of volumes of all 3D elements in the mesh object. |
|
|
Computes a radian measure of an angle defined by 3 points: <(p1,p2,p3) |
Verify whether a 2D mesh element has free edges (edges connected to one face only). |
|
|
Get minimum distance between two nodes, elements or distance to the origin |
|
Get |
|
Get bounding box of the specified object(s) |
|
Get |
|
Return a cached numerical functor by its type. |
|
Return value of a functor for a given element |
|
Get length of given 1D elements or of all 1D mesh elements |
|
Get area of given 2D elements or of all 2D mesh elements |
|
Get volume of given 3D elements or of all 3D mesh elements |
|
Computes a radian measure of an angle defined by 3 nodes: <(node1,node2,node3) |
Modifying meshes¶
Create a pattern mapper. |
|
Obtain the mesh editor tool |
Adding nodes and elements¶
|
Add a node to the mesh by coordinates |
|
Create a 0D element on a node with given number. |
|
Create 0D elements on all nodes of the given elements except those nodes on which a 0D element already exists. |
|
Create a ball element on a node with given ID. |
|
Create a linear or quadratic edge (this is determined by the number of given nodes). |
|
Create a linear or quadratic face (this is determined by the number of given nodes). |
|
Add a polygonal face defined by a list of node IDs |
|
Add a quadratic polygonal face defined by a list of node IDs |
|
Create both simple and quadratic volume (this is determined by the number of given nodes). |
|
Create a volume of many faces, giving nodes for each face. |
|
Create a volume of many faces, giving the IDs of the existing faces. |
|
Bind a node to a vertex |
|
Store the node position on an edge |
|
Store node position on a face |
|
Bind a node to a solid |
|
Bind an element to a shape |
Create 2D mesh as skin on boundary faces of a 3D mesh |
|
|
Create missing boundary elements |
|
Create missing boundary elements around either the whole mesh or groups of elements |
|
Append given meshes into this mesh. |
If during the last operation of |
|
If during the last operation of |
|
Forget what nodes and elements were created by the last mesh edition operation |
Removing nodes and elements¶
|
Remove the elements from the mesh by ids |
|
Remove nodes from mesh by ids |
|
Remove a node along with changing surrounding faces to cover a hole. |
Remove all orphan (free) nodes from mesh |
Modifying nodes and elements¶
|
Move the node with the given id |
|
Find the node closest to a point and moves it to a point location |
|
Find the node closest to a point and moves it to a point location |
|
Set new nodes for the given element. |
Convert to/from Quadratic Mesh¶
|
Convert the mesh to quadratic or bi-quadratic, deletes old elements, replacing them with quadratic with the same id. |
|
Convert the mesh from quadratic to ordinary, deletes old quadratic elements, replacing them with ordinary mesh elements with the same id. |
Extrusion and Revolution¶
|
Generate new elements by rotation of the given elements and nodes around the axis |
|
Generate new elements by rotation of the elements around the axis |
|
Generate new elements by rotation of the elements of object around the axis theObject object which elements should be sweeped. |
|
Generate new elements by rotation of the elements of object around the axis theObject object which elements should be sweeped. |
|
Generate new elements by rotation of the elements of object around the axis theObject object which elements should be sweeped. |
|
Generate new elements by extrusion of the given elements and nodes |
|
Generate new elements by extrusion of the elements with given ids |
|
Generate new elements by extrusion along the normal to a discretized surface or wire |
|
Generate new elements by extrusion of the elements or nodes which belong to the object |
|
Generate new elements by extrusion of edges which belong to the object |
|
Generate new elements by extrusion of faces which belong to the object |
|
Generate new elements by extrusion of the elements with given ids |
|
Generate new elements by extrusion of the given elements and nodes along the path. |
|
Generate new elements by extrusion of the given elements. |
|
Generate new elements by extrusion of the given elements. |
|
Generate new elements by extrusion of the elements which belong to the object. |
|
Generate new elements by extrusion of mesh segments which belong to the object. |
|
Generate new elements by extrusion of faces which belong to the object. |
Transforming meshes (Translation, Rotation, Symmetry, Sewing, Merging)¶
|
Create a symmetrical copy of mesh elements |
|
Create a new mesh by a symmetrical copy of mesh elements |
|
Create a symmetrical copy of the object |
|
Create a new mesh by a symmetrical copy of the object |
|
Translate the elements |
|
Create a new mesh of translated elements |
|
Translate the object |
|
Create a new mesh from the translated object |
|
Rotate the elements |
|
Create a new mesh of rotated elements |
|
Rotate the object |
|
Create a new mesh from the rotated object |
|
Find groups of adjacent nodes within Tolerance. |
|
Find groups of adjacent nodes within Tolerance. |
|
Merge nodes |
Find the elements built on the same nodes. |
|
|
Merge elements in each given group. |
Leave one element and remove all other elements built on the same nodes. |
|
|
Returns all or only closed free borders |
|
Fill with 2D elements a hole defined by a SMESH.FreeBorder. |
|
Return groups of FreeBorder’s coincident within the given tolerance. |
|
Sew FreeBorder’s of each group |
|
Sew free borders |
|
Sew conform free borders |
Sew border to side |
|
|
Sew two sides of a mesh. |
Changing orientation of elements¶
|
Reorient elements by ids |
|
Reorient all elements of the object |
|
Reorient faces contained in the2DObject. |
|
Reorient faces contained in a list of objectFaces equally to faces contained in a list of referenceFaces. |
|
Reorient faces according to adjacent volumes. |
Uniting triangles¶
|
Replace two neighbour triangles sharing Node1-Node2 link with a quadrangle built on the same 4 nodes. |
|
Fuse the neighbouring triangles into quadrangles. |
|
Fuse the neighbouring triangles of the object into quadrangles |
Cutting elements¶
|
Replace two neighbour triangles sharing Node1-Node2 link with the triangles built on the same 4 nodes but having other common link. |
|
Split quadrangles into triangles. |
|
Split quadrangles into triangles. |
|
Split each of given quadrangles into 4 triangles. |
|
Split quadrangles into triangles. |
|
Split quadrangles into triangles. |
|
Find a better splitting of the given quadrangle. |
|
Split volumic elements into tetrahedrons |
|
Split bi-quadratic elements into linear ones without creation of additional nodes: |
|
Split hexahedra into prisms |
Split quadrangle faces near triangular facets of volumes |
|
|
Split hexahedrons into tetrahedrons. |
|
Split hexahedrons into prisms. |
|
Replace each triangle bound by Node1-Node2 segment with two triangles by connecting a node made on the link with a node opposite to the link. |
|
Split a face into triangles by adding a new node onto the face and connecting the new node with face nodes |
Smoothing¶
|
Smooth elements |
|
Smooth elements which belong to the given object |
|
Parametrically smooth the given elements |
|
Parametrically smooth the elements which belong to the given object |
Duplication of nodes and elements (to emulate cracks)¶
|
Create duplicates of given elements, i.e. create new elements based on the same nodes as the given ones. |
|
Create a hole in a mesh by doubling the nodes of some particular elements |
|
Create a hole in a mesh by doubling the nodes of some particular elements. |
|
Create a hole in a mesh by doubling the nodes of some particular elements. |
|
Create a hole in a mesh by doubling the nodes of some particular elements. |
|
Create a hole in a mesh by doubling the nodes of some particular elements |
|
Create a hole in a mesh by doubling the nodes of some particular elements |
|
Create a hole in a mesh by doubling the nodes of some particular elements. |
|
Create a hole in a mesh by doubling the nodes of some particular elements. |
|
Create a hole in a mesh by doubling the nodes of some particular elements. |
|
Create a hole in a mesh by doubling the nodes of some particular elements. |
|
Identify the elements that will be affected by node duplication (actual duplication is not performed). |
Double nodes on shared faces between groups of volumes and create flat elements on demand. |
|
Double nodes on some external faces and create flat elements. |
Renumbering nodes and elements¶
Renumber mesh nodes to remove unused node IDs |
|
Renumber mesh elements to remove unused element IDs |
Auxiliary methods¶
|
Return a name of an object |
|
Convert an angle from degrees to radians |
|
Create a new smeshBuilder instance. |