I am trying to make a mold to model the airway. Is there a way to split a cube all the way through in multiple parts. I am trying to cut the cube in this fashion. Is there way to cut it like this? I tried using the knife tool, but that only cut the surface, as opposed to cutting all the way through the object.
3 Answers
If you say the knife does not work for you, as it only cuts the surface, then you may want to use the option Z to Cut Through, for a snapping on angles to ensure a clean cut, you can also use C, so a cut from the front or any orthogonal view can be made in a straight line.
Here the optional functions of the knife tool:
Another option would be to use bisect, where you can also find some optional functionality mentioned while the tool is active.
Here a bisect example, bisect has the advantage that you can select the fill option and it will generate a surface that closes the cut:
I believe bisect might be a good idea as you can adjust not only the direction but also the position interactively.
Happy Blending.
Using Booleans
To create internal geometry recommend using a boolean as explained here Slicing an object in 4 parts
Code from my answer edited to split the cube into 8. (2 x 2 x 2)
import bpy
from mathutils import Matrix, Vector
context = bpy.context
ob = context.object
size = 4 * max(ob.dimensions)
mw = ob.matrix_world
def bbox(ob):
return (Vector(b) for b in ob.bound_box)
def bbox_center(ob):
return sum(bbox(ob), Vector()) / 8
def bbox_axes(ob):
bb = list(bbox(ob))
return tuple(bb[i] for i in (0, 4, 3, 1))
o, x, y, z = bbox_axes(ob)
bpy.ops.mesh.primitive_plane_add(
location=mw @ bbox_center(ob),
size=size)
chopper = context.object
m = chopper.modifiers.new("Sol", type='SOLIDIFY')
m.thickness = size
chopper.select_set(False)
def chop(ob, start, end, segments):
slices = []
planes = [(f, start.lerp(end, f / segments))
for f in range(1, segments)]
for i, p in planes:
m.thickness = -size
bm = ob.modifiers.new("BOOL",type="BOOLEAN")
bm.object = chopper
bm.operation = 'DIFFERENCE'
M = (mw @ end - mw @ start).to_track_quat('Z', 'X').to_matrix().to_4x4()
M.translation = mw @ p
chopper.matrix_world = M
cp = ob.copy()
cp.data = cp.data.copy()
context.scene.collection.objects.link(cp)
bpy.ops.object.modifier_apply({"object" : cp}, modifier="BOOL")
slices.append(cp)
m.thickness = size
bpy.ops.object.modifier_apply(
{"object" : ob}, modifier = 'BOOL')
slices.append(ob)
return slices
segments_x = 2
segments_y = 2
segments_z = 2
for ox in chop(ob, o, x, segments_x):
for oy in chop(ox, o, y, segments_y):
chop(oy, o, z, segments_z)
bpy.data.objects.remove(chopper)
Bisect. Similarly to the method used by Xylvier, https://blender.stackexchange.com/a/133258/15543 which would need ammending to include the use fill.