This class allows defining and managing a mesh. More...
Public Member Functions | |
| def | __init__ |
| Constructor. | |
| def | SetMesh |
| Initializes the Mesh object from an instance of SMESH_Mesh interface. | |
| def | GetMesh |
| Returns the mesh, that is an instance of SMESH_Mesh interface. | |
| def | GetName |
| Gets the name of the mesh. | |
| def | SetName |
| Sets a name to the mesh. | |
| def | GetSubMesh |
| Gets the subMesh object associated to a theSubObject geometrical object. | |
| def | GetShape |
| Returns the shape associated to the mesh. | |
| def | SetShape |
| Associates the given shape to the mesh (entails the recreation of the mesh) | |
| def | IsReadyToCompute |
| Returns true if the hypotheses are defined well. | |
| def | GetAlgoState |
| Returns errors of hypotheses definition. | |
| def | GetGeometryByMeshElement |
| Returns a geometrical object on which the given element was built. | |
| def | MeshDimension |
| Returns the mesh dimension depending on the dimension of the underlying shape. | |
| def | Segment |
| Creates a segment discretization 1D algorithm. | |
| def | UseExisting1DElements |
| Creates 1D algorithm importing segments conatined in groups of other mesh. | |
| def | UseExisting2DElements |
| Creates 2D algorithm importing faces conatined in groups of other mesh. | |
| def | UseExistingSegments |
| Enables creation of nodes and segments usable by 2D algoritms. | |
| def | UseExistingFaces |
| Enables creation of nodes and faces usable by 3D algoritms. | |
| def | Triangle |
| Creates a triangle 2D algorithm for faces. | |
| def | Quadrangle |
| Creates a quadrangle 2D algorithm for faces. | |
| def | Tetrahedron |
| Creates a tetrahedron 3D algorithm for solids. | |
| def | Hexahedron |
| Creates a hexahedron 3D algorithm for solids. | |
| def | Netgen |
| Deprecated, used only for compatibility! | |
| def | Projection1D |
| Creates a projection 1D algorithm for edges. | |
| def | Projection2D |
| Creates a projection 2D algorithm for faces. | |
| def | Projection3D |
| Creates a projection 3D algorithm for solids. | |
| def | Prism |
| Creates a 3D extrusion (Prism 3D) or RadialPrism 3D algorithm for solids. | |
| def | Evaluate |
| Evaluates size of prospective mesh on a shape. | |
| def | Compute |
| Computes the mesh and returns the status of the computation. | |
| def | GetMeshOrder |
| Return submesh objects list in meshing order. | |
| def | SetMeshOrder |
| Return submesh objects list in meshing order. | |
| def | Clear |
| Removes all nodes and elements. | |
| def | ClearSubMesh |
| Removes all nodes and elements of indicated shape. | |
| def | AutomaticTetrahedralization |
| Computes a tetrahedral mesh using AutomaticLength + MEFISTO + NETGEN. | |
| def | AutomaticHexahedralization |
| Computes an hexahedral mesh using AutomaticLength + Quadrangle + Hexahedron. | |
| def | AddHypothesis |
| Assigns a hypothesis. | |
| def | RemoveHypothesis |
| Unassigns a hypothesis. | |
| def | GetHypothesisList |
| Gets the list of hypotheses added on a geometry. | |
| def | RemoveGlobalHypotheses |
| Removes all global hypotheses. | |
| def | ExportToMED |
| Deprecated, used only for compatibility! Please, use ExportToMEDX() method instead. | |
| def | ExportMED |
| Exports the mesh in a file in MED format and chooses the version of MED format allowing to overwrite the file if it exists or add the exported data to its contents. | |
| def | ExportDAT |
| Exports the mesh in a file in DAT format. | |
| def | ExportUNV |
| Exports the mesh in a file in UNV format. | |
| def | ExportSTL |
| Export the mesh in a file in STL format. | |
| def | CreateEmptyGroup |
| Creates an empty mesh group. | |
| def | Group |
| Creates a mesh group based on the geometric object grp and gives a name, if this parameter is not defined the name is the same as the geometric group name Note: Works like GroupOnGeom(). | |
| def | GroupOnGeom |
| Creates a mesh group based on the geometrical object grp and gives a name, if this parameter is not defined the name is the same as the geometrical group name. | |
| def | MakeGroupByIds |
| Creates a mesh group by the given ids of elements. | |
| def | MakeGroup |
| Creates a mesh group by the given conditions. | |
| def | MakeGroupByCriterion |
| Creates a mesh group by the given criterion. | |
| def | MakeGroupByCriteria |
| Creates a mesh group by the given criteria (list of criteria) | |
| def | MakeGroupByFilter |
| Creates a mesh group by the given filter. | |
| def | GetIdsFromFilter |
| Passes mesh elements through the given filter and return IDs of fitting elements. | |
| def | GetFreeBorders |
| Verifies whether a 2D mesh element has free edges (edges connected to one face only) Returns a list of special structures (borders). | |
| def | RemoveGroup |
| Removes a group. | |
| def | RemoveGroupWithContents |
| Removes a group with its contents. | |
| def | GetGroups |
| Gets the list of groups existing in the mesh. | |
| def | NbGroups |
| Gets the number of groups existing in the mesh. | |
| def | GetGroupNames |
| Gets the list of names of groups existing in the mesh. | |
| def | UnionGroups |
| Produces a union of two groups A new group is created. | |
| def | UnionListOfGroups |
| Produces a union list of groups New group is created. | |
| def | IntersectGroups |
| Prodices an intersection of two groups A new group is created. | |
| def | IntersectListOfGroups |
| Produces an intersection of groups New group is created. | |
| def | CutGroups |
| Produces a cut of two groups A new group is created. | |
| def | CutListOfGroups |
| Produces a cut of groups A new group is created. | |
| def | CreateDimGroup |
| Produces a group of elements of specified type using list of existing groups A new group is created. | |
| def | ConvertToStandalone |
| Convert group on geom into standalone group. | |
| def | GetLog |
| Returns the log of nodes and elements added or removed since the previous clear of the log. | |
| def | ClearLog |
| Clears the log of nodes and elements added or removed since the previous clear. | |
| def | SetAutoColor |
| Toggles auto color mode on the object. | |
| def | GetAutoColor |
| Gets flag of object auto color mode. | |
| def | GetId |
| Gets the internal ID. | |
| def | GetStudyId |
| Get the study Id. | |
| def | HasDuplicatedGroupNamesMED |
| Checks the group names for duplications. | |
| def | GetMeshEditor |
| Obtains the mesh editor tool. | |
| def | GetIDSource |
| Wrap a list of IDs of elements or nodes into SMESH_IDSource which can be passed as argument to accepting mesh, group or sub-mesh. | |
| def | GetMEDMesh |
| Gets MED Mesh. | |
| def | GetMeshInfo |
| Gets the mesh stattistic. | |
| def | NbNodes |
| Returns the number of nodes in the mesh. | |
| def | NbElements |
| Returns the number of elements in the mesh. | |
| def | Nb0DElements |
| Returns the number of 0d elements in the mesh. | |
| def | NbEdges |
| Returns the number of edges in the mesh. | |
| def | NbEdgesOfOrder |
| Returns the number of edges with the given order in the mesh. | |
| def | NbFaces |
| Returns the number of faces in the mesh. | |
| def | NbFacesOfOrder |
| Returns the number of faces with the given order in the mesh. | |
| def | NbTriangles |
| Returns the number of triangles in the mesh. | |
| def | NbTrianglesOfOrder |
| Returns the number of triangles with the given order in the mesh. | |
| def | NbQuadrangles |
| Returns the number of quadrangles in the mesh. | |
| def | NbQuadranglesOfOrder |
| Returns the number of quadrangles with the given order in the mesh. | |
| def | NbPolygons |
| Returns the number of polygons in the mesh. | |
| def | NbVolumes |
| Returns the number of volumes in the mesh. | |
| def | NbVolumesOfOrder |
| Returns the number of volumes with the given order in the mesh. | |
| def | NbTetras |
| Returns the number of tetrahedrons in the mesh. | |
| def | NbTetrasOfOrder |
| Returns the number of tetrahedrons with the given order in the mesh. | |
| def | NbHexas |
| Returns the number of hexahedrons in the mesh. | |
| def | NbHexasOfOrder |
| Returns the number of hexahedrons with the given order in the mesh. | |
| def | NbPyramids |
| Returns the number of pyramids in the mesh. | |
| def | NbPyramidsOfOrder |
| Returns the number of pyramids with the given order in the mesh. | |
| def | NbPrisms |
| Returns the number of prisms in the mesh. | |
| def | NbPrismsOfOrder |
| Returns the number of prisms with the given order in the mesh. | |
| def | NbPolyhedrons |
| Returns the number of polyhedrons in the mesh. | |
| def | NbSubMesh |
| Returns the number of submeshes in the mesh. | |
| def | GetElementsId |
| Returns the list of mesh elements IDs. | |
| def | GetElementsByType |
| Returns the list of IDs of mesh elements with the given type. | |
| def | GetNodesId |
| Returns the list of mesh nodes IDs. | |
| def | GetElementType |
| Returns the type of mesh element. | |
| def | GetElementGeomType |
| Returns the geometric type of mesh element. | |
| def | GetSubMeshElementsId |
| Returns the list of submesh elements IDs. | |
| def | GetSubMeshNodesId |
| Returns the list of submesh nodes IDs. | |
| def | GetSubMeshElementType |
| Returns type of elements on given shape. | |
| def | Dump |
| Gets the mesh description. | |
| def | GetNodeXYZ |
| Gets XYZ coordinates of a node If there is no nodes for the given ID - returns an empty list. | |
| def | GetNodeInverseElements |
| Returns list of IDs of inverse elements for the given node If there is no node for the given ID - returns an empty list. | |
| def | GetNodePosition |
| Returns the position of a node on the shape. | |
| def | GetShapeID |
| If the given element is a node, returns the ID of shape If there is no node for the given ID - returns -1. | |
| def | GetShapeIDForElem |
| Returns the ID of the result shape after FindShape() from SMESH_MeshEditor for the given element If there is no element for the given ID - returns -1. | |
| def | GetElemNbNodes |
| Returns the number of nodes for the given element If there is no element for the given ID - returns -1. | |
| def | GetElemNode |
| Returns the node ID the given index for the given element If there is no element for the given ID - returns -1 If there is no node for the given index - returns -2. | |
| def | GetElemNodes |
| Returns the IDs of nodes of the given element. | |
| def | IsMediumNode |
| Returns true if the given node is the medium node in the given quadratic element. | |
| def | IsMediumNodeOfAnyElem |
| Returns true if the given node is the medium node in one of quadratic elements. | |
| def | ElemNbEdges |
| Returns the number of edges for the given element. | |
| def | ElemNbFaces |
| Returns the number of faces for the given element. | |
| def | GetElemFaceNodes |
| Returns nodes of given face (counted from zero) for given volumic element. | |
| def | FindElementByNodes |
| Returns an element based on all given nodes. | |
| def | IsPoly |
| Returns true if the given element is a polygon. | |
| def | IsQuadratic |
| Returns true if the given element is quadratic. | |
| def | BaryCenter |
| Returns XYZ coordinates of the barycenter of the given element If there is no element for the given ID - returns an empty list. | |
| def | MinDistance |
| Get minimum distance between two nodes, elements or distance to the origin. | |
| def | GetMinDistance |
| Get measure structure specifying minimum distance data between two objects. | |
| def | BoundingBox |
| Get bounding box of the specified object(s) | |
| def | GetBoundingBox |
| Get measure structure specifying bounding box data of the specified object(s) | |
| def | RemoveElements |
| Removes the elements from the mesh by ids. | |
| def | RemoveNodes |
| Removes nodes from mesh by ids. | |
| def | RemoveOrphanNodes |
| Removes all orphan (free) nodes from mesh. | |
| def | AddNode |
| Add a node to the mesh by coordinates. | |
| def | Add0DElement |
| Creates a 0D element on a node with given number. | |
| def | AddEdge |
| Creates a linear or quadratic edge (this is determined by the number of given nodes). | |
| def | AddFace |
| Creates a linear or quadratic face (this is determined by the number of given nodes). | |
| def | AddPolygonalFace |
| Adds a polygonal face to the mesh by the list of node IDs. | |
| def | AddVolume |
| Creates both simple and quadratic volume (this is determined by the number of given nodes). | |
| def | AddPolyhedralVolume |
| Creates a volume of many faces, giving nodes for each face. | |
| def | AddPolyhedralVolumeByFaces |
| Creates a volume of many faces, giving the IDs of the existing faces. | |
| def | SetNodeOnVertex |
| Binds a node to a vertex. | |
| def | SetNodeOnEdge |
| Stores the node position on an edge. | |
| def | SetNodeOnFace |
| Stores node position on a face. | |
| def | SetNodeInVolume |
| Binds a node to a solid. | |
| def | SetMeshElementOnShape |
| Bind an element to a shape. | |
| def | MoveNode |
| Moves the node with the given id. | |
| def | MoveClosestNodeToPoint |
| Finds the node closest to a point and moves it to a point location. | |
| def | FindNodeClosestTo |
| Finds the node closest to a point. | |
| def | FindElementsByPoint |
| Finds the elements where a point lays IN or ON. | |
| def | GetPointState |
| def | MeshToPassThroughAPoint |
| Finds the node closest to a point and moves it to a point location. | |
| def | InverseDiag |
| Replaces two neighbour triangles sharing Node1-Node2 link with the triangles built on the same 4 nodes but having other common link. | |
| def | DeleteDiag |
| Replaces two neighbour triangles sharing Node1-Node2 link with a quadrangle built on the same 4 nodes. | |
| def | Reorient |
| Reorients elements by ids. | |
| def | ReorientObject |
| Reorients all elements of the object. | |
| def | TriToQuad |
| Fuses the neighbouring triangles into quadrangles. | |
| def | TriToQuadObject |
| Fuses the neighbouring triangles of the object into quadrangles. | |
| def | QuadToTri |
| Splits quadrangles into triangles. | |
| def | QuadToTriObject |
| Splits quadrangles into triangles. | |
| def | SplitQuad |
| Splits quadrangles into triangles. | |
| def | SplitQuadObject |
| Splits quadrangles into triangles. | |
| def | BestSplit |
| Finds a better splitting of the given quadrangle. | |
| def | SplitVolumesIntoTetra |
| Splits volumic elements into tetrahedrons. | |
| def | SplitQuadsNearTriangularFacets |
| Splits quadrangle faces near triangular facets of volumes. | |
| def | SplitHexaToTetras |
| Splits hexahedrons into tetrahedrons. | |
| def | SplitHexaToPrisms |
| Split hexahedrons into prisms. | |
| def | Smooth |
| Smoothes elements. | |
| def | SmoothObject |
| Smoothes elements which belong to the given object. | |
| def | SmoothParametric |
| Parametrically smoothes the given elements. | |
| def | SmoothParametricObject |
| Parametrically smoothes the elements which belong to the given object. | |
| def | ConvertToQuadratic |
| Converts the mesh to quadratic, deletes old elements, replacing them with quadratic with the same id. | |
| def | ConvertFromQuadratic |
| Converts the mesh from quadratic to ordinary, deletes old quadratic elements, replacing them with ordinary mesh elements with the same id. | |
| def | Make2DMeshFrom3D |
| Creates 2D mesh as skin on boundary faces of a 3D mesh. | |
| def | MakeBoundaryMesh |
| Creates missing boundary elements. | |
| def | MakeBoundaryElements |
| Creates missing boundary elements around either the whole mesh or groups of 2D elements. | |
| def | RenumberNodes |
| Renumber mesh nodes. | |
| def | RenumberElements |
| Renumber mesh elements. | |
| def | RotationSweep |
| Generates new elements by rotation of the elements around the axis. | |
| def | RotationSweepObject |
| Generates new elements by rotation of the elements of object around the axis. | |
| def | RotationSweepObject1D |
| Generates new elements by rotation of the elements of object around the axis. | |
| def | RotationSweepObject2D |
| Generates new elements by rotation of the elements of object around the axis. | |
| def | ExtrusionSweep |
| Generates new elements by extrusion of the elements with given ids. | |
| def | AdvancedExtrusion |
| Generates new elements by extrusion of the elements with given ids. | |
| def | ExtrusionSweepObject |
| Generates new elements by extrusion of the elements which belong to the object. | |
| def | ExtrusionSweepObject1D |
| Generates new elements by extrusion of the elements which belong to the object. | |
| def | ExtrusionSweepObject2D |
| Generates new elements by extrusion of the elements which belong to the object. | |
| def | ExtrusionAlongPathX |
| Generates new elements by extrusion of the given elements The path of extrusion must be a meshed edge. | |
| def | ExtrusionAlongPath |
| Generates new elements by extrusion of the given elements The path of extrusion must be a meshed edge. | |
| def | ExtrusionAlongPathObject |
| Generates new elements by extrusion of the elements which belong to the object The path of extrusion must be a meshed edge. | |
| def | ExtrusionAlongPathObject1D |
| Generates new elements by extrusion of the elements which belong to the object The path of extrusion must be a meshed edge. | |
| def | ExtrusionAlongPathObject2D |
| Generates new elements by extrusion of the elements which belong to the object The path of extrusion must be a meshed edge. | |
| def | Mirror |
| Creates a symmetrical copy of mesh elements. | |
| def | MirrorMakeMesh |
| Creates a new mesh by a symmetrical copy of mesh elements. | |
| def | MirrorObject |
| Creates a symmetrical copy of the object. | |
| def | MirrorObjectMakeMesh |
| Creates a new mesh by a symmetrical copy of the object. | |
| def | Translate |
| Translates the elements. | |
| def | TranslateMakeMesh |
| Creates a new mesh of translated elements. | |
| def | TranslateObject |
| Translates the object. | |
| def | TranslateObjectMakeMesh |
| Creates a new mesh from the translated object. | |
| def | Scale |
| Scales the object. | |
| def | ScaleMakeMesh |
| Creates a new mesh from the translated object. | |
| def | Rotate |
| Rotates the elements. | |
| def | RotateMakeMesh |
| Creates a new mesh of rotated elements. | |
| def | RotateObject |
| Rotates the object. | |
| def | RotateObjectMakeMesh |
| Creates a new mesh from the rotated object. | |
| def | FindCoincidentNodes |
| Finds groups of ajacent nodes within Tolerance. | |
| def | FindCoincidentNodesOnPart |
| Finds groups of ajacent nodes within Tolerance. | |
| def | MergeNodes |
| Merges nodes. | |
| def | FindEqualElements |
| Finds the elements built on the same nodes. | |
| def | MergeElements |
| Merges elements in each given group. | |
| def | MergeEqualElements |
| Leaves one element and removes all other elements built on the same nodes. | |
| def | SewFreeBorders |
| Sews free borders. | |
| def | SewConformFreeBorders |
| Sews conform free borders. | |
| def | SewBorderToSide |
| Sews border to side. | |
| def | SewSideElements |
| Sews two sides of a mesh. | |
| def | ChangeElemNodes |
| Sets new nodes for the given element. | |
| def | GetLastCreatedNodes |
| If during the last operation of MeshEditor some nodes were created, this method returns the list of their IDs, if new nodes were not created - returns empty list. | |
| def | GetLastCreatedElems |
| If during the last operation of MeshEditor some elements were created this method returns the list of their IDs, if new elements were not created - returns empty list. | |
| def | DoubleNodes |
| def | DoubleNode |
| Creates a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above. | |
| def | DoubleNodeGroup |
| Creates a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above. | |
| def | DoubleNodeGroups |
| Creates a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above. | |
| def | DoubleNodeElem |
| Creates a hole in a mesh by doubling the nodes of some particular elements. | |
| def | DoubleNodeElemInRegion |
| Creates a hole in a mesh by doubling the nodes of some particular elements. | |
| def | DoubleNodeElemGroup |
| Creates a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above. | |
| def | DoubleNodeElemGroupInRegion |
| Creates a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above. | |
| def | DoubleNodeElemGroups |
| Creates a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above. | |
| def | DoubleNodeElemGroupsInRegion |
| Creates a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above. | |
| def | DoubleNodesOnGroupBoundaries |
| Double nodes on shared faces between groups of volumes and create flat elements on demand. | |
| def | CreateFlatElementsOnFacesGroups |
| Double nodes on some external faces and create flat elements. | |
| def | GetLength |
| Get length of 1D element. | |
| def | GetArea |
| Get area of 2D element. | |
| def | GetVolume |
| Get volume of 3D element. | |
| def | GetMaxElementLength |
| Get maximum element length. | |
| def | GetAspectRatio |
| Get aspect ratio of 2D or 3D element. | |
| def | GetWarping |
| Get warping angle of 2D element. | |
| def | GetMinimumAngle |
| Get minimum angle of 2D element. | |
| def | GetTaper |
| Get taper of 2D element. | |
| def | GetSkew |
| Get skew of 2D element. | |
Data Fields | |
| smeshpyD | |
| geompyD | |
| geom | |
| mesh | |
| editor | |
Static Public Attributes | |
| int | geom = 0 |
| int | mesh = 0 |
| int | editor = 0 |
Private Member Functions | |
| def | _groupTypeFromShape |
| Pivate method to get a type of group on geometry. | |
| def | _valueFromFunctor |
This class allows defining and managing a mesh.
It has a set of methods to build a mesh on the given geometry, including the definition of sub-meshes. It also has methods to define groups of mesh elements, to modify a mesh (by addition of new nodes and elements and by changing the existing entities), to get information about a mesh and to export a mesh into different formats.
Definition at line 1093 of file smeshDC.py.
| def smeshDC.Mesh._groupTypeFromShape | ( | self, | |
| shape | |||
| ) | [private] |
Pivate method to get a type of group on geometry.
Definition at line 1748 of file smeshDC.py.
01749 : 01750 tgeo = str(shape.GetShapeType()) 01751 if tgeo == "VERTEX": 01752 typ = NODE 01753 elif tgeo == "EDGE": 01754 typ = EDGE 01755 elif tgeo == "FACE" or tgeo == "SHELL": 01756 typ = FACE 01757 elif tgeo == "SOLID" or tgeo == "COMPSOLID": 01758 typ = VOLUME 01759 elif tgeo == "COMPOUND": 01760 sub = self.geompyD.SubShapeAll( shape, geompyDC.ShapeType["SHAPE"]) 01761 if not sub: 01762 raise ValueError,"_groupTypeFromShape(): empty geometric group or compound '%s'" % GetName(shape) 01763 return self._groupTypeFromShape( sub[0] ) 01764 else: 01765 raise ValueError, \ 01766 "_groupTypeFromShape(): invalid geometry '%s'" % GetName(shape) 01767 return typ
| def smeshDC.Mesh._valueFromFunctor | ( | self, | |
| funcType, | |||
| elemId | |||
| ) | [private] |
Definition at line 4186 of file smeshDC.py.
| def smeshDC.Mesh.BoundingBox | ( | self, | |
objects = None, |
|||
isElem = False |
|||
| ) |
Get bounding box of the specified object(s)
| objects | single source object or list of source objects or list of nodes/elements IDs |
| isElem | if objects is a list of IDs, True value in this parameters specifies that objects are elements, False specifies that objects are nodes |
Definition at line 2431 of file smeshDC.py.
| def smeshDC.Mesh.CreateFlatElementsOnFacesGroups | ( | self, | |
| theGroupsOfFaces | |||
| ) |
Double nodes on some external faces and create flat elements.
Flat elements are mainly used by some types of mechanic calculations.
Each group of the list must be constituted of faces. Triangles are transformed in prisms, and quadrangles in hexahedrons.
| theGroupsOfFaces | - list of groups of faces |
Definition at line 4183 of file smeshDC.py.
| def smeshDC.Mesh.DoubleNodes | ( | self, | |
| theNodes, | |||
| theModifiedElems | |||
| ) |
Definition at line 4053 of file smeshDC.py.
| def smeshDC.Mesh.DoubleNodesOnGroupBoundaries | ( | self, | |
| theDomains, | |||
| createJointElems | |||
| ) |
Double nodes on shared faces between groups of volumes and create flat elements on demand.
The list of groups must describe a partition of the mesh volumes. The nodes of the internal faces at the boundaries of the groups are doubled. In option, the internal faces are replaced by flat elements. Triangles are transformed in prisms, and quadrangles in hexahedrons.
| theDomains | - list of groups of volumes |
| createJointElems | - if TRUE, create the elements |
Definition at line 4173 of file smeshDC.py.
| def smeshDC.Mesh.Evaluate | ( | self, | |
geom = 0 |
|||
| ) |
Evaluates size of prospective mesh on a shape.
Definition at line 1407 of file smeshDC.py.
| def smeshDC.Mesh.GetBoundingBox | ( | self, | |
IDs = None, |
|||
isElem = False |
|||
| ) |
Get measure structure specifying bounding box data of the specified object(s)
| objects | single source object or list of source objects or list of nodes/elements IDs |
| isElem | if objects is a list of IDs, True value in this parameters specifies that objects are elements, False specifies that objects are nodes |
Definition at line 2445 of file smeshDC.py.
02446 : 02447 if IDs is None: 02448 IDs = [self.mesh] 02449 elif isinstance(IDs, tuple): 02450 IDs = list(IDs) 02451 if not isinstance(IDs, list): 02452 IDs = [IDs] 02453 if len(IDs) > 0 and isinstance(IDs[0], int): 02454 IDs = [IDs] 02455 srclist = [] 02456 for o in IDs: 02457 if isinstance(o, Mesh): 02458 srclist.append(o.mesh) 02459 elif hasattr(o, "_narrow"): 02460 src = o._narrow(SMESH.SMESH_IDSource) 02461 if src: srclist.append(src) 02462 pass 02463 elif isinstance(o, list): 02464 if isElem: 02465 srclist.append(self.editor.MakeIDSource(o, SMESH.FACE)) 02466 else: 02467 srclist.append(self.editor.MakeIDSource(o, SMESH.NODE)) 02468 pass 02469 pass 02470 aMeasurements = self.smeshpyD.CreateMeasurements() 02471 aMeasure = aMeasurements.BoundingBox(srclist) 02472 aMeasurements.UnRegister() 02473 return aMeasure
| def smeshDC.Mesh.GetMinDistance | ( | self, | |
| id1, | |||
id2 = 0, |
|||
isElem1 = False, |
|||
isElem2 = False |
|||
| ) |
Get measure structure specifying minimum distance data between two objects.
| id1 | first node/element id |
| id2 | second node/element id (if 0, distance from id1 to the origin is computed) |
| isElem1 | True if id1 is element id, False if it is node id |
| isElem2 | True if id2 is element id, False if it is node id |
Definition at line 2406 of file smeshDC.py.
02407 : 02408 if isElem1: 02409 id1 = self.editor.MakeIDSource([id1], SMESH.FACE) 02410 else: 02411 id1 = self.editor.MakeIDSource([id1], SMESH.NODE) 02412 if id2 != 0: 02413 if isElem2: 02414 id2 = self.editor.MakeIDSource([id2], SMESH.FACE) 02415 else: 02416 id2 = self.editor.MakeIDSource([id2], SMESH.NODE) 02417 pass 02418 else: 02419 id2 = None 02420 02421 aMeasurements = self.smeshpyD.CreateMeasurements() 02422 aMeasure = aMeasurements.MinDistance(id1, id2) 02423 aMeasurements.UnRegister() 02424 return aMeasure
| def smeshDC.Mesh.GetPointState | ( | self, | |
| x, | |||
| y, | |||
| z | |||
| ) |
Definition at line 2707 of file smeshDC.py.
| def smeshDC.Mesh.MakeBoundaryElements | ( | self, | |
dimension = SMESH.BND_2DFROM3D, |
|||
groupName = "", |
|||
meshName = "", |
|||
toCopyAll = False, |
|||
groups = [] |
|||
| ) |
Creates missing boundary elements around either the whole mesh or groups of 2D elements.
| dimension | - defines type of boundary elements to create |
| groupName | - a name of group to store all boundary elements in, "" means not to create the group |
| meshName | - a name of a new mesh, which is a copy of the initial mesh + created boundary elements; "" means not to create the new mesh |
| toCopyAll | - if true, the whole initial mesh will be copied into the new mesh else only boundary elements will be copied into the new mesh |
| groups | - groups of 2D elements to make boundary around |
| tuple( | long, mesh, groups ) long - number of added boundary elements mesh - the mesh where elements were added to group - the group of boundary elements or None |
Definition at line 3139 of file smeshDC.py.
| def smeshDC.Mesh.MinDistance | ( | self, | |
| id1, | |||
id2 = 0, |
|||
isElem1 = False, |
|||
isElem2 = False |
|||
| ) |
Get minimum distance between two nodes, elements or distance to the origin.
| id1 | first node/element id |
| id2 | second node/element id (if 0, distance from id1 to the origin is computed) |
| isElem1 | True if id1 is element id, False if it is node id |
| isElem2 | True if id2 is element id, False if it is node id |
Definition at line 2395 of file smeshDC.py.
| def smeshDC.Mesh.Scale | ( | self, | |
| theObject, | |||
| thePoint, | |||
| theScaleFact, | |||
| Copy, | |||
MakeGroups = False |
|||
| ) |
Scales the object.
| theObject | - the object to translate (mesh, submesh, or group) |
| thePoint | - base point for scale |
| theScaleFact | - list of 1-3 scale factors for axises |
| Copy | - allows copying the translated elements |
| MakeGroups | - forces the generation of new groups from existing ones (if Copy) |
Definition at line 3793 of file smeshDC.py.
03794 : 03795 if ( isinstance( theObject, Mesh )): 03796 theObject = theObject.GetMesh() 03797 if ( isinstance( theObject, list )): 03798 theObject = self.GetIDSource(theObject, SMESH.ALL) 03799 03800 thePoint, Parameters = ParsePointStruct(thePoint) 03801 self.mesh.SetParameters(Parameters) 03802 03803 if Copy and MakeGroups: 03804 return self.editor.ScaleMakeGroups(theObject, thePoint, theScaleFact) 03805 self.editor.Scale(theObject, thePoint, theScaleFact, Copy) 03806 return []
| def smeshDC.Mesh.ScaleMakeMesh | ( | self, | |
| theObject, | |||
| thePoint, | |||
| theScaleFact, | |||
MakeGroups = False, |
|||
NewMeshName = "" |
|||
| ) |
Creates a new mesh from the translated object.
| theObject | - the object to translate (mesh, submesh, or group) |
| thePoint | - base point for scale |
| theScaleFact | - list of 1-3 scale factors for axises |
| MakeGroups | - forces the generation of new groups from existing ones |
| NewMeshName | - the name of the newly created mesh |
Definition at line 3814 of file smeshDC.py.
03815 : 03816 if (isinstance(theObject, Mesh)): 03817 theObject = theObject.GetMesh() 03818 if ( isinstance( theObject, list )): 03819 theObject = self.GetIDSource(theObject,SMESH.ALL) 03820 03821 mesh = self.editor.ScaleMakeMesh(theObject, thePoint, theScaleFact, 03822 MakeGroups, NewMeshName) 03823 #mesh.SetParameters(Parameters) 03824 return Mesh( self.smeshpyD, self.geompyD, mesh ) 03825 03826
int smeshDC.Mesh.editor = 0 [static] |
Definition at line 1097 of file smeshDC.py.
Definition at line 1108 of file smeshDC.py.
int smeshDC.Mesh.geom = 0 [static] |
Definition at line 1095 of file smeshDC.py.
Definition at line 1108 of file smeshDC.py.
Definition at line 1108 of file smeshDC.py.
int smeshDC.Mesh.mesh = 0 [static] |
Definition at line 1096 of file smeshDC.py.
Definition at line 1108 of file smeshDC.py.
Definition at line 1108 of file smeshDC.py.