This PR adds the grading of a TPMS based on the implicit distance to the surface of a mesh.
It is a draft PR for now, as the goal is to discuss the way to implement this feature.
In my opinion, having a class OffsetGrading allows the creation of additional classes that inherit from it for as many grading types as necessary.
The first one implemented is NormedDistance. It allows the definition of an offset on the surface (boundary_offset) and an offset to the furthest point inside the mesh (furthest_offset). The offset of the TPMS then varies linearly within the mesh between these two offsets, following the normed distance to the surface of the mesh. A parameter boundary_weight is also available to adjust the weight on the boundary, such as weighted_distance = normed_distance**boundary_weight.
This PR adds the grading of a TPMS based on the implicit distance to the surface of a mesh.
It is a draft PR for now, as the goal is to discuss the way to implement this feature.
In my opinion, having a class
OffsetGrading
allows the creation of additional classes that inherit from it for as many grading types as necessary. The first one implemented isNormedDistance
. It allows the definition of an offset on the surface (boundary_offset
) and an offset to the furthest point inside the mesh (furthest_offset
). The offset of the TPMS then varies linearly within the mesh between these two offsets, following the normed distance to the surface of the mesh. A parameterboundary_weight
is also available to adjust the weight on the boundary, such asweighted_distance = normed_distance**boundary_weight
.