[GiDlist] How to orient conditions in *.sim

Moderator: GiD Team

Post Reply
Philippe Bouchilloux

[GiDlist] How to orient conditions in *.sim

Post by Philippe Bouchilloux »

Hello:

This is what I am doing:
- the user defines a local coordinate system (local_axes)
- the user applies a boundary condition that depends on local_axes to a set
of volumes present in the model.

The tricky part here is that the boundary condition is radial (for
instance, radial with respect to an axis of local_axes).

To export the data to my solver, there's no problem because I can find the
orientation of the local_axes in the *.bas file using
LocalAxesDef(EulerAngles), for instance.

However, since local_axes is the same for all the volumes in the set, then
the drawing of the condition is the same also.
In order to draw properly the condition in GiD, I would need to know the
orientation of local_axes (or the orientation of the element) at the time
of drawing so that I could apply a formula in the *.sim file that would
properly orient the drawing for each element. I have not found how to do that.

Is there a way to obtain the local_axes definition (or element orientation)
for use in the *.sim file?

Thanks.

Philippe

PS: one possible way would seem to add hidden fields (euler angles, e.g.)
to my condition and automatically compute the value of these fields based
on the setting of local_axes (using the FUNC command, for instance); but I
haven't found how to do that either.


Magsoft Corporation
Tel: 518-271-1352
Cell: 518-365-0421 (direct)
www.magsoft-flux.com
Enrique Escolano

[GiDlist] How to orient conditions in *.sim

Post by Enrique Escolano »

Sorry, it is not possible now to orient a symbol with the local_axes field
information.

The format of the symbols file is old, and it can be updated and enhanced
with
this and another features for next GiD versions.

Enrique Escolano

----- Original Message -----
From: "Philippe Bouchilloux" pb at magsoft-flux.com
To: "GiDList" gidlist at gatxan.cimne.upc.es
Sent: Tuesday, June 10, 2003 12:07 AM
Subject: [GiDlist] How to orient conditions in *.sim


Hello:

This is what I am doing:
- the user defines a local coordinate system (local_axes)
- the user applies a boundary condition that depends on local_axes to a
set
of volumes present in the model.

The tricky part here is that the boundary condition is radial (for
instance, radial with respect to an axis of local_axes).

To export the data to my solver, there's no problem because I can find the
orientation of the local_axes in the *.bas file using
LocalAxesDef(EulerAngles), for instance.

However, since local_axes is the same for all the volumes in the set, then
the drawing of the condition is the same also.
In order to draw properly the condition in GiD, I would need to know the
orientation of local_axes (or the orientation of the element) at the time
of drawing so that I could apply a formula in the *.sim file that would
properly orient the drawing for each element. I have not found how to do
that.

Is there a way to obtain the local_axes definition (or element
orientation)
for use in the *.sim file?

Thanks.

Philippe

PS: one possible way would seem to add hidden fields (euler angles, e.g.)
to my condition and automatically compute the value of these fields based
on the setting of local_axes (using the FUNC command, for instance); but I
haven't found how to do that either.


Magsoft Corporation
Tel: 518-271-1352
Cell: 518-365-0421 (direct)
www.magsoft-flux.com


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

Ramon Ribó

[GiDlist] How to orient conditions in *.sim

Post by Ramon Ribó »

Hello,

It is very difficult to give a general mechanism for orienting
properly and semi-automatically the symbols. For the new version,
we have decided to follow another scheme: to draw OpenGL from TCL.

The main disadvantage is that OpenGL is quite difficult to learn
and understand. The main advantage is that it gives complete freedom
to the problemtype creator to draw whatever he/she wants. Another
advantage is that it is easy to copy from someone else the most
standard drawings.

This new possibility should be usable in the last beta version.

As a example, consider the following:

in proc InitGIDProject:

drawopengl registercond DrawSections::drawLoadCond
Global_Beam_Load \
Global_Projected_Beam_Load

And below, you can find the drawing function.

Regards,

--
Compass Ing. y Sistemas Dr. Ramon Ribo
http://www.compassis.com ramsan at compassis.com
c/ Manuel Girona, 61 bajos tel. +34 93 204 10 82
08034 Barcelona, Spain fax. +34 93 204 19 09

