Setting and moving vertices is the same exact thing. If you set a location for a vertex you have moved it if the new location is different from the previous location.
import bpy
ob = bpy.data.objects["Cube"]
me = ob.data
print("faces:")
for face in me.faces:
print(face)
print("
verts:")
for vert in me.vertices:
new_location = vert.co
new_location[0] = new_location[0] + 1 #X
new_location[1] = new_location[1] + 1 #Y
new_location[2] = new_location[2] + 1 #Z
vert.co = new_location
If you have (x,y,z) the ‘new’ coordinates of your vertex already computed/available
you can use at once: vert.co = (x,y,z)
(or if “from mathutils import Vector” is done)
I would write Atoms example as vect.co = vect.co + Vector((1,1,1))
angles and lengths are already ‘built in’ use in 3DView and type N (such that the right options are visible) and under Display in edit-mode you can see angles and length …(select works too!)
Though I do not know yet to get the measurements to Python …
Huh,
which version of Blender are you using? I can’t find anyting like it. The display section of “N panel” doesn’t seem to contain any information about angles or lenghts. I attached a screen to see what am I missing…
//edit: the whole thing shouldn’t be hard to do in Python, we know coordinates of all points, so we can easily get the rest.
Alright,
I am already using Blender 2.61, but turning on debugging fixed it. Great. (Looks like I won’t even have to, actually, do any work after all :D).