Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build123d anchor #30

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

build123d anchor #30

wants to merge 6 commits into from

Conversation

przymi
Copy link
Contributor

@przymi przymi commented Sep 23, 2024

Anchor re-implemented in build123d

  • same design, no fundamental changes

@przymi przymi requested a review from marcos-diaz September 23, 2024 13:43
@przymi przymi requested a review from marcos-diaz September 24, 2024 11:07
@jdegenstein
Copy link

OK, spent a bit of time looking at this and here is my reworked version. I believe there may have been a bug with FDM_BRIDGE_THICKNESS but please confirm and see screenshot below. I made quite a few changes, the biggest of which was to completely rework the part positioning. To me the natural part origin was the underside of the top part centered on the hole location (and thus the hexagon and FDM bridge). This allows much better use of symmetry in my opinion through the use of extrude(... both=True). I also leaned harder on the use of Trapezoids which can greatly reduce the number of specified parameters in the form of point lists. Also sorry for making a mess of the parameterization, but I hope it can be fixed easily if any of this is of interest. Feel free to use as much or as little as you wish. The part volume of this version is 428.7 mm^3 versus the PR version of 429.19 mm^3 most of which I believe is in the FDM bridge mentioned above.

with BuildPart() as p:
    with BuildSketch(Plane.YZ.offset(0)) as ss:
        with Locations((-8 / 2, 0)):
            Trapezoid(11, 4.3, 90, 55.1, align=(Align.MIN, Align.MIN))
    extrude(amount=TOP_WIDTH / 2, both=True)

    edge_list = edges().filter_by(Axis.Z)
    chamfer(edge_list, CHAMFER)

    Hole(BOLT_HOLE_RADIUS)

    with BuildSketch(Plane.YZ.offset(0)) as ss2:
        with Locations((6 - 8 / 2, 0)):
            Trapezoid(9, 4, 90, 45, align=(Align.MIN, Align.MAX))
    extrude(amount=BOTTOM_WIDTH / 2, both=True)

    with BuildSketch(Plane.YZ.offset(0)) as ss3:
        with Locations((-4, 0)):
            Trapezoid(10, 4, 90, 45, align=(Align.MIN, Align.MAX))
    extrude(amount=BOTTOM_CUTOUT_WIDTH / 2, both=True, mode=Mode.SUBTRACT)

    with BuildSketch(faces().sort_by(Axis.Z)[-1]) as ss4:
        RegularPolygon(
            (NUT_WIDTH + NUT_TOLERANCE) / 2, 6, rotation=360 / 6 / 2, major_radius=False
        )
    extrude(amount=-NUT_THICKNESS, mode=Mode.SUBTRACT)

    # FDM bridging TODO: add bool
    with BuildSketch(faces().sort_by(Axis.Z)[-1]) as ss5:
        Rectangle(NUT_WIDTH + NUT_TOLERANCE, BOLT_HOLE_RADIUS * 2)
    extrude(amount=-NUT_THICKNESS - FDM_BRIDGE_THICKNESS, mode=Mode.SUBTRACT)

and screenshot:
image

Lastly I should mention the pack feature from build123d which is intended to create automatic buildplate packing but can be used for single parts to re-align the bottom (in the z-dir) to the XY plane. I personally believe that parts should usually be designed in the coordinate systems that make the design easier rather than pre-positioning for printing. https://build123d.readthedocs.io/en/latest/assemblies.html#pack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants