Updating to new full_round
Some checks are pending
benchmarks / tests (macos-13, 3.12) (push) Waiting to run
benchmarks / tests (macos-14, 3.12) (push) Waiting to run
benchmarks / tests (ubuntu-latest, 3.12) (push) Waiting to run
benchmarks / tests (windows-latest, 3.12) (push) Waiting to run
Upload coverage reports to Codecov / run (push) Waiting to run
pylint / lint (3.10) (push) Waiting to run
Run type checker / typecheck (3.10) (push) Waiting to run
Run type checker / typecheck (3.13) (push) Waiting to run
Wheel building and publishing / Build wheel on ubuntu-latest (push) Waiting to run
Wheel building and publishing / upload_pypi (push) Blocked by required conditions
tests / tests (macos-13, 3.10) (push) Waiting to run
tests / tests (macos-13, 3.13) (push) Waiting to run
tests / tests (macos-14, 3.10) (push) Waiting to run
tests / tests (macos-14, 3.13) (push) Waiting to run
tests / tests (ubuntu-latest, 3.10) (push) Waiting to run
tests / tests (ubuntu-latest, 3.13) (push) Waiting to run
tests / tests (windows-latest, 3.10) (push) Waiting to run
tests / tests (windows-latest, 3.13) (push) Waiting to run

This commit is contained in:
gumyr 2025-05-01 15:16:11 -04:00
parent 46f062c175
commit 9259725cf7

View file

@ -11,7 +11,10 @@ with BuildPart() as p:
with BuildSketch(Plane.YZ) as yz: with BuildSketch(Plane.YZ) as yz:
Trapezoid(2.5, 4, 90 - 6, align=(Align.CENTER, Align.MIN)) 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) extrude(amount=10, mode=Mode.INTERSECT)
# To avoid OCCT problems, don't attempt to extend the top arc, remove instead # To avoid OCCT problems, don't attempt to extend the top arc, remove instead
@ -52,6 +55,6 @@ want_mass = 3.923
tolerance = 0.02 tolerance = 0.02
delta = abs(got_mass - want_mass) delta = abs(got_mass - want_mass)
print(f"Mass: {got_mass:0.1f} lbs") 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) show(p)