BasicTools.Bridges.vtkBridge module
- BasicTools.Bridges.vtkBridge.AddCellsFromVtkCellArrayToMesh(cells, cellTypesArray: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], out: UnstructuredMesh, originalIdsOffset=0)[source]
Function to migrate cells from a vtkCellArray to a BasicTools Unstructured Mesh
- Parameters:
cells (vtkCellArray) – the cell to be created in the mesh
cellTypesArray (ArrayLike) – the vtk cell type to use for in the vtkCellArray. In the case is none we infer the type of cell from the number of nodes (for the polys in a vtkPolyData)
out (UnstructuredMesh) – the output mesh
originalIdsOffset (offset to apply to the original ids) –
- BasicTools.Bridges.vtkBridge.ApplyVtkPipeline(mesh: UnstructuredMesh, op: Callable) UnstructuredMesh[source]
- BasicTools.Bridges.vtkBridge.CellDataToPoint(mesh: UnstructuredMesh, cellfields: ndarray) ndarray[source]
Applies the CellDataToPointData from vtk. Supported only for the dimensionality of the mesh (no mix of elements of different dimensions)
- Parameters:
mesh (UnstructuredMesh) – Mesh containing the cells and vertices concerned by the conversion.
cellfield (np.ndarray) – of size (number of fields, number of elements). Cell fields to convert to Point field.
- Returns:
of size (number of points, number of fields). Field converted at the vertices of the mesh.
- Return type:
np.ndarray
- BasicTools.Bridges.vtkBridge.GetInputBasicTools(request, inInfoVec, outInfoVec, FieldsAsTags=False, port=0)[source]
- BasicTools.Bridges.vtkBridge.GetOutputVtk(request, inInfoVec, outInfoVec, copyAttr=True, outputNumber=0)[source]
- BasicTools.Bridges.vtkBridge.NumpyFieldToVtkField(support: UnstructuredMesh, fieldData: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], fieldName: str)[source]
- BasicTools.Bridges.vtkBridge.NumpyFieldToVtkFieldWithDims(fieldData: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], fieldName: str, dimensions=None)[source]
- BasicTools.Bridges.vtkBridge.ReadMeshAndPopulateVtkObject(filename, vtkobject=None, TagsAsFields=False)[source]
- BasicTools.Bridges.vtkBridge.SetOutputBasicTools(request, inInfoVec, outInfoVec, outMesh, TagsAsFields=False)[source]
- BasicTools.Bridges.vtkBridge.VtkFieldToNumpyField(support: UnstructuredMesh, vtkField) ndarray[source]