Import points to create a curve or a mesh

I have a series of numerous points, each on with its 2 coordinates (x,y,z) in a text file that I would like to import to create a curve if possible or a mesh.
Is there a simple way to carry it out? %|

A little python script should do this nicely. Easy to write, especially if you’ve done any programming ever.

take a look at this

You can do this with a text editor.

  • Start a new text file.

  • Write 3DG1 in the first line.

  • Write the number of vertices in the second line.

  • Write the X Y Z coordinates, separated by spaces, for all your vertices, one per line.

  • You may save this as vertices only and connect them with Blender.

  • If you want to add faces, for each face add a line starting with the number of vertices, then the vertex indices (starting at 0) and then a color number.

  • You can make edges by creating faces of two vertices.

  • Open in Blender with F1

Thank you for your suggestions.
I made the following short test:
I created a txt file (that I called test.txt) only made of the following lines:

0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1

expecting to import it as 8 vertices withtin Blender.
I then tried to open it with F1 (open file). It proposes to open a Blender file. I passed over it forcing to open the text file instead of a real Blender file. Blender refuses it and displays:
ERROR : unknown file type or error

Is there another way to import the text file data?

Open it as a normal Blender file.

This is a Videoscape format file, an old Amiga computer program. It will be appended to your scene. Your example works.


I even tried dos and unix line endings and works both ways.

Try File>Import>Videoscape from the menu. Also works.

(Maybe your text editor is not saving text only?)

I use Blender under XP
When importing my text file using File->Import->Videoscape
I get :
ERROR: unknown file type or error, check console
ERROR: loadiing c: mp\BdB.txt failed <invalid read error>

The Blender consoles displays:
In BPY_call_importloader(name=c: mp\BdB.txt)

BdB.txt is the text file precisely containing:

0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1

When I edit it in hexa it gives:
For the first line that corresponds to “3DG1”
ff fe 33 00 44 00 47 00 31 00 0d 00 0a 00

For the second line that corresponds to “8”
38 00 0d 00 0a 00

For the third line that corresponds to “0 0 0”
38 00 0d 00 0a 00 30 00 20 00 30 00 20 00 30 00 0d 00 0a 00

For the last line that corresponds to “1 1 1”
31 00 20 00 31 00 20 00 31 00

Is there anything to change in the text file?

NO WONDER! Looks like your text is in 16 bit unicode! I had never thought of that.

Should be:

3DG1        33 44 47 31 0A
8           38 0A

… etc
(or 0D 0A for line breaks)

Your editor may have an option for setting encoding. Use an 8 bit encoding. You might try with an old simple text editor.

I have updated my text file according to your recommendations, but I still face the same problem.
Can you send me an example of fil that works. I could so edit it in hexa and check where I am wrong.
Thanks in advance.