From 9259725cf75b22f77693d2e047ac9cdf817af31c Mon Sep 17 00:00:00 2001 From: gumyr Date: Thu, 1 May 2025 15:16:11 -0400 Subject: [PATCH] Updating to new full_round --- docs/assets/ttt/ttt-24-SPO-06-Buffer_Stand.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/assets/ttt/ttt-24-SPO-06-Buffer_Stand.py b/docs/assets/ttt/ttt-24-SPO-06-Buffer_Stand.py index 60c0fce..586e689 100644 --- a/docs/assets/ttt/ttt-24-SPO-06-Buffer_Stand.py +++ b/docs/assets/ttt/ttt-24-SPO-06-Buffer_Stand.py @@ -11,7 +11,10 @@ with BuildPart() as p: with BuildSketch(Plane.YZ) as yz: Trapezoid(2.5, 4, 90 - 6, align=(Align.CENTER, Align.MIN)) - _, arc_center, arc_radius = full_round(yz.edges().sort_by(SortBy.LENGTH)[0]) + full_round(yz.edges().sort_by(SortBy.LENGTH)[0]) + circle_edge = yz.edges().filter_by(GeomType.CIRCLE)[0] + arc_center = circle_edge.arc_center + arc_radius = circle_edge.radius extrude(amount=10, mode=Mode.INTERSECT) # To avoid OCCT problems, don't attempt to extend the top arc, remove instead @@ -47,11 +50,11 @@ with BuildPart() as p: part = scale(p.part, IN) -got_mass = part.volume*7800e-6/LB +got_mass = part.volume * 7800e-6 / LB want_mass = 3.923 tolerance = 0.02 delta = abs(got_mass - want_mass) print(f"Mass: {got_mass:0.1f} lbs") -assert delta < tolerance, f'{got_mass=}, {want_mass=}, {delta=}, {tolerance=}' +assert delta < tolerance, f"{got_mass=}, {want_mass=}, {delta=}, {tolerance=}" show(p)