No subject

Moderator: GiD Team

Post Reply
Guest

No subject

Post by Guest »

commands to be processed with the GiD_Process command, someting like =
this:
set x 0
set y 0
set z 0
GiD_Process Mescape geometry create point $x $y $z

Selection is a common problem when automatizing tasks from scripts, =
sometimes it's not possible to know how many entities you will obtain =
and its identifiers.
a solution can be work with layers: set a layer to use, new entities =
will be created in this layer, then you select the layername instead the =
entities ids.

In some cases you can also know the new entity id, because number are =
set increasing from the last one

set lastpointid [GiD_Info Geometry Maxnumpoints]
GiD_Process Mescape geometry create point $x $y $z
set pointid [expr $lastpointid+1]

I recommend you to try to do what you want from a Tcl procedure, and if =
do you have a very expensive operation, like calculate your planes =
intersection, do it with an
external program (written in a compiled language like C/C++ or FORTRAN), =
that read from a file the required input and write also an output file =
that can be read again from the tcl procedure to convert into GiD =
entities.

Regards

Enrique

----- Original Message -----=20
From: anjaney vatsal=20
To: gidlist at gid.cimne.upc.edu=20
Sent: Thursday, June 05, 2008 12:48 PM
Subject: Re: [GiDlist] batch file


Hi Enrique,

If the geometrical figures that I have to draw are stored in a text =
file in form of coordinates or equations, is there any way to read these =
input files and then use it for creating figures- even using some other =
tool/language that GID is compatible with?=20

How can I get id no. of a surface if I am writing a batch file? As the =
geometries vary, the id nos of surfaces to be selected will differ. For =
general case, I have been thinking if it is possible to select any =
entity by specifying conditions. For example, is it possible to chop off =
part of the plane lying outside a known volume. Can I give some =
conditional command in this case? The major problem is if it can be done =
using batch file.

Well, I am going through all the methods you told me in your last =
email but I doubt what I want to do can simply be done using GID only. I =
think I would have to use some other tool as well and I can do meshing =
using GID. If it is not possible to do with GID, please suggest me some =
other tool which I can use along with GID.=20

Thanking you.

Anticipating you response

Anjaney Vatsal




On Wed, Jun 4, 2008 at 9:35 PM, Enrique Escolano =
escolano at cimne.upc.edu wrote:

Hello,

To select an entity simply must specify the id number. You can also =
say a range a:b that mean from a to b
you can omit b or use 'end' as the last available entity number, =
then 1:end select all entities of a type

An interesting way to select entities when automatizing from scripts =
is to separate in layers and specify the layername where the entities =
are, e.g
layer:Layer1

It's possible also apply filters to the selection, to keep entities =
that satisfy some conditional

When selecting points, an unusual way is to specify a plane equation
plane:a,b,c,d,r

Read GiD help about User basics-Entity selection

Sorry, but It doesn't exist any command to select entities near a =
coordinate.

Enrique
----- Original Message -----=20
From: anjaney vatsal=20
To: gidlist at gid.cimne.upc.edu=20
Sent: Wednesday, June 04, 2008 7:15 PM
Subject: [GiDlist] batch file


Hiii,

I have to draw geometries in GID using batch file. I am facing =
difficulties as I am not aware of some commands like that for selecting =
a particular entity (surafce, volume etc) or all entities. Please tell =
me how to get the commands for batch files. Is there any direct command =
to draw a volume when its coordinates are known?=20

Anjaney Vatsal



