[Gmsh] Duplicating a point
Christophe Geuzaine
c.geuzaine at ulg.ac.be
Wed Sep 3 23:29:41 CEST 2003
Jean-Francois Remacle wrote:
> 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.
>
Good idea: go for it.
Meanwhile, in this simple case, I guess you could do
Translate{dx, 0, 0}{Point{p1};}
p2 = newp-1;
but it's a hack...
Christophe
--
Christophe A. Geuzaine
Applied and Computational Mathematics, Caltech
geuzaine at acm.caltech.edu - http://geuz.org