-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
Description
The following code snippet raises an AssertionError:
from microgen import Tpms
from microgen.shape.surface_functions import gyroid
geometry = Tpms(
surface_function=gyroid,
offset=0.16,
resolution=30,
)
assert geometry.density is not NoneAfter checking the implementation, it seems that the Tpms class currently cannot compute the density of a TPMS structure when it is initialized using an offset rather than a density.
(See [tpms.py#L43](
microgen/microgen/shape/tpms.py
Line 43 in ae275ed
| class Tpms(Shape): |
Suggestion
It might be useful to:
- Add a
densityproperty to theTpmsclass that can handle geometries defined via offset,
or - Clarify in the documentation that
densityis unavailable when an offset is used.
@kmarchais please let me know if I’m misunderstanding how the API is intended to be used 🙂
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request