------=_NextPart_000_00BC_01C8C70F.534DE5B0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
HTMLHEAD
META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1"
META content=3D"MSHTML 6.00.6001.18023" name=3DGENERATOR
STYLE/STYLE
/HEAD
BODY bgColor=3D#ffffff
DIVFONT face=3DArial size=3D2Tcl is a powerful scripting =
language/FONT/DIV
DIVFONT face=3DArial size=3D2/FONT /DIV
DIVFONT face=3DArial size=3D2From a Tcl procedure you can open an =
read your=20
file, and send GiD commands to be processed with the /FONTFONT =
face=3DArial=20
size=3D2GiD_Process command, someting like this:/FONT/DIV
DIVFONT face=3DArial size=3D2set x 0/FONT/DIV
DIVFONT face=3DArial size=3D2set y 0/FONT/DIV
DIVFONT face=3DArial size=3D2set z 0/FONT/DIV
DIVFONT face=3DArial size=3D2GiD_Process Mescape geometry create =
point $x $y=20
$z/FONT/DIV
DIVFONT face=3DArial size=3D2/FONT /DIV
DIVFONT face=3DArial size=3D2Selection is a common problem when =
automatizing=20
tasks from scripts, sometimes it's not possible to know how=20
many entities you will obtain and =
its identifiers./FONT/DIV
DIVFONT face=3DArial size=3D2a solution can be work with =
layers: set a=20
layer to use, new entities will be created in this layer, then you =
select the=20
layername instead the entities ids./FONT/DIV
DIVFONT face=3DArial size=3D2/FONT /DIV
DIVFONT face=3DArial size=3D2In some cases you can also know the new =
entity id,=20
because number are set increasing from the last one/FONT/DIV
DIVFONT face=3DArial size=3D2/FONT /DIV
DIVFONT face=3DArial size=3D2set lastpointid [GiD_Info Geometry=20
Maxnumpoints]/FONT/DIV
DIVFONT face=3DArial size=3D2
DIVFONT face=3DArial size=3D2GiD_Process Mescape geometry create =
point $x $y=20
$z/FONT/DIV
DIVset pointid [expr $lastpointid+1]/DIV
DIV /DIV
DIVI recommend you to try to do what you want from a Tcl procedure, =
and if do=20
you have a very expensive operation, like calculate your planes =
intersection, do=20
it with an/DIV
DIVexternal program (written in a compiled language like C/C++ or =
FORTRAN),=20
that read from a file the required input and write also an output file =
that can=20
be read again from the tcl procedure to convert into GiD entities./DIV
DIV /DIV
DIVRegards/DIV
DIV /DIV
DIVEnrique/DIV
DIV /DIV/FONT/DIV
DIV----- Original Message ----- /DIV
BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"
DIV=20
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"BFrom:/B=20
A title=3Danjaney.iitkgp at gmail.com=20
href=3D"mailto:anjaney.iitkgp at gmail.com"anjaney vatsal/A /DIV
DIV style=3D"FONT: 10pt arial"BTo:/B A =
title=3Dgidlist at gid.cimne.upc.edu=20
=
href=3D"mailto:gidlist at gid.cimne.upc.edu"gidlist at gid.cimne.upc.edu/A =
/DIV
DIV style=3D"FONT: 10pt arial"BSent:/B Thursday, June 05, 2008 =
12:48=20
PM/DIV
DIV style=3D"FONT: 10pt arial"BSubject:/B Re: [GiDlist] batch =
file/DIV
DIVBR/DIVHi Enrique,BRBRIf the geometrical figures that I =
have to=20
draw are stored in a text file in form of coordinates or equations, is =
there=20
any way to read these input files and then use it for creating =
figures- even=20
using some other tool/language that GID is compatible with? =
BRBRHow can I=20
get id no. of a surface if I am writing a batch file? As the =
geometries vary,=20
the id nos of surfaces to be selected will differ. For general case, I =
have=20
been thinking if it is possible to select any entity by specifying =
conditions.=20
For example, is it possible to chop off part of the plane lying =
outside a=20
known volume. Can I give some conditional command in this case? The =
major=20
problem is if it can be done using batch file.BRBRWell, I am going =
through=20
all the methods you told me in your last email but I doubt what I want =
to do=20
can simply be done using GID only. I think I would have to use some =
other tool=20
as well and I can do meshing using GID. If it is not possible to do =
with GID,=20
please suggest me some other tool which I can use along with GID.=20
BRBRThanking you.BRBRAnticipating you responseBRBRAnjaney=20
VatsalBRBRBRBR
DIV class=3Dgmail_quoteOn Wed, Jun 4, 2008 at 9:35 PM, Enrique =
Escolano <A=20
href=3D"mailto:escolano at cimne.upc.edu"escolano at cimne.upc.edu/A> =
wrote:BR
BLOCKQUOTE class=3Dgmail_quote=20
style=3D"PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: =
rgb(204,204,204) 1px solid"
DIV bgcolor=3D"#ffffff"
DIVFONT face=3DArial size=3D2Hello,/FONT/DIV
DIVFONT face=3DArial size=3D2/FONT&nbsp;/DIV
DIVFONT face=3DArial size=3D2To select an entity simply must =
specify the id=20
number. /FONTFONT face=3DArial size=3D2You can also say a =
range&nbsp; a:b=20
that mean from a to b/FONT/DIV
DIVFONT face=3DArial size=3D2you can omit b or use 'end' as the =
last=20
available entity&nbsp;number, then 1:end select all entities =
of&nbsp;a=20
type/FONT/DIV
DIVFONT face=3DArial size=3D2/FONT&nbsp;/DIV
DIVFONT face=3DArial size=3D2An interesting way to select =
entities when=20
automatizing from scripts is to separate in layers and&nbsp;specify =
the=20
layername where the entities are, e.g/FONT/DIV
DIVFONT face=3DArial size=3D2layer:Layer1/FONT/DIV
DIVFONT face=3DArial size=3D2/FONT&nbsp;/DIV
DIVFONT face=3DArial size=3D2It's possible also apply filters to =
the=20
selection, to keep entities that satisfy some =
conditional/FONT/DIV
DIVFONT face=3DArial size=3D2/FONT&nbsp;/DIV
DIV
DIVFONT face=3DArial size=3D2When selecting points, an =
un/FONTFONT=20
face=3DArial size=3D2usual way is to specify a plane =
equation/FONT/DIV
DIV
DIVFONT face=3DArial =
size=3D2plane:a,b,c,d,rBR/FONT/DIV/DIV/DIV
DIVFONT face=3DArial size=3D2Read GiD help about User =
basics->Entity=20
selection/FONT/DIV
DIVFONT face=3DArial size=3D2/FONT&nbsp;/DIV
DIV
DIVFONT face=3DArial size=3D2Sorry, but It doesn't exist any =
command to=20
select entities near a&nbsp;coordinate./FONT/DIV
DIVFONT face=3DArial size=3D2/FONT&nbsp;/DIVFONT =
color=3D#888888
DIVFONT face=3DArial size=3D2Enrique/FONT/DIV/FONT/DIV
DIV
DIV/DIV
DIV class=3DWj3C7c
BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: rgb(0,0,0) 2px solid; MARGIN-RIGHT: 0px"
DIV=20
style=3D"FONT: 10pt arial; font-size-adjust: none; font-stretch: =
normal"-----=20
Original Message ----- /DIV
DIV=20
style=3D"BACKGROUND: rgb(228,228,228) 0% 50%; FONT: 10pt arial; =
font-size-adjust: none; font-stretch: normal; -moz-background-clip: =
-moz-initial; -moz-background-origin: -moz-initial; =
-moz-background-inline-policy: -moz-initial"BFrom:/B=20
A title=3Danjaney.iitkgp at gmail.com =
href=3D"mailto:anjaney.iitkgp at gmail.com"=20
target=3D_blankanjaney vatsal/A /DIV
DIV=20
style=3D"FONT: 10pt arial; font-size-adjust: none; font-stretch: =
normal"BTo:/B=20
A title=3Dgidlist at gid.cimne.upc.edu =
href=3D"mailto:gidlist at gid.cimne.upc.edu"=20
target=3D_blankgidlist at gid.cimne.upc.edu/A /DIV
DIV=20
style=3D"FONT: 10pt arial; font-size-adjust: none; font-stretch: =
normal"BSent:/B=20
Wednesday, June 04, 2008 7:15 PM/DIV
DIV=20
style=3D"FONT: 10pt arial; font-size-adjust: none; font-stretch: =
normal"BSubject:/B=20
[GiDlist] batch file/DIV
DIVBR/DIVHiii,BRBRI have to draw geometries in GID using =
batch=20
file. I am facing difficulties as I am not aware of some commands =
like=20
that for selecting a particular entity (surafce, volume etc) or =
all=20
entities. Please tell me how to get the commands for batch files. =
Is there=20
any direct command to draw a volume when its coordinates are =
known?=20
BRBRAnjaney=20
=
VatsalBR/BLOCKQUOTE/DIV/DIV/DIV/BLOCKQUOTE/DIVBR/BLOCKQU=
OTE/BODY/HTML

------=_NextPart_000_00BC_01C8C70F.534DE5B0--
Post Reply