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
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 != "--CANCEL--" } {
set idx [lsearch $mysizes $retval]
if { $idx != -1} {
set mysizes [lreplace $mysizes $idx $idx]
}
set mysizes [linsert $mysizes 0 $retval]
JustVolumes $retval
JustSurfaces $retval
JustLines $retval
} 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]
.central.s process escape escape escape escape Meshing
MeshCriteria NoMesh Surfaces 1:
.central.s process escape escape escape escape Meshing MeshCriteria
NoMesh Lines 1:
.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
}
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]
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
}
.central.s process escape escape escape escape Meshing
MeshCriteria NoMesh Lines 1:
.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
}
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]
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
}
.central.s process escape escape escape escape Meshing
MeshCriteria NoMesh Surfaces SelWindow 1:
.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
}
Best Regards,
dialogs
At 01:44 PM 11/25/2003, you wrote:
.central.s process escape
Khaled Obeidat
Research Engineer
EMAG Technologies, Inc.
www.emagtechnologies.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20031125/a7d3bede/attachment.htm