-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add meshing tools and stats #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
add tests of helpers add test data files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this script redundant with the already existing methods in vtk to remove colocated points such as vtkCleanPolyData, vtkCleanUnstructuredGrid or vtkMergePoints ?
self._transferCellArrays( output ) | ||
return 1 | ||
|
||
def _get_cell_counts( self: Self ) -> tuple[ int, int, int, int, int ]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use the class CellTypeCounts here ?
def to_vtk_id_list( data ) -> vtkIdList: | ||
|
||
# TODO: copy from vtkUtils | ||
def getAttributesFromDataSet( object: vtkDataSet, onPoints: bool ) -> dict[ str, int ]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getAttributesFromDataSet is ambiguous to me, can we use getArraysFromDataSet ?
return bounds | ||
|
||
|
||
def createSingleCellMesh( cellType: int, ptsCoord: npt.NDArray[ np.float64 ] ) -> vtkUnstructuredGrid: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to have a check for the ordering of the nodes when creating the cell ? If not, need a warning that the cell can be degenerated if invalid node ordering
return mesh | ||
|
||
|
||
def createMultiCellMesh( cellTypes: list[ int ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question for check of nodes ordering with multiple cells
) | ||
|
||
# update sys.path to load all GEOS Python Package dependencies | ||
geos_pv_path: Path = Path( __file__ ).parent.parent.parent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure I understood what was decided regarding paths in the code, can we still use this for ParaView filters ?
) | ||
|
||
# update sys.path to load all GEOS Python Package dependencies | ||
geos_pv_path: Path = Path( __file__ ).parent.parent.parent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same remark for paths
except AssertionError as e: | ||
print(f"Mesh split failed due to: {e}") | ||
return 0 | ||
except Exception as e: | ||
print(f"Mesh split failed due to: {e}") | ||
return 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
except (AssertionError, Exception) as e:
print(f"Mesh split failed due to: {e}")
return 0
This PR adds new meshing tools and stats.
Tools include:
Stats tools include: