使用 Blender 2.8,我创建了一个复杂的对象,我想将其拆分为两个单独的对象。
我遵循的过程(所有脚本):创建对象;重复对象;进入编辑模式并用 '''clear_inner=True''' 平分。(完美!)然后选择其他(原始)对象;进入编辑模式并用 '''clear_outer=True''' 平分。现在第一个对象似乎也受到了二等分:只有一些点/面被二等分保留。
我包括一个简单多维数据集的代码:
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()
在图片中,您看到第二个二等分的结果成功地将第一个立方体(“左”)减半。但它也分裂了已经被减半的复制立方体('right'),导致只在平分平面上产生一个面。
为什么它不起作用?我究竟做错了什么?