[Gmsh] Change coordinate of a vertex in a GModel using API

Mikhail Artemyev artemiev.mikhail at gmail.com
Tue May 27 16:51:14 CEST 2014


Hi Marco,

I would suggest to remove a wrong vertex from a model using:

void remove(GVertex *v); // from GModel class

and then to add a new (corrected) one:

void add(GVertex *v) { vertices.insert(v); } // from GModel class

However I didn't try that for myself.

Best regards,
Mikhail

>
> Hello GMSH users,
> I have a GModel and I want to change the coordinates of a point inside it: just the coordinates of a point , everything in the GModel need to remains exactly the same.
> Is there a way without creating from scratch a new GModel?
> Because if I extract the pointer to a GVertex with the method getVertexByTag I have a const pointer therefore I cannot modify the value but only read it.
> Is there a method to have a non const pointer? Or is there  a method to simply change the coordinates?
>
> Thank you,
> cheers,
> Marco Agnese.
>
>
>