fedoo.mesh.extract_edges

extract_edges(mesh: Mesh, reduce_order: bool = False, node_set: str | _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None = None, element_set: str | _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None = None)

Extract edges from a given 2D or 3D mesh.

The edges are returned as a new mesh with ‘lin2’ or ‘lin3’ element types depending on the element order of the input mesh. ‘lin2’ elements can be forced by setting the reduce_order argument.

Parameters:
  • mesh (fd.Mesh) – Mesh from which we want to extract the edges

  • reduce_order (bool, default = False) – If True, only 2-nodes edges will be extracted in any cases

  • node_set (str | array_like, optional) – if node_set is defined (array of node indices or node_set name), the edge mesh will include only edges whose nodes are all in the given node_set.

  • element_set (str | array_like, optional) – if element_set is defined (array of element indicees or element_set name), the edge mesh will include only edges that belong to elements in the given element_set.

Returns:

Edge Mesh with ‘lin2’ or ‘lin3’ elm_type.

Return type:

Mesh