[Gmsh] Geometrical to Physical entity

Christophe Geuzaine geuzaine at acm.caltech.edu
Fri Jan 30 00:40:05 CET 2004


Lussou Philippe wrote:

> Is there a way to know the number of the new geometrical entities that 
> are created when I perform a transformation (Translate, Symmetry, etc) ?
> 
> It would be very useful if I want to perform another transformation (on 
> the newly created entities) or to declare them as physical entities.
> 
> Is there a magic formula ??
> 

Transformation commands actually return the indices of the tranformed
entities into a list. So you can for example write (cf. tutorial/t2.geo)

newpt[] = Translate {0,0.1,0} { Duplicata{ Point{3}; } } ;

and newpt[0] will contain what you need.

Cheers,

Christophe

-- 
Christophe A. Geuzaine
Applied and Computational Mathematics, Caltech
geuzaine at acm.caltech.edu - http://geuz.org