1
$\begingroup$

How may I select certain vertices I want from this 3d mesh in Blender and export these vertices coordinates values as a table in a *.xls or *.csv file format?

I'm looking at 100 over vertices to be chosen.

$\endgroup$

1 Answer 1

2
$\begingroup$

you can do this with this script:

import bpy
import bmesh

print ("started")



obj = bpy.context.active_object

verts = []

if bpy.context.mode == 'EDIT_MESH':
    bm = bmesh.from_edit_mesh(obj.data)
    verts = [ v for v in bm.verts if v.select ]
else:
    verts = [ v for v in obj.data.vertices if v.select ]
    
    
for vertex in verts:
    print(vertex.co.x, ", ", vertex.co.y, ",",vertex.co.z)

enter image description here

result:

0.9238795042037964 ,  0.3826834261417389 , 1.0
0.7071067690849304 ,  -0.7071067690849304 , 1.0
$\endgroup$
2
  • $\begingroup$ I used this script successfully on a few objects. I tried to use it on another object today, and the printed vertices are nonsense, i.e. they don't comport with the actual vertices in the object (looking manually within blender). There's only one object in the scene. Any ideas? $\endgroup$
    – G Lap
    Jan 25, 2022 at 17:52
  • $\begingroup$ Please open a new question here…this is closed. Then I will take a look. $\endgroup$
    – Chris
    Jan 25, 2022 at 18:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .