Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Iterative Applications of 3D Boolean Operations on Nef Polyhedra

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Iterative Applications of 3D Boolean Operations on Nef Polyhedra


Chronological Thread 
  • From: shebbycat <>
  • To:
  • Subject: Re: [cgal-discuss] Iterative Applications of 3D Boolean Operations on Nef Polyhedra
  • Date: Mon, 29 Sep 2014 08:00:34 -0700 (PDT)

Thanks for the reply.  The issue turned out to be when using that kernel I could not create a Nef from a plane (which, for the record, was clearly articulated in the manual), so I simply created a new polyhedron shape and converted it into a Nef. 

From: "Sebastien Loriot (GeometryFactory) [via cgal-discuss]" <[hidden email]>
Date: Monday, September 29, 2014 at 3:07 AM
To: Scott Shebby <[hidden email]>
Subject: Re: Iterative Applications of 3D Boolean Operations on Nef Polyhedra

On 09/26/2014 05:55 PM, shebbycat wrote:
> Thanks for the response, Sebastien.
>   Plane_3::has_on_positive_side(origin)  seems like it will do the
> trick.  However when I use Exact_predicates_exact_constructions_kernel
> seems I can no longer convert a Polyhedron/3 to a Nef/Polyhedron3.   My
> initial polyhedron is generated by Random_points_in_sphere_3 followed by
> a Delaunay triangulation.
>

Did you also changed the Polyhedron Kernel?

Sebastien.

> At a high level I start with a Polyhedron_3 random sphere, define a
> clipping plane, clip, convert to Nefpolyhedron3, clip, then convert back
> to a Polyhedron_3 for rendering in OpenGL.    Could there be a better
> way of approaching this process?
>
> From: "Sebastien Loriot (GeometryFactory) [via cgal-discuss]" <[hidden
> email] </user/SendEmail.jtp?type=node&node=4659901&i=0>>
> Date: Monday, September 22, 2014 at 7:23 AM
> To: Scott Shebby <[hidden email]
> </user/SendEmail.jtp?type=node&node=4659901&i=1>>
> Subject: Re: Iterative Applications of 3D Boolean Operations on Nef
> Polyhedra
>
> On 09/21/2014 03:12 AM, shebbycat wrote:
>
>> Hi everyone,
>>
>> I'm new to CGAL and quite grateful for its existence!  I've built an
>> application that iteratively clips a 3D Nef Polyhedra with a plane, for a
>> specific application.  For example, I define a clipping plane which
>> intersects a polyhedron (with its center at 0,0,0) and clip, rotate by some
>> degrees, clip again, and so on.  When its done I convert it back to a 3D
>> polyhedron and render it in OpenGL.
>>
>> My first question is that this process is really slow.. like taking a couple
>> seconds per clip.  My kernel is:
>> typedef CGAL::Extended_cartesian< CGAL::Gmpq> K2;
>>
> Try CGAL::Exact_predicates_exact_constructions_kernel instead of K2.
>
> Do you have a geometric properties for your set of clipping planes?
> (like defining a convex volume)?
>
>
>> My second question is that sometimes after my clip process Ive inadvertently
>> clipped the origin side of the polyhedron instead of the "outer" side of the
>> intersection.  Id like to always preserve the portion of the poly that
>> contains the origin.  Ive tried grabbing the volume handle for the origin
>> point, but not sure how to use it properly.
>
> try using Plane_3::has_on_positive_side(origin)
>
> http://doc.cgal.org/latest/Kernel_23/classCGAL_1_1Plane__3.html#a2ca90cac980833ff38dd12dcb9858baf
>
> Sebastien.
>
>>
>> Is there anything I can do to speed the clipping up, and whats the best way
>> to check that my intersection will preserve the correct side of the poly?
>>
>> Thanks!
>>
>>
>>
>> --
>> View this message in context:http://cgal-discuss.949826.n4.nabble.com/Iterative-Applications-of-3D-Boolean-Operations-on-Nef-Polyhedra-tp4659856.html
>> Sent from the cgal-discuss mailing list archive at Nabble.com.
>>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>
>
>
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://cgal-discuss.949826.n4.nabble.com/Iterative-Applications-of-3D-Boolean-Operations-on-Nef-Polyhedra-tp4659856p4659867.html
>
> To unsubscribe from Iterative Applications of 3D Boolean Operations on
> Nef Polyhedra, click here.
> NAML
> <http://cgal-discuss.949826.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
> ------------------------------------------------------------------------
> View this message in context: Re: Iterative Applications of 3D Boolean
> Operations on Nef Polyhedra
> <http://cgal-discuss.949826.n4.nabble.com/Iterative-Applications-of-3D-Boolean-Operations-on-Nef-Polyhedra-tp4659856p4659901.html>
> Sent from the cgal-discuss mailing list archive
> <http://cgal-discuss.949826.n4.nabble.com/> at Nabble.com.

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss





If you reply to this email, your message will be added to the discussion below:
http://cgal-discuss.949826.n4.nabble.com/Iterative-Applications-of-3D-Boolean-Operations-on-Nef-Polyhedra-tp4659856p4659905.html
To unsubscribe from Iterative Applications of 3D Boolean Operations on Nef Polyhedra, click here.
NAML


View this message in context: Re: Iterative Applications of 3D Boolean Operations on Nef Polyhedra
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.18.

Top of Page