fedoo.Mesh.as_ndim
- Mesh.as_ndim(ndim, inplace: bool = False) Mesh
Change the number of dimensions of the mesh.
This method modifies only the nodes attribute. All other attributes remain unchanged.
- Parameters:
ndim (int) – Number of dimensions for the returned mesh.
inplace (bool, default=False) – If True, modifies the current mesh in place. If False, returns a new mesh that shares memory with the original one for most attributes.
Warning
This method does not check whether the element type is compatible with the new dimensionality. It simply truncates or pads the node coordinates with zeros. As a result, the returned mesh may be invalid.