Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/ImplicitShapes/gyroid_implicit_phase.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
print(f" piece[{i}]: volume={piece.volume:.4f}, com={piece.com}")

# %% Immutable transforms return new Phase objects.
moved = phase.translated((1.0, 0.0, 0.0))
moved = phase.translate((1.0, 0.0, 0.0))
print(f"\nTranslated phase COM: {moved.center_of_mass} (shifted by +1 in x)")

scaled = phase.scaled(2.0)
scaled = phase.scale(2.0)
print(f"Scaled phase bounds: {scaled.bounds} (cell doubled)")

# %% Compose with another implicit Shape via F-rep boolean ops.
Expand Down
2 changes: 1 addition & 1 deletion microgen/cad/meshbridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def shape_to_cad(
:return: :class:`CadShape` wrapping the tessellated ``TopoDS_Shell``
"""
require_cad()
if shape.func is None:
if shape.field is None:
err_msg = "No implicit field defined — cannot build BREP from an empty Shape"
raise NotImplementedError(err_msg)

Expand Down
Loading
Loading