Using AI to convert files

26 views
Skip to first unread message

Roger Kaufman

unread,
Aug 27, 2024, 4:04:23 PM8/27/24
to anti...@googlegroups.com
Just out of curiosity I tried feeding an OBJ file into Copilot and it converted the file to OFF. (The prompt was convert the following file to geomview off format)
I tried the output and it triangulated the squares for some reason but otherwise it did it.

Console log below

Roger

You
Sent by you:
# File type: ASCII OBJ v 1.142613508925962 0.3377539738137524 -0.6212264105565853 0.38824 0.60000 0.30196 v 1.142613508925962 -0.3377539738137524 0.6212264105565853 0.38824 0.60000 0.30196 v -1.142613508925962 0.3377539738137524 0.6212264105565853 0.38824 0.60000 0.30196 v -1.142613508925962 -0.3377539738137524 -0.6212264105565853 0.38824 0.60000 0.30196 v 0.3377539738137524 0.6212264105565853 -1.142613508925962 0.38824 0.60000 0.30196 v 0.3377539738137524 -0.6212264105565853 1.142613508925962 0.38824 0.60000 0.30196 v -0.3377539738137524 0.6212264105565853 1.142613508925962 0.38824 0.60000 0.30196 v -0.3377539738137524 -0.6212264105565853 -1.142613508925962 0.38824 0.60000 0.30196 v 0.6212264105565853 1.142613508925962 -0.3377539738137524 0.38824 0.60000 0.30196 v 0.6212264105565853 -1.142613508925962 0.3377539738137524 0.38824 0.60000 0.30196 v -0.6212264105565853 1.142613508925962 0.3377539738137524 0.38824 0.60000 0.30196 v -0.6212264105565853 -1.142613508925962 -0.3377539738137524 0.38824 0.60000 0.30196 v 1.142613508925962 0.6212264105565853 0.3377539738137524 0.38824 0.60000 0.30196 v 1.142613508925962 -0.6212264105565853 -0.3377539738137524 0.38824 0.60000 0.30196 v -1.142613508925962 0.6212264105565853 -0.3377539738137524 0.38824 0.60000 0.30196 v -1.142613508925962 -0.6212264105565853 0.3377539738137524 0.38824 0.60000 0.30196 v 0.3377539738137524 1.142613508925962 0.6212264105565853 0.38824 0.60000 0.30196 v 0.3377539738137524 -1.142613508925962 -0.6212264105565853 0.38824 0.60000 0.30196 v -0.3377539738137524 1.142613508925962 -0.6212264105565853 0.38824 0.60000 0.30196 v -0.3377539738137524 -1.142613508925962 0.6212264105565853 0.38824 0.60000 0.30196 v 0.6212264105565853 0.3377539738137524 1.142613508925962 0.38824 0.60000 0.30196 v 0.6212264105565853 -0.3377539738137524 -1.142613508925962 0.38824 0.60000 0.30196 v -0.6212264105565853 0.3377539738137524 -1.142613508925962 0.38824 0.60000 0.30196 v -0.6212264105565853 -0.3377539738137524 1.142613508925962 0.38824 0.60000 0.30196 f 1 9 13 f 1 14 22 f 1 22 5 f 2 6 10 f 3 7 11 f 3 11 15 f 3 24 7 f 5 9 1 f 5 23 19 f 6 2 21 f 6 24 20 f 8 4 23 f 8 12 4 f 8 22 18 f 10 6 20 f 10 14 2 f 11 7 17 f 12 20 16 f 13 9 17 f 13 21 2 f 15 11 19 f 15 23 4 f 16 4 12 f 16 20 24 f 16 24 3 f 17 7 21 f 17 21 13 f 18 12 8 f 18 14 10 f 18 22 14 f 19 9 5 f 19 23 15 f 2 14 1 13 f 3 15 4 16 f 5 22 8 23 f 7 24 6 21 f 9 19 11 17 f 20 12 18 10
Copilot
Sent by Copilot:

Converted OFF File Content

OFF
24 36 0
1.142613508925962 0.337753973813752 -0.621226410556585
1.142613508925962 -0.337753973813752 0.621226410556585
-1.142613508925962 0.337753973813752 0.621226410556585
-1.142613508925962 -0.337753973813752 -0.621226410556585
0.337753973813752 0.621226410556585 -1.142613508925962
0.337753973813752 -0.621226410556585 1.142613508925962
-0.337753973813752 0.621226410556585 1.142613508925962
-0.337753973813752 -0.621226410556585 -1.142613508925962
0.621226410556585 1.142613508925962 -0.337753973813752
0.621226410556585 -1.142613508925962 0.337753973813752
-0.621226410556585 1.142613508925962 0.337753973813752
-0.621226410556585 -1.142613508925962 -0.337753973813752
1.142613508925962 0.621226410556585 0.337753973813752
1.142613508925962 -0.621226410556585 -0.337753973813752
-1.142613508925962 0.621226410556585 -0.337753973813752
-1.142613508925962 -0.621226410556585 0.337753973813752
0.337753973813752 1.142613508925962 0.621226410556585
0.337753973813752 -1.142613508925962 -0.621226410556585
-0.337753973813752 1.142613508925962 -0.621226410556585
-0.337753973813752 -1.142613508925962 0.621226410556585
0.621226410556585 0.337753973813752 1.142613508925962
0.621226410556585 -0.337753973813752 -1.142613508925962
-0.621226410556585 0.337753973813752 -1.142613508925962
-0.621226410556585 -0.337753973813752 1.142613508925962
3 0 8 12
3 0 13 21
3 0 21 4
3 1 5 9
3 2 6 10
3 2 10 14
3 2 23 6
3 4 8 0
3 4 22 18
3 5 1 20
3 5 23 19
3 7 3 22
3 7 11 3
3 7 21 17
3 9 5 19
3 9 13 1
3 10 6 16
3 11 19 15
3 12 8 16
3 12 20 1
3 14 10 18
3 14 22 3
3 15 3 11
3 15 19 23
3 15 23 2
3 16 6 20
3 16 20 12
3 17 11 7
3 17 13 9
3 17 21 13
3 18 8 4
3 18 22 14
3 1 13 0 12
3 2 14 3 15
3 4 21 7 22
3 6 23 5 20
3 8 18 10 16
3 19 11 17 9

Explanation

  • The first line OFF indicates the file format.
  • The second line 24 36 0 specifies the number of vertices (24), faces (36), and edges (0).
  • The next 24 lines list the vertices with their (x, y, z) coordinates.
  • The following 36 lines define the faces using the vertex indices.

You can save this content into a file with the .off extension and open it with Geomview or any other compatible 3D viewer.

If you need any further assistance or have more questions, feel free to ask!



Reply all
Reply to author
Forward
0 new messages