An embedded and charset-unspecified text was scrubbed…
Name: not available
Url: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20060904/10efdb90/attachment.txt
-------------- next part --------------
An HTML attachment was scrubbed…
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20060904/10efdb90/attachment.htm
Directly not exists the list of used materials,
You must check all geometry/mesh entities to know which materials are assigned to some entity.
Some like this to get the list of the name or the materials assigned to some element:
proc MeshUsedMaterials { } {
foreach elemtype [lrange [GiD_Info Mesh] 1 end] {
foreach elem [GiD_Info mesh Elements $elemtype -sublist] {
set matnum [lindex $elem end]
if { $matnum 0 } {
incr matnum -1
set usetmatnum($matnum) 1
}
}
}
set matlist [GiD_Info materials]
set res “”
foreach matnum [lsort -integer [array names usetmatnum]] {
lappend res [lindex $matlist $matnum]
}
return $res
}
----- Original Message -----
From: ascosta at portugalmail.pt
To: gidlist at gid.cimne.upc.es
Sent: Monday, September 04, 2006 1:56 PM
Subject: [GiDlist] Defined materials and assigned materials
Hi!!
If i define for example three diferent materials:
1 - Mat 1
2 - Mat 2
3 - Mat 3
and only assign the materials 2 and 3, how can i obtain this information?
If i use .central.s. info materials, it return all materials.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed…
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20060908/0f8305e0/attachment.htm