This PR brings a property for the offset attribute.
TLDR
Add offset property to update the offset without recomputing the grid
Fix for return types where an UnstructuredGrid was returned instead of the expected PolyData
Rename vtk_sheet to grid_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, the clip_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 the generateVtk method where UnstructuredGrid were returned instead of a PolyData. The extract_surface is now called to return a PolyData instead of a UnstructuredGrid. The vtk_* methods have been renamed to grid_* for more clarity as their purpose is to return the corresponding UnstructuredGrid.
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.
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.