Surface_mesh_parameterization didn't keep face information

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

Surface_mesh_parameterization didn't keep face information

theidleman
I test several examples by using example mesh. The result is good. But when I
open the mesh file, I found the face in the mesh between input and result is
very different.

For example,

Input:
First three lines of face information.
3 170 169 218
3 304 259 871
3 299 298 8

Result:
First three lines of face information.
3 921 914 901
3 901 914 885
3 883 885 914

What I want is to change the face of the result as same as the input.

How can I deal with it?
Thank you very much.



--
Sent from: http://cgal-discuss.949826.n4.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


Reply | Threaded
Open this post in threaded view
|

Re: Surface_mesh_parameterization didn't keep face information

Shankar Kulumani
I believe that when you build the mesh you'll want to store some of the ids along with the other face/vertex information.

Here's an example using the Polyhedron class but I think others are similar

typedef CGAL::Polyhedron_3<Kernel, CGAL::Polyhedron_items_with_id_3> Polyhedron;
typedef Polyhedron::Facet_iterator Facet_iterator;
typedef Polyhedron::Vertex_iterator Vertex_iterator;


void build_polyhedron_index(Polyhedron &P) {
std::size_t ii = 0;
for (Vertex_iterator vert = P.vertices_begin(); vert != P.vertices_end(); ++vert) {
vert->id() = ii++;
}
ii = 0; // reset the counter
for (Facet_iterator facet = P.facets_begin(); facet != P.facets_end(); ++facet) {
facet->id() = ii++;
}
}


On Thu, Apr 19, 2018 at 8:37 PM, theidleman <[hidden email]> wrote:
I test several examples by using example mesh. The result is good. But when I
open the mesh file, I found the face in the mesh between input and result is
very different.

For example,

Input:
First three lines of face information.
3 170 169 218
3 304 259 871
3 299 298 8

Result:
First three lines of face information.
3 921 914 901
3 901 914 885
3 883 885 914

What I want is to change the face of the result as same as the input.

How can I deal with it?
Thank you very much.



--
Sent from: http://cgal-discuss.949826.n4.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



Reply | Threaded
Open this post in threaded view
|

Re: Surface_mesh_parameterization didn't keep face information

MaelRL
In reply to this post by theidleman
Hello,

Please check out this issue: https://github.com/CGAL/cgal/issues/2994,
which seems similar to what you want.


On 20/04/2018 02:37, theidleman wrote:

> I test several examples by using example mesh. The result is good. But when I
> open the mesh file, I found the face in the mesh between input and result is
> very different.
>
> For example,
>
> Input:
> First three lines of face information.
> 3 170 169 218
> 3 304 259 871
> 3 299 298 8
>
> Result:
> First three lines of face information.
> 3 921 914 901
> 3 901 914 885
> 3 883 885 914
>
> What I want is to change the face of the result as same as the input.
>
> How can I deal with it?
> Thank you very much.
>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.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


Reply | Threaded
Open this post in threaded view
|

Re: Surface_mesh_parameterization didn't keep face information

theidleman
Yes, Thank you very much.



--
Sent from: http://cgal-discuss.949826.n4.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