Page 1 of 2

[GiDlist] stl-import

Posted: Tue Jan 24, 2006 11:52 am
by Timon Rabczuk
Hallo

I have some trouble with importing surface mesh from stl-file with GID,
version 7.2. The mesh can be imported and is transformed into NURBS.
However, when trying to save it, the disk quota of 2GB is exceeded even
for a single triangle. Does somebody have an idea how to fix this?
Thanks a lot!
Best!
TImon

[GiDlist] Save Problem

Posted: Tue Jan 24, 2006 12:06 pm
by Sofia Costa
Hi GID team!

I've been to try save all assigned data of Condition Point
Load some problems but i did not get success.
My procedures are:

proc SaveGIDProject {filespd} {


set fp [open $filespd w]
if {$fp!=""} {
#save the specific problemtype data file contents...


# global DefaultSearchDirectory
# if { ![info exists DefaultSearchDirectory] || \
# ![file isdirectory $DefaultSearchDirectory]} {
# set DefaultSearchDirectory [pwd]
# }
# set deft $DefaultSearchDirectory
# set aa [.central.s info Project]
# set ProjectName [lindex $aa 1]
# if { [file extension $ProjectName] == ".gid" } {
# set ProjectName [file root $ProjectName]
# }
# if { $ProjectName == "UNNAMED" } {
# tk_dialogRAM .gid.tmpwin error \
# [_ "Before importing, a project title is needed. Save
project to get it"] \
# error 0 OK
# return
# }
# set directory $ProjectName.gid
#WarnWinText "SaveGIDProject $filespd"
# close $fp




set dirinfo [lindex [.central.s info Project] 1]
set rootname [lindex [file split $dirinfo] end]
set from [file join [lindex [.central.s info Project]
1].gid $rootname.flavia.rst]
#set to [file rootname $filespd].flavia.rst
set to [file rootname $filespd].spd
WarnWin "Saving $to from $from"

}

}


proc AfterOpenFile { filename format error} {

WarnWinText "$filename $format $error"

if {$format == "GIDGEOMETRY_FORMAT"} {
set filespd [file join $filename [file tail
$filename]]

if {[file exists $filespd]} {
set fp [open $filespd r]

#read the specific problemtype data file contents

close $fp
}
}

#WarnWinText "LoadGIDProject $filespd"
}

I'm sending you the file of Point load.

When i save the problem type, the file *.spd is a empty
file.

How can i save the information of
[.central.s info conditions PointLoad] ?

Could you give some advice?

Thanks.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tkpoint.tcl
Type: application/octet-stream
Size: 39562 bytes
Desc: not available
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20060124/279eac8f/attachment.obj

[GiDlist] Get Elements for selected node

Posted: Tue Jan 24, 2006 12:36 pm
by Björn Brodersen
Hi,

i need to get the information about what elements are connected to a
specific node.

I want to select the node via a condition, and write to file what
elements are connected to it.

Any Ideas?

Thanks in advance

Bjoern Brodersen
--
------------------------------
Dipl.-Ing. Björn Brodersen MSc
TU Braunschweig
Institut für Statik
Beethovenstr. 51
38106 Braunschweig
Tel.: 0531 / 391 - 3670

[GiDlist] stl-import

Posted: Tue Jan 24, 2006 1:35 pm
by escolano
Maybe is a corrected bug.
Try to download the last avalable beta version 7.7.5b

If the problem persists, send us a sample model (small if possible),
directly to escolano at cimne.upc.edu

In other hand, when you import a stl as surf-mesh it's not converted to
NURBS, it's created an
special pseudo-surface entity where the shape is really the mesh
triangulation.

Regards

Enrique Escolano

----- Original Message -----
From: "Timon Rabczuk" Timon.Rabczuk at lnm.mw.tum.de
To: gidlist at gatxan.cimne.upc.es
Sent: Tuesday, January 24, 2006 11:21 AM
Subject: [GiDlist] stl-import


Hallo

I have some trouble with importing surface mesh from stl-file with GID,
version 7.2. The mesh can be imported and is transformed into NURBS.
However, when trying to save it, the disk quota of 2GB is exceeded even
for a single triangle. Does somebody have an idea how to fix this?
Thanks a lot!
Best!
TImon

_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist


[GiDlist] stl-import

Posted: Tue Jan 24, 2006 3:05 pm
by Timon Rabczuk
Dear Enrique

