Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Facet soup to solids

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Facet soup to solids


Chronological Thread 
  • From: GIS Worx <>
  • To:
  • Subject: Re: [cgal-discuss] Facet soup to solids
  • Date: Tue, 8 May 2012 15:38:35 -0700

Thank you for the suggestion Cody.

So I've attempted to construct a simple example, with two unit cubes, constructing each using the Nef_polyhedra constructor that takes a boundary and a normal as a separate Nef polyhedron, and then adding it to a Nef_nary_union_3. Looking at the methods in this class, it doesn't appear that any calls to .simplify() are made, I would assume this is what you mean by regularizing the result.

However, inspecting the result of the Nef_nary_union of these 12 faces defining two cubes (which are touching along a face), I see number_of_facets() = 6 and number_of_volumes() = 2. Based on the manual descriptions, I would hope to see the answers here be 12, and 4, so that I have two independent cubes in the result.

There doesn't seem to be anything I can do to prevent the loss of that shared face.

On Tue, May 8, 2012 at 10:59 AM, Cody Rose <> wrote:
Would taking the union without regularizing the result do what you need?

On May 8, 2012, at 10:38 AM, GIS Worx <> wrote:

> Hi everyone,
>
> I've spent quite a bit of time reading documentation and trying to devise a way to accomplish the following:
>
> Given a bag of planar facets, seal them, where possible, into closed polyhedrons, and return the remnants, as well as the newly constructed polyhedrons.
>
> Reading the Polyhedron_3 and Nef_Polyhedron documentation, it seems like the approach that comes closest is this:
>
> Use Nef_Polyhedron to define each facet, and then take the union of every facet, then the closed volumes can be marked and it's possible to iterate through the results. My problem with this method is that it will remove 'seams' between solids according to the union operation.
>
> If you imagine a two cubes, side by side, each defined by six faces, I would like two cubes back, each represented by six faces, not a single unified solid.
>
> I am not immediately concerned with performance, which can be solved externally to this particular problem.
>
> Is there a pathway to accomplish this within CGAL that I am missing? Is there a way to 'merge' two Nef_Polyhedra in a way that will maintain shared faces?
>

--
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