modulus-sym
modulus-sym copied to clipboard
🐛[BUG]: Rotating a Line gives the new line an interior.
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