Konubinix' opinionated web of thoughts

Extend My Yogurt Maker

Fleeting

tag: learning 3D printing

L: 32cm l: 17cm

Support width: 0.5cm Cover width: 0.15cm

Here, I use a 0.5cm unit, so all measures are X2

import cadquery as cq


path = (
    cq.Workplane("XY")
    #spline(
    .polyline(
        [
            (0,0),
            (0,9),
            (0.5,11),
            (1,12),
            (2,13.5),
            (3.5,15),
            (5,16),
            (6.5,16.5),
            (9,17),
            (32, 17),
        ],
        # tangents=([0,1], [1,0]),
    )
)
profile = (
    cq.Workplane("XZ")
    .polyline(
        [
            (0, 0),
            (0, 1),
            (-1 ,3),
            (-0.5,3),
            (0, 2),
            (1, 2),
            (1, 0),
        ],
    ).close()
)

result = (
    profile.sweep(path)


    # .faces(">X").edges(">Z")
    # .workplane(centerOption="CenterOfMass")
    # .tag("a")
    # .rect(0.5, 1, centered=(True, False))
    # .extrude(-0.5)
    # .workplaneFromTagged("a")
    # .center(0, 0.5)
    # .hole(0.2)

    # .faces("<Y").edges(">Z")
    # .workplane(centerOption="CenterOfMass")
    # .tag("a")
    # .rect(0.5, 1, centered=(True, False))
    # .extrude(-0.5)
    # .workplaneFromTagged("a")
    # .center(0, 0.5)
    # .hole(0.2)

)

#.edges(">Z").fillet(0.2)

cq.exporters.export(
    (
        result.val()
        .scale(5) # get back to the approriate scale
        .mirror(mirrorPlane="ZY")
    ),
    out,
)
return out

()