Professional Documents
Culture Documents
import blender
import math
from blender import *
from blender import window, text, draw, bgl
from blender.window import *
from blender.text import *
from blender.draw import *
from blender.bgl import *
from blender import nmesh #lots of useless modules imported
window.editmode(1)
scn = scene.getcurrent()
mesh = nmesh.getraw()
obj = mesh.new("circle")
punktid = []
selected_faces = []
seledges = []
edge = obj.edges
verts = obj.verts
faces = obj.faces
radians=math.radians
selected = []
sin=math.sin
degrees = math.degrees
asin = math.asin
sqrt = math.sqrt
cos = math.cos
#andmed ringi kohta
ringidearv = 4 #number of subcircles
resolutsioon = 7 #the smaller number the more verts per circle
ovalness = 90 #90 is perfect circle,the lower, the more oval
center = 0 #center point of circle
raadius=6 #radius of circle
raadiusini = 0 #dont change this
#/andmed ringi kohta
def vector(v1,v2):#gets the distance between two points,not used in this script
vect = sqrt((v1.co[0]-v2.co[0])*(v1.co[0]-v2.co[0])+(v1.co[1]-
v2.co[1])*(v1.co[1]-v2.co[1])+(v1.co[2]-v2.co[2])*(v1.co[2]-v2.co[2]))
return vect