No subject

Moderator: GiD Team

Post Reply
Guest

No subject

Post by Guest »

.gid.central.s disable windows 1

Note: can write a tcl command directly in the GiD command line with -np- =
tclcommand=20
For example:
-np- .gid.central.s disable windows 1

But if don't open this message window, do not have any echo of the "end =
of calculation" event.

Remember to reactivate the normal windows state with:
.gid.central.s disable windows 0

Other details: Instead to use WarnWinText "...", must be more elegant to =
put a message in the lower message bar, for example

GidUtils::SetWarnLine "Meshing volumes ..."

Enrique
----- Original Message -----=20
From: Khaled Obeidat=20
To: gidlist at gatxan.cimne.upc.es=20
Sent: Tuesday, November 25, 2003 8:55 PM
Subject: Re: [GiDlist] mesh only volumes


Thanks I have applied the changes and it works but I wonder if i can =
make it look user friendly for the user, since I'm creating three files =
one for volumes, one for surfaces and the other one for lines. but GID =
will show some dialogs likes meshing in progress and then it will ask =
about boundary visualization another dialog will show the number of =
tetrahedral elements, triangles or lines.

the following four functions will do what is required but they appear =
to be not user friendly.

proc GenerateMeshAndFiles {} {
global mysizes
=20
=20
if {[lindex [.central.s info Mesh] 0]} {
# there is a previous mesh we should erase
.central.s process escape escape escape escape meshing cancelmesh =
yes
}
# now ganerate the mesh

if {![info exists mysizes]} {
set mysizes {}
}
set retval [tk_dialogComboRAM .gid.tempwinec [_ "Enter value =
window"] \
"Enter size of the elements" questhead 3 $mysizes]
if { $retval !=3D "--CANCEL--" } {=20

=20
set idx [lsearch $mysizes $retval]
if { $idx !=3D -1} {
set mysizes [lreplace $mysizes $idx $idx]=20
=20
=20
}
set mysizes [linsert $mysizes 0 $retval]
=20
JustVolumes $retval
JustSurfaces $retval
JustLines $retval
=20
=20
} else {
WarnWinText "Canceled ..."
}
}

proc JustVolumes {retval} {
set P_info [.central.s info Project]
set ProjectName [lindex $P_info 1]
set FileName1 [file join $ProjectName.gid [file tail =
$ProjectName].msh]
=20
.central.s process escape escape escape escape Meshing =
MeshCriteria NoMesh Surfaces 1:
.central.s process escape escape escape escape Meshing =
MeshCriteria NoMesh Lines 1: =20
.central.s process escape escape escape escape meshing =
generate $retval
WarnWinText "..."
.central.s process escape escape escape escape Files WriteMesh =
\"$FileName1\"
.central.s process escape=20

=20
}

proc JustSurfaces {retval} {
set P_info [.central.s info Project]
set ProjectName [lindex $P_info 1]
set FileName2 [file join $ProjectName.gid [file tail =
$ProjectName].msh2]
=20
if {[lindex [.central.s info Mesh] 0]} {
# there is a previous mesh we should erase
.central.s process escape escape escape escape meshing cancelmesh =
yes
.central.s process escape escape escape escape meshing reset yes
}
=20
.central.s process escape escape escape escape Meshing =
MeshCriteria NoMesh Lines 1:=20
.central.s process escape escape escape escape Meshing =
MeshCriteria NoMesh Volumes 1:
.central.s process escape escape escape escape meshing =
generate $retval
WarnWinText "..."
.central.s process escape escape escape escape Files WriteMesh =
\"$FileName2\"
.central.s process escape=20

=20
}

proc JustLines {retval} {
set P_info [.central.s info Project]
set ProjectName [lindex $P_info 1]
set FileName3 [file join $ProjectName.gid [file tail =
$ProjectName].msh3]
=20
if {[lindex [.central.s info Mesh] 0]} {
# there is a previous mesh we should erase
.central.s process escape escape escape escape meshing cancelmesh =
yes
.central.s process escape escape escape escape meshing reset yes
}
=20
.central.s process escape escape escape escape Meshing =
MeshCriteria NoMesh Surfaces SelWindow 1:=20
.central.s process escape escape escape escape Meshing =
MeshCriteria NoMesh Volumes SelWindow 1:
.central.s process escape escape escape escape meshing =
generate $retval
WarnWinText "..."
.central.s process escape escape escape escape Files WriteMesh =
\"$FileName3\"
.central.s process escape=20

=20
}



Best Regards,

dialogs=20
At 01:44 PM 11/25/2003, you wrote:

.central.s process escape=20
Khaled Obeidat=20
Research Engineer=20
EMAG Technologies, Inc.=20
www.emagtechnologies.com


------=_NextPart_000_0180_01C3B39C.246477E0
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.2800.1276" name=3DGENERATOR
STYLE/STYLE
/HEAD
BODY bgColor=3D#ffffff
DIVFONT face=3DArial size=3D2Read my request to a similar =
question of some=20
days ago FONT size=3D1FONT size=3D1
Plunes, 17 de noviembre de 2003 11:27/P
P/FONTRe: [GiDlist] getting rid off the message box appering at the =
end of=20
calculation action/P/FONT/FONT/DIV
DIVFONT face=3DArial size=3D2 /DIV
DIVFONT face=3DArial size=3D2Can use a trick to disable the window=20
messages:/FONT/DIV
DIVFONT face=3DArial size=3D2From tcl use:/FONT/DIV
DIVFONT face=3DArial color=3D#0000ff size=3D2.gid.central.s disable =
windows=20
1/FONT/DIV
DIVFONT face=3DArial color=3D#0000ff size=3D2/FONT /DIV
DIVFONT face=3DArial size=3D2Note: can write a tcl command =

directly in the GiD command line with /FONTFONT face=3DArial =
size=3D2-np-=20
<tclcommand>&nbsp;/FONT/DIV
DIVFONT face=3DArial size=3D2For example:/FONT/DIV
DIVFONT face=3DArial size=3D2FONT color=3D#0000ff-np- =
.gid.central.s disable=20
windows 1/FONT/FONT/DIV
DIVFONT face=3DArial color=3D#0000ff size=3D2/FONT&nbsp;/DIV
DIVFONT face=3DArial size=3D2But if&nbsp;don't open this =
message&nbsp;window, do=20
not&nbsp;have any echo of the "end =
of&nbsp;calculation"&nbsp;event./FONT/DIV
DIVFONT face=3DArial size=3D2/FONT&nbsp;/DIV
DIVFONT face=3DArial size=3D2Remember to reactivate the normal =
windows state=20
with:/FONT/DIV
DIVFONT face=3DArial color=3D#0000ff size=3D2.gid.central.s disable =
windows=20
0/FONT/DIV
DIVFONT color=3D#0000ff/FONT&nbsp;/DIV
DIVOther details: Instead to use&nbsp;WarnWinText "...",&nbsp;must be =
more=20
elegant to&nbsp;put&nbsp;a message&nbsp;in the lower message bar, for=20
example/DIV
DIV&nbsp;/DIV
DIVGidUtils::SetWarnLine "Meshing volumes ..."BR/DIV
DIVEnrique/DIVX-TAB/FONT
BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"
DIV style=3D"FONT: 10pt arial"----- Original Message ----- /DIV
DIV=20
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"BFrom:/B=20
A title=3Dkobeidat at emagtechnologies.com=20
href=3D"mailto:kobeidat at emagtechnologies.com"Khaled Obeidat/A =
/DIV
DIV style=3D"FONT: 10pt arial"BTo:/B A =
title=3Dgidlist at gatxan.cimne.upc.es=20
=
href=3D"mailto:gidlist at gatxan.cimne.upc.es"gidlist at gatxan.cimne.upc.es/=
A=20
/DIV
DIV style=3D"FONT: 10pt arial"BSent:/B Tuesday, November 25, =
2003 8:55=20
PM/DIV
DIV style=3D"FONT: 10pt arial"BSubject:/B Re: [GiDlist] mesh =
only=20
volumes/DIV
DIVBR/DIVThanks I have applied the changes and it works but =
I&nbsp;=20
wonder if i can make it look user friendly for the user, since I'm =
creating=20
three files one for volumes, one for surfaces and the other one for =
lines. but=20
GID will show some dialogs likes meshing in progress and then it will =
ask=20
about boundary visualization another dialog will show the number of=20
tetrahedral elements, triangles or lines.BRBRthe&nbsp; following =
four=20
functions will do what is required but they appear to be not user=20
friendly.BRBRproc GenerateMeshAndFiles {} {BR&nbsp;&nbsp;&nbsp; =
global=20
=
mysizesBRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TAB=
BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TABBR&=
nbsp;&nbsp;&nbsp;=20
if {[lindex [.central.s info Mesh] 0]} {BR&nbsp;&nbsp;&nbsp; # there =
is a=20
previous mesh we should eraseBR&nbsp;&nbsp;&nbsp; .central.s process =
escape=20
escape escape escape meshing cancelmesh yesBR&nbsp;&nbsp;&nbsp;=20
}BR&nbsp;&nbsp;&nbsp; # now ganerate the =
meshBRBR&nbsp;&nbsp;&nbsp; if=20
{![info exists mysizes]} {BR&nbsp;&nbsp;&nbsp; set mysizes=20
{}BR&nbsp;&nbsp;&nbsp; }BR&nbsp;&nbsp;&nbsp; set retval =
[tk_dialogComboRAM=20
.gid.tempwinec [_ "Enter value window"]=20
=
\BR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
"Enter=20
size of the elements" questhead 3 $mysizes]BR&nbsp;&nbsp;&nbsp; if { =
$retval=20
!=3D "--CANCEL--" } { BRBR&nbsp; BR&nbsp;&nbsp;&nbsp; set idx =
[lsearch=20
$mysizes $retval]BR&nbsp;&nbsp;&nbsp; if { $idx !=3D -1}=20
{BR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set mysizes [lreplace =
$mysizes=20
$idx $idx] BR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
BR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BR&nbsp;&nbsp;&nbsp;=20
}BR&nbsp;&nbsp;&nbsp; set mysizes [linsert $mysizes 0=20
$retval]BR&nbsp;&nbsp;&nbsp; BR&nbsp;&nbsp;&nbsp;=20
X-TAB&nbsp;&nbsp;&nbsp;&nbsp;/X-TABJustVolumes=20
$retvalBR&nbsp;&nbsp;&nbsp;=20
X-TAB&nbsp;&nbsp;&nbsp;&nbsp;/X-TABJustSurfaces=20
$retvalBR&nbsp;&nbsp;&nbsp; =
X-TAB&nbsp;&nbsp;&nbsp;&nbsp;/X-TABJustLines=20
=
$retvalBRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TAB=
BR&nbsp;=20
BR&nbsp;&nbsp;&nbsp; } else {BR&nbsp;&nbsp;&nbsp; WarnWinText =
"Canceled=20
..."BR&nbsp;&nbsp;&nbsp; }BR}BRBRproc JustVolumes {retval}=20
=
{BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TABset =
P_info=20
[.central.s info=20
=
Project]BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TA=
Bset=20
ProjectName&nbsp; [lindex $P_info=20
=
1]BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TABset =

FileName1 [file join&nbsp; $ProjectName.gid [file tail=20
=
$ProjectName].msh]BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;/X-TABBRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/=
X-TAB.central.s=20
process escape escape escape escape Meshing MeshCriteria NoMesh =
Surfaces=20
1:BR&nbsp;&nbsp;&nbsp; .central.s process escape escape escape =
escape=20
Meshing MeshCriteria NoMesh Lines 1:&nbsp;=20
=
BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TAB.centr=
al.s=20
process escape escape escape escape meshing generate=20
=
$retvalBRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TAB=
WarnWinText=20
=
"..."BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TAB.=
central.s=20
process escape escape escape escape Files WriteMesh=20
=
\"$FileName1\"BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
/X-TAB.central.s=20
process escape=20
=
BRBRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TABB=
R}BRBRproc=20
JustSurfaces {retval}=20
=
{BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TABset =
P_info=20
[.central.s info=20
=
Project]BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TA=
Bset=20
ProjectName&nbsp; [lindex $P_info=20
=
1]BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TABset =

FileName2 [file join&nbsp; $ProjectName.gid [file tail=20
=
$ProjectName].msh2]BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;/X-TABBRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
/X-TABif=20
{[lindex [.central.s info Mesh] 0]} {BR&nbsp;&nbsp;&nbsp; # there is =
a=20
previous mesh we should eraseBR&nbsp;&nbsp;&nbsp; .central.s process =
escape=20
escape escape escape meshing cancelmesh =
yesBR&nbsp;&nbsp;&nbsp;&nbsp;=20
.central.s process escape escape escape escape meshing reset=20
yesBR&nbsp;&nbsp;&nbsp;=20
=
}BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TABBR=
X-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TAB.central.s =

process escape escape escape escape Meshing MeshCriteria NoMesh Lines =
1:=20
=
BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TAB.centr=
al.s=20
process escape escape escape escape Meshing MeshCriteria NoMesh =
Volumes=20
=
1:BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TAB.cen=
tral.s=20
process escape escape escape escape meshing generate=20
=
$retvalBRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TAB=
WarnWinText=20
=
"..."BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TAB.=
central.s=20
process escape escape escape escape Files WriteMesh=20
=
\"$FileName2\"BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
/X-TAB.central.s=20
process escape=20
=
BRBRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TABB=
R}BRBRproc=20
JustLines {retval}=20
=
{BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TABset =
P_info=20
[.central.s info=20
=
Project]BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TA=
Bset=20
ProjectName&nbsp; [lindex $P_info=20
=
1]BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TABset =

FileName3 [file join&nbsp; $ProjectName.gid [file tail=20
=
$ProjectName].msh3]BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;/X-TABBRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
/X-TABif=20
{[lindex [.central.s info Mesh] 0]} {BR&nbsp;&nbsp;&nbsp; # there is =
a=20
previous mesh we should eraseBR&nbsp;&nbsp;&nbsp; .central.s process =
escape=20
escape escape escape meshing cancelmesh =
yesBR&nbsp;&nbsp;&nbsp;&nbsp;=20
.central.s process escape escape escape escape meshing reset=20
yesBR&nbsp;&nbsp;&nbsp;=20
=
}BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TABBR=
X-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TAB.central.s =

process escape escape escape escape Meshing MeshCriteria NoMesh =
Surfaces=20
SelWindow 1:=20
=
BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TAB.centr=
al.s=20
process escape escape escape escape Meshing MeshCriteria NoMesh =
Volumes=20
SelWindow=20
=
1:BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TAB.cen=
tral.s=20
process escape escape escape escape meshing generate=20
=
$retvalBRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TAB=
WarnWinText=20
=
"..."BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TAB.=
central.s=20
process escape escape escape escape Files WriteMesh=20
=
\"$FileName3\"BRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
/X-TAB.central.s=20
process escape=20
=
BRBRX-TAB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/X-TABB=
R}BRBRBRBRBest=20
Regards,BRBR&nbsp;dialogs BRAt 01:44 PM 11/25/2003, you =
wrote:BR
BLOCKQUOTE class=3Dcite cite=3D"" type=3D"cite"FONT=20
face=3D"Times New Roman, Times".central.s process escape=20
/FONT/BLOCKQUOTEX-SIGSEP
P/X-SIGSEPKhaled Obeidat BRResearch Engineer BREMAG =
Technologies, Inc.=20
BRFONT color=3D#0000ffUA =
href=3D"http://www.emagtechnologies.com/"=20
=
eudora=3D"autourl"www.emagtechnologies.comBR/A/FONT/U/P/BLOCK=
QUOTE/BODY/HTML

------=_NextPart_000_0180_01C3B39C.246477E0--
Post Reply