-------------------------------------
proc DrawSections::drawLoadCond { condname geommesh num values } {
variable beamcolor
variable load_object

CreateObjects

switch $geommesh {
GEOMETRYUSE {
if { [catch {.central.s info list_entities Lines $num}
list_ent] } { return 0 }
if { [regexp {^\s*STLINE} $list_ent] } {
set type stline
} else { set type nurbline } ;# arc assimilated to nurb

regexp {Points:\s+([0-9]+)\s+([0-9]+)} $list_ent {} P1 P2
foreach j "P1 P2" {
set list_pnt [.central.s info list_entities Points [set
$j]]
regexp {Coord:\s+([^\n]+)} $list_pnt {} coords
set points([set $j]) $coords
}
}
MESHUSE {
if { [lindex [.gid.central.s info Project] 4] == "MESHUSE" }
{
set list_ent [.central.s info list_entities Elements
$num]
set type stline
regexp {([0-9]+)\s+([0-9]+)\s*$} $list_ent {} P1 P2
foreach j "P1 P2" {
set list_pnt [.central.s info list_entities Nodes
[set $j]]
regexp {\S+\s+\S+\s+\S+\s*$} $list_pnt coords
set points([set $j]) $coords
}
} else {
set list_ent [.central.s info list_entities Elements
$num]
set type stline
foreach "P1 P2" [lindex $list_ent 3] break
foreach j "P1 P2" {
set list_pnt [.central.s info list_entities Nodes
[set $j]]
set points([set $j]) [lindex $list_pnt 3]
}
}
}
default { return 0 }
}
switch $condname {
Global_Beam_Load {
set yvec [math::Normalizevector [lrange $values 1 3]]
set color [list .5 0 0]
}
Global_Projected_Beam_Load {
set yvec [math::Normalizevector [lrange $values 1 3]]
set color [list .5 .5 .5]
}
default { return 0 }
}

set delta .1
for { set t $delta } { $t = 1.0+.5*$delta } { set t [expr
{$t+$delta}] } {
if { $type != "stline" } {
set points($P2) [split [.central.s info nurbs line $num 0
$t] ,]
}

set mat [lindex $values 0]
if { [llength $mat] == 1 } {
set mat [math::BeamTransfMatrix [list $P1 $P2] points]
}

set xvec [math::GetAxeInMatrix $mat x]
set mat [math::SetAxeInMatrix $mat y $yvec]
set zvec [math::VectorProd $xvec $yvec]
if { [math::module $zvec] 1e-10 } {
set zvex
  • }
    set mat [math::SetAxeInMatrix $mat z $zvec]

    set length [math::module [math::VectorDiff $points($P1)
    $points($P2)]]
    drawopengl draw -pushmatrix -translate $points($P1) -multmatrix
    \
    [math::RotMat2OpenGLmat $mat] -scale [list $length 1 1]
    -color $color \
    -begin lines -call $load_object -end -popmatrix
    if { $type == "stline" } { break }
    set points($P1) $points($P2)
    }

    # return 1 means no draw simbol after
    return 1
    }

    proc DrawSections::CreateObjects {} {
    variable ipn_object
    variable load_object

    if { ![info exists ipn_object] } {
    set ipn_object [drawopengl draw -genlists 1]
    drawopengl draw -newlist $ipn_object compile \
    -normal {0 0 1} \
    -vertex {1 1 1} -vertex {0 1 1} -vertex {0 -1 1}
    -vertex {1 -1 1} \
    -normal {0 -1 0} \
    -vertex {1 -1 1} -vertex {0 -1 1} -vertex {0 -1 .9}
    -vertex {1 -1 .9} \
    -normal {0 0 -1} \
    -vertex {1 -1 .9} -vertex {0 -1 .9} -vertex {0 -.1 .9}
    -vertex {1 -.1 .9} \
    -normal {0 -1 0} \
    -vertex {1 -.1 .9} -vertex {0 -.1 .9} -vertex {0 -.1 -.9}
    -vertex {1 -.1 -.9} \
    -normal {0 0 1} \
    -vertex {1 -.1 -.9} -vertex {0 -.1 -.9} -vertex {0 -1 -.9}
    -vertex {1 -1 -.9} \
    -normal {0 -1 0} \
    -vertex {1 -1 -.9} -vertex {0 -1 -.9} -vertex {0 -1 -1}
    -vertex {1 -1 -1} \
    -normal {0 0 -1} \
    -vertex {1 -1 -1} -vertex {0 -1 -1} -vertex {0 1 -1}
    -vertex {1 1 -1} \
    -normal {0 1 0} \
    -vertex {1 1 -1} -vertex {0 1 -1} -vertex {0 1 -.9}
    -vertex {1 1 -.9} \
    -normal {0 0 1} \
    -vertex {1 1 -.9} -vertex {0 1 -.9} -vertex {0 .1 -.9}
    -vertex {1 .1 -.9} \
    -normal {0 1 0} \
    -vertex {1 .1 -.9} -vertex {0 .1 -.9} -vertex {0 .1 .9}
    -vertex {1 .1 .9} \
    -normal {0 0 -1} \
    -vertex {1 .1 .9} -vertex {0 .1 .9} -vertex {0 1 .9}
    -vertex {1 1 .9} \
    -normal {0 1 0} \
    -vertex {1 1 .9} -vertex {0 1 .9} -vertex {0 1 1}
    -vertex {1 1 1} \
    \
    -normal {1 0 0} \
    -vertex {0 1 1} -vertex {0 -1 1} -vertex {0 -1 .9}
    -vertex {0 1 .9} \
    -vertex {0 .1 .9} -vertex {0 -.1 .9} -vertex {0 -.1 -.9}
    -vertex {0 .1 -.9} \
    -vertex {0 1 -1} -vertex {0 1 -.9} -vertex {0 -1 -.9}
    -vertex {0 -1 -1} \
    \
    -normal {-1 0 0} \
    -vertex {1 1 1} -vertex {1 1 .9} -vertex {1 -1 .9}
    -vertex {1 -1 1} \
    -vertex {1 .1 .9} -vertex {1 .1 -.9} -vertex {1 -.1 -.9}
    -vertex {1 -.1 .9} \
    -vertex {1 1 -1} -vertex {1 -1 -1} -vertex {1 -1 -.9}
    -vertex {1 1 -.9} \
    -endlist
    }

    if { ![info exists load_object] } {
    set load_object [drawopengl draw -genlists 1]
    set comm "drawopengl draw -newlist $load_object compile "
    for { set i 0 } { $i 5 } { incr i } {
    set x [expr {$i/4.0}]
    append comm "-vertex {$x -1 0} -vertex {$x 0 0} "
    append comm "-vertex {[expr {$x-.025}] -.2 0} -vertex {$x 0
    0} "
    append comm "-vertex {[expr {$x+.025}] -.2 0} -vertex {$x 0
    0} "
    }
    append comm "-vertex {0 -1 0} -vertex {1 -1 0} "
    append comm "-endlist"
    eval $comm
    }
    }


    -----Mensaje original-----
    De: gidlist-admin at gatxan.cimne.upc.es
    [mailto:gidlist-admin at gatxan.cimne.upc.es] En nombre de Philippe
    Bouchilloux
    Enviado el: martes, 10 de junio de 2003 0:07
    Para: GiDList
    Asunto: [GiDlist] How to orient conditions in *.sim


    Hello:

    This is what I am doing:
    - the user defines a local coordinate system (local_axes)
    - the user applies a boundary condition that depends on local_axes to a
    set
    of volumes present in the model.

    The tricky part here is that the boundary condition is radial (for
    instance, radial with respect to an axis of local_axes).

    To export the data to my solver, there's no problem because I can find
    the
    orientation of the local_axes in the *.bas file using
    LocalAxesDef(EulerAngles), for instance.

    However, since local_axes is the same for all the volumes in the set,
    then
    the drawing of the condition is the same also.
    In order to draw properly the condition in GiD, I would need to know the

    orientation of local_axes (or the orientation of the element) at the
    time
    of drawing so that I could apply a formula in the *.sim file that would
    properly orient the drawing for each element. I have not found how to
    do that.

    Is there a way to obtain the local_axes definition (or element
    orientation)
    for use in the *.sim file?

    Thanks.

    Philippe

    PS: one possible way would seem to add hidden fields (euler angles,
    e.g.)
    to my condition and automatically compute the value of these fields
    based
    on the setting of local_axes (using the FUNC command, for instance); but
    I
    haven't found how to do that either.


    Magsoft Corporation
    Tel: 518-271-1352
    Cell: 518-365-0421 (direct)
    www.magsoft-flux.com


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

[GiDlist] RamDebugger version 3.0

Post by Ramon Ribó »

Hello,

A new version of RamDebugger has been released.

Changes From version 2.8 to version 3.0

* Count lines of code of a project (LOC)
* It is possible to create and use macros defined in TCL
* Values in User defined var & Local vars display content in balloon
* Autodisplay variables now displays also array variables
* Better interactive indentation and colors
* Menu close
* Drawing dynamically closing braces when editing
* better stack position
* search & replace
* comment lines are indented in normal column
* Added reinstrument to menu Debug
* If tkcon is open, output goes also to tkcon
* New menu options in Tkcon to send commands to debugged program

web page
========

RamDebugger web page is at: http://gid.cimne.com/RamDebugger

Introduction
============

RamDebugger is a graphical debugger for the scripting lenguage
Tcl-TK. It can operate basically in two modes: * GUI mode: The normal
one, is the one that appears when opening normally the program and has
a Graphical User Interface. * Text mode: In this mode, the GUI is not
displayed and the debugger is executed as a set of text commands,
similar to GDB. To use RamDebugger in this mode, load it inside Tkcon.
With RamDebugger, it is possible to make Local Debugging, where the
debugger starts the program to be debugged. and Remote debugging,
where the program to debug is already started and RamDebugger connects
to it.

