Entries from 2014-05-01 to 1 month

Saru-no-Koshikake-Broken.py

import math import bmesh def deselect(): for x in bpy.data.objects: x.select = False # bpy.ops.object.delete() # n=disks m=fins q=lenth r0=min radius, r1=max radius, s=h to w ratio def genVert(n, m, q, r0, r1, s): dR = (r1-r0)/float(n) d =…

Saru-no-Koshikake.py

import math import bmesh def deselect(): for x in bpy.data.objects: x.select = False # bpy.ops.object.delete() # n=disks m=fins q=lenth r=radius s=h to w ratio def genVert(n, m, q, r, s): d = 1.0 for i in range(n): yield(0.0, 0.0, q*float(…

detect vert-links in bmesh

# just print edges by verts for v in bm.verts: for e in v.link_edges: vv = e.other_vert(v) print(v.co, vv.co) # make verts-link list as array "xs" import bmesh ao = bpy.context.scene.objects.active m = ao.data bm = bmesh.new() bm.from_mesh…

Line 2 Window Frame Looped

# let u, v vectors on the plane. b the origin on it. # let a a point off plane. and n a normal of the plane. import sys import bmesh import numpy as np def mapOnPlane(a, b0, b1, b2): u = np.array([b1[0]-b0[0], b1[1]-b0[1], b1[2]-b0[2]]) v …

Line 2 Window Frame

# let u, v vectors on the plane. b the origin on it. # let a a point off plane. and n a normal of the plane. import sys import bmesh import numpy as np def mapOnPlane(a, b0, b1, b2): u = np.array([b1[0]-b0[0], b1[1]-b0[1], b1[2]-b0[2]]) v …