Subject: CGAL users discussion list
List archive
- From: Frederic De Pourcq <>
- To:
- Subject: Re: [cgal-discuss] Trouble cutting polyhedron using a plane.
- Date: Tue, 24 Feb 2009 13:51:14 +0100
Hi again,
Ok, I found out what I did wrong:
* my offset was wrong, resulting in the exception, the plane must have been
outside.
* my halfedge wasn't passing through the plane, if it doesn't the program
gets
stuck in a loop.
* the halfedge had to come from the correct side, I had to invert the plane
or
use the opposite of my halfedge. If this is not done a segfault occurs.
Greetings,
F!
On Tuesday 24 February 2009 01:16:05
wrote:
> Hi,
>
> I am writing code that constructs bsp-trees. For this I need a robust way
> of cutting polyhedra (K-dops, K-discrete oriented polytopes) using a plane.
> Given a plane description and a polyhedron I want 2 polyhedra back. As
> simple as cutting a block of cheese in 2 with a knife.
>
> I could not find a solution to my problem in the documentation, but I did
> find the function polyhedron_cut_plane_3 in header
> CGAL/polyhedron_cut_plane_3.h
>
> I also found an example program for it:
> Polyhedron/polyhedron_prog_cut_cube.cpp That example works, but when trying
> to use different splitting planes I get problems.
>
> Plane pl = Plane(0,1,0,0.5 ); // orientation (0,1,0) offset 0.5,
> straight
> through the [0,1]^3 cube
>
> ERROR: coplanar planes used for computing intersecting point.
> Return ORIGIN. Don't trust result.
> ERROR: coplanar planes used for computing intersecting point.
> Return ORIGIN. Don't trust result.
>
> And it does not modify the given polyhedron.
>
> What is going on? A cutting function that can not cut a cube in 2 equal
> halves? How can I get rid of this problem?
>
> Any help is appreciated,
>
> Thanks,
>
> F!
- [cgal-discuss] Trouble cutting polyhedron using a plane., frederic.depourcq, 02/24/2009
- Re: [cgal-discuss] Trouble cutting polyhedron using a plane., Frederic De Pourcq, 02/24/2009
- [cgal-discuss] Accessing Finite_Vertex_Iterator as std::iterator or boost iterator, Tom Kazimiers, 02/24/2009
- Re: [cgal-discuss] Accessing Finite_Vertex_Iterator as std::iterator, Sylvain Pion, 02/24/2009
- Re: [cgal-discuss] Accessing Finite_Vertex_Iterator as std::iterator, Tom Kazimiers, 02/24/2009
- Re: [cgal-discuss] Accessing Finite_Vertex_Iterator as std::iterator, Sylvain Pion, 02/24/2009
- Re: [cgal-discuss] Accessing Finite_Vertex_Iterator as std::iterator, Tom Kazimiers, 02/24/2009
- Re: [cgal-discuss] Accessing Finite_Vertex_Iterator as std::iterator, Sylvain Pion, 02/24/2009
- Re: [cgal-discuss] Accessing Finite_Vertex_Iterator as std::iterator, Tom Kazimiers, 02/24/2009
- Re: [cgal-discuss] Accessing Finite_Vertex_Iterator as std::iterator, Sylvain Pion, 02/24/2009
- Re: [cgal-discuss] Accessing Finite_Vertex_Iterator as std::iterator, Tom Kazimiers, 02/24/2009
- Re: [cgal-discuss] Accessing Finite_Vertex_Iterator as std::iterator, Tom Kazimiers, 02/24/2009
- Re: [cgal-discuss] Accessing Finite_Vertex_Iterator as std::iterator, Sylvain Pion, 02/24/2009
- Re: [cgal-discuss] Accessing Finite_Vertex_Iterator as std::iterator, Tom Kazimiers, 02/24/2009
- Re: [cgal-discuss] Accessing Finite_Vertex_Iterator as std::iterator, Sylvain Pion, 02/24/2009
- [cgal-discuss] Accessing Finite_Vertex_Iterator as std::iterator or boost iterator, Tom Kazimiers, 02/24/2009
- Re: [cgal-discuss] Trouble cutting polyhedron using a plane., Frederic De Pourcq, 02/24/2009
Archive powered by MHonArc 2.6.16.