Meshes.jl icon indicating copy to clipboard operation
Meshes.jl copied to clipboard

Add isinside(Point, Mesh) method

Open kylebeggs opened this issue 3 years ago • 7 comments
trafficstars

This method checks whether a point is inside a mesh or not.

kylebeggs avatar Sep 02 '22 14:09 kylebeggs

Oh, I developed this using the old Vec, forgot to run tests after fetching that update...

kylebeggs avatar Sep 02 '22 14:09 kylebeggs

Also it would be nice to introduce a new function name for this function. For example isinside(point, mesh) if this name is already used with the same idea of interior or ininterior(point, mesh). The operation point \in mesh means the point is in the elements of the mesh, I.e. the surface.

Em sex., 2 de set. de 2022 11:53, Kyle Beggs @.***> escreveu:

Oh, I developed this using the old Vec, forgot to run tests after fetching that update...

— Reply to this email directly, view it on GitHub https://github.com/JuliaGeometry/Meshes.jl/pull/293#issuecomment-1235598697, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZQW3LCCWBVVTND67C6TQDV4IIHLANCNFSM6AAAAAAQDKQYIY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

juliohm avatar Sep 02 '22 15:09 juliohm

Codecov Report

Merging #293 (bf9b1bf) into master (b5922bc) will increase coverage by 0.02%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #293      +/-   ##
==========================================
+ Coverage   92.86%   92.89%   +0.02%     
==========================================
  Files         106      106              
  Lines        3057     3069      +12     
==========================================
+ Hits         2839     2851      +12     
  Misses        218      218              
Impacted Files Coverage Δ
src/mesh/simplemesh.jl 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Sep 02 '22 15:09 codecov[bot]

Hi @kylebeggs did you have a chance to take a look into this?

juliohm avatar Sep 14 '22 16:09 juliohm

I've made most of the requested changes, but the issue is we need to also check if a ray intersects with an edge of the triangle. The issue right now is if this happens, it counts for both triangles that share the edge and gives the wrong answer. I have not had time to look into implementing this yet, but it seems @dorn-gerhard has been looking into implementing more intersections.

kylebeggs avatar Sep 14 '22 17:09 kylebeggs

Thank you @kylebeggs for the update 👍🏽

juliohm avatar Sep 14 '22 17:09 juliohm

I've made most of the requested changes, but the issue is we need to also check if a ray intersects with an edge of the triangle. The issue right now is if this happens, it counts for both triangles that share the edge and gives the wrong answer. I have not had time to look into implementing this yet, but it seems @dorn-gerhard has been looking into implementing more intersections.

@kylebeggs, yes my next PR will treat rays - segments intersection (starting tomorrow or next week ;) )

dorn-gerhard avatar Sep 14 '22 21:09 dorn-gerhard