[GiDlist] Suggestions for inserting cracks in meshes

Moderator: GiD Team

User avatar
escolano
Posts: 1918
Joined: Sun Sep 05, 1982 10:51 pm

[GiDlist] Surface parameterization

Post by escolano »

Hi Willy,
Your model don't have any geometric surface (you probably imported a mesh), then it not exists a "surface space parameter" to ask.

In other hand, the user don't have any control over the parameterization of the surfaces, then maybe the uv parameter space coordinates are not valid for your use.

I generated by revolution a new surface matching your simple mesh shape. I attach your model with this surface number 1.

Then you can ask for example the uv coordinates of all your nodes over this surface with this tcl procedure

proc GetUVCoordinates { } {
set res ""
set numsurface 1
set infonodes [GiD_Info mesh nodes]
foreach {num x y z} $infonodes {
set uv [GiD_Info parametric surface $numsurface uv_fromcoord $x $y $z]
append res "$num $uv\n"
}
WarnWinText $res
return $res
}

To test it:
copy this definition procedure an put in the GiD lower command line, preceded by "-np-" (to indicate GiD that is tcl code)

-np- proc GetUVCoordinates { } {
set res ""
set numsurface 1
set infonodes [GiD_Info mesh nodes]
foreach {num x y z} $infonodes {
set uv [GiD_Info parametric surface $numsurface uv_fromcoord $x $y $z]
append res "$num $uv\n"
}
WarnWinText $res
return $res
}

Then the procedure is defined inside GiD, and can invoke it with
-np- GetUVCoordinates

(it will open a window with the results)

Note: It's possible to easily call tcl procedures from customized buttons of the macros toolbar.

----- Original Message -----
From: "VSayako Willy" vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.edu
Sent: Saturday, October 15, 2005 4:41 AM
Subject: Re: [GiDlist] Surface parameterization


Hi Enrique
Thanks very much for your advice and information. I
have attached the shell surface herewith. How would we
write the parametric of all the nodes of such surface
which has about 100 nodes.??
Regards


--- Enrique Escolano escolano at cimne.upc.edu wrote:

It exists a GiD-Tcl Info command to get this type of
geometric information (coordinates, derivatives,
etc):

for example to get the u,v parameter coordinates of
a 3D coordinates x,y,z on the surface number 28, can
use

set uv [GiD_Info parametric surface 28 uv_fromcoord
$x $y $z]

Read GiD Help about Tcl/Tk extension-Control
functions-Info function-Parametric

Regards

Enrique Escolano

----- Original Message -----
From: "VSayako Willy" vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.edu
Sent: Wednesday, October 12, 2005 5:51 AM
Subject: [GiDlist] Surface parameterization


Hi all Gidlists

Could you please tell me or send the source of
information or source code on the surface
parameterization for shell.. I would like to mapp
the
nodes in space into 2D...UV parametric space..
Anybody knows something about this???

Regards.



__________________________________
Start your day with Yahoo! - Make it your home
page!
http://www.yahoo.com/r/hs
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist






__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20051015/92786cfc/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Moley_with_surface.zip
Type: application/x-zip-compressed
Size: 54837 bytes
Desc: not available
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20051015/92786cfc/attachment.bin
VSayako Willy

[GiDlist] Surface parameterization

Post by VSayako Willy »

Hi Enrique
Where should I put this tcl proc?? in which file
of GiD?or which directory?
Enrique what do you mean by uv-parametric space
here? isn't the x-y coordinate of 3D x-y-z cartesian
coordinates?
What is the idea of uv-parametric used in GiD? how
could I get this uv-parametric generated inside my
source code? instead of reading as a input file of
this uv data.. I just read the 3D xyz coordinates in
the data input file then write the source code to
calculate the uv-parametric automatically inside the
code..

Best regards.

--- Enrique Escolano escolano at cimne.upc.edu wrote:

Hi Willy,
Your model don't have any geometric surface (you
probably imported a mesh), then it not exists a
"surface space parameter" to ask.

In other hand, the user don't have any control over
the parameterization of the surfaces, then maybe the
uv parameter space coordinates are not valid for
your use.

