I would like to come back to the coordinates of the direction of observation of the
geometry in GID.
Is the 7.2 version take into account this possibility ?
In my electromagnetic problem, the user could find easily the direction of propagation
of a wave.
Thanks again for you response and please receive my best wishes for the 2003 new year !
May all your (and mine too!) GID projects born this year !!
G.W.R.Geis
ieea a écrit :
Thank you for the response. I have seen that the m matrix can be useful to obtain the 3D coordinates of the observation vector. I think this information could be useful to easily find an orientation vector of an object especially to give the good orientation of a symbol that could be use for a calculation. In my problem, I put a symbol on my object (not yet on the mesh!). This symbolizes a directive antenna I wish to orient. If you have an easy calculation to have the vector coordinates from m-matrix without I calculate that, I will be happy. Thanks again for you response. G.W.R.Geis P.S. Next contact in january !! Have a good Christmas. “Miguel A. de Riera Pasenau” a écrit : Hi, what is you idea? no in a direct way. but, you can get the view parameters through the ‘View-View-Save’ menu option which writes an ASCII file the real-world-3D-window limits, the rotation vector, the rotation matrix and the center of the figure. we can find a way to make it possible and usable for future versions, including the drawing of some simple 3D objects from tcl. miguel ieea wrote: Dear All, Is it possible to obtain the informations about the coordinates of the vector corresponding to the direction of observation of an object ? Thank you for your response. G.W.R.Geis
You can restore a view previously saved in a file with view-Save…
To restore the view, use from tcl:
.central.s process escape escape escape escape View ReadView “filename”
Enrique Escolano
----- Original Message -----
From: “ieea” ieea at club-internet.fr
To: gidlist at gatxan.cimne.upc.es
Sent: Thursday, January 03, 2002 3:16 PM
Subject: [GiDlist] Coordinates of the direction of observation in GID 7.2
version ?
Dear All, I would like to come back to the coordinates of the direction of
observation of the geometry in GID. Is the 7.2 version take into account this possibility ? In my electromagnetic problem, the user could find easily the direction of
propagation of a wave. Thanks again for you response and please receive my best wishes for the
2003 new year ! May all your (and mine too!) GID projects born this year !! G.W.R.Geis
ieea a écrit : Thank you for the response. I have seen that the m matrix can be useful to obtain the 3D coordinates
of the observation vector. I think this information could be useful to easily find an orientation
vector of an object especially to give the good orientation of a symbol that could be use for a
calculation. In my problem, I put a symbol on my object (not yet on the mesh!). This
symbolizes a directive antenna I wish to orient. If you have an easy calculation to have the vector coordinates from
m-matrix without I calculate that, I will be happy. Thanks again for you response. G.W.R.Geis P.S. Next contact in january !! Have a good Christmas. “Miguel A. de Riera Pasenau” a écrit : Hi, what is you idea? no in a direct way. but, you can get the view parameters through the ‘View-View-Save’ menu option which writes an ASCII file the real-world-3D-window limits, the rotation vector, the rotation matrix and the center of the figure. we can find a way to make it possible
and usable for future versions, including the drawing of some simple 3D
objects from tcl. miguel ieea wrote: Dear All, Is it possible to obtain the informations about the coordinates of
the vector corresponding to the direction of observation of an object ? Thank you for your response. G.W.R.Geis
Hello;
I am trying to modify the “parametric.tcl” file, so i wish to calculate the
lenght of parametric curve, like sum every segment(i), But i have troubles to
declarate the array, anybody can help me??
Advanced thanks;
i attached a pice of file to modify.
for { set i 0 } { $i $ParametricPriv(NumberPointsT) } { incr i} {
set t [expr $a+$i*$b]
set x [expr $fx]
set y [expr $fy]
set z [expr $fz]
.central.s process $x $y $z #now i try to put the array
set xlenght(i) $x
set y1enght(i) $y
set z1enght(i) $z
}
calculate lenght
set long 0
for { set i 1 } { $i $ParametricPriv(NumberPointsT) } { incr i} {
set j [expr $i-1]
set long[expr
sqrt(($xlenght(i)-$xlenght($j))($xlenght(i)-$xlenght($j))+($ylenght(i)-$ylenght($j))($ylenght(i)-$ylenght($j))+($zlenght(i)-$zlenght($j))*($zlenght(i)-$zlenght($j)))+$long]
There are some errors in this expression: (in red) maybe problems come
from these errors instead of tcl arrays.
set xlength($i) $x
set y1ength($i) $y
set z1ength($i) $z
And:
set long _ [expr
sqrt(($xlength($i)-$xlength($j))($xlength($i)-$xlength($j))+($ylength($
i)-$ylength($j))($ylength($i)-$ylength($j))+($zlength($i)-$zlength($j))
*($zlength($i)-$zlength($j)))+$long]
To compress this expression you can use pow(x,y), in your case
pow((($xlength($i)-$xlength($j),2)
..
Look that length=lenght
But remember that if any variable will be use like an array never can be
use like string or list before. For example:
Hello;
I am trying to modify the “parametric.tcl” file, so i wish to calculate
the lenght of parametric curve, like sum every segment(i), But i have
troubles to declarate the array, anybody can help me??
Advanced thanks;
i attached a pice of file to modify.
for { set i 0 } { $i $ParametricPriv(NumberPointsT) } { incr
i} {
set t [expr $a+$i*$b]
set x [expr $fx]
set y [expr $fy]
set z [expr $fz]
.central.s process $x $y $z #now i try to put the array
}
calculate lenght
set long 0
for { set i 1 } { $i $ParametricPriv(NumberPointsT) } { incr
i} {
set j [expr $i-1]
set long[expr
sqrt(($xlenght(i)-$xlenght($j))($xlenght(i)-$xlenght($j))+($ylenght(i)-
$ylenght($j))($ylenght(i)-$ylenght($j))+($zlenght(i)-$zlenght($j))*($zl
enght(i)-$zlenght($j)))+$long]
Hi, There are some errors in this expression: (in red) maybe problems come from these errors instead of tcl arrays. set xlength($i) $x set y1ength($i) $y set z1ength($i) $z And: set long _ [expr sqrt(($xlength($i)-$xlength($j))($xlength($i)-$xlength($j))+($ylength($i)-$ylength($j))($ylength($i)-$ylength($j))+($zlength($i)-$zlength($j))*($zlength($i)-$zlength($j)))+$long] To compress this expression you can use pow(x,y), in your case pow((($xlength($i)-$xlength($j),2)
..
Look that length=lenght But remember that if any variable will be use like an array never can be use like string or list before. For example: Set zlength Set zlength(1) 3 It is and error.!!! Bye, Aleix -----Mensaje original----- De: gidlist-admin at gatxan.cimne.upc.es [mailto:gidlist-admin at gatxan.cimne.upc.es] En nombre de Pablo Perez del Castillo Enviado el: sábado, 04 de enero de 2003 1:20 Para: gidlist at gatxan.cimne.upc.es Asunto: [GiDlist] arrays in tcl Importancia: Alta Hello; I am trying to modify the “parametric.tcl” file, so i wish to calculate the lenght of parametric curve, like sum every segment(i), But i have troubles to declarate the array, anybody can help me?? Advanced thanks; i attached a pice of file to modify. for { set i 0 } { $i $ParametricPriv(NumberPointsT) } { incr i} { set t [expr $a+$i*$b] set x [expr $fx] set y [expr $fy] set z [expr $fz] .central.s process $x $y $z #now i try to put the array } # calculate lenght set long 0 for { set i 1 } { $i $ParametricPriv(NumberPointsT) } { incr i} { set j [expr $i-1] set long[expr sqrt(($xlenght(i)-$xlenght($j))($xlenght(i)-$xlenght($j))+($ylenght(i)-$ylenght($j))($ylenght(i)-$ylenght($j))+($zlenght(i)-$zlenght($j))*($zlenght(i)-$zlenght($j)))+$long]
As Aleix says, the error surely is because the bad use of xlenght(i) instead xlenght($i) …
It is not necessary to store the coordinates, you can calculate the long value directly inside the first loop.
You can also ask GiD to obtain a more acurate length of some curve with a regexp of the result of:
.central.s info list_entities lines “line number”
or with
.central.s info listmassproperties lines “line number”
Enrique Escolano
----- Original Message -----
From: Pablo Perez del Castillo
To: gidlist at gatxan.cimne.upc.es
Sent: Saturday, January 04, 2003 1:19 AM
Subject: [GiDlist] arrays in tcl
Hello;
I am trying to modify the “parametric.tcl” file, so i wish to calculate the lenght of parametric curve, like sum every segment(i), But i have troubles to declarate the array, anybody can help me??
Advanced thanks;
i attached a pice of file to modify.
for { set i 0 } { $i $ParametricPriv(NumberPointsT) } { incr i} {
set t [expr $a+$i*$b]
set x [expr $fx]
set y [expr $fy]
set z [expr $fz]
.central.s process $x $y $z #now i try to put the array
set xlenght(i) $x
set y1enght(i) $y
set z1enght(i) $z
}
calculate lenght
set long 0
for { set i 1 } { $i $ParametricPriv(NumberPointsT) } { incr i} {
set j [expr $i-1]
set long[expr sqrt(($xlenght(i)-$xlenght($j))($xlenght(i)-$xlenght($j))+($ylenght(i)-$ylenght($j))($ylenght(i)-$ylenght($j))+($zlenght(i)-$zlenght($j))*($zlenght(i)-$zlenght($j)))+$long]
Hello;
How Enrique note, if it use “.central.s info listmassproperties lines
“line number””, it is fater and easy. But you can tell me how many
points use GID to calculate the lenght?, i am using profiles similar to
NACA.
Thanks again
Another question;
I created a new menu, and it has a jpg pic, i had a lot of troubles to
get it, at the end i used the sample “coils”, and i got it. Anybody can
explain me when declarate $dir in the next proc?
The length of a parametric Nurbs line is calculated inside GiD, foreach interval between “knots”, with a Gauss-Legendre numerical integration rule of 8 points. (it is not calculated as a simple piecewise linear interpolation)
To use the value $dir provided by the InitGIDProject procedure in anoter procedure, you can store the value in a global variable,
for example:
proc InitGIDProject { dir } {
global PabloPriv
set PabloPriv(directory) $dir
}
proc AnotherProc { } {
global PabloPriv
WarnWinText “The value of dir is $PabloPriv(directory)”
}
Regards
Enrique Escolano
----- Original Message -----
From: Pablo Perez del Castillo
To: gidlist at gatxan.cimne.upc.es
Sent: Saturday, January 04, 2003 8:31 PM
Subject: Re: [GiDlist] arrays in tcl
Hello;
How Enrique note, if it use “.central.s info listmassproperties lines “line number””, it is fater and easy. But you can tell me how many points use GID to calculate the lenght?, i am using profiles similar to NACA.
Thanks again
Another question;
I created a new menu, and it has a jpg pic, i had a lot of troubles to get it, at the end i used the sample “coils”, and i got it. Anybody can explain me when declarate $dir in the next proc?
Where is trying to put the *.gif image: In a toolbar ? in the conditions or
materials window? …
For example, in the toolbars, the “standard” gifs used by GiD are of 24x24
pixels, but this size is arbitrary.
Happy New year to all of GiDListers!!! I tried to create the ICONS from GiD. I got the ICONs but I got trouble with its sizes. How we fix the size of those ICONS?? Do we have to specify the size of the ICON.gif from the xxxx.gif software source?? Regards.
I find the materials configuration file very powerful, but in some cases
(in my case in particular !) the name “material” is not well adapted.
Is it possible, in a problem type, to assign an other name, both in the
data menu and as the title of the materials window.
You can do the following in your InitGIDProject routine:
GidChangeDataLabel “Materials” “TheNameYouWant”
best regards,
Jorge Suit
ieea wrote:
Dear all, I find the materials configuration file very powerful, but in some cases (in my case in particular !) the name “material” is not well adapted. Is it possible, in a problem type, to assign an other name, both in the data menu and as the title of the materials window. Thank you for your response G.W.R.Geis
In materials file (problemtype_name.mat) create a book (using
instruction BOOK: book_name)
In tcl file (problemtype_name.tcl) use the following commands:
Proc InitGIDProject {dir} {
.
.
.
GidChangeDataLabel “Materials” “” #To delete materials entry in Data menu
GidAddUserDataOptions “book_name” “GidOpenMaterials book_name” #To add new Data menu entry with name “book_name”
.
.
.
.
}
If you need more help, you can take a look to Nastran problem type like
an example.
I find the materials configuration file very powerful, but in some cases
(in my case in particular !) the name “material” is not well adapted.
Is it possible, in a problem type, to assign an other name, both in the
data menu and as the title of the materials window.
A problem type can customize the labels used for “Conditions” , “Materials”, “Problem Data” or “Interval Data”
using the tcl procedure GidChangeDataLabel
This is the header of this procedure:
proc GidChangeDataLabel { GidLabel NewLabel {Singular “”} }
GidLabel can be “Conditions” , “Materials”, “Problem Data” or “Interval Data”
The third parameter is optional, to specify the singular word
After use this procedure, use the procedure UpdateMenus
for example to use the word “Properties” instead “Materials”, use:
Dear all, I find the materials configuration file very powerful, but in some cases (in my case in particular !) the name “material” is not well adapted. Is it possible, in a problem type, to assign an other name, both in the data menu and as the title of the materials window. Thank you for your response G.W.R.Geis