2011/12/13 Prakash Manandhar <[email protected]>: > I am a newbie. Say I have the following: > > h = 0.1; > out[] = Extrude {h,0,0} { > Surface{1, 5, 14, 10}; Layers{10 }; Recombine; > }; > > How do I get the length of the out array.
I don't know a nice way, but here's what I do:
%<---
Point(1) = {0, 0, 0};
out[] = Extrude {1, 0, 0} { Point{1};};
For i In {0:2}
Printf ("out[%g] = %g", i, out[i]);
EndFor
--->%
The message console then ends with:
%<---
out[0] = 2
out[1] = 1
Error : 'count.geo', line 4 : Uninitialized variable 'out[2]'
out[2] = 0
Info : Done reading 'count.geo'
--->%
which tells me that the length is two. Then I go back and rewrite the
program knowing that. This is only any good if the length is going to
be the same each time.
count.geo
Description: Binary data
_______________________________________________ gmsh mailing list [email protected] http://www.geuz.org/mailman/listinfo/gmsh
