Hi,
Sorry for confusing you! I forgot that the command “Draw
Normals” on “Surfaces” requests a user input: the surfaces where
to draw.
I overwrote the command “DrawNormals“ a long time ago with a
Tcl function which draws all the normals without further user input:
proc CheckNormalsVector {} {
.central.s process escape escape escape escape Geometry
...
utilities renumber Yes
.central.s process escape escape escape escape \
utilities DrawNormals Surfaces 1:[NumSurfaces]
}
and I FORGOT complitely the normally necessary surface selection!
I’ll program a special “NumSurfaces” function reading the layers
data and giving the list of visible surfaces only.
So no request nor suggestion
Have a nice day
Andrea Calaon
Ashurst Lodge, Ashurst
Southampton, Hampshire
SO40 7AA, UK
Tel. office: +44 23 80 293 223
Fax office: +44 23 80 292 853
Mobile: +44 7766 488 225
E-mail: andrea at beasy.com
[GiDlist] Draw Normals
Moderator: GiD Team
[GiDlist] Draw Normals
There is a Tcl-GiD sample procedure to return the current surface (or othe entities) list, considering its layer status (On/Off and Freeze/Unfreeze)
#set entities to {points, lines, surfaces, volumes, nodes or elements)
#set parameters on and freeze to 0 , 1 or *
#return the list of surfaces matching the required "On/Off" and "Freeze/Unfreeze" layer status
#set * to accept surfaces with any layer status value
proc ListEntitiesStatus { entities first last { on * } { freeze * } } {
foreach layer [.central.s info layers] {
set infolayer [lindex [.central.s info layers $layer] 0]
if { ( $on == "*" || [lindex $infolayer 0] == $on ) && \
( $freeze == "*" || [lindex $infolayer 1] == $freeze ) } {
set AcceptLayer($layer) 1
} else {
set AcceptLayer($layer) 0
}
}
if { $last == "end" } {
set last ""
}
set infosurfs [.central.s info list_entities $entities $first:$last]
set ret ""
foreach {string num layer} [regexp -all -inline "Num: (\[0-9]+)\[^\n]*\nLAYER: (\[^\n]+)" $infosurfs] {
if { $AcceptLayer($layer) } {
lappend ret $num
}
}
return $ret
}
And there must be your customized "DrawNormals" procedure:
proc CheckNormalsVector {} {
#draw normals only in surfaces with layers "On" and "Unfreeze"
set entities "surfaces"
set on 1
set freeze 0
.central.s process escape escape escape escape utilities DrawNormals Surfaces [ListSurfsStatus $entities 1 end $on $freeze ]
}
Enrique Escolano
----- Original Message -----
From: "Andrea Calaon" andrea at beasy.com
To: gidlist at gatxan.cimne.upc.es
Sent: Monday, December 08, 2003 5:26 PM
Subject: [GiDlist] Draw Normals
Hi,
Sorry for confusing you! I forgot that the command "Draw
Normals" on "Surfaces" requests a user input: the surfaces where
to draw.
I overwrote the command "DrawNormals" a long time ago with a
Tcl function which draws all the normals without further user input:
proc CheckNormalsVector {} {
.central.s process escape escape escape escape Geometry
...
utilities renumber Yes
.central.s process escape escape escape escape \
utilities DrawNormals Surfaces 1:[NumSurfaces]
}
and I FORGOT complitely the normally necessary surface selection!
I'll program a special "NumSurfaces" function reading the layers
data and giving the list of visible surfaces only.
So no request nor suggestion .
Have a nice day
Andrea Calaon
Ashurst Lodge, Ashurst
Southampton, Hampshire
SO40 7AA, UK
Tel. office: +44 23 80 293 223
Fax office: +44 23 80 292 853
Mobile: +44 7766 488 225
E-mail: andrea at beasy.com
_______________________________________________
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/20031209/4680df87/attachment.htm
#set entities to {points, lines, surfaces, volumes, nodes or elements)
#set parameters on and freeze to 0 , 1 or *
#return the list of surfaces matching the required "On/Off" and "Freeze/Unfreeze" layer status
#set * to accept surfaces with any layer status value
proc ListEntitiesStatus { entities first last { on * } { freeze * } } {
foreach layer [.central.s info layers] {
set infolayer [lindex [.central.s info layers $layer] 0]
if { ( $on == "*" || [lindex $infolayer 0] == $on ) && \
( $freeze == "*" || [lindex $infolayer 1] == $freeze ) } {
set AcceptLayer($layer) 1
} else {
set AcceptLayer($layer) 0
}
}
if { $last == "end" } {
set last ""
}
set infosurfs [.central.s info list_entities $entities $first:$last]
set ret ""
foreach {string num layer} [regexp -all -inline "Num: (\[0-9]+)\[^\n]*\nLAYER: (\[^\n]+)" $infosurfs] {
if { $AcceptLayer($layer) } {
lappend ret $num
}
}
return $ret
}
And there must be your customized "DrawNormals" procedure:
proc CheckNormalsVector {} {
#draw normals only in surfaces with layers "On" and "Unfreeze"
set entities "surfaces"
set on 1
set freeze 0
.central.s process escape escape escape escape utilities DrawNormals Surfaces [ListSurfsStatus $entities 1 end $on $freeze ]
}
Enrique Escolano
----- Original Message -----
From: "Andrea Calaon" andrea at beasy.com
To: gidlist at gatxan.cimne.upc.es
Sent: Monday, December 08, 2003 5:26 PM
Subject: [GiDlist] Draw Normals
Hi,
Sorry for confusing you! I forgot that the command "Draw
Normals" on "Surfaces" requests a user input: the surfaces where
to draw.
I overwrote the command "DrawNormals" a long time ago with a
Tcl function which draws all the normals without further user input:
proc CheckNormalsVector {} {
.central.s process escape escape escape escape Geometry
...
utilities renumber Yes
.central.s process escape escape escape escape \
utilities DrawNormals Surfaces 1:[NumSurfaces]
}
and I FORGOT complitely the normally necessary surface selection!
I'll program a special "NumSurfaces" function reading the layers
data and giving the list of visible surfaces only.
So no request nor suggestion .
Have a nice day
Andrea Calaon
Ashurst Lodge, Ashurst
Southampton, Hampshire
SO40 7AA, UK
Tel. office: +44 23 80 293 223
Fax office: +44 23 80 292 853
Mobile: +44 7766 488 225
E-mail: andrea at beasy.com
_______________________________________________
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/20031209/4680df87/attachment.htm