CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Pointwise & Gridgen (
-   -   How to import .curve format file into Pointwise (

hui August 25, 2011 21:36

How to import .curve format file into Pointwise
Hello, everyone:)

I am gonna use Pointwise to generate grids. Now I have the profile of a turbin blade as .curve format file. I am wondering if anyone knows how to import this kind of file into Pointwise.

Thanks in advance:)

rmatus August 29, 2011 10:31

Import curve into Pointwise
There are a couple of different formats you might use depending on the data you have. The format descriptions are available in Appendix III of the Pointwise User Manual.

If you want to import the geometry as curves, use the segment file format. Here is that format:

c.....nmax is the number of segments is the number of points on segment n
c.....imax is the number of points
integer nmax
integer ni(nmax)
real x(imax), y(imax), z(imax)

do n = 1, nmax
write(1,*) ni(n)
do i = 1, ni(n)
write(1,*) x(i,n), y(i,n), z(i,n)
end do
end do

If you want it import the geometry as surfaces, put it into PLOT3D (network) format:

c.....nmax is number of networks number of points in the i direction for the nth network
c.....nj(n) number of points in the j direction for the nth network
c.....nk(n) number of points in the k direction for the nth network

integer ni(nmax), nj(nmax), nk(nmax)
real x(imax,jmax,nmax),
& y(imax,jmax,nmax),
& z(imax,jmax,nmax)
write(1) nmax
write(1) ( ( ni(n), nj(n), nk(n) ), n=1,nmax )

do 10 n = 1, nmax
write(1) ( ( x(i,j,n), i=1,ni(n) ), j=1,nj(n) ),
& ( ( y(i,j,n), i=1,ni(n) ), j=1,nj(n) ),
& ( ( z(i,j,n), i=1,ni(n) ), j=1,nj(n) )
10 continue

Once the data is formatted the way you want, use File, Import, Database to import it as geometry, or File, Import, Grid to import it as grid.

hui August 29, 2011 19:46

Dear Rmatus,

Thanks a lot for your help! I found another way to solve this kind of problem.

It is very convenient to use journals. You can do some actions (creat points, connect lines) and look at the journal file. And you can just write your own script. I solved this problem by doing so.

Thanks again for your kind help!


rmatus August 30, 2011 09:18

Nice use of scripting

Glad to hear you were able to use scripting to solve your problem. That is a good way to do it.


Petar Filipovic November 22, 2015 14:20


Can you explain how to use that code on a .dat or .txt file? File contains x,y,z coordinate of a point.

Regards, Petar

rmatus November 23, 2015 09:57

File, Import

Once you have your coordinates in the format above, you can import the curve into Pointwise using the File, Import command. You can choose either the Grid... option to import as a connector or the Database... option to import as a database curve.


Petar Filipovic November 23, 2015 11:10


Ok I get the part with the import but I missed the part about formating my file to what you wrote.

So what I must do is write that code in front of my coordinates? :confused:

Sorry but I am total newbee with this.


rmatus November 23, 2015 11:48

Segment file format

Sorry, I answered the wrong question.

You just need to put the curve coordinates in a format like the one described in the code above.

Here is an example of a circle with 61 points:

0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00
2.739052315863355e-03 5.226423163382674e-02 0.000000000000000e+00
1.092619963309716e-02 1.039558454088797e-01 0.000000000000000e+00
2.447174185242323e-02 1.545084971874737e-01 0.000000000000000e+00
4.322727117869957e-02 2.033683215379001e-01 0.000000000000000e+00
6.698729810778065e-02 2.500000000000000e-01 0.000000000000000e+00
9.549150281252627e-02 2.938926261462366e-01 0.000000000000000e+00
1.284275872613028e-01 3.345653031794291e-01 0.000000000000000e+00
1.654346968205709e-01 3.715724127386971e-01 0.000000000000000e+00
2.061073738537634e-01 4.045084971874737e-01 0.000000000000000e+00
2.499999999999999e-01 4.330127018922193e-01 0.000000000000000e+00
2.966316784620998e-01 4.567727288213004e-01 0.000000000000000e+00
3.454915028125263e-01 4.755282581475768e-01 0.000000000000000e+00
3.960441545911203e-01 4.890738003669028e-01 0.000000000000000e+00
4.477357683661732e-01 4.972609476841366e-01 0.000000000000000e+00
4.999999999999999e-01 5.000000000000000e-01 0.000000000000000e+00
5.522642316338268e-01 4.972609476841366e-01 0.000000000000000e+00
6.039558454088796e-01 4.890738003669028e-01 0.000000000000000e+00
6.545084971874737e-01 4.755282581475768e-01 0.000000000000000e+00
7.033683215379001e-01 4.567727288213004e-01 0.000000000000000e+00
7.499999999999999e-01 4.330127018922194e-01 0.000000000000000e+00
7.938926261462365e-01 4.045084971874737e-01 0.000000000000000e+00
8.345653031794289e-01 3.715724127386972e-01 0.000000000000000e+00
8.715724127386970e-01 3.345653031794292e-01 0.000000000000000e+00
9.045084971874737e-01 2.938926261462366e-01 0.000000000000000e+00
9.330127018922192e-01 2.500000000000002e-01 0.000000000000000e+00
9.567727288213004e-01 2.033683215379002e-01 0.000000000000000e+00
9.755282581475768e-01 1.545084971874738e-01 0.000000000000000e+00
9.890738003669028e-01 1.039558454088799e-01 0.000000000000000e+00
9.972609476841366e-01 5.226423163382687e-02 0.000000000000000e+00
1.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00
9.972609476841368e-01 -5.226423163382649e-02 0.000000000000000e+00
9.890738003669028e-01 -1.039558454088797e-01 0.000000000000000e+00
9.755282581475768e-01 -1.545084971874737e-01 0.000000000000000e+00
9.567727288213006e-01 -2.033683215378999e-01 0.000000000000000e+00
9.330127018922194e-01 -2.500000000000000e-01 0.000000000000000e+00
9.045084971874737e-01 -2.938926261462366e-01 0.000000000000000e+00
8.715724127386971e-01 -3.345653031794291e-01 0.000000000000000e+00
8.345653031794291e-01 -3.715724127386971e-01 0.000000000000000e+00
7.938926261462366e-01 -4.045084971874737e-01 0.000000000000000e+00
7.500000000000000e-01 -4.330127018922193e-01 0.000000000000000e+00
7.033683215379003e-01 -4.567727288213004e-01 0.000000000000000e+00
6.545084971874737e-01 -4.755282581475768e-01 0.000000000000000e+00
6.039558454088797e-01 -4.890738003669028e-01 0.000000000000000e+00
5.522642316338268e-01 -4.972609476841366e-01 0.000000000000000e+00
5.000000000000000e-01 -5.000000000000000e-01 0.000000000000000e+00
4.477357683661732e-01 -4.972609476841366e-01 0.000000000000000e+00
3.960441545911203e-01 -4.890738003669028e-01 0.000000000000000e+00
3.454915028125263e-01 -4.755282581475768e-01 0.000000000000000e+00
2.966316784620999e-01 -4.567727288213004e-01 0.000000000000000e+00
2.500000000000001e-01 -4.330127018922194e-01 0.000000000000000e+00
2.061073738537635e-01 -4.045084971874737e-01 0.000000000000000e+00
1.654346968205709e-01 -3.715724127386971e-01 0.000000000000000e+00
1.284275872613029e-01 -3.345653031794292e-01 0.000000000000000e+00
9.549150281252633e-02 -2.938926261462366e-01 0.000000000000000e+00
6.698729810778065e-02 -2.500000000000000e-01 0.000000000000000e+00
4.322727117869962e-02 -2.033683215379002e-01 0.000000000000000e+00
2.447174185242323e-02 -1.545084971874738e-01 0.000000000000000e+00
1.092619963309716e-02 -1.039558454088797e-01 0.000000000000000e+00
2.739052315863355e-03 -5.226423163382687e-02 0.000000000000000e+00
0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00

Petar Filipovic November 23, 2015 12:23


Ok I managed to import points that are then connected into a curve. :)
Is there any chance that these points are not connected?


rmatus November 23, 2015 15:23

Looks like a script

If I understand correctly, you want read coordinates from a file and use them to create database points. If that is true, you can write a Pointwise Glyph script to accomplish this task.

The man page for the database point creation is here:

A general intro to Glyph scripting is available in the Glyph Reference Manual you can access through the Pointwise Help menu.

Hope this helps,

rmatus November 24, 2015 11:57

Sample script
2 Attachment(s)

Here is a short script to read points from a file and convert them to database points and a sample input file. It is not very general, but could be the starting point for a more general script.


Petar Filipovic November 26, 2015 15:08

Thank you for your help Rick. I will try this and let you know did I manage to do it for my case. :)

Regards, Petar

Petar Filipovic November 26, 2015 15:47


I am having trouble with executing the scritp you sent me. I get this error:

Script: couldn't read file "D:/Faks/Zavr?ni/readPoints.glf": no such file or directory

I am running Pointwise from Windows.

Regards, Petar

dgarlisch November 30, 2015 11:41

Does the path contain non-ascii (UTF-8, or Unicode?) characters?
Tcl is supposed to deal with that stuff correctly, but issues can arise.

As a quick test, place the script into a folder that only uses ascii chars.

All times are GMT -4. The time now is 13:34.