I generated by revolution a new surface matching
your simple mesh shape. I attach your model with
this surface number 1.

Then you can ask for example the uv coordinates of
all your nodes over this surface with this tcl
procedure

proc GetUVCoordinates { } {
set res ""
set numsurface 1
set infonodes [GiD_Info mesh nodes]
foreach {num x y z} $infonodes {
set uv [GiD_Info parametric surface
$numsurface uv_fromcoord $x $y $z]
append res "$num $uv\n"
}
WarnWinText $res
return $res
}

To test it:
copy this definition procedure an put in the GiD
lower command line, preceded by "-np-" (to indicate
GiD that is tcl code)

-np- proc GetUVCoordinates { } {
set res ""
set numsurface 1
set infonodes [GiD_Info mesh nodes]
foreach {num x y z} $infonodes {
set uv [GiD_Info parametric surface
$numsurface uv_fromcoord $x $y $z]
append res "$num $uv\n"
}
WarnWinText $res
return $res
}

Then the procedure is defined inside GiD, and can
invoke it with
-np- GetUVCoordinates

(it will open a window with the results)

Note: It's possible to easily call tcl procedures
from customized buttons of the macros toolbar.

----- Original Message -----
From: "VSayako Willy" vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.edu
Sent: Saturday, October 15, 2005 4:41 AM
Subject: Re: [GiDlist] Surface parameterization


Hi Enrique
Thanks very much for your advice and
information. I
have attached the shell surface herewith. How
would we
write the parametric of all the nodes of such
surface
which has about 100 nodes.??
Regards


--- Enrique Escolano escolano at cimne.upc.edu
wrote:

It exists a GiD-Tcl Info command to get this
type of
geometric information (coordinates, derivatives,
etc):

for example to get the u,v parameter coordinates
of
a 3D coordinates x,y,z on the surface number 28,
can
use

set uv [GiD_Info parametric surface 28
uv_fromcoord
$x $y $z]

Read GiD Help about Tcl/Tk extension-Control
functions-Info function-Parametric

Regards

Enrique Escolano

----- Original Message -----
From: "VSayako Willy" vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.edu
Sent: Wednesday, October 12, 2005 5:51 AM
Subject: [GiDlist] Surface parameterization


Hi all Gidlists

Could you please tell me or send the source of
information or source code on the surface
parameterization for shell.. I would like to
mapp
the
nodes in space into 2D...UV parametric space..

Anybody knows something about this???

Regards.



__________________________________
Start your day with Yahoo! - Make it your home
page!
http://www.yahoo.com/r/hs

_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es

http://gid.cimne.upc.es/mailman/listinfo/gidlist






__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com




__________________________________
Start your day with Yahoo! - Make it your home page!
http://www.yahoo.com/r/hs
User avatar
escolano
Posts: 1918
Joined: Sun Sep 05, 1982 10:51 pm

[GiDlist] Surface parameterization

Post by escolano »

For a fast test, it's not necessary to save the code in any file. you can
copy and paste in the GiD command line, preceded by "-np-" as I said in the
previous message:
-np- proc GetUVCoordinates...

And use with:
-np- GetUVCoordinates

A parametric surface is a mapping from a 2D parameter space (a 1x1 square)
to 3D coordinates. { x(u,v) ,y(u,v), z(u,v) }
Maybe you can use this u,v space.

Note: each surface has his own parametric space, then you only can use this
trick if your 3D nodes are generated from a single source surface.

In general, only from a cloud of points you can't create a surface to use
his space parameter.
The uv_fromcoord command get the inverse: from a 3D coordinate on the
surface, returning the u,v parameters
(to calculate this inverse of the parametrization, you need to solve a
non-linear two equation system, finding u,v that minimize the distance to
the 3D point)


----- Original Message -----
From: "VSayako Willy" vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.edu
Sent: Monday, October 17, 2005 6:28 AM
Subject: Re: [GiDlist] Surface parameterization


Hi Enrique
Where should I put this tcl proc?? in which file
of GiD?or which directory?
Enrique what do you mean by uv-parametric space
here? isn't the x-y coordinate of 3D x-y-z cartesian
coordinates?
What is the idea of uv-parametric used in GiD? how
could I get this uv-parametric generated inside my
source code? instead of reading as a input file of
this uv data.. I just read the 3D xyz coordinates in
the data input file then write the source code to
calculate the uv-parametric automatically inside the
code..

Best regards.

--- Enrique Escolano escolano at cimne.upc.edu wrote:

Hi Willy,
Your model don't have any geometric surface (you
probably imported a mesh), then it not exists a
"surface space parameter" to ask.

In other hand, the user don't have any control over
the parameterization of the surfaces, then maybe the
uv parameter space coordinates are not valid for
your use.

I generated by revolution a new surface matching
your simple mesh shape. I attach your model with
this surface number 1.

Then you can ask for example the uv coordinates of
all your nodes over this surface with this tcl
procedure

proc GetUVCoordinates { } {
set res ""
set numsurface 1
set infonodes [GiD_Info mesh nodes]
foreach {num x y z} $infonodes {
set uv [GiD_Info parametric surface
$numsurface uv_fromcoord $x $y $z]
append res "$num $uv\n"
}
WarnWinText $res
return $res
}

To test it:
copy this definition procedure an put in the GiD
lower command line, preceded by "-np-" (to indicate
GiD that is tcl code)

-np- proc GetUVCoordinates { } {
set res ""
set numsurface 1
set infonodes [GiD_Info mesh nodes]
foreach {num x y z} $infonodes {
set uv [GiD_Info parametric surface
$numsurface uv_fromcoord $x $y $z]
append res "$num $uv\n"
}
WarnWinText $res
return $res
}

Then the procedure is defined inside GiD, and can
invoke it with
-np- GetUVCoordinates

(it will open a window with the results)

Note: It's possible to easily call tcl procedures
from customized buttons of the macros toolbar.

----- Original Message -----
From: "VSayako Willy" vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.edu
Sent: Saturday, October 15, 2005 4:41 AM
Subject: Re: [GiDlist] Surface parameterization


Hi Enrique
Thanks very much for your advice and
information. I
have attached the shell surface herewith. How
would we
write the parametric of all the nodes of such
surface
which has about 100 nodes.??
Regards


--- Enrique Escolano escolano at cimne.upc.edu
wrote:

It exists a GiD-Tcl Info command to get this
type of
geometric information (coordinates, derivatives,
etc):

for example to get the u,v parameter coordinates
of
a 3D coordinates x,y,z on the surface number 28,
can
use

set uv [GiD_Info parametric surface 28
uv_fromcoord
$x $y $z]

Read GiD Help about Tcl/Tk extension-Control
functions-Info function-Parametric

Regards

Enrique Escolano

----- Original Message -----
From: "VSayako Willy" vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.edu
Sent: Wednesday, October 12, 2005 5:51 AM
Subject: [GiDlist] Surface parameterization


Hi all Gidlists

Could you please tell me or send the source of
information or source code on the surface
parameterization for shell.. I would like to
mapp
the
nodes in space into 2D...UV parametric space..

Anybody knows something about this???

Regards.



__________________________________
Start your day with Yahoo! - Make it your home
page!
http://www.yahoo.com/r/hs

_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es

http://gid.cimne.upc.es/mailman/listinfo/gidlist






__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com




__________________________________
Start your day with Yahoo! - Make it your home page!
http://www.yahoo.com/r/hs
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist

Willy S

[GiDlist] Surface parameterization

Post by Willy S »

Hi Enrique
The proc you wrote gives the window box of Copy, Translation, mirror, scale, and offset... What and how can I know anything about uv-parameter from this window box. Actually we use this box only for extrution purpose?? Would you please to elaborate.

Regards

Enrique Escolano escolano at cimne.upc.edu wrote:
Hi Willy,
Your model don't have any geometric surface (you probably imported a mesh), then it not exists a "surface space parameter" to ask.

In other hand, the user don't have any control over the parameterization of the surfaces, then maybe the uv parameter space coordinates are not valid for your use.

I generated by revolution a new surface matching your simple mesh shape. I attach your model with this surface number 1.

Then you can ask for example the uv coordinates of all your nodes over this surface with this tcl procedure

proc GetUVCoordinates { } {
set res ""
set numsurface 1
set infonodes [GiD_Info mesh nodes]
foreach {num x y z} $infonodes {
set uv [GiD_Info parametric surface $numsurface uv_fromcoord $x $y $z]
append res "$num $uv\n"
}
WarnWinText $res
return $res
}

To test it:
copy this definition procedure an put in the GiD lower command line, preceded by "-np-" (to indicate GiD that is tcl code)

-np- proc GetUVCoordinates { } {
set res ""
set numsurface 1
set infonodes [GiD_Info mesh nodes]
foreach {num x y z} $infonodes {
set uv [GiD_Info parametric surface $numsurface uv_fromcoord $x $y $z]
append res "$num $uv\n"
}
WarnWinText $res
return $res
}

Then the procedure is defined inside GiD, and can invoke it with
-np- GetUVCoordinates

(it will open a window with the results)

Note: It's possible to easily call tcl procedures from customized buttons of the macros toolbar.

----- Original Message ----- From: "VSayako Willy" vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.edu
Sent: Saturday, October 15, 2005 4:41 AM
Subject: Re: [GiDlist] Surface parameterization



Hi Enrique
Thanks very much for your advice and information. I
have attached the shell surface herewith. How would we
write the parametric of all the nodes of such surface
which has about 100 nodes.??
Regards


--- Enrique Escolano escolano at cimne.upc.edu wrote:

It exists a GiD-Tcl Info command to get this type of
geometric information (coordinates, derivatives,
etc):

for example to get the u,v parameter coordinates of
a 3D coordinates x,y,z on the surface number 28, can
use

set uv [GiD_Info parametric surface 28 uv_fromcoord
$x $y $z]

Read GiD Help about Tcl/Tk extension-Control
functions-Info function-Parametric

Regards

Enrique Escolano

----- Original Message -----
From: "VSayako Willy" vilaysako at yahoo.com
To: gidlist at gatxan.cimne.upc.edu
Sent: Wednesday, October 12, 2005 5:51 AM
Subject: [GiDlist] Surface parameterization


Hi all Gidlists

Could you please tell me or send the source of
information or source code on the surface
parameterization for shell.. I would like to mapp
the
nodes in space into 2D...UV parametric space..
Anybody knows something about this???

Regards.



__________________________________
Start your day with Yahoo! - Make it your home
page!
http://www.yahoo.com/r/hs
_______________________________________________
GiDlist mailing list
GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist






__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com

---------------------------------
Yahoo! FareChase - Search multiple travel sites in one click.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20051027/64ee4bbb/attachment.htm
User avatar
miguel
Posts: 361
Joined: Thu Sep 25, 2014 9:04 am

[GiDlist] Surface parameterization

Post by miguel »

Hi, from what you are telling, it's sure that you have selected de Tcl code
from the mail, made a ctrl.-C and change to GiD, and pressed Ctrl-V to paste
the code in the command line entry. But, in gid, Ctrl-V is the shortcut for
the Move window, which will popup and that is what happened to you.



Instead of using Ctrl-V to paste the code, used Shift-Insert.



But, as Enrique told you, you'll need a Surface to get's this UV information
and in the example you've sent, there is no geometrical surface. So you'll
not get any UV information.



regards



miguel



_____

De: gidlist-admin at gatxan.cimne.upc.edu
[mailto:gidlist-admin at gatxan.cimne.upc.edu] En nombre de Willy S
Enviado el: jueves, 27 de octubre de 2005 4:57
Para: gidlist at gatxan.cimne.upc.edu
Asunto: Re: [GiDlist] Surface parameterization



Hi Enrique

The proc you wrote gives the window box of Copy, Translation, mirror,
scale, and offset... What and how can I know anything about uv-parameter
from this window box. Actually we use this box only for extrution purpose??
Would you please to elaborate.



Regards

Enrique Escolano escolano at cimne.upc.edu wrote:

Hi Willy,

Your model don't have any geometric surface (you probably imported a mesh),
then it not exists a "surface space parameter" to ask.



In other hand, the user don't have any control over the parameterization of
the surfaces, then maybe the uv parameter space coordinates are not valid
for your use.



I generated by revolution a new surface matching your simple mesh shape. I
attach your model with this surface number 1.



Then you can ask for example the uv coordinates of all your nodes over this
surface with this tcl procedure



proc GetUVCoordinates { } {

set res ""

set numsurface 1

set infonodes [GiD_Info mesh nodes]

foreach {num x y z} $infonodes {

set uv [GiD_Info parametric surface $numsurface uv_fromcoord $x $y
$z]
append res "$num $uv\n"

}

WarnWinText $res

return $res

}



To test it:

copy this definition procedure an put in the GiD lower command line,
preceded by "-np-" (to indicate GiD that is tcl code)



-np- proc GetUVCoordinates { } {
set res ""
set numsurface 1
set infonodes [GiD_Info mesh nodes]
foreach {num x y z} $infonodes {
set uv [GiD_Info parametric surface $numsurface uv_fromcoord $x $y
$z]
append res "$num $uv\n"
}
WarnWinText $res
return $res
}



Then the procedure is defined inside GiD, and can invoke it with

-np- GetUVCoordinates



(it will open a window with the results)



Note: It's possible to easily call tcl procedures from customized buttons of
the macros toolbar.



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

From: "VSayako Willy" mailto:vilaysako at yahoo.com vilaysako at yahoo.com

To: mailto:gidlist at gatxan.cimne.upc.edu gidlist at gatxan.cimne.upc.edu

Sent: Saturday, October 15, 2005 4:41 AM

Subject: Re: [GiDlist] Surface parameterization



Hi Enrique
Thanks very much for your advice and information. I
have attached the shell surface herewith. How would we
write the parametric of all the nodes of such surface
which has about 100 nodes.??
Regards


--- Enrique Escolano mailto:escolano at cimne.upc.edu
escolano at cimne.upc.edu wrote:

It exists a GiD-Tcl Info command to get this type of
geometric information (coordinates, derivatives,
etc):

for example to get the u,v parameter coordinates of
a 3D coordinates x,y,z on the surface number 28, can
use

set uv [GiD_Info parametric surface 28 uv_fromcoord
$x $y $z]

! Read GiD Help about Tcl/Tk extension-Control
functions-Info function-Parametric

Regards

Enrique Escolano

----- Original Message -----
From: "VSayako Willy" mailto:vilaysako at yahoo.com
vilaysako at yahoo.com
To: mailto:gidlist at gatxan.cimne.upc.edu
gidlist at gatxan.cimne.upc.edu
Sent: Wednesday, October 12, 2005 5:51 AM
Subject: [GiDlist] Surface parameterization


Hi all Gidlists

Could you please tell me or send the source of
information or source code on the surface
parameterization for shell.. I would like to mapp
the
nod! es in space into 2D...UV parametric space..
Anybody knows something about this???

Regards.



__________________________________
Start your day with Yahoo! - Make it your home
page!
http://www.yahoo.com/r/hs http://www.yahoo.com/r/hs
_______________________________________________
GiDlist mailing list
mailto:GiDlist at gid.cimne.upc.es GiDlist at gid.cimne.upc.es
http://gid.cimne.upc.es/mailman/listinfo/gidlist
http://gid.cimne.upc.es/mailman/listinfo/gidlist





__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com/ http://mail.yahoo.com

_____

Yahoo!
http://us.lrd.yahoo.com/_ylc=X3oDMTFqODRtdXQ4BF9TAzMyOTc1MDIEX3MDOTY2ODgxNj
kEcG9zAzEEc2VjA21haWwtZm9vdGVyBHNsawNmYw--/SIG=110oav78o/**http%3a/farechase
.yahoo.com FareChase - Search multiple travel sites in one click.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20051028/d86f8f67/attachment.htm
Post Reply