[GiDlist] Invoking and editing tcl macros
Posted: Thu Oct 09, 2014 6:24 pm
Hi,
Just a small follow up question- Which version of GID are you running? When I click the 'Edit Macro' button, I just see the macros listed and not the actual code. Could you let me know how can I can enable this so that I am able to edit any of the inbuilt tcl macros? Attached the screenshot of what I got.
Thanks
Today's Topics:
1. Re: GID move node feature? (Enrique Escolano)
----------------------------------------------------------------------
Message: 1
Date: Tue, 7 Oct 2014 14:49:26 +0200
From: "Enrique Escolano" escolano at cimne.upc.edu
Subject: Re: [GiDlist] GID move node feature?
To: gidlist at listas.cimne.upc.edu
Message-ID: 097e01cfe22d$20aa6f80$61ff4e80$@cimne.upc.edu
Content-Type: text/plain; charset="us-ascii"
You can move a mesh node for example as you said, from the menu
Mesh-Edit mesh-Move node
And then pick the node and enter its new x,y,z coordinates in the lower
command line
That internally is converted into this GiD process commands:
MEscape Meshing EditMesh MoveNode $node_id $x,$y,$z Escape
Where node_id is the node number, and x y z the new location
And it exists also a more direct GiD-Tcl command:
GiD_Mesh edit node $node_id {$x $y $z}
You can create a Tcl procedure to set the quadratic node position you want
for all mesh nodes, and you can invoke this procedure in multiple ways
e.g. writing in the lower command line preceded by -np- your_procedure
(-np- mean 'no process' and then the next is expected to be a Tcl command)
of from a button of the 'macros toolbar'
In fact It already exists (hidden in the toolbar) a macro button very
similar, to re-locate the quadratic nodes aligned in the middle edge (e.g.
to avoid possible wrong jacobians in curved elements)
Have a look to the Tcl code of this macro: click the "Edit macros" button to
open the Macros window
And select the 'Align Quadratic Nodes' macro to see its Tcl code on the
right
From the window could set this macro visible in the toolbar or invoke it.
You can clone this macro to create your similar macro changing a little the
Tcl code to calculate the position you want instead of the mid-edge
Enrique
De: gidlist-bounces at listas.cimne.upc.edu
[mailto:gidlist-bounces at listas.cimne.upc.edu] En nombre de Dhankhar, Amit
Kumar
Enviado el: lunes, 6 de octubre de 2014 22:45
Para: gidlist at listas.cimne.upc.edu
Asunto: [GiDlist] GID move node feature?
Hi,
Could you tell me if GID provides a feature so that I can move some specific
nodes at specific distance for meshing purposes.
Basically I am interested to model tet10 (quadratic tetrahedrals) mesh
elements but nodes should be at (1/4)th distance rather than the default
middle location in the region where my crack exists in the material. I know
there is one "move node" feature but not really sure if that would suit my
purpose. Is there any easy way to do this in GID?
Would appreciate any help.
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/de998426/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 2026 bytes
Desc: not available
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/de998426/attachment.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 68395 bytes
Desc: not available
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/de998426/attachment.jpeg
------------------------------
_______________________________________________
GiDlist mailing list
GiDlist at listas.cimne.upc.edu
http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist
End of GiDlist Digest, Vol 51, Issue 4
**************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: macros.png
Type: image/png
Size: 118477 bytes
Desc: macros.png
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141009/0eaa044f/attachment-0001.png
Just a small follow up question- Which version of GID are you running? When I click the 'Edit Macro' button, I just see the macros listed and not the actual code. Could you let me know how can I can enable this so that I am able to edit any of the inbuilt tcl macros? Attached the screenshot of what I got.
Thanks
Today's Topics:
1. Re: GID move node feature? (Enrique Escolano)
----------------------------------------------------------------------
Message: 1
Date: Tue, 7 Oct 2014 14:49:26 +0200
From: "Enrique Escolano" escolano at cimne.upc.edu
Subject: Re: [GiDlist] GID move node feature?
To: gidlist at listas.cimne.upc.edu
Message-ID: 097e01cfe22d$20aa6f80$61ff4e80$@cimne.upc.edu
Content-Type: text/plain; charset="us-ascii"
You can move a mesh node for example as you said, from the menu
Mesh-Edit mesh-Move node
And then pick the node and enter its new x,y,z coordinates in the lower
command line
That internally is converted into this GiD process commands:
MEscape Meshing EditMesh MoveNode $node_id $x,$y,$z Escape
Where node_id is the node number, and x y z the new location
And it exists also a more direct GiD-Tcl command:
GiD_Mesh edit node $node_id {$x $y $z}
You can create a Tcl procedure to set the quadratic node position you want
for all mesh nodes, and you can invoke this procedure in multiple ways
e.g. writing in the lower command line preceded by -np- your_procedure
(-np- mean 'no process' and then the next is expected to be a Tcl command)
of from a button of the 'macros toolbar'
In fact It already exists (hidden in the toolbar) a macro button very
similar, to re-locate the quadratic nodes aligned in the middle edge (e.g.
to avoid possible wrong jacobians in curved elements)
Have a look to the Tcl code of this macro: click the "Edit macros" button to
open the Macros window
And select the 'Align Quadratic Nodes' macro to see its Tcl code on the
right
From the window could set this macro visible in the toolbar or invoke it.
You can clone this macro to create your similar macro changing a little the
Tcl code to calculate the position you want instead of the mid-edge
Enrique
De: gidlist-bounces at listas.cimne.upc.edu
[mailto:gidlist-bounces at listas.cimne.upc.edu] En nombre de Dhankhar, Amit
Kumar
Enviado el: lunes, 6 de octubre de 2014 22:45
Para: gidlist at listas.cimne.upc.edu
Asunto: [GiDlist] GID move node feature?
Hi,
Could you tell me if GID provides a feature so that I can move some specific
nodes at specific distance for meshing purposes.
Basically I am interested to model tet10 (quadratic tetrahedrals) mesh
elements but nodes should be at (1/4)th distance rather than the default
middle location in the region where my crack exists in the material. I know
there is one "move node" feature but not really sure if that would suit my
purpose. Is there any easy way to do this in GID?
Would appreciate any help.
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/de998426/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 2026 bytes
Desc: not available
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/de998426/attachment.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 68395 bytes
Desc: not available
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141007/de998426/attachment.jpeg
------------------------------
_______________________________________________
GiDlist mailing list
GiDlist at listas.cimne.upc.edu
http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist
End of GiDlist Digest, Vol 51, Issue 4
**************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: macros.png
Type: image/png
Size: 118477 bytes
Desc: macros.png
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20141009/0eaa044f/attachment-0001.png