modulus-sym icon indicating copy to clipboard operation
modulus-sym copied to clipboard

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

Open ahallback opened this issue 4 months ago • 0 comments

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 avatar Oct 09 '24 14:10 ahallback