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

🐛[BUG]: Rotating a Line gives the new line an interior. #196

Open
ahallback opened this issue Oct 9, 2024 · 0 comments
Open

🐛[BUG]: Rotating a Line gives the new line an interior. #196

ahallback opened this issue Oct 9, 2024 · 0 comments
Labels
? - Needs Triage Need team to review and classify bug Something isn't working

Comments

@ahallback
Copy link

Version

1.6.0

On which installation method(s) does this occur?

No response

Describe the issue

Rotation of a Line() class somehow produces an interior for the line. It seems that the SDF might be calculated wrong for the rotated line. The interior seems to be sampled from the area between the x-axis and the new line.

Minimum reproducible example

import numpy as np
from modulus.sym.geometry.primitives_2d import Line

line = Line((0,0), (0, 42), normal=1)
line = line.rotate(angle=np.pi/2 + 0.1)
s = line.sample_interior(
nr_points=1000,
)
var_to_polyvtk(s, f"interior")
print("Volume: {:.3f}".format(np.sum(s["area"])))

Relevant log output

No response

Environment details

No response

Other/Misc.

No response

@ahallback ahallback added ? - Needs Triage Need team to review and classify bug Something isn't working labels Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
? - Needs Triage Need team to review and classify bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant