Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] CGAL assertions using Minkowski_sum_3
- Date: Thu, 03 Mar 2011 19:36:03 +0100
I finally understood the problem here.
The convex decomposition (used by Minkowski sum) is not working in the
case the nef polyhedron does not contain any volume (which is the case with boundary). It results that each facet is then considered as convex
which is not the case. The fix is to change convex_decomposition_3 to
handle this case. Unfortunately I cannot provide any delay for
implementing this.
Here is a quick hack that must work if you know that you have only
facets (and no volume).
For each facet, compute a convex decomposition of each facet.
Then for each convex facet, build a nef containing only this facet.
Make the Minkowski sum of this nef with the cube.
Finally make the union of each resulting nef polyhedron to get
the expected Minkowski sum.
S.
Sebastien Loriot (GeometryFactory) wrote:
J.L.M. wrote:
I have been writing some programs that use the Nef_polyhedron_3 andIt seems their is a problem in boundary function.
Minkowski_sum_3 portions of the CGAL library. I have discovered a number of assertions with various input shapes. The attached backtrace shows one example problem. I have also attached a small example program, and the input shapes. The l-shape is shown in the attached jpeg file.
This problem shows up in both CGAL 3.7 and 3.6.1. I am using GCC 4.5.1
on Arch Linux with kernel version 2.6.36.
I think this is a bug, since it does not occur with other input shapes. I would be very grateful if someone can help me fix it since the Minkowski_sum_3 is essential to my research.
Thank you for your time.
Jason M'Sadoques
------------------------------------------------------------------------
If I replace:
Nef_polyhedron_3 container_boundary(container.boundary());
by
Nef_polyhedron_3 container_boundary(container);
Your program runs fine (with your data, the call to boundary is
superfluous).
Note that as you are then reusing "container", you need to make a copy
of it
(see http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Minkowski_sum_3/Chapter_main.html)
Note also that the difference you are computing will be empty as the Minkowski sum contains "container".
Finally, note that facets of your cube are clockwise oriented while the usual convention is to use counterclockwise oriented faces in off files.
I'll try to find a fix to boundary function and will post it here.
S.
- Re: [cgal-discuss] CGAL assertions using Minkowski_sum_3, Sebastien Loriot (GeometryFactory), 03/03/2011
Archive powered by MHonArc 2.6.16.