Subject: CGAL users discussion list
List archive
- From: "Grimm, Raphael (IAR)" <>
- To: "" <>
- Subject: RE: [cgal-discuss] minkowski_sum_3 segfault
- Date: Tue, 29 Sep 2020 15:29:58 +0000
- Accept-language: en-GB, de-DE, en-US
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:taPhQxV/g8lHYNDfQwE/++YhVQ/V8LGtZVwlr6E/grcLSJyIuqrYZRWFtKdThVPEFb/W9+hDw7KP9fy5Bipasd3R7zgrS99lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUhrwOhBoKevrB4Xck9q41/yo+53Ufg5EmCexbal9IRmrrwjdrNcajIhtJqsyyBbCv2dFdflRyW50P1yYggzy5t23/J5t8iRQv+wu+stdWqjkfKo2UKJVAi0+P286+MPkux/DTRCS5nQHSWUZjgBIAwne4x7kWJr6rzb3ufB82CmeOs32UKw0VDG/5KplVBPklCEKPCM//WrKiMJ/kbhbrQqhqRJh3oDUfI+bOvlwfqzffNMVWWVOU91eVyBdAIOxd5cDA/YcMetesoLzp0EOrRy7BQS0Cu/hyyVIhn7z3a0/y+gqDB3I0xY4H9IOqnvbstH1P7oWXe620KTG0TDPY/1L0jr68ojHaAghofGWUr1udcrd00YvFxnEjlWVrIzoJDCV1uURs2SB8eVvSP+vhnchpgpsrTeh2t0ihZPVhoIJ1F/E7yN5zZ4pKNC3VEJ2fdypHZRTuiyZNYZ7X80sTn1rtSskzrAKpJ22cSsXxZkoyRDRZfyJf5aG7B/tWuicJSp0inJ4dL+8gRu57Eauyur5Vsau0VZKqDJIncXDtn8X0xzf8M+HSuFy/ku52jaP1hzT5vtaLk8piKrXM58hwrgqlpoSq0vPBCH2mF/wgaSLdUsk4vCl5/n5brjivJOQKoF5hhvgPqkgh8CzG+c1PhUWU2SG9umwyafv8EPjTLhJjfA6iLTVvI3GKcgDuKK2GRNZ3pom5hqiATqr1NcVkHwDIV9AdhKKjpXlN0/LLf39EPuyjFShnTF2zP7cJLLhGI/CLn3bnbfhY7l970lcxRIozd9D+51YE7QBL+jyWk/1s9zYEwM5PxW3w+bmFNVxz58SVX+VDq+CLKzdrUWE5uEuI+mQfoMapivyK+U96/7vi382h0MdcLG00ZcJbH20BOlqLkuDbXbyjNoNDH0GswkjQODyjV2NSz9TZ3K8X6Im4TE7DZqrDZ3ZSYC1gLyOxjm0HplMamBJEFCMEHLod4CfVvcPaSKSPtVtnSIZWri8U4Mhzw2htBfmy7p7KerZ4jEXtZ3529hx/uHciBAy9SdoAMSAyGGNVHp5nngIRj8zxKBwu1ZxylaF0ahigvxXD8Zf5/1TUlRyCJjH0uYvC8zuQhmTOZCSWVO+S5OnByswR5Q/2ZgVckNlEpKjiB7EmCGlCrtQm72QD4Ev6fHh2WPsLfpw22qT1LU9l0J0BYxUJGi+j+h+8RLSDsjHiQKChqOyfOMd2iDKs2yMxG7LsEBDWxNrSvb5WiVVbUTfqZH151jJUqS1IbUhKApIj8CYYOMeYdLgiRBKRezoJc/FS2O3gWa5QxiSkOCido3vLi8yxiTYDQxMqQkL/X+LMUB+Jw6b4iiWWCZnDVLmbkeq/vN/rXaTTU4oiQyGchsyhPKO5hcJiKnEGLso1bUetXJ58mgmLBOGx9vTTuG4iU9hcaFbOolv+1xMkGfQtgh6I4DlLKF+wwZHNR98tAXt1gkxB4ldw5Bz/SEaiTFqIKfd62tvMjaR3JT+ILrSezvx/QzpZqLLiAiHjISmv5wX4fF9kG3N+RmzHxtw8HR7ldRZzinE6w==
Hi,
Thanks for the idea, but the problem with a distance query is:
* it is slow (since it extract more information, than the binary label I
need for my application)
* after the query, I do not know whether the point is inside or outside of
the mesh (so I need to perform the inside check anyways)
To check how much slower a distance query is, I wrote some test code (it is
attached).
If I run it with mesh (21965 vertices, 43926 faces, roughly a cube), then
the tree version takes much longer (x200+ times) than the check whether the
point is inside of the mesh.
This test has to be very fast, since I have a lot of query points.
Hence I need some way to inflate my mesh.
Maybe you or someone else has another idea.
Best regards,
Raphael.
-----Original Message-----
From: <> On
Behalf Of "Sebastien Loriot (GeometryFactory)"
Sent: Wednesday, 23 September, 2020 18:36
To:
Subject: Re: [cgal-discuss] minkowski_sum_3 segfault
Did you try the AABB-tree and the closest_point() method?
https://doc.cgal.org/latest/AABB_tree/#title6
Best regards,
Sebastien.
On 9/23/20 4:17 PM, "Grimm, Raphael (IAR)" ( via
cgal-discuss Mailing List) wrote:
> Hello,
>
> I have a non-convex mesh and want to check whether a point is within a
> certain distance of it. Since distance queries are slow, I decided to
> inflate the mesh and check whether the point is inside.
>
> Scaling does not work, since my mesh is concave.
>
> I did some looking around and came across minkowski_sum_3. I am
> planning to use a sphere to inflate my original mesh by using
minkowski_sum_3.
>
> I wrote some simple test for minkowski_sum_3 that adds a tetrahedron
> to a cube (code is attached).
>
> This test crashes with a segfault. Here is the stack trace:
>
> 1 CGAL::SNC_FM_decorator<CGAL::SNC_structure<CGAL::Epick,
> CGAL::SNC_indexed_items,
> bool>>::determine_facet
> stl_vector.h 805 0x55555559244a
>
> 2 CGAL::SNC_FM_decorator<CGAL::SNC_structure<CGAL::Epick,
> CGAL::SNC_indexed_items,
> bool>>::create_facet_objects
> In_place_list.h 84 0x5555555a0dea
>
> 3 CGAL::SNC_external_structure<CGAL::SNC_indexed_items,
> CGAL::SNC_structure<CGAL::Epick, CGAL::SNC_indexed_items,
> bool>>::categorize_facet_cycles_and_create_facets
> stl_list.h 953 0x5555555a16d7
>
> 4 CGAL::SNC_external_structure<CGAL::SNC_indexed_items,
> CGAL::SNC_structure<CGAL::Epick, CGAL::SNC_indexed_items,
> bool>>::build_external_structure
> In_place_list.h 310 0x5555555c3417
>
> 5 CGAL::Nef_polyhedron_3<CGAL::Epick, CGAL::SNC_indexed_items,
> bool>::build_external_structure
> SNC_const_decorator.h 125 0x5555555f6188
>
> 6 CGAL::Nef_polyhedron_3<CGAL::Epick, CGAL::SNC_indexed_items,
> bool>::delegate
> Nef_polyhedron_3.h 1071 0x5555555f6188
>
> 7
> CGAL::bipartite_nary_union_sorted_combined<CGAL::Nef_polyhedron_3<CGAL
> ::Epick,
> CGAL::SNC_indexed_items,
> bool>>
> bipartite_nary_union_sorted_combined.h 214 0x5555555f6188
>
> 8 CGAL::minkowski_sum_3<CGAL::Nef_polyhedron_3<CGAL::Epick,
> CGAL::SNC_indexed_items, bool>>
>
In_place_list.h
> 309 0x5555555f7384
>
> 9
> main
> minkowski_sum_3.cpp 81 0x55555555d8df
>
> 10
> __libc_start_main
> libc-start.c 310 0x7ffff69ccb97
>
> 11 _start
>
> I have two questions:
>
> 1.Is there a better (more efficient) way to do this?
>
> 2.If not, how can I fix the segfault / what am I doing wrong?
>
> I appreciate any hints.
>
> Best
>
> Raphael
>
> ----
>
> Karlsruhe Institute of Technology (KIT)
>
> Institute for Anthropomatics and Robotics (IAR)
>
> High Performance Humanoid Technologies (H2T)
>
> Raphael Grimm (M.Sc.)
>
> Research Scientist
>
> Adenauerring 2
>
> Building 50.20, Room 334
>
> 76131 Karlsruhe, Germany
>
> Phone: +49 721 608-47133
>
> Fax: +49 721 608-48270
>
> Email:
>
> Web: https://www.humanoids.kit.edu
>
> KIT - The Research University in the Helmholtz Association
>
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
Attachment:
mesh_distance_calc_test.cpp
Description: Binary data
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
- [cgal-discuss] minkowski_sum_3 segfault, Grimm, Raphael (IAR), 09/23/2020
- Re: [cgal-discuss] minkowski_sum_3 segfault, Sebastien Loriot (GeometryFactory), 09/23/2020
- RE: [cgal-discuss] minkowski_sum_3 segfault, Grimm, Raphael (IAR), 09/29/2020
- Re: [cgal-discuss] minkowski_sum_3 segfault, Sebastien Loriot (GeometryFactory), 09/30/2020
- RE: [cgal-discuss] minkowski_sum_3 segfault, Grimm, Raphael (IAR), 09/29/2020
- Re: [cgal-discuss] minkowski_sum_3 segfault, Sebastien Loriot (GeometryFactory), 09/23/2020
Archive powered by MHonArc 2.6.19+.