Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Know if a point is inside geometry in MATLAB livelink

Please login with a confirmed email address before reporting spam

Hi all,

For a custom meshing algorithm (that inserts vertices at specific points) I need a way to know if a point is inside a geometry using the MATLAB livelink, without relying on an existing mesh. Any ideas on how to accomplish this?

Note that I'm not looking for e.g. points near a vertex, or points inside the existing mesh, as this would make the algorithm moot, but rather something that uses the full geometry incl. curved surfaces (as the actual model is curve heavy).

My current solution relies in calling mphinterp and checking for Nan's, but I'm not sure it's precise enough and it requires solving the model with a wrong mesh before being able to actually synthesize the right mesh. Thank you!


0 Replies Last Post 30 ago 2018, 03:03 GMT-4
COMSOL Moderator

Hello Marc Serra

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.