[GiDlist] keyboard input

Dear all,

Has anyone ever used GID on the Fedora 7 and Fedora 8? I can not use
my keyboard to input any characters.



Regards!



Tao

=====================================

TERM=vt100

SHELL=/bin/bash

QTDIR=/usr/lib/qt-3.3

QTINC=/usr/lib/qt-3.3/include

INPUTRC=/etc/inputrc

LANG=zh_CN.GBK

KDE_IS_PRELINKED=1

KDEDIRS=/usr

QTLIB=/usr/lib/qt-3.3/lib

LESSOPEN=|/usr/bin/lesspipe.sh %s

PETSC_DIR=/usr/local/PETSc

G_BROKEN_FILENAMES=1

=====================================

-------------- next part --------------
An HTML attachment was scrubbed…
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20080618/61eb66d5/attachment.htm

Hi to all users of GiD

i’m trying to create a script in TCl language to assign force load to each node, but not to nodes with constrain ( named Vincoli in my case). it run well when it assign the conditions, but i dont find the way to found a comand to give true or false ( 0 or 1), or a list oh nodes with condition Vincoli assigned.

the *.tcl file is

GiDMenu::Create “Pakka-kun” PRE -2 =GiDMenu::InsertOption “Pakka-kun” [list “Pacca”] 0 PRE “Pacca”
GiDMenu::RemoveOption “Help” [list “What is new”] PRE _
GiDMenu::UpdateMenus

