Subject: CGAL users discussion list
List archive
- From: "J.L.M." <>
- To:
- Subject: Re: [cgal-discuss] CGAL assertions using Minkowski_sum_3
- Date: Mon, 27 Dec 2010 16:32:29 -0500
Sebastien,
Thank you for your reply. I have been on holiday, or I would have responded sooner. I hope you will be able to provide a fix to the boundary function, as this is essential to my research. If there is anything I can do to help, please let me know.
Here are a few responses to your statements. The call to boundary is necessary for my work. What I am computing is the feasible region that contains all points in which the object can be placed and be wholly contained in the container (stored in result). If you would like, I have a paper I can provide to you that shows how this works.
Second, I am wondering about your statement that I need to make a copy of container. I see that the minkowski_sum_3 modifies the input, and in my example code the input is container_boundary, and object. container_boundary should be a copy of container (well just the boundary of course).
You are correct that the result is empty in this example. The correct algorithm uses the interior of the object (actually the inverted interior) in the Minkowski sum. I removed that part while simplifying the code to one that shows the problem.
Thank you for pointing out the non-standard OFF files. I am creating my shapes in Blender, and I have to post-process them. First, Blender gives me coordinates that are something like 1.00001 or 0.99999, and I need them to be exact whole numbers for accurate computations. Also, Blender has Z increase up, and Y increase into the scene, which is different than I am used to with OpenGL, so I swapped those coordinates. It must be in my swapping of those that I have switched the orientation of the facets.
Thank you again for your time.
On 12/20/2010 08:26 AM, 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.
- [cgal-discuss] CGAL assertions using Minkowski_sum_3, J.L.M., 12/12/2010
- Re: [cgal-discuss] CGAL assertions using Minkowski_sum_3, Sebastien Loriot (GeometryFactory), 12/20/2010
- Re: [cgal-discuss] CGAL assertions using Minkowski_sum_3, J.L.M., 12/27/2010
- Re: [cgal-discuss] CGAL assertions using Minkowski_sum_3, Sebastien Loriot (GeometryFactory), 12/20/2010
Archive powered by MHonArc 2.6.16.