Introductions Hello, I'm a brand new blender user... I'm working on a little project that's entirely made up of Python scripts. But I'm having trouble turning an octagon into a circle right now ( I do know that adding vertices would make it better, but is there another way, perhaps something like a code that resembles a subdivision modifier?)... Please help me with my problem...
My Question Is scripting subdivision modifier applicable? Can you show me how to do it with my code if it is possible?
Here is my code
import bpy
verts = [(0,1,0), (0.29,1.70,0), (1,2,0), (1.70,1.70,0), (2,1,0), (1.70,0.29,0), (1,0,0), (0.29,0.29,0)]
faces = [(0,1,2,3,4,5,6,7)]
mesh = bpy.data.meshes.new("octagon")
object = bpy.data.objects.new("octagon", mesh)
bpy.context.collection.objects.link(object)
mesh.from_pydata(verts,[],faces)