Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Cutting a polyhedron with a plane?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Cutting a polyhedron with a plane?


Chronological Thread 
  • From: Peter Hachenberger <>
  • To:
  • Subject: Re: [cgal-discuss] Cutting a polyhedron with a plane?
  • Date: Sat, 29 Dec 2007 16:52:38 +0100

Hi,

Sorry, but your question is not precise. You want to extract the
intersection of a polyhedron and a plane? It works like this:

Nef_polyhedron N0;
// ...
Nef_polyhedron N1(Plane(1,0,0,-1), Nef_polyhedron::INCLUDED);
N1 = N1.boundary();
Nef_polyhedron R = N0.intersection(N1);

Peter

On Sat, 2007-12-29 at 23:27 +0800, loadcom wrote:
> I have looked up the CGAL manual, but I got no direct answer.
>
> I guess it's created as the intermediate result of the AND operation
> of
> 2 existing nef-polyhedra. e.g:
>
> Nef_polyhedron N0;
> // ...
> Nef_polyhedron N1(Plane_3( 1, 0, 0,-1),Nef_polyhedron::EXCLUDED);
> N0 -= N1; // during this op, the cutting polygon should be already
> created
>
> But how can I get this result?
>
> Or, as an coarse implementation, as far as efficiency is concerned, I
> may
> get the result I needed, in another form, using:
>
> Nef_polyhedron N2(Plane_3( 1, 0, 0,-1),Nef_polyhedron::INCLUDED);
> N0 -= !N2;
>
> N0 will be the resulting slice of cutting Plane_3( 1, 0, 0,-1) with
> N0,
> but, still, how can I get the polygon from the Nef_polyhedron data
> structure?
>
> Any help or hints will be appreciated.
>
> Max
>
>
>
>
> Re:[cgal-discuss] How to get resulting polygen of cutting a
> polyhedron with a plane?
>
> Hello,
>
> I have a maybe simple question:
>
> How to get resulting polygen of cutting a polyhedron with a plane?
>
> Many thanks.
>
> Max
>
>
>
> -------------------------------------------------------------------
> 金山毒霸2008,新品上市!37天免
> 费!(
> http://d1.sina.com.cn/sina/limeng3/mail_zhuiyu/2007/mail_zhuiyu_20071212g.html
> )
>
> ===================================================================
> 注册新浪2G免费邮箱(http://mail.sina.com.cn/)




Archive powered by MHonArc 2.6.16.

Top of Page