mirror of
https://github.com/gumyr/build123d.git
synced 2026-03-09 08:11:37 -07:00
Some checks failed
benchmarks / benchmarks (macos-14, 3.12) (push) Has been cancelled
benchmarks / benchmarks (macos-15-intel, 3.12) (push) Has been cancelled
benchmarks / benchmarks (ubuntu-latest, 3.12) (push) Has been cancelled
benchmarks / benchmarks (windows-latest, 3.12) (push) Has been cancelled
Upload coverage reports to Codecov / run (push) Has been cancelled
pylint / lint (3.10) (push) Has been cancelled
Wheel building and publishing / Build wheel on ubuntu-latest (push) Has been cancelled
tests / tests (macos-14, 3.10) (push) Has been cancelled
tests / tests (macos-14, 3.14) (push) Has been cancelled
tests / tests (macos-15-intel, 3.10) (push) Has been cancelled
tests / tests (macos-15-intel, 3.14) (push) Has been cancelled
tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
tests / tests (ubuntu-latest, 3.14) (push) Has been cancelled
tests / tests (windows-latest, 3.10) (push) Has been cancelled
tests / tests (windows-latest, 3.14) (push) Has been cancelled
Run type checking / typecheck (3.10) (push) Has been cancelled
Run type checking / typecheck (3.14) (push) Has been cancelled
Wheel building and publishing / upload_pypi (push) Has been cancelled
35 lines
895 B
Python
35 lines
895 B
Python
# [Setup]
|
|
from build123d import *
|
|
|
|
# from ocp_vscode import *
|
|
|
|
dot = Circle(0.05)
|
|
|
|
with BuildLine() as arcs:
|
|
c1 = CenterArc((4, 0), 2, 0, 360)
|
|
c2 = CenterArc((0, 2), 1.5, 0, 360)
|
|
a1 = ConstrainedArcs(c1, c2, radius=6)
|
|
|
|
s = 100 / max(*arcs.line.bounding_box().size)
|
|
svg = ExportSVG(scale=s)
|
|
svg.add_layer("dashed", line_type=LineType.ISO_DASH_SPACE)
|
|
svg.add_shape(c1, "dashed")
|
|
svg.add_shape(c2, "dashed")
|
|
svg.add_shape(a1)
|
|
svg.write("assets/constrained_arcs_example.svg")
|
|
|
|
|
|
with BuildLine() as lines:
|
|
c1 = CenterArc((4, 0), 2, 0, 360)
|
|
c2 = CenterArc((0, 2), 1.5, 0, 360)
|
|
l1 = ConstrainedLines(c1, c2)
|
|
|
|
s = 100 / max(*lines.line.bounding_box().size)
|
|
svg = ExportSVG(scale=s)
|
|
svg.add_layer("dashed", line_type=LineType.ISO_DASH_SPACE)
|
|
svg.add_shape(c1, "dashed")
|
|
svg.add_shape(c2, "dashed")
|
|
svg.add_shape(l1)
|
|
svg.write("assets/constrained_lines_example.svg")
|
|
|
|
# show_all()
|