proc Pacca {} { global ParametricPriv set w .gid.parametric #creating the main window InitWindow $w “Create Parametric Line” ParametricWindowGeom #creating the widgets frame $w.frmEquations label $w.frmEquations.lx -text “X(t)” entry $w.frmEquations.ex -relief sunken -width 15 -textvariable ParametricPriv(xt) label $w.frmEquations.ly -text “Y(t)” entry $w.frmEquations.ey -relief sunken -width 15 -textvariable ParametricPriv(yt) label $w.frmEquations.lz -text “Z(t)” entry $w.frmEquations.ez -relief sunken -width 15 -textvariable ParametricPriv(zt) frame $w.frmButtons button $w.frmButtons.btnApply -text “Assegna” \ -command “Assign_loads $w” \ -underline 0 -width 6 button $w.frmButtons.btnclose -text “Termina” \ -command “destroy $w” \ -underline 0 -width 6 #packing the widgets grid $w.frmEquations -padx 5 -pady 5 -sticky ew grid $w.frmEquations.lx $w.frmEquations.ex -sticky e grid $w.frmEquations.ly $w.frmEquations.ey -sticky e grid $w.frmEquations.lz $w.frmEquations.ez -sticky e grid conf $w.frmEquations.ex $w.frmEquations.ey $w.frmEquations.ez -sticky ew grid columnconf $w.frmEquations 1 -weight 1 grid $w.frmButtons -sticky ews -columnspan 7 grid $w.frmButtons.btnApply $w.frmButtons.btnclose -padx 5 -pady 6 grid columnconf $w “0” -weight 1 grid rowconfigure $w “3” -weight 1 }

proc Assign_loads { w } {global ParametricPriv set fx $ParametricPriv(xt) set fy $ParametricPriv(yt) set fz $ParametricPriv(zt) set x [expr $fx] set y [expr $fy] set z [expr $fz].central.s process "Mescape Data Conditions AssignCond Point-Force-Load Change $fx $fy $fz"for { set i 0 } { $i = [GiD_Info Mesh MaxNumNodes] } { incr i} {
if { [GiD_Info conditions] 5 } { set nodo [expr $i] .central.s process “$nodo”} else { }
}.central.s process “escape”.central.s process “Mescape”.central.s process “redraw”}



and the *.cnd

NUMBER: 1 CONDITION:VincoliCONDTYPE: over pointsCONDMESHTYPE: over nodesQUESTION:Tipologia:#CB#(Muro,Telaio)VALUE:TelaioDEPENDENCIES: (Muro,HIDE,Rotazione,#CURRENT#)DEPENDENCIES: (Telaio,RESTORE,Rotazione,#CURRENT#)QUESTION:Blocco_X:#CB#(1,0)VALUE:1QUESTION:Blocco_Y:#CB#(1,0)VALUE: 1QUESTION: Rotazione#CB#(1,0)VALUE: 1END CONDITION
NUMBER: 2 CONDITION: Point-Force-LoadCONDTYPE: over pointsCONDMESHTYPE: over nodesQUESTION:X-ForceVALUE: QUESTION:Y-ForceVALUE: QUESTION:z-ForceVALUE: END CONDITION



I put the “if” in the proc of the tcl after the For only to try the comand if run with the for
I can also made a new for with a list of nodes, but i don’t find the comand on GiD manual to do that, to assign the point force load with “0 0 0”.

Thank for help and suggestions

Thanks for help


Explore the seven wonders of the world

-------------- next part --------------
An HTML attachment was scrubbed…
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20080619/34656051/attachment.htm

Some comments:

1- don’t use this names for your variables or window names, because they are used for some GiD standard windows
e.g, instead
global ParametricPriv
set w .gid.parametric
InitWindow $w “Create Parametric Line” ParametricWindowGeom
can use some like:
global PakkaPriv
set w .gid.pakka
InitWindow $w [= “Pakka window”] PakkaWindowGeom

2- It’s a bad idea to apply conditions directly to mesh entities, it’s better to apply to geometric entities and then generate the mesh.

and your if expression "if { [GiD_Info conditions] 5 } " is wrong:

  • GiD_Info conditions need more arguments, read GiD help to know this and
  • and you need to use some conditional, like if { [GiD_Info conditions …] == “5” } (read some manual about Tcl syntax)


    I really don’t understand what are you trying to do.

you can ask GiD for the list of the nodes and its values with the condition Point-Force-Load
GiD_Info conditions Point-Force-Load mesh

and you can apply for example the values $fx $fy $fz to the nodes 1 and 2 (in mesh view) with
GiD_AssignData condition Point-Force-Load Nodes “$fx $fy $fz” “1 2”
or also with this through the GiD process loop:
GiD_Process Mescape Data Conditions AssignCond Point-Force-Load Change $fx $fy $fz 1 2

Regards

Enrique Escolano


----- Original Message -----
From: marco paccapelo
To: gidlist at gid.cimne.upc.edu
Sent: Thursday, June 19, 2008 2:12 PM
Subject: [GiDlist] Tcl script


Hi to all users of GiD

i’m trying to create a script in TCl language to assign force load to each node, but not to nodes with constrain ( named Vincoli in my case). it run well when it assign the conditions, but i dont find the way to found a comand to give true or false ( 0 or 1), or a list oh nodes with condition Vincoli assigned.

the *.tcl file is

GiDMenu::Create “Pakka-kun” PRE -2 =
GiDMenu::InsertOption “Pakka-kun” [list “Pacca”] 0 PRE “Pacca”
GiDMenu::RemoveOption “Help” [list “What is new”] PRE _

GiDMenu::UpdateMenus


proc Pacca {} {
global ParametricPriv
set w .gid.parametric
#creating the main window
InitWindow $w “Create Parametric Line” ParametricWindowGeom
#creating the widgets
frame $w.frmEquations
label $w.frmEquations.lx -text “X(t)”
entry $w.frmEquations.ex -relief sunken -width 15 -textvariable ParametricPriv(xt)
label $w.frmEquations.ly -text “Y(t)”
entry $w.frmEquations.ey -relief sunken -width 15 -textvariable ParametricPriv(yt)
label $w.frmEquations.lz -text “Z(t)”
entry $w.frmEquations.ez -relief sunken -width 15 -textvariable ParametricPriv(zt)

frame $w.frmButtons
button $w.frmButtons.btnApply -text “Assegna”
-command “Assign_loads $w”
-underline 0 -width 6
button $w.frmButtons.btnclose -text “Termina”
-command “destroy $w”
-underline 0 -width 6
#packing the widgets
grid $w.frmEquations -padx 5 -pady 5 -sticky ew
grid $w.frmEquations.lx $w.frmEquations.ex -sticky e
grid $w.frmEquations.ly $w.frmEquations.ey -sticky e
grid $w.frmEquations.lz $w.frmEquations.ez -sticky e
grid conf $w.frmEquations.ex $w.frmEquations.ey $w.frmEquations.ez -sticky ew
grid columnconf $w.frmEquations 1 -weight 1

grid $w.frmButtons -sticky ews -columnspan 7
grid $w.frmButtons.btnApply $w.frmButtons.btnclose -padx 5 -pady 6
grid columnconf $w “0” -weight 1
grid rowconfigure $w “3” -weight 1
}

proc Assign_loads { w } {
global ParametricPriv
set fx $ParametricPriv(xt)
set fy $ParametricPriv(yt)
set fz $ParametricPriv(zt)
set x [expr $fx]
set y [expr $fy]
set z [expr $fz]
.central.s process “Mescape Data Conditions AssignCond Point-Force-Load Change $fx $fy $fz”
for { set i 0 } { $i = [GiD_Info Mesh MaxNumNodes] } { incr i} {
if { [GiD_Info conditions] 5 } {

set nodo [expr $i]
.central.s process “$nodo”
} else {

}
}
.central.s process “escape”
.central.s process “Mescape”
.central.s process “redraw”
}



and the *.cnd

NUMBER: 1 CONDITION:Vincoli
CONDTYPE: over points
CONDMESHTYPE: over nodes
QUESTION:Tipologia:#CB#(Muro,Telaio)
VALUE:Telaio
DEPENDENCIES: (Muro,HIDE,Rotazione,#CURRENT#)
DEPENDENCIES: (Telaio,RESTORE,Rotazione,#CURRENT#)
QUESTION:Blocco_X:#CB#(1,0)
VALUE:1
QUESTION:Blocco_Y:#CB#(1,0)
VALUE: 1
QUESTION: Rotazione#CB#(1,0)
VALUE: 1
END CONDITION
NUMBER: 2 CONDITION: Point-Force-Load
CONDTYPE: over points
CONDMESHTYPE: over nodes
QUESTION:X-Force
VALUE:
QUESTION:Y-Force
VALUE:
QUESTION:z-Force
VALUE:
END CONDITION



I put the “if” in the proc of the tcl after the For only to try the comand if run with the for
I can also made a new for with a list of nodes, but i don’t find the comand on GiD manual to do that, to assign the point force load with “0 0 0”.

Thank for help and suggestions

Thanks for help

\

Explore the seven wonders of the world Learn more!
-------------- next part --------------
An HTML attachment was scrubbed…
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20080623/2e188c26/attachment.htm