Add offset property to Tpms to be able to update it #55
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.
This PR brings a property for the
offset
attribute.TLDR
offset
property to update the offset without recomputing the gridUnstructuredGrid
was returned instead of the expectedPolyData
vtk_sheet
togrid_sheet
for more clarity (same for skeletals)Details
Especially with the new infill feature, the generation of a Tpms object can have a computational cost pretty high due to the number of points in the grid. For an
Infill
object, theclip_surface
method is applied on the grid and is expensive.If we need to change the offset but keep the same grid, the grid does not need to be computed again.
At the same time, this PR fixes an issue of return type for the
sheet
,lower_skeletal
,upper_skeletal
properties and thegenerateVtk
method whereUnstructuredGrid
were returned instead of aPolyData
. Theextract_surface
is now called to return aPolyData
instead of aUnstructuredGrid
. Thevtk_*
methods have been renamed togrid_*
for more clarity as their purpose is to return the correspondingUnstructuredGrid
.For now we can give a variable offset but not a variable density. It would be nice to make this possible in this PR or another.