[GiDlist] lines with higher entities

Moderator: GiD Team

Post Reply
Khaled Obeidat

[GiDlist] lines with higher entities

Post by Khaled Obeidat »

Hello Gid Team,

Is there a way to list all lines of 0 higher entities and then find these
lines coordinates.

Regards,

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/20031126/872555f1/attachment.htm
Enrique Escolano

[GiDlist] lines with higher entities

Post by Enrique Escolano »

Can use some filter when selecting entities

Written this commands in the lower command line can list the isolated lines (higherentity=0)

escape escape escape utilities list line
filter:higher=0
1: escape

See also other filters in the selection window (menu Utilities-Graphical-Selection window...)

Enrique
----- Original Message -----
From: Khaled Obeidat
To: gidlist at gatxan.cimne.upc.es
Sent: Wednesday, November 26, 2003 3:51 PM
Subject: [GiDlist] lines with higher entities


Hello Gid Team,

Is there a way to list all lines of 0 higher entities and then find these lines coordinates.

Regards,

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/20031201/e5b825cb/attachment.htm
Khaled Obeidat

[GiDlist] lines with higher entities

Post by Khaled Obeidat »

but using this command will not give me a list of variable that contains
the Id number of the lines, I don't want to do this manually as you know.

in my code what i want is to find the ID of all the lines with
(higherentity=0) and then find their coordinates.

I'm suing the following procedure but the problem is that GID doesn't
arrange the line Id in a sequence way.

proc CreateLinesList { } {

global Linelist
set Linelist {}
set Clist {}
set Dataeparator {}
set counter 0

set Entities [.central.s info list_entities status]
set index [lsearch $Entities "lines:"]
set NumberOfLiensIndex [expr $index + 1]
set NumberOfLiens [lindex $Entities $NumberOfLiensIndex]
WarnWinText $NumberOfLiens
for {set i_Dilines 1} {$i_Dilines = $NumberOfLiens} {incr
i_Dilines} {
set Line [.central.s info list_entities Lines $i_Dilines]


set en_index [lsearch $Line "HigherEntity:"]
set en_index1 [expr $en_index + 1]
set enNumber [lindex $Line $en_index1]
WarnWinText $enNumber
if { $enNumber == 0 } {

set m_index [lsearch $Line "Points:"]
set m_index1 [expr $m_index + 1]
set Dip1 [lindex $Line $m_index1]
set m_index2 [expr $m_index + 2]
set Dip2 [lindex $Line $m_index2]
set Point [.central.s info list_entities Points $Dip1]
set mp_index [lsearch $Point "Coord:"]
set mp_index1 [expr $mp_index + 1]
set Dix_1 [lindex $Point $mp_index1]
set mp_index2 [expr $mp_index + 2]
set Diy_1 [lindex $Point $mp_index2]
set mp_index3 [expr $mp_index + 3]
set Diz_1 [lindex $Point $mp_index3]

set Point [.central.s info list_entities Points $Dip2]
set mp2_index [lsearch $Point "Coord:"]
set mp2_index1 [expr $mp2_index + 1]
set Dix_2 [lindex $Point $mp2_index1]
set mp2_index2 [expr $mp2_index + 2]
set Diy_2 [lindex $Point $mp2_index2]
set mp2_index3 [expr $mp2_index + 3]
set Diz_2 [lindex $Point $mp2_index3]

append Clist $Dataeparator $Dix_1 $Dataeparator
$Diy_1 $Dataeparator $Diz_1 $Dataeparator $Dix_2 \
$Dataeparator $Diy_2 $Dataeparator $Diz_2

set counter [expr $counter + 1]


}
set Dataeparator " "

}

append Linelist $counter " " $Clist
}


Thanks a lot for your help
khaled


At 10:01 AM 12/1/2003, you wrote:
Can use some filter when selecting entities

Written this commands in the lower command line can list the isolated
lines (higherentity=0)

escape escape escape utilities list line
filter:higher=0
1: escape

See also other filters in the selection window (menu
Utilities-Graphical-Selection window...)

Enrique
----- Original Message -----
From: mailto:kobeidat at emagtechnologies.comKhaled Obeidat
To: mailto:gidlist at gatxan.cimne.upc.esgidlist at gatxan.cimne.upc.es
Sent: Wednesday, November 26, 2003 3:51 PM
Subject: [GiDlist] lines with higher entities

Hello Gid Team,

