You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After moving a Segment by (0, 0, -1), the "in" and "intersection" operations still take the original position into account.
Python 3.12.1 (tags/v3.12.1:2305ca5, Dec 7 2023, 22:03:25) [MSC v.1937 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Geometry3D.version
'0.2.4'
s = Segment(Point(0, 0, 1), Point(2, 0, 1))
s.move(-z_unit_vector())
Segment(Point(0, 0, 0), Point(2, 0, 0))
s
Segment(Point(0, 0, 0), Point(2, 0, 0))
s2 = Segment(Point(0, 0, 0), Point(2, 0, 0))
s == s2
True
Point(1, 0, 0) in s2
True
Point(1, 0, 0) in s
False # Should return True
Point(1, 0, 1) in s
True # Should return False
ground = Plane(origin(), x_unit_vector(), y_unit_vector())
print(intersection(s2, ground))
Segment(Point(0, 0, 0), Point(2, 0, 0))
print(intersection(s, ground))
None # Should return the segment
This may be caused by a failure to move the "line" attribute accordingly:
I had the same problem yesterday trying to figure out the bug in my code as it wasn't working. It does indeed turn out that the function move on line 85 of segment.py doesn't move self.line, which in turn is used by intersection! I just added a self.line.move(v) and now everything works! Spent hours on that yesterday!
After moving a Segment by (0, 0, -1), the "in" and "intersection" operations still take the original position into account.
Python 3.12.1 (tags/v3.12.1:2305ca5, Dec 7 2023, 22:03:25) [MSC v.1937 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
This may be caused by a failure to move the "line" attribute accordingly:
The text was updated successfully, but these errors were encountered: