[Gmsh] Duplicating a point

Jean-Francois Remacle remacle at gce.ucl.ac.be
Wed Sep 3 17:44:16 CEST 2003


At 11:52 3/09/2003 +0200, Pascal A. Dupuis wrote:
>Hello,
>
>this is a question/feature request: I would like to define some point
>relative to another one:
>
>p1= newp; Point(p1) = { x, y, z, lcar };
>p2= newp; Point(p2) = { x, y, z, lcar };
>         Translate{dx, 0, 0}{Point{p2}; }
>
>where x, y, z, lcar, dx are defined constants.
>
>Wanting to make sure that, if I change p1 definition, p2 stays at the
>same relative position, I would like to perform an operation like:
>p2= newp; Point(p2) = Duplicata{Point{p1};};
>         Translate{dx, 0, 0}{Point{p2}; }
>
>but it seems 'Duplicata' may only appears as an argument of
>'Translate'. Problem is that the newly generated point has an
>automatic number, which will change if other points are
>created/removed. Is it possible to perform similar operation, and have
>an symbolic name ('p2' here) linked to the new point ?


I fully agree that it is really ennoying that the resulting ID of an object
created through of a simple translation operation cannot be reached
in the interface. This should be fixed.

Things that could be easily added in the gmsh langage :

      coords[]  =  Coordinates  ( Point (p1) ) ;

to retrieve point coordinates and

IDs [] = Extrude ...

that would return a list of new id's created through a given operation. The
number of items in that list will be variable and will depend on the 
operation.
This can be documented.

What do you think Christophe ? If you agree, I go forward and doit.

jf
>Thanks
>
>Pascal Dupuis
>
>--
>Dr. ir. Pascal Dupuis
>K. U. Leuven, ESAT/ELECTA (formerly ELEN):  http://www.esat.kuleuven.ac.be/
>Kasteelpark Arenberg, 10; B-3001 Leuven-Heverlee, Belgium
>Tel. +32-16-32 10 21 -- Fax +32-16-32 19 85
>_______________________________________________
>gmsh mailing list
>gmsh at geuz.org
>http://www.geuz.org/mailman/listinfo/gmsh




Prof. Jean-François Remacle
Dept. of Civil Engineering and
Center for Systems Engineering and Applied Mechanics
Bâtiment Vinci, Place du Levant 1
Catholic University of Louvain
B-1348 Louvain-la-Neuve, Belgium.
Tel : +32(0)10 472082
Fax: +32(0)10 472179