Is there a way to list all lines of 0 higher entities and then find these
lines coordinates.

Regards,

Khaled Obeidat
Research Engineer
EMAG Technologies, Inc.
www.emagtechnologies.com

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/20031201/5497939e/attachment.htm
Enrique Escolano

[GiDlist] lines with higher entities

Post by Enrique Escolano »

Can use a info list_entities of all lines, and then use a regexp to extract the desired information.
For example, can use this tcl procedure to get the list of lines with $higher higherentities

proc GetListLinesHigher { higher } {
set infolines [.central.s info list_entities lines 1:]
set ret ""
foreach {string num} [regexp -all -inline "Num: (\[0-9]+) HigherEntity: $higher" $infolines] {
lappend ret $num
}
return $ret
}

set isolatedlines [GetListLinesHigher 0]

Enrique Escolano
----- Original Message -----
From: Khaled Obeidat
To: gidlist at gatxan.cimne.upc.es
Sent: Monday, December 01, 2003 4:33 PM
Subject: Re: [GiDlist] lines with higher entities


but using this command will not give me a list of variable that contains the Id number of the lines, I don't want to do this manually as you know.

in my code what i want is to find the ID of all the lines with (higherentity=0) and then find their coordinates.

I'm suing the following procedure but the problem is that GID doesn't arrange the line Id in a sequence way.

proc CreateLinesList { } {

global Linelist
set Linelist {}
set Clist {}
set Dataeparator {}
set counter 0

set Entities [.central.s info list_entities status]
set index [lsearch $Entities "lines:"]
set NumberOfLiensIndex [expr $index + 1]
set NumberOfLiens [lindex $Entities $NumberOfLiensIndex]
WarnWinText $NumberOfLiens
for {set i_Dilines 1} {$i_Dilines = $NumberOfLiens} {incr i_Dilines} {
set Line [.central.s info list_entities Lines $i_Dilines]


set en_index [lsearch $Line "HigherEntity:"]
set en_index1 [expr $en_index + 1]
set enNumber [lindex $Line $en_index1]
WarnWinText $enNumber
if { $enNumber == 0 } {

set m_index [lsearch $Line "Points:"]
set m_index1 [expr $m_index + 1]
set Dip1 [lindex $Line $m_index1]
set m_index2 [expr $m_index + 2]
set Dip2 [lindex $Line $m_index2]
set Point [.central.s info list_entities Points $Dip1]
set mp_index [lsearch $Point "Coord:"]
set mp_index1 [expr $mp_index + 1]
set Dix_1 [lindex $Point $mp_index1]
set mp_index2 [expr $mp_index + 2]
set Diy_1 [lindex $Point $mp_index2]
set mp_index3 [expr $mp_index + 3]
set Diz_1 [lindex $Point $mp_index3]

set Point [.central.s info list_entities Points $Dip2]
set mp2_index [lsearch $Point "Coord:"]
set mp2_index1 [expr $mp2_index + 1]
set Dix_2 [lindex $Point $mp2_index1]
set mp2_index2 [expr $mp2_index + 2]
set Diy_2 [lindex $Point $mp2_index2]
set mp2_index3 [expr $mp2_index + 3]
set Diz_2 [lindex $Point $mp2_index3]

append Clist $Dataeparator $Dix_1 $Dataeparator $Diy_1 $Dataeparator $Diz_1 $Dataeparator $Dix_2 \
$Dataeparator $Diy_2 $Dataeparator $Diz_2

set counter [expr $counter + 1]


}
set Dataeparator " "

}

append Linelist $counter " " $Clist
}


Thanks a lot for your help
khaled


At 10:01 AM 12/1/2003, you wrote:

Can use some filter when selecting entities

Written this commands in the lower command line can list the isolated lines (higherentity=0)

escape escape escape utilities list line
filter:higher=0
1: escape

See also other filters in the selection window (menu Utilities-Graphical-Selection window...)

Enrique

----- Original Message -----

From: Khaled Obeidat

To: gidlist at gatxan.cimne.upc.es

Sent: Wednesday, November 26, 2003 3:51 PM

Subject: [GiDlist] lines with higher entities


Hello Gid Team,


Is there a way to list all lines of 0 higher entities and then find these lines coordinates.


Regards,


Khaled Obeidat

Research Engineer

EMAG Technologies, Inc.

www.emagtechnologies.com


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/20031201/ae954f81/attachment.htm
Post Reply