Thanks a lot for the tip. It works with the beta version.
Best!
Timon

Maybe is a corrected bug.
Try to download the last avalable beta version 7.7.5b

If the problem persists, send us a sample model (small if possible),
directly to escolano at cimne.upc.edu

In other hand, when you import a stl as surf-mesh it's not converted to
NURBS, it's created an
special pseudo-surface entity where the shape is really the mesh
triangulation.

Regards

Enrique Escolano

----- Original Message -----
From: "Timon Rabczuk" Timon.Rabczuk at lnm.mw.tum.de
To: gidlist at gatxan.cimne.upc.es
Sent: Tuesday, January 24, 2006 11:21 AM
Subject: [GiDlist] stl-import




Hallo

I have some trouble with importing surface mesh from stl-file with GID,
version 7.2. The mesh can be imported and is transformed into NURBS.
However, when trying to save it, the disk quota of 2GB is exceeded even
for a single triangle. Does somebody have an idea how to fix this?
Thanks a lot!
Best!
TImon

_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist




_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist




[GiDlist] Get Elements for selected node

Posted: Tue Jan 24, 2006 3:35 pm
by escolano
This information is not directly available inside GiD. Do you have direct access from the elements to the nodes, but not the inverse.
The node has only a counter (higherentities) of elements referencing it .

In other hand, you can write a simple tcl procedure in order to do this, for example some like this (it's untested):

proc ElementsOfNodes { } {
foreach elementtype [lrange [GiD_Info mesh] 1 end] {
foreach elem [GiD_Info mesh elements $elementtype 1 end -sublist] {
set num [lindex $elem 0]
set nodes [lrange $elem 1 end-1]
foreach node $nodes {
lappend elemsofnode($node) $num
}
}
}
#return a string with this information
set ret ""
foreach node [lsort -integer [array names elemsofnode]] {
append ret "$node $elemsofnode\n"
}
return $ret
}

Note: you can call this tcl procedure from the .bas template, with *tcl(ElementsOfNodes). The returned value is directly printed to the output calculation file.

Regards
Enrique Escolano

----- Original Message -----
From: "Björn Brodersen" bjoern.brodersen at tu-bs.de
To: gidlist at gatxan.cimne.upc.edu
Sent: Tuesday, January 24, 2006 12:25 PM
Subject: [GiDlist] Get Elements for selected node


Hi,

i need to get the information about what elements are connected to a
specific node.

I want to select the node via a condition, and write to file what
elements are connected to it.

Any Ideas?

Thanks in advance

Bjoern Brodersen
--
------------------------------
Dipl.-Ing. Björn Brodersen MSc
TU Braunschweig
Institut für Statik
Beethovenstr. 51
38106 Braunschweig
Tel.: 0531 / 391 - 3670
_______________________________________________
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/20060124/c542f530/attachment.htm

[GiDlist] Get Elements for selected node

Posted: Tue Jan 24, 2006 5:52 pm
by Björn Brodersen
Hi,

thanks for this first "direction" ;-)

Unfortunately I'm not familiar with tcl, so it will take me some time to
answer whether this code works or not. First try revealed that line

foreach node [lsort -integer [array names elemsofnode]] {

has [dont know why ;-) ] to be

