fix: Use correct precision from input mesh when generating fractures #204
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently when using generateFractures feature from mesh-doctor, the default precision for vtkPoints objects is float.
This can become an issue when the input mesh uses double precision and we want to create a new instance of this input mesh with the split points to output.
In certain cases, it will mess up the node mapping from the input to the output mesh and we will get cells with invalid nodes ordering, therefore leading to invalid/zero/negative volumes.
This PR solves this issue by checking the precision of points from the input mesh and applying this precision to the new vtkPoints objects of the output mesh.