-
Notifications
You must be signed in to change notification settings - Fork 11
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
base: main
Are you sure you want to change the base?
build123d anchor #30
Conversation
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 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) 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 |
Anchor re-implemented in build123d