foreach node [lsort -integer [array names elemsofnode($node)]] {

to get no error on execution.
Can you give me a hint on how to shorten the procedure of loading the
problemtype over and over again after changing the tcl- file ? This will
surely ease my "trial and error" -tcl learning.

I will report when i get an working tcl function in this thread.

Thanks Bjoern

Enrique Escolano wrote:
This information is not directly available inside GiD. Do you have direct access from the elements to the nodes, but not the inverse.
The node has only a counter (higherentities) of elements referencing it .

In other hand, you can write a simple tcl procedure in order to do this, for example some like this (it's untested):

proc ElementsOfNodes { } {
foreach elementtype [lrange [GiD_Info mesh] 1 end] {
foreach elem [GiD_Info mesh elements $elementtype 1 end -sublist] {
set num [lindex $elem 0]
set nodes [lrange $elem 1 end-1]
foreach node $nodes {
lappend elemsofnode($node) $num
}
}
}
#return a string with this information
set ret ""
foreach node [lsort -integer [array names elemsofnode]] {
append ret "$node $elemsofnode\n"
}
return $ret
}

Note: you can call this tcl procedure from the .bas template, with *tcl(ElementsOfNodes). The returned value is directly printed to the output calculation file.

Regards
Enrique Escolano

----- Original Message -----
From: "Björn Brodersen" bjoern.brodersen at tu-bs.de
To: gidlist at gatxan.cimne.upc.edu
Sent: Tuesday, January 24, 2006 12:25 PM
Subject: [GiDlist] Get Elements for selected node



Hi,

i need to get the information about what elements are connected to a
specific node.

I want to select the node via a condition, and write to file what
elements are connected to it.

Any Ideas?

Thanks in advance

Bjoern Brodersen
--
------------------------------
Dipl.-Ing. Björn Brodersen MSc
TU Braunschweig
Institut für Statik
Beethovenstr. 51
38106 Braunschweig
Tel.: 0531 / 391 - 3670
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist


--
------------------------------
Dipl.-Ing. Björn Brodersen MSc
TU Braunschweig
Institut für Statik
Beethovenstr. 51
38106 Braunschweig
Tel.: 0531 / 391 - 3670

[GiDlist] Get Elements for selected node

Posted: Wed Jan 25, 2006 11:53 am
by Björn Brodersen
Hi again,

can anybody give me a hint about how to get some output out of this
function? Testing some "puts" and such doesn't work.
I understand the basic Idea of getting the information, but I'm still
stucked with the tcl thing.

Do I have to use

*tcl(ElementsOfNodes [arguments]) ?

Please give me an advice how to get some output, even if its only a
string "..." from the tcl proc...

Greeting and thanks
Bjoern

Enrique Escolano wrote:
This information is not directly available inside GiD. Do you have direct access from the elements to the nodes, but not the inverse.
The node has only a counter (higherentities) of elements referencing it .

In other hand, you can write a simple tcl procedure in order to do this, for example some like this (it's untested):

proc ElementsOfNodes { } {
foreach elementtype [lrange [GiD_Info mesh] 1 end] {
foreach elem [GiD_Info mesh elements $elementtype 1 end -sublist] {
set num [lindex $elem 0]
set nodes [lrange $elem 1 end-1]
foreach node $nodes {
lappend elemsofnode($node) $num
}
}
}
#return a string with this information
set ret ""
foreach node [lsort -integer [array names elemsofnode]] {
append ret "$node $elemsofnode\n"
}
return $ret
}

Note: you can call this tcl procedure from the .bas template, with *tcl(ElementsOfNodes). The returned value is directly printed to the output calculation file.

Regards
Enrique Escolano

----- Original Message -----
From: "Björn Brodersen" bjoern.brodersen at tu-bs.de
To: gidlist at gatxan.cimne.upc.edu
Sent: Tuesday, January 24, 2006 12:25 PM
Subject: [GiDlist] Get Elements for selected node



Hi,

i need to get the information about what elements are connected to a
specific node.

I want to select the node via a condition, and write to file what
elements are connected to it.

Any Ideas?

Thanks in advance

Bjoern Brodersen
--
------------------------------
Dipl.-Ing. Björn Brodersen MSc
TU Braunschweig
Institut für Statik
Beethovenstr. 51
38106 Braunschweig
Tel.: 0531 / 391 - 3670
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist


--
------------------------------
Dipl.-Ing. Björn Brodersen MSc
TU Braunschweig
Institut für Statik
Beethovenstr. 51
38106 Braunschweig
Tel.: 0531 / 391 - 3670

[GiDlist] Get Elements for selected node

Posted: Wed Jan 25, 2006 3:35 pm
by escolano
About my previous code, there is a small error (as I said it was untested)
instead
append ret "$node $elemsofnode\n"
must be
append ret "$node $elemsofnode($node)\n"

but [array names elemsofnode] is ok, it returns a list containing the names of all of the elements in the array
I sorted this list with lsort to obtain the list of nodes increasing its number.

Can read the standard documentation of the standard Tcl commands at
http://www.gidhome.com/ManHtml/tcl8.4.9/html/TclCmd/contents.htm

About the special GiD commands, like GiD_Info or GiD_Process, can read the GiD help on Tcl-Tk extension
http://www.gidhome.com/support/gidbeta/gid_18.subst


In order to use this code, if you have your problemtype, add a file named yourproblemty.tcl, this file will be automatically loaded when loading the problemtype. And can write the calculation file in your required format with a yourproblemty.bas template, that can call the tcl procedure.
(read the GiD help customization chapter)

Can use the GiD-tcl procedure WarnWinText to have a non-modal window with the output.
A trick of the GiD command line is to use -np- to evaluate a tcl command,

for example, after load the procedure in GiD, can use

-np- WarnWinText [ElementsOfNodes]

The last GiD beta versions include RamDebugger: a editor and debugger for Tcl/Tk code.
Can start this debugger from the menu: Data-problemtype-Debugger...

Can write the code in this tcl developper environment, and run it with F5. Also it include the Tcl/Tk reference help
(it's a contextual help, for example if select the 'array' word and press F1, automatically go to the help on this topic)

I understand that it's a lot of information to begin, but don't worry about.
If you are not familiarized with the GiD customization concepts, I recommend you to follow the 'problemtype tutorial' http://www.gidhome.com/support/su05.subst.

Regards
Enrique Escolano

----- Original Message -----
From: "Björn Brodersen" bjoern.brodersen at tu-bs.de
To: gidlist at gatxan.cimne.upc.edu
Sent: Tuesday, January 24, 2006 5:42 PM
Subject: Re: [GiDlist] Get Elements for selected node


Hi,

thanks for this first "direction" ;-)

Unfortunately I'm not familiar with tcl, so it will take me some time to
answer whether this code works or not. First try revealed that line

foreach node [lsort -integer [array names elemsofnode]] {

has [dont know why ;-) ] to be

foreach node [lsort -integer [array names elemsofnode($node)]] {

to get no error on execution.
Can you give me a hint on how to shorten the procedure of loading the
problemtype over and over again after changing the tcl- file ? This will
surely ease my "trial and error" -tcl learning.

I will report when i get an working tcl function in this thread.

Thanks Bjoern

Enrique Escolano wrote:
This information is not directly available inside GiD. Do you have direct access from the elements to the nodes, but not the inverse.
The node has only a counter (higherentities) of elements referencing it .

In other hand, you can write a simple tcl procedure in order to do this, for example some like this (it's untested):

proc ElementsOfNodes { } {
foreach elementtype [lrange [GiD_Info mesh] 1 end] {
foreach elem [GiD_Info mesh elements $elementtype 1 end -sublist] {
set num [lindex $elem 0]
set nodes [lrange $elem 1 end-1]
foreach node $nodes {
lappend elemsofnode($node) $num
}
}
}
#return a string with this information
set ret ""
foreach node [lsort -integer [array names elemsofnode]] {
append ret "$node $elemsofnode\n"
}
return $ret
}

Note: you can call this tcl procedure from the .bas template, with *tcl(ElementsOfNodes). The returned value is directly printed to the output calculation file.

Regards
Enrique Escolano

----- Original Message -----
From: "Björn Brodersen" bjoern.brodersen at tu-bs.de
To: gidlist at gatxan.cimne.upc.edu
Sent: Tuesday, January 24, 2006 12:25 PM
Subject: [GiDlist] Get Elements for selected node



Hi,

i need to get the information about what elements are connected to a
specific node.

I want to select the node via a condition, and write to file what
elements are connected to it.

Any Ideas?

Thanks in advance

Bjoern Brodersen
--
------------------------------
Dipl.-Ing. Björn Brodersen MSc
TU Braunschweig
Institut für Statik
Beethovenstr. 51
38106 Braunschweig
Tel.: 0531 / 391 - 3670
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist


--
------------------------------
Dipl.-Ing. Björn Brodersen MSc
TU Braunschweig
Institut für Statik
Beethovenstr. 51
38106 Braunschweig
Tel.: 0531 / 391 - 3670
_______________________________________________
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/20060125/a2ced5ea/attachment.htm

[GiDlist] Get Elements for selected node

Posted: Wed Jan 25, 2006 4:36 pm
by Björn Brodersen
Great !!!!!

This is exactly what i needed...

Thanks for the help,

Greetings Bjoern

Enrique Escolano wrote:
About my previous code, there is a small error (as I said it was untested)
instead
append ret "$node $elemsofnode\n"
must be
append ret "$node $elemsofnode($node)\n"

but [array names elemsofnode] is ok, it returns a list containing the names of all of the elements in the array
I sorted this list with lsort to obtain the list of nodes increasing its number.

Can read the standard documentation of the standard Tcl commands at
http://www.gidhome.com/ManHtml/tcl8.4.9/html/TclCmd/contents.htm

About the special GiD commands, like GiD_Info or GiD_Process, can read the GiD help on Tcl-Tk extension
http://www.gidhome.com/support/gidbeta/gid_18.subst


In order to use this code, if you have your problemtype, add a file named yourproblemty.tcl, this file will be automatically loaded when loading the problemtype. And can write the calculation file in your required format with a yourproblemty.bas template, that can call the tcl procedure.
(read the GiD help customization chapter)

Can use the GiD-tcl procedure WarnWinText to have a non-modal window with the output.
A trick of the GiD command line is to use -np- to evaluate a tcl command,

for example, after load the procedure in GiD, can use

-np- WarnWinText [ElementsOfNodes]

The last GiD beta versions include RamDebugger: a editor and debugger for Tcl/Tk code.
Can start this debugger from the menu: Data-problemtype-Debugger...

Can write the code in this tcl developper environment, and run it with F5. Also it include the Tcl/Tk reference help
(it's a contextual help, for example if select the 'array' word and press F1, automatically go to the help on this topic)

I understand that it's a lot of information to begin, but don't worry about.
If you are not familiarized with the GiD customization concepts, I recommend you to follow the 'problemtype tutorial' http://www.gidhome.com/support/su05.subst.

Regards
Enrique Escolano

----- Original Message -----
From: "Björn Brodersen" bjoern.brodersen at tu-bs.de
To: gidlist at gatxan.cimne.upc.edu
Sent: Tuesday, January 24, 2006 5:42 PM
Subject: Re: [GiDlist] Get Elements for selected node



Hi,

thanks for this first "direction" ;-)

Unfortunately I'm not familiar with tcl, so it will take me some time to
answer whether this code works or not. First try revealed that line


foreach node [lsort -integer [array names elemsofnode]] {

has [dont know why ;-) ] to be


foreach node [lsort -integer [array names elemsofnode($node)]] {

to get no error on execution.
Can you give me a hint on how to shorten the procedure of loading the
problemtype over and over again after changing the tcl- file ? This will
surely ease my "trial and error" -tcl learning.

I will report when i get an working tcl function in this thread.

Thanks Bjoern

Enrique Escolano wrote:

This information is not directly available inside GiD. Do you have direct access from the elements to the nodes, but not the inverse.
The node has only a counter (higherentities) of elements referencing it .

In other hand, you can write a simple tcl procedure in order to do this, for example some like this (it's untested):

proc ElementsOfNodes { } {
foreach elementtype [lrange [GiD_Info mesh] 1 end] {
foreach elem [GiD_Info mesh elements $elementtype 1 end -sublist] {
set num [lindex $elem 0]
set nodes [lrange $elem 1 end-1]
foreach node $nodes {
lappend elemsofnode($node) $num
}
}
}
#return a string with this information
set ret ""
foreach node [lsort -integer [array names elemsofnode]] {
append ret "$node $elemsofnode\n"
}
return $ret
}

Note: you can call this tcl procedure from the .bas template, with *tcl(ElementsOfNodes). The returned value is directly printed to the output calculation file.

Regards
Enrique Escolano

----- Original Message -----
From: "Björn Brodersen" bjoern.brodersen at tu-bs.de
To: gidlist at gatxan.cimne.upc.edu
Sent: Tuesday, January 24, 2006 12:25 PM
Subject: [GiDlist] Get Elements for selected node




Hi,

i need to get the information about what elements are connected to a
specific node.

I want to select the node via a condition, and write to file what
elements are connected to it.

Any Ideas?

Thanks in advance

Bjoern Brodersen
--
------------------------------
Dipl.-Ing. Björn Brodersen MSc
TU Braunschweig
Institut für Statik
Beethovenstr. 51
38106 Braunschweig
Tel.: 0531 / 391 - 3670
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist


--
------------------------------
Dipl.-Ing. Björn Brodersen MSc
TU Braunschweig
Institut für Statik
Beethovenstr. 51
38106 Braunschweig
Tel.: 0531 / 391 - 3670
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist


--
------------------------------
Dipl.-Ing. Björn Brodersen MSc
TU Braunschweig
Institut für Statik
Beethovenstr. 51
38106 Braunschweig
Tel.: 0531 / 391 - 3670