mirror of
https://github.com/gumyr/build123d.git
synced 2025-12-05 18:20:46 -08:00
Adding BlendCurve to the docs
Some checks are pending
benchmarks / benchmarks (macos-13, 3.12) (push) Waiting to run
benchmarks / benchmarks (macos-14, 3.12) (push) Waiting to run
benchmarks / benchmarks (ubuntu-latest, 3.12) (push) Waiting to run
benchmarks / benchmarks (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
Some checks are pending
benchmarks / benchmarks (macos-13, 3.12) (push) Waiting to run
benchmarks / benchmarks (macos-14, 3.12) (push) Waiting to run
benchmarks / benchmarks (ubuntu-latest, 3.12) (push) Waiting to run
benchmarks / benchmarks (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:
parent
6028b14aa0
commit
5681bfb905
3 changed files with 38 additions and 0 deletions
12
docs/assets/example_blend_curve.svg
Normal file
12
docs/assets/example_blend_curve.svg
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<svg width="53.437087mm" height="100.089999mm" viewBox="-3.542734 -5.0072 8.549934 16.0144" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g transform="scale(1,-1)" stroke-linecap="round">
|
||||||
|
<g fill="none" stroke="rgb(0,0,0)" stroke-width="0.01440000009">
|
||||||
|
<path d="M 5.0,0.0 C 5.00028,-0.417137 4.985935,-0.83158 4.937625,-1.209787 C 4.890768,-1.590627 4.807318,-1.930241 4.687277,-2.228627 C 4.447554,-2.825457 4.043062,-3.22477 3.531938,-3.510073 C 3.022136,-3.79718 2.414809,-3.986061 1.805109,-4.210727 C 1.192462,-4.429798 0.586549,-4.700437 0.0,-5.0" />
|
||||||
|
</g>
|
||||||
|
<g fill="none" stroke="rgb(0,0,0)" stroke-width="0.01440000009" id="dashed" stroke-dasharray="0.1728 0.2592">
|
||||||
|
<path d="M -3.535534,3.535534 A 5.0,5.0 0.0 0,0 5.0,0.0" />
|
||||||
|
<path d="M 0.0,-5.0 Q -6.0,-8.0 0.0,-11.0" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 876 B |
|
|
@ -83,6 +83,13 @@ The following objects all can be used in BuildLine contexts. Note that
|
||||||
+++
|
+++
|
||||||
Curve defined by control points and weights
|
Curve defined by control points and weights
|
||||||
|
|
||||||
|
.. grid-item-card:: :class:`~objects_curve.BlendCurve`
|
||||||
|
|
||||||
|
.. image:: assets/example_blend_curve.svg
|
||||||
|
|
||||||
|
+++
|
||||||
|
Curve blending curvature of two curves
|
||||||
|
|
||||||
.. grid-item-card:: :class:`~objects_curve.CenterArc`
|
.. grid-item-card:: :class:`~objects_curve.CenterArc`
|
||||||
|
|
||||||
.. image:: assets/center_arc_example.svg
|
.. image:: assets/center_arc_example.svg
|
||||||
|
|
@ -222,6 +229,7 @@ Reference
|
||||||
|
|
||||||
.. autoclass:: BaseLineObject
|
.. autoclass:: BaseLineObject
|
||||||
.. autoclass:: Bezier
|
.. autoclass:: Bezier
|
||||||
|
.. autoclass:: BlendCurve
|
||||||
.. autoclass:: CenterArc
|
.. autoclass:: CenterArc
|
||||||
.. autoclass:: DoubleTangentArc
|
.. autoclass:: DoubleTangentArc
|
||||||
.. autoclass:: EllipticalCenterArc
|
.. autoclass:: EllipticalCenterArc
|
||||||
|
|
|
||||||
18
docs/objects_1d_blend_curve.py
Normal file
18
docs/objects_1d_blend_curve.py
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
from build123d import *
|
||||||
|
|
||||||
|
# from ocp_vscode import show_all, set_defaults, Camera
|
||||||
|
|
||||||
|
# set_defaults(reset_camera=Camera.KEEP)
|
||||||
|
|
||||||
|
with BuildLine() as blend_curve:
|
||||||
|
l1 = CenterArc((0, 0), 5, 135, -135)
|
||||||
|
l2 = Spline((0, -5), (-3, -8), (0, -11))
|
||||||
|
l3 = BlendCurve(l1, l2, tangent_scalars=(2, 5))
|
||||||
|
s = 100 / max(*blend_curve.line.bounding_box().size)
|
||||||
|
svg = ExportSVG(scale=s)
|
||||||
|
svg.add_layer("dashed", line_type=LineType.ISO_DASH_SPACE)
|
||||||
|
svg.add_shape(l1, "dashed")
|
||||||
|
svg.add_shape(l2, "dashed")
|
||||||
|
svg.add_shape(l3)
|
||||||
|
svg.write("assets/example_blend_curve.svg")
|
||||||
|
# show_all()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue