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:
  • To:
  • Subject: Re: [cgal-discuss] Boolean operations on triangle surfaces
  • Date: Sat, 27 Dec 2008 12:10:19 -0500 (EST)
  • Importance: Normal


> 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





Archive powered by MHonArc 2.6.16.

Top of Page