Page MenuHome

diameter_test.py

import bpy
import bmesh
from mathutils import Matrix
bm = bmesh.new()
T = Matrix.Translation((0, 0, 0))
bmesh.ops.create_circle(
bm,
diameter=1,
segments=20,
matrix=T)
T = Matrix.Translation((1, 0, 0))
bmesh.ops.create_uvsphere(
bm,
u_segments=20,
v_segments=20,
diameter=1,
matrix=T)
T = Matrix.Translation((0, 1, 0))
bmesh.ops.create_icosphere(
bm,
subdivisions=2,
diameter=1,
matrix=T)
T = Matrix.Translation((1, 1, 0))
bmesh.ops.create_cone(
bm,
segments=20,
diameter1=1,
diameter2=1,
depth=1,
matrix=T)
T = Matrix.Translation((1, 2, 0))
bmesh.ops.create_cube(
bm,
size=1,
matrix=T)
mesh = bpy.data.meshes.new('Mesh')
bm.to_mesh(mesh)
obj = bpy.data.objects.new('Object', mesh)
bpy.context.scene.objects.link(obj)
bpy.context.scene.update()

File Metadata

Mime Type
text/x-python
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
37/1a/3b3f5ad1d3f76b3373847eaccdfa

Event Timeline