Poygon mesh creation with PMP

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Poygon mesh creation with PMP

mura.cld
Hello,

I'm trying to use the CGAL's PMP package to create a mesh out of a polygon soup (extracted from a spatial subdivision structure using a min-cut approach). I've used orient_polygon_soup() and polygon_soup_to_polygon_mesh(). A subsequent call to is_polygon_soup_a_polygon_mesh() return true, but the mesh produced is not closed. This also creates problems when using other functions of the package, such as
is_outward_oriented()/reverse_face_orientations(). Also using stitch_borders did not improve the mesh.
Is this the expected behaviour of the functions?

Thanks,
Claudio


Reply | Threaded
Open this post in threaded view
|

Re: Poygon mesh creation with PMP

Sebastien Loriot (GeometryFactory)
You probably have some non-manifold faces in your soup. If this is the
case, it probably needs some clean up. Can you share the input so that
we can give more info?


Sebastien.



On 08/14/2018 10:05 AM, [hidden email] wrote:

> Hello,
>
> I'm trying to use the CGAL's PMP package to create a mesh out of a
> polygon soup (extracted from a spatial subdivision structure using a
> min-cut approach). I've usedorient_polygon_soup() and
> polygon_soup_to_polygon_mesh(). A subsequent call to
> is_polygon_soup_a_polygon_mesh() return true, but the mesh produced is
> not closed. This also creates problems when using other functions of the
> package, such as
>
> is_outward_oriented()/reverse_face_orientations(). Also using
> stitch_borders did not improve the mesh.
>
> Is this the expected behaviour of the functions?
>
> Thanks,
>
> Claudio
>
>
>

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


Reply | Threaded
Open this post in threaded view
|

Re: Poygon mesh creation with PMP

mura.cld
Hi Sebastien,

thank you for looking into this. I've exported the polygon soup into .off (see attachment) - let me know if you need any further information.

Claudio

On Wed, Aug 15, 2018 at 12:29 PM Sebastien Loriot (GeometryFactory) <[hidden email]> wrote:
You probably have some non-manifold faces in your soup. If this is the
case, it probably needs some clean up. Can you share the input so that
we can give more info?


Sebastien.



On 08/14/2018 10:05 AM, [hidden email] wrote:
> Hello,
>
> I'm trying to use the CGAL's PMP package to create a mesh out of a
> polygon soup (extracted from a spatial subdivision structure using a
> min-cut approach). I've usedorient_polygon_soup() and
> polygon_soup_to_polygon_mesh(). A subsequent call to
> is_polygon_soup_a_polygon_mesh() return true, but the mesh produced is
> not closed. This also creates problems when using other functions of the
> package, such as
>
> is_outward_oriented()/reverse_face_orientations(). Also using
> stitch_borders did not improve the mesh.
>
> Is this the expected behaviour of the functions?
>
> Thanks,
>
> Claudio
>
>
>

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



soup.off (418K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Poygon mesh creation with PMP

Sebastien Loriot (GeometryFactory)
As is your model is detected as valid surface mesh.
This is because you have many duplicated vertices.
If you merge them (using something like [1] for example)
you will end up with a mesh with only one boundary cycle.
It is not stitch-able because it is would produce a set of non-manifold
edges.

 From there, depending on what you want to do with the model, you can
still try to close the model but you'll endup with some
self-intersection.

Sebastien.

[1] https://gist.github.com/sloriot/12f6ba2c5d593b1b0e2e82a07fc82df7

On 08/15/2018 11:44 PM, [hidden email] wrote:

> Hi Sebastien,
>
> thank you for looking into this. I've exported the polygon soup into
> .off (see attachment) - let me know if you need any further information.
>
> Claudio
>
> On Wed, Aug 15, 2018 at 12:29 PM Sebastien Loriot (GeometryFactory)
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     You probably have some non-manifold faces in your soup. If this is the
>     case, it probably needs some clean up. Can you share the input so that
>     we can give more info?
>
>
>     Sebastien.
>
>
>
>     On 08/14/2018 10:05 AM, [hidden email]
>     <mailto:[hidden email]> wrote:
>      > Hello,
>      >
>      > I'm trying to use the CGAL's PMP package to create a mesh out of a
>      > polygon soup (extracted from a spatial subdivision structure using a
>      > min-cut approach). I've usedorient_polygon_soup() and
>      > polygon_soup_to_polygon_mesh(). A subsequent call to
>      > is_polygon_soup_a_polygon_mesh() return true, but the mesh
>     produced is
>      > not closed. This also creates problems when using other functions
>     of the
>      > package, such as
>      >
>      > is_outward_oriented()/reverse_face_orientations(). Also using
>      > stitch_borders did not improve the mesh.
>      >
>      > Is this the expected behaviour of the functions?
>      >
>      > Thanks,
>      >
>      > Claudio
>      >
>      >
>      >
>
>     --
>     You are currently subscribed to cgal-discuss.
>     To unsubscribe or access the archives, go to
>     https://sympa.inria.fr/sympa/info/cgal-discuss
>
>

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


Reply | Threaded
Open this post in threaded view
|

Re: Poygon mesh creation with PMP

mura.cld
I see, thanks for the clarification. After merging the duplicated vertices the non-manifold edges become evident. Incidentally, I though the input polygon soup could be represented redundantly by storing an instance of a vertex in each incident triangle, and that merging the vertices would be done by polygon_soup_to_polygon_mesh(). So from my understanding, this function "only" takes care of building the data structure and of explicitly setting the adjacency relations between its elements - correct?

Claudio

On Thu, Aug 16, 2018 at 12:12 PM Sebastien Loriot (GeometryFactory) <[hidden email]> wrote:
As is your model is detected as valid surface mesh.
This is because you have many duplicated vertices.
If you merge them (using something like [1] for example)
you will end up with a mesh with only one boundary cycle.
It is not stitch-able because it is would produce a set of non-manifold
edges.

 From there, depending on what you want to do with the model, you can
still try to close the model but you'll endup with some
self-intersection.

Sebastien.

[1] https://gist.github.com/sloriot/12f6ba2c5d593b1b0e2e82a07fc82df7

On 08/15/2018 11:44 PM, [hidden email] wrote:
> Hi Sebastien,
>
> thank you for looking into this. I've exported the polygon soup into
> .off (see attachment) - let me know if you need any further information.
>
> Claudio
>
> On Wed, Aug 15, 2018 at 12:29 PM Sebastien Loriot (GeometryFactory)
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     You probably have some non-manifold faces in your soup. If this is the
>     case, it probably needs some clean up. Can you share the input so that
>     we can give more info?
>
>
>     Sebastien.
>
>
>
>     On 08/14/2018 10:05 AM, [hidden email]
>     <mailto:[hidden email]> wrote:
>      > Hello,
>      >
>      > I'm trying to use the CGAL's PMP package to create a mesh out of a
>      > polygon soup (extracted from a spatial subdivision structure using a
>      > min-cut approach). I've usedorient_polygon_soup() and
>      > polygon_soup_to_polygon_mesh(). A subsequent call to
>      > is_polygon_soup_a_polygon_mesh() return true, but the mesh
>     produced is
>      > not closed. This also creates problems when using other functions
>     of the
>      > package, such as
>      >
>      > is_outward_oriented()/reverse_face_orientations(). Also using
>      > stitch_borders did not improve the mesh.
>      >
>      > Is this the expected behaviour of the functions?
>      >
>      > Thanks,
>      >
>      > Claudio
>      >
>      >
>      >
>
>     --
>     You are currently subscribed to cgal-discuss.
>     To unsubscribe or access the archives, go to
>     https://sympa.inria.fr/sympa/info/cgal-discuss
>
>

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


Reply | Threaded
Open this post in threaded view
|

Re: Poygon mesh creation with PMP

Sebastien Loriot (GeometryFactory)
Orient polygon soup will duplicate vertices when some non-manifold
situations are encountered.
polygon_soup_to_polygon_mesh() creates a mesh out of a correctly
oriented soup representing a manifold mesh.

The merging of "duplicated" vertices can be done using stitching.
Right now we do nothing for non-manifold situtations but we have
some pull-request that will improve it.

Sebastien.

On 08/16/2018 11:06 PM, [hidden email] wrote:

> I see, thanks for the clarification. After merging the duplicated
> vertices the non-manifold edges become evident. Incidentally, I though
> the input polygon soup could be represented redundantly by storing an
> instance of a vertex in each incident triangle, and that merging the
> vertices would be done by polygon_soup_to_polygon_mesh(). So from my
> understanding, this function "only" takes care of building the data
> structure and of explicitly setting the adjacency relations between its
> elements - correct?
>
> Claudio
>
> On Thu, Aug 16, 2018 at 12:12 PM Sebastien Loriot (GeometryFactory)
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     As is your model is detected as valid surface mesh.
>     This is because you have many duplicated vertices.
>     If you merge them (using something like [1] for example)
>     you will end up with a mesh with only one boundary cycle.
>     It is not stitch-able because it is would produce a set of non-manifold
>     edges.
>
>       From there, depending on what you want to do with the model, you can
>     still try to close the model but you'll endup with some
>     self-intersection.
>
>     Sebastien.
>
>     [1] https://gist.github.com/sloriot/12f6ba2c5d593b1b0e2e82a07fc82df7
>
>     On 08/15/2018 11:44 PM, [hidden email]
>     <mailto:[hidden email]> wrote:
>      > Hi Sebastien,
>      >
>      > thank you for looking into this. I've exported the polygon soup into
>      > .off (see attachment) - let me know if you need any further
>     information.
>      >
>      > Claudio
>      >
>      > On Wed, Aug 15, 2018 at 12:29 PM Sebastien Loriot (GeometryFactory)
>      > <[hidden email] <mailto:[hidden email]>
>     <mailto:[hidden email] <mailto:[hidden email]>>> wrote:
>      >
>      >     You probably have some non-manifold faces in your soup. If
>     this is the
>      >     case, it probably needs some clean up. Can you share the
>     input so that
>      >     we can give more info?
>      >
>      >
>      >     Sebastien.
>      >
>      >
>      >
>      >     On 08/14/2018 10:05 AM, [hidden email]
>     <mailto:[hidden email]>
>      >     <mailto:[hidden email] <mailto:[hidden email]>> wrote:
>      >      > Hello,
>      >      >
>      >      > I'm trying to use the CGAL's PMP package to create a mesh
>     out of a
>      >      > polygon soup (extracted from a spatial subdivision
>     structure using a
>      >      > min-cut approach). I've usedorient_polygon_soup() and
>      >      > polygon_soup_to_polygon_mesh(). A subsequent call to
>      >      > is_polygon_soup_a_polygon_mesh() return true, but the mesh
>      >     produced is
>      >      > not closed. This also creates problems when using other
>     functions
>      >     of the
>      >      > package, such as
>      >      >
>      >      > is_outward_oriented()/reverse_face_orientations(). Also using
>      >      > stitch_borders did not improve the mesh.
>      >      >
>      >      > Is this the expected behaviour of the functions?
>      >      >
>      >      > Thanks,
>      >      >
>      >      > Claudio
>      >      >
>      >      >
>      >      >
>      >
>      >     --
>      >     You are currently subscribed to cgal-discuss.
>      >     To unsubscribe or access the archives, go to
>      > https://sympa.inria.fr/sympa/info/cgal-discuss
>      >
>      >
>
>     --
>     You are currently subscribed to cgal-discuss.
>     To unsubscribe or access the archives, go to
>     https://sympa.inria.fr/sympa/info/cgal-discuss
>
>

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