With Blender 2.8 I have created a complex object that I wanted to split in two seperate objects.
The procedure I followed (all scripted): Create object; duplicate object; go to edit mode and bisect with '''clear_inner=True'''. (works Perfect!) Then select other (original) object; go to edit mode and bisect with '''clear_outer=True'''. Now the first object seems also to have been subject to the bisect: Only some points/faces were the bisect is remain.
I am including the code for a simple cube:
import bpy
bpy.ops.mesh.primitive_cube_add(size=4, enter_editmode=False, location=(0, 0, 0))
bpy.context.object.name="left"
bpy.ops.object.duplicate_move(OBJECT_OT_duplicate={"linked":False, "mode":'TRANSLATION'})
bpy.context.object.name="right"
# cutting in two (bisect)
bpy.data.objects['left'].select_set(False)
bpy.data.objects['right'].select_set(True)
bpy.ops.object.editmode_toggle()
bpy.ops.mesh.select_all(action='SELECT')
bpy.ops.mesh.bisect(plane_co=(0, 28.5249, 5.80484), plane_no=(1, 0, 0), use_fill=True, clear_inner=True, threshold=0.0001, xstart=1042, xend=1068, ystart=647, yend=130)
bpy.ops.object.editmode_toggle()
bpy.data.objects['right'].select_set(False)
bpy.data.objects['left'].select_set(True)
bpy.ops.object.editmode_toggle()
bpy.ops.mesh.select_all(action='SELECT')
bpy.ops.mesh.bisect(plane_co=(0, 28.5249, 5.80484), plane_no=(1, 0, 0), use_fill=True, clear_outer=True, threshold=0.0001, xstart=1042, xend=1068, ystart=647, yend=130)
bpy.ops.object.editmode_toggle()
using bisect to seperate cube in two halfs
In the picture you see that the result of the second bisect succesfully halved the first cube ('left'). But it also splitted the duplictated cube('right') which was already halved resulting only in a face at the bisect plane.
Why doesn't it work? What am I doing wrong?