RamDebugger has additional capabilities like:
* Editing the code. It is possible to edit the code inside its own
editor and resend the new code without closing the debugged
program.
* The TCL-TK source code is colorized and supports automatic
indentation.
* When stopping the debugger is one source code line, it is
possible to view all the variables and expression values, as well
as change them.
* It has additional options to measure execution times in the
debugged program.
* Works in Linux and Windows
* Includes additional packages, like Tkcon and VisualRegexp,
developed by third party people, as a convenience for RamDebugger
users.
* The same program is an IDE for compiling and debugging c and c++

Have a nice debugging!

--
Compass Ing. y Sistemas Dr. Ramon Ribo
http://www.compassis.com ramsan at compassis.com
c/ Manuel Girona, 61 bajos tel. +34 93 204 10 82
08034 Barcelona, Spain fax. +34 93 204 19 09
Jesús Torrecilla

[GiDlist] RamDebugger version 3.0. I this a bug?

Post by Jesús Torrecilla »

Hello,

just downloaded RamDebugger 3.0 into C:\RamDebugger. When I try to run
RamDebugger.tcl, I obtain a message box with this content:

"bitmap "C:\RamDebugger\addons\ramdebugger.ico" not defined while executing
"wm iconbitmap "w "MainDir\addons\ramdebugger.ico"
(procedure "RamDebugger::InitGUI" line 530)
invoked from within
"RamDebugger::InitGUI"
invoked from within
"...............................

Some suggestion ?

Thanks in advance


Jesús Torrecilla
Enrique Escolano

[GiDlist] RamDebugger version 3.0. I this a bug?

Post by Enrique Escolano »

See if exists the related file: C:\RamDebugger\addons\ramdebugger.ico

I attach a copy of this file 'ramdebugger.ico', but it is included inside
Ramdebugger3.0.zip,
try to re-download it and unzip.

Enrique Escolano

----- Original Message -----
From: "Jesús Torrecilla" jtorine at ciccp.es
To: gidlist at gatxan.cimne.upc.es
Sent: Thursday, June 12, 2003 10:17 AM
Subject: RE: [GiDlist] RamDebugger version 3.0. I this a bug?


Hello,

just downloaded RamDebugger 3.0 into C:\RamDebugger. When I try to run
RamDebugger.tcl, I obtain a message box with this content:

"bitmap "C:\RamDebugger\addons\ramdebugger.ico" not defined while
executing
"wm iconbitmap "w "MainDir\addons\ramdebugger.ico"
(procedure "RamDebugger::InitGUI" line 530)
invoked from within
"RamDebugger::InitGUI"
invoked from within
"...............................

Some suggestion ?

Thanks in advance


Jesús Torrecilla

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ramdebugger.ico
Type: image/x-icon
Size: 766 bytes
Desc: not available
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20030612/6f796a4e/attachment.ico
Jesús Torrecilla

[GiDlist] RamDebugger version 3.0. I this a bug?

Post by Jesús Torrecilla »

Yes, I did have the file. Anyway I got yours and put into /addons directory.
I
have the same problem as before. I have Tcl/Tk 8.4 version. Any idea?


Thanks in advance.

Jesús Torrecilla
Post Reply