Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Boolean operations on triangle surfaces

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Boolean operations on triangle surfaces


Chronological Thread 
  • From: "Aviv Hurvitz" <>
  • To:
  • Subject: Re: [cgal-discuss] Boolean operations on triangle surfaces
  • Date: Sun, 28 Dec 2008 12:11:38 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=RWZ4IgbwvqnqFDCwM4bga6LFOeUwKMZiyOyFZsAlj9FF9RAic2dLOxNkwMYHY3yRaS DpbVzFtwIEuPX3Gp+6NAKefgFUeZFUk7Yj1ugx89/i48l0+nF/BCtNtKVsFqP7Pi9/NO 3l+wAHjTXoWvxZyJt59CMKjvtEKE1KUDteRUw=

Hi Fred,

Thanks. Knowing it is possible is important. My next step will be to see how well it performs, and if I get the performance I want I'll move to CGAL and do the marking thing you did.

BTW I should say that I'm working with triangle meshes and that I don't expect to see degenerate configurations (faces or edges) since the surface approximates a natural (not synthetic) object, and therefore co-planar edges are unlikely. This suggests that CGAL is "overkill" for this task - much more sophisticated than what I need. I considered trying to use a program like Autocad/3D studio/Blender for this computation. Have you had any experience with other libraries?

- Aviv

On Sat, Dec 27, 2008 at 7:10 PM, <> wrote:

> I have two closed solids bounded by triangle meshes, call them A and B.
> First, I'd like to cut one with the other, i.e. compute C=A-B. The result
> C should be a closed polyhedron, and I'd like to convert it to a triangle
> mesh.
>
> To my understanding, I can do the cut with Nef_polyhedron_3::difference().
> So far so good.

I would add that depending on your input shapes, the result might not be
just a closed polyhedron (you might have 1 and 2-dimensional features left
over). These can be discarded by regularization operations.

> Second, I'd like to identify the set of triangles in C which "came from
> B", i.e. the set in intersect(C,B). How would I find these set?

I have successfully done something similar to this for union operations. I
use a custom Mark trait to embed texture information in input facets (this
Mark is a template argument to Nef3). The textures persist through boolean
operations according to mark combination rules that I implement.

This idea can be applied to colour facets according to the shape they
originated from. It should work fine with difference/complement operations
and cascaded operations as well.

This wasn't trivial to achieve out-of-the-box, but it's certainly doable.

Fred


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




Archive powered by MHonArc 2.6.16.

Top of Page