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

Box-Segment intersection in 3D #810

Open
cserteGT3 opened this issue Mar 25, 2024 · 1 comment
Open

Box-Segment intersection in 3D #810

cserteGT3 opened this issue Mar 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@cserteGT3
Copy link
Contributor

I have a box, and a segment, that clearly doesn't intersect, but intersects returns true:

julia> testbox = Box(Point3(-130, -18.78, 46.25), Point3(-110.75, -5.05, 60.0))
Box{3,Float64}
├─ min: Point(-130.0, -18.78, 46.25)
└─ max: Point(-110.75, -5.05, 60.0)

julia> testline = Segment(Point(-70,-50,0), Point(-130, 0, 50))
Segment{3,Float64}
├─ Point(-70.0, -50.0, 0.0)
└─ Point(-130.0, 0.0, 50.0)

julia> intersects(testbox, testline)
true

Using Ray returns false, as expected:

julia> testbox = Box(Point3(-130, -18.78, 46.25), Point3(-110.75, -5.05, 60.0))
Box{3,Float64}
├─ min: Point(-130.0, -18.78, 46.25)
└─ max: Point(-110.75, -5.05, 60.0)

julia> testray = Ray(Point(-70,-50,0), Point(-130, 0, 50)-Point(-70,-50,0))
Ray{3,Float64}
├─ p: Point(-70.0, -50.0, 0.0)
└─ v: Vec(-60.0, 50.0, 50.0)

julia> intersects(testbox, testray)
false
@juliohm juliohm added the bug Something isn't working label Mar 25, 2024
@juliohm
Copy link
Member

juliohm commented Mar 25, 2024

Probably related to #809

cc: @MachSilva

cserteGT3 added a commit to cserteGT3/Meshes.jl that referenced this issue Mar 25, 2024
return (possibly) false positive anyways
cserteGT3 added a commit to cserteGT3/Meshes.jl that referenced this issue Mar 28, 2024
return (possibly) false positive anyways
cserteGT3 added a commit to cserteGT3/Meshes.jl that referenced this issue Mar 30, 2024
return (possibly) false positive anyways
cserteGT3 added a commit to cserteGT3/Meshes.jl that referenced this issue Apr 1, 2024
return (possibly) false positive anyways
cserteGT3 added a commit to cserteGT3/Meshes.jl that referenced this issue Apr 3, 2024
return (possibly) false positive anyways
cserteGT3 added a commit to cserteGT3/Meshes.jl that referenced this issue Apr 18, 2024
return (possibly) false positive anyways
@juliohm juliohm changed the title box-segment intersection returns bad result Box-Segment intersection returns bad result Jun 14, 2024
@juliohm juliohm changed the title Box-Segment intersection returns bad result Box-Segment intersection in 3D Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants