# How to import .curve format file into Pointwise

 Register Blogs Members List Search Today's Posts Mark Forums Read

 August 25, 2011, 21:36 How to import .curve format file into Pointwise #1 New Member   Join Date: Aug 2011 Posts: 2 Rep Power: 0 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

 August 29, 2011, 10:31 Import curve into Pointwise #2 Member     Rick Matus Join Date: Mar 2009 Location: Fort Worth, Texas, USA Posts: 98 Rep Power: 10 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 c.....ni(n) 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 c.....ni(n) 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.

 August 29, 2011, 19:46 #3 New Member   Join Date: Aug 2011 Posts: 2 Rep Power: 0 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! Regards, Hui

 August 30, 2011, 09:18 Nice use of scripting #4 Member     Rick Matus Join Date: Mar 2009 Location: Fort Worth, Texas, USA Posts: 98 Rep Power: 10 Hui: Glad to hear you were able to use scripting to solve your problem. That is a good way to do it. Cheers, Rick

 November 22, 2015, 14:20 #5 New Member   Petar Filipovic Join Date: Nov 2015 Location: Zagreb, Croatia Posts: 6 Rep Power: 3 Hello, 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

 November 23, 2015, 09:57 File, Import #6 Member     Rick Matus Join Date: Mar 2009 Location: Fort Worth, Texas, USA Posts: 98 Rep Power: 10 Petar: 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. Rick

 November 23, 2015, 11:10 #7 New Member   Petar Filipovic Join Date: Nov 2015 Location: Zagreb, Croatia Posts: 6 Rep Power: 3 Rick, 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? Sorry but I am total newbee with this. Petar

 November 23, 2015, 11:48 Segment file format #8 Member     Rick Matus Join Date: Mar 2009 Location: Fort Worth, Texas, USA Posts: 98 Rep Power: 10 Petar: 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: 61 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

 November 23, 2015, 12:23 #9 New Member   Petar Filipovic Join Date: Nov 2015 Location: Zagreb, Croatia Posts: 6 Rep Power: 3 Rick, Ok I managed to import points that are then connected into a curve. Is there any chance that these points are not connected? Petar

 November 23, 2015, 15:23 Looks like a script #10 Member     Rick Matus Join Date: Mar 2009 Location: Fort Worth, Texas, USA Posts: 98 Rep Power: 10 Petar: 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: http://www.pointwise.com/glyph2/file...Point-cxx.html A general intro to Glyph scripting is available in the Glyph Reference Manual you can access through the Pointwise Help menu. Hope this helps, Rick

November 24, 2015, 11:57
Sample script
#11
Member

Rick Matus
Join Date: Mar 2009
Location: Fort Worth, Texas, USA
Posts: 98
Rep Power: 10
Petar:

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.

Rick
Attached Files
 readPoints.zip (459 Bytes, 14 views) points.zip (774 Bytes, 10 views)

 November 26, 2015, 15:08 #12 New Member   Petar Filipovic Join Date: Nov 2015 Location: Zagreb, Croatia Posts: 6 Rep Power: 3 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

 November 26, 2015, 15:47 #13 New Member   Petar Filipovic Join Date: Nov 2015 Location: Zagreb, Croatia Posts: 6 Rep Power: 3 Rick, 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

 November 30, 2015, 11:41 #14 Senior Member   David Garlisch Join Date: Jan 2013 Location: Pointwise HQ Posts: 157 Rep Power: 6 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.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Greg Givogue OpenFOAM Programming & Development 3 March 4, 2011 18:18 marval OpenFOAM Installation 2 March 17, 2010 09:33 hjasak OpenFOAM Post-Processing 69 April 24, 2008 01:24 Rasmus Gjesing (Gjesing) OpenFOAM Native Meshers: blockMesh 10 April 2, 2007 14:00 CFD user CFX 3 November 25, 2002 16:16

All times are GMT -4. The time now is 23:48.