[GiDlist] problems with cutwire

Moderator: GiD Team

Post Reply
Andres Peratta

[GiDlist] problems with cutwire

Post by Andres Peratta »

I need to postprocess my results along a sequence of points in a 3D mesh.
I normally use the command CUTWIRE and then apply BORDER_GRAPH to the
resulting cut.
However, CUTWIRE presents a big problem:
The points of my cutwire are not coincident with the nodes of the mesh,
( where the results are prescribed ). In fact, the distance between
two consecutive
points in the cutwire is small in comparison with the size of the
adjacent elements (tetrahedrons).
For this reason somehow GID does not respect the coordinates that I
enter by hand, and the points
of the cutwire are automatically located in any other place thus
generating a
distorted cutwire. This must be an internal algorithm
used to detect near postprocessing nodes.
Now, I just would like cutwire to respect the coordinates that I
introduce by hand
so I could export the right coordinates of the points entered by hand to
an ASCII file,
and use my own interpolation method to rebuild the results there.
Do you have any suggestion about it ?
Is it possible to override the command cutwire with any tcl script in
order to prevent
that automatic relocation of the points that define the cutwire ?
thanks in advance,
Andres
Enrique Escolano

[GiDlist] problems with cutwire

Post by Enrique Escolano »

At this moment, the cutwire points must be located over element edges. Iif the selected point is not over a edge is moved to a near edge
It's not possible to override this command because is internal to the C++ kernel, is not a tcl procedure.

But it's possible to make another own tcl procedure for your pourposes:

1) This procedure can collect and store in a tcl variable a list of points

Can request the user for a point with the tcl command GidUtils::GetCoordinates, for example
set coord [GidUtils::GetCoordinates [= "Enter node coordinates"] NoJoin]

2) Then can write this points to a file, and run your code to calculate your own interpolated result
3) Your code can write this results as a graph Ascii file (to see a sample format, Files-Export-Graph),
and read it inside GiD with:
.central.s process escape escape escape results graphs readgraph "filename"

Note: In the last beta 7.7.4b , it's also possible to draw inside GiD directly with OpenGL, but this feature is currently undocumented.
For this pourpose, it's defined a new tcl procedure: drawopengl

can make a step 1.5) and define a function to draw the selected points connected by lines

For example:
proc MyDrawFunction { } {
set color "0 0 0" ;#rgb black
drawopengl draw -color $color -begin lines
drawopengl draw -vertex "0 0 0"
drawopengl draw -vertex "1 1 1"
drawopengl draw -end
}

#register this MyDrawFunction procedure to be called when need a redraw
set id [drawopengl register MyDrawFunction]

.central.s process redraw

# ...
#unregisted when is not needed
catch { drawopengl unregister $CreateMeshPriv(drawopengl) }

The commands for drawopengl draw are practically all valid OpenGL commands.

Regards
Enrique Escolano

----- Original Message -----
From: "Andres Peratta" andres at wessex.ac.uk
To: gidlist at gatxan.cimne.upc.es
Sent: Monday, January 12, 2004 12:21 PM
Subject: [GiDlist] problems with cutwire


I need to postprocess my results along a sequence of points in a 3D mesh.
I normally use the command CUTWIRE and then apply BORDER_GRAPH to the
resulting cut.
However, CUTWIRE presents a big problem:
The points of my cutwire are not coincident with the nodes of the mesh,
( where the results are prescribed ). In fact, the distance between
two consecutive
points in the cutwire is small in comparison with the size of the
adjacent elements (tetrahedrons).
For this reason somehow GID does not respect the coordinates that I
enter by hand, and the points
of the cutwire are automatically located in any other place thus
generating a
distorted cutwire. This must be an internal algorithm
used to detect near postprocessing nodes.
Now, I just would like cutwire to respect the coordinates that I
introduce by hand
so I could export the right coordinates of the points entered by hand to
an ASCII file,
and use my own interpolation method to rebuild the results there.
Do you have any suggestion about it ?
Is it possible to override the command cutwire with any tcl script in
order to prevent
that automatic relocation of the points that define the cutwire ?
thanks in advance,
Andres

_______________________________________________
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/20040114/2342978c/attachment.htm
Post Reply