I'm a newbie in blender and I'm trying to play around with the boolean difference modifier.
I have two concentric disks and I want to perform the boolean differece between them. I'm using the python API.
Here is an example:
import bpy
import bmesh
c1mesh = bpy.data.meshes.new("Disk1")
c1object = bpy.data.objects.new("Disk1", c1mesh)
bpy.context.scene.objects.link(c1object)
bm = bmesh.new()
bm.from_mesh(c1mesh)
bmesh.ops.create_circle(bm, cap_ends=True, diameter=2, segments=128)
bm.to_mesh(c1mesh)
bm.free()
c2mesh = bpy.data.meshes.new("Disk2")
c2object = bpy.data.objects.new("Disk2", c2mesh)
bpy.context.scene.objects.link(c2object)
bm = bmesh.new()
bm.from_mesh(c2mesh)
bmesh.ops.create_circle(bm, cap_ends=True, diameter=1, segments=128)
bm.to_mesh(c2mesh)
bm.free()
bool = c1object.modifiers.new(type='BOOLEAN', name = "diff1")
bool.operation = 'DIFFERENCE'
bool.object = c2object
c2object.hide = True
This has no effect (besides hiding the second disk). When I try to apply the modifier from the gui I get no result (besides some weird lines over the disk 1).
I guess that the problem is just my poor initial knowledge of blender (and general 3D modelling).
Thanks in advance.