Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geometry translated() method cannot be plotted #1778

Open
alec-flexcompute opened this issue Jun 19, 2024 · 0 comments
Open

geometry translated() method cannot be plotted #1778

alec-flexcompute opened this issue Jun 19, 2024 · 0 comments
Assignees

Comments

@alec-flexcompute
Copy link
Contributor

Describe the bug
User raised and Alec confirmed - when defining a geometry with the .translated() method, this geometry does not show up when trying to plot it.

To Reproduce
As an example:

import matplotlib.pyplot as plt
sph = td.Sphere(radius=1)
box = td.Box(center=(0, 0, 1), size=(2, 2, 2))
half_sph = sph * box
half_sph = td.Geometry.copy(half_sph).translated(0.01, 0, 0)
fig, ax = plt.subplots(1, 2, figsize=(10, 4), tight_layout=True)
_ = half_sph.plot(x=0, ax=ax[0])
_ = half_sph.plot(y=0, ax=ax[1])

The issue is not the .copy() method, as an untranslated copy is able to be plotted.

lucas-flexcompute added a commit that referenced this issue Jun 20, 2024
Signed-off-by: Lucas Heitzmann Gabrielli <[email protected]>
lucas-flexcompute added a commit that referenced this issue Jun 20, 2024
Signed-off-by: Lucas Heitzmann Gabrielli <[email protected]>
lucas-flexcompute added a commit that referenced this issue Jun 20, 2024
* Fix for #1778
* Update notebooks submodule

Signed-off-by: Lucas Heitzmann Gabrielli <[email protected]>
Co-authored-by: Tyler Hughes <[email protected]>
QimingFlex pushed a commit that referenced this issue Jun 25, 2024
* Fix for #1778
* Update notebooks submodule

Signed-off-by: Lucas Heitzmann Gabrielli <[email protected]>
Co-authored-by: Tyler Hughes <[email protected]>
m-bone pushed a commit that referenced this issue Jul 1, 2024
* Fix for #1778
* Update notebooks submodule

Signed-off-by: Lucas Heitzmann Gabrielli <[email protected]>
Co-authored-by: Tyler Hughes <[email protected]>
m-bone pushed a commit that referenced this issue Jul 2, 2024
* Fix for #1778
* Update notebooks submodule

Signed-off-by: Lucas Heitzmann Gabrielli <[email protected]>
Co-authored-by: Tyler Hughes <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants