Skip to content

Instantly share code, notes, and snippets.

View lauradean's full-sized avatar

Laura Dean lauradean

  • Moone Leaf, LLC
  • Houston, TX
View GitHub Profile
@lauradean
lauradean / hexgen.py
Created September 25, 2017 15:47
Generate a grid of hexagons in blender
import bpy
import math
radius = .3 # long diagonal of hexagon
layers = 12 # number of rings of hexagons in grid
def makePrimitiveCircle(objName, v, r, f, loc, rot, lvl, layers=[0]):
bpy.ops.mesh.primitive_circle_add(
vertices=v,
import bpy
import math
from mathutils import Vector, Matrix
radius = .3
layers = 12
height = .1
def makePrimitiveCircle(objRing, objNum, v, r, f, loc, rot, lvl, layers=[0]):