mymesh.converter.solid2edges#
- mymesh.converter.solid2edges(NodeCoords, NodeConn, ElemType='auto', return_EdgeConn=False, return_EdgeElem=False)[source]#
Convert a solid mesh to edges. There will be one edge for each edge of each element, i.e. there will be multiple entries for shared edges. solid2edges is also suitable for use with 2D or surface meshes. It differs from surface2edges in that surface2edges returns only exposed edges of unclosed surfaces.
- Parameters:
NodeCoords (list) – List of nodal coordinates.
NodeConn (list) – Nodal connectivity list.
ElemType (str, optional) –
Specifies the element type contained within the mesh, by default ‘auto’.
’auto’ or ‘mixed’ - Will detect element type by the number of nodes present in each element using
identify_type()
.’surf’ - Will detect element type by the number of nodes present in each
element, assuming four node elements are quads
’vol’ - Will detect element type by the number of nodes present in each
element, assuming four node elements are tets (functionally the ame as ‘auto’)
’tri’ - All elements treated as 3-node triangular elements.
’quad’ - All elements treated as 4-node quadrilateral elements.
’tet’ - All elements treated as 4-node tetrahedral elements.
’pyramid’ - All elements treated as 5-node wedge elements.
’wedge’ - All elements treated as 6-node quadrilateral elements.
’hex’ - All elements treated as 8-node quadrilateral elements.
’polygon’ - All elements treated as n-node polygonal elements. TODO: add support for return_EdgeConn and return_EdgeElem
return_EdgeConn (bool, optional) – If true, will return EdgeConn, the Edge Connectivity of each element. For each element, EdgeConn has the indices of the edges connected to that element, by default False
return_EdgeElem (bool, optional) – If true, will return EdgeElem, the Element Connectivity of each edge. For each face, EdgeElem has the index of the element that the edge is a part of, by default False
- Returns:
Edges (list) – List of node connectivity of the edges in the mesh. Ex. [[n0,n1],[n1,n2],…]
EdgeConn (list, optional) – The edge connectivity of each element. Ex. [[e0,e1,e2,e3,e4,e5],[e6,e7,e8,e9,e10],…]
EdgeElem (list, optional) – The element index that each edge is taken from. Ex. [E0,E0,E0,E0,E0,E0,E1,E1,E1,…]