Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Finding the a face in a mesh that is coplanar to a given point
Chronological Thread
- From: Marc Eder <>
- To:
- Subject: Re: [cgal-discuss] Finding the a face in a mesh that is coplanar to a given point
- Date: Fri, 25 Oct 2019 10:46:11 -0400
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:zDnY+BxuWFgaExzXCy+O+j09IxM/srCxBDY+r6Qd1O4XIJqq85mqBkHD//Il1AaPAdyAraMfwLqO+4nbGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2aFLduGC94iAPERvjKwV1Ov71GonPhMiryuy+4ZLebxhGiTanZb5/Ihq6oAbNusILnYZsN6E9xwfTrHBVYepW32RoJVySnxb4+Mi9+YNo/jpTtfw86cNOSL32cKskQ7NWCjQmKH0169bwtRbfVwuP52ATXXsQnxFVHgXK9hD6XpP2sivnqupw3TSRMMPqQbwoXzmp8qFmQwLqhigaLT406G7YisJyg6xbrhyvpAFxzZDIb4yOLvVyYrnQcMkGSWZdXMtcUTFKDIOmb4sICuoMJeFWoJPnp1QSsBCwChSjC/31yjRVgXL22LM13Pk/HgHcxwEvA8kOvG7JrNXzKKgeS/66w7TVzTjaaf5dxDnz6I/Nch87oPGMW6p9cczLxkY0DAzFikufpZb5MDOS0+QBq3SU7+V6WuKrkWInrBtxojepy8wxiYfJnpoYxk7Y+Sh92oo4Jt21RFRlbdK6DZdcrS6XOohwT8g/WW9nojw6xacDuZOjfCgF1pAnxxnHZvyCaYeI4xbjWP+fIDdimX5pYby/ihmx/ES6xe38Uc600FlOriVbiNXDqncN1xnL5siGTPty4Fuh1C6R2wzP7uxIO0M5mKrBJ5I/3LI8i4AfvEvAEyPunUX5lq6WdkEq+uiy7OTnZ63rppqCOIBplA7+KL8jldCkAegiLwgOWXSU9f6i27L+4E31WK9KgeEukqnFrJDaItwWqbK2AwBP1oYv8guwDza90NsEgHkHN0lFdQmcj4npPlHOOOr3Ae2+g1SqijdrxurJMqfvApXXfTD/l+Lqcr95rkJd0wEu1st35pROC7hHLuigdFX2sYn9BwUyeyG4zvyvXNBw2o4EcWmURLKfO+XfvULetbFnGPWFeIJA4GW1EPMi/fO71SZly29YRrGg2N4sUF79Bu5veh/LamGqn9EKV2oGo1hmFb24uBi5STdWIk2Kcec57zA/BpihCN6ZFIu2xqGH12G2EoAEPzkbWGDJKm/hcsC/Y9lJaC+WJZU8wDkNVLzkVJV4kB/y5En1zL1oKueS8Sod58ru
I didn't finish that thought.... That would help you to narrow down the space to only parallel planes. Then, you can either iterate over all of them and compute the projected distance. Or, if there's still a ton, you can always take the overhead of AABB trees on just these faces, and then choose the closest with `closest_point_and_primitive()`.
While I'm not sure if this is possible as I'm far from in-depth-experienced with CGAL.... I suspect you can build a custom AABB tree around face normals (just parameterize each normal as a point on a unit sphere (S2)). Then, look for the closest point in that AABB tree, treating your query point normal also as a point on the unit sphere.I do not see where that helps. A point coplanar to a face f
can be far away from f and be close to a non-coplanar face.************
* *
p f1 ***f2**
* *
******************
p is coplanar with f2 but f1 is closer
On 10/25/2019 4:27 PM, Sebastien Loriot (GeometryFactory) wrote:
You can use AABB_tree::closest_point_and_primitive()
https://doc.cgal.org/latest/AABB_tree/classCGAL_1_1AABB__tree.html#a1b3ac9521fd7257f760deafff3743437
Sebastien.
On 10/24/19 6:05 PM, aseverino wrote:
Hello,
I'm trying to find the face index that has its points coplanar to another
given point. This given point is guaranteed to be coplanar to the mesh
*somewhere*.
Is there a more optimized method to find that face without having to iterate
over all of them (in the worst case)?
--
Sent from: http://cgal-discuss.949826.n4.nabble.com/
-- Andreas Fabri, PhD Chief Officer, GeometryFactory Editor, The CGAL Project phone: +33.492.954.912 skype: andreas.fabri
- [cgal-discuss] Finding the a face in a mesh that is coplanar to a given point, aseverino, 10/24/2019
- Re: [cgal-discuss] Finding the a face in a mesh that is coplanar to a given point, Sebastien Loriot (GeometryFactory), 10/25/2019
- Re: [cgal-discuss] Finding the a face in a mesh that is coplanar to a given point, Andreas Fabri, 10/25/2019
- Re: [cgal-discuss] Finding the a face in a mesh that is coplanar to a given point, Marc Eder, 10/25/2019
- Re: [cgal-discuss] Finding the a face in a mesh that is coplanar to a given point, Marc Eder, 10/25/2019
- Re: [cgal-discuss] Finding the a face in a mesh that is coplanar to a given point, Sebastien Loriot (GeometryFactory), 10/28/2019
- Re: [cgal-discuss] Finding the a face in a mesh that is coplanar to a given point, Marc Eder, 10/25/2019
- Re: [cgal-discuss] Finding the a face in a mesh that is coplanar to a given point, Andreas Fabri, 10/25/2019
- Re: [cgal-discuss] Finding the a face in a mesh that is coplanar to a given point, Sebastien Loriot (GeometryFactory), 10/25/2019
Archive powered by MHonArc 2.6.18.