[GiDlist] Coordinates of the direction of observation in GID
Moderator: GiD Team
[GiDlist] Coordinates of the direction of observation in GID
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
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist
--
--------------------------------------------------------------------------------
Miguel A. de Riera Pasenau miguel at cimne.upc.es http://gid.cimne.upc.es
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist
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
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist
--
--------------------------------------------------------------------------------
Miguel A. de Riera Pasenau miguel at cimne.upc.es http://gid.cimne.upc.es
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist
[GiDlist] Changing the name of the materials menu
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
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
[GiDlist] Changing the name of the materials menu
Dear Geis,
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
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist
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
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist
[GiDlist] Changing the name of the materials menu
It is possible:
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.
Bye,
Aleix
-----Mensaje original-----
De: gidlist-admin at gatxan.cimne.upc.es
[mailto:gidlist-admin at gatxan.cimne.upc.es] En nombre de ieea
Enviado el: viernes, 03 de enero de 2003 15:25
Para: GiDlist at gatxan.cimne.upc.es
Asunto: [GiDlist] Changing the name of the materials menu
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
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist
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.
Bye,
Aleix
-----Mensaje original-----
De: gidlist-admin at gatxan.cimne.upc.es
[mailto:gidlist-admin at gatxan.cimne.upc.es] En nombre de ieea
Enviado el: viernes, 03 de enero de 2003 15:25
Para: GiDlist at gatxan.cimne.upc.es
Asunto: [GiDlist] Changing the name of the materials menu
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
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist
[GiDlist] Changing the name of the materials menu
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:
GidChangeDataLabel Materials Properties
UpdateMenus
Regards
Enrique Escolano
----- Original Message -----
From: "ieea" ieea at club-internet.fr
To: GiDlist at gatxan.cimne.upc.es
Sent: Friday, January 03, 2003 3:24 PM
Subject: [GiDlist] Changing the name of the materials menu
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
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20030103/a72ebca7/attachment.htm
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:
GidChangeDataLabel Materials Properties
UpdateMenus
Regards
Enrique Escolano
----- Original Message -----
From: "ieea" ieea at club-internet.fr
To: GiDlist at gatxan.cimne.upc.es
Sent: Friday, January 03, 2003 3:24 PM
Subject: [GiDlist] Changing the name of the materials menu
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
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20030103/a72ebca7/attachment.htm
[GiDlist] Coordinates of the direction of observation in GID
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
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist
--
--------------------------------------------------------------------------
------
Miguel A. de Riera Pasenau miguel at cimne.upc.es
http://gid.cimne.upc.es
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist
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
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist
--
--------------------------------------------------------------------------
------
Miguel A. de Riera Pasenau miguel at cimne.upc.es
http://gid.cimne.upc.es
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist
[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]
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20030103/85866f0e/attachment.htm
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]
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20030103/85866f0e/attachment.htm
[GiDlist] arrays in tcl
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))*($zl
enght(i)-$zlenght($j)))+$long]
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20030103/407b8fa1/attachment.htm
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))*($zl
enght(i)-$zlenght($j)))+$long]
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20030103/407b8fa1/attachment.htm
[GiDlist] arrays in tcl
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]
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20030103/f4c14099/attachment.htm
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]
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20030103/f4c14099/attachment.htm
[GiDlist] arrays in tcl
alot of thanks Aleix
Aleix Valls escribió:
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]
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20030103/773c2c26/attachment.htm
Aleix Valls escribió:
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]
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20030103/773c2c26/attachment.htm