Konubinix' opinionated web of thoughts

Guardrail for Objects Placed on the Car's Rear Shelf

Fleeting

tag: learning 3D printing

with cadquery,

the part that clips on the shelf

length=100

path = (
    cq.Workplane("XY")
    .polyline(
        [
            (0,0),
            (0,length),
        ],
    )
)

width = 7
height = 10
bump_height = 3
depth=5

clip_profile = (
    cq.Workplane("XZ")
    .threePointArc(
        (width/2, bump_height),
        (width, 0),
    )
    .hLine(depth)
    .threePointArc(
        (width/2, bump_height + depth),
        (-depth, 0),
    )
    .vLine(-height/2)
    .hLine(depth)
    .close()
)

clip_base = (
    clip_profile.sweep(path)
)

clip_base = clip_base.mirror(clip_base.faces("<Z"), union=True)

dovetail_width = 10
dovetail_height = 10.

profiledovetail = (
    cq.Workplane("XZ")
    .moveTo(width/2, bump_height)
    .line(dovetail_width/2, dovetail_height)
    .line(- dovetail_width, 0)
    .close()
)
dovetail = (
    profiledovetail.sweep(path)
)

clip = clip_base.union(dovetail)

()

the wall guard

wall_height = 50
wall_width = 5

wall_bl_y = width/2 + dovetail_height
wall_bl_x = - depth

profile = (
    cq.Workplane("XZ")
    .moveTo(wall_bl_x, wall_bl_y)
    .hLine(wall_width)
    .vLine(wall_height)
    .hLine(- wall_width)
    .close()
)

overlap = (
    cq.Workplane("XZ")
    .moveTo(width/2, width/2 + dovetail_height - 3)
    .rect(width + 2 * depth, dovetail_height + 3)
)

wall = (
    profile.sweep(path)
    .union(overlap.sweep(path))
    .edges("|Y").fillet(1)
    .cut(
        clip.val().scale(1.05)
    )
)

()

the stop

width = 7
height = 10
bump_height = 3
depth=5

clip_profile = (
    cq.Workplane("XZ")
    .threePointArc(
        (width/2, bump_height),
        (width, 0),
    )
    .hLine(depth)
    .threePointArc(
        (width/2, bump_height + depth),
        (-depth, 0),
    )
    .vLine(-height/2)
    .hLine(depth)
    .close()
)

clip_base = clip_profile.extrude(2)

clip_base = clip_base.mirror(clip_base.faces("<Z"), union=True)

dovetail_width = 10
dovetail_height = 10.

overlap = (
    cq.Workplane("XZ")
    .moveTo(width/2, width/2 + dovetail_height - 3)
    .rect(width + 2 * depth, dovetail_height + 3)
)

stop = clip_base.union(overlap.extrude(2).edges("|Y").fillet(1))

()

what does it look like?

The stop is easily movable so as to put and remove the wall.

Once the wall is removed, the clip does not disturb.