Skip to content

Commit

Permalink
Merge branch 'gumyr:dev' into loftvertices
Browse files Browse the repository at this point in the history
  • Loading branch information
jdegenstein authored Nov 27, 2023
2 parents 594deef + b18af27 commit 7862705
Show file tree
Hide file tree
Showing 10 changed files with 103 additions and 56 deletions.
2 changes: 1 addition & 1 deletion docs/assets/buildline_example_5.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions docs/assets/buildline_example_7.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions docs/assets/helix_example.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions docs/assets/intersecting_line_example.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/assets/jern_arc_example.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/assets/polar_line_example.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/assets/tangent_arc_example.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions docs/objects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ The following objects all can be used in BuildLine contexts. Note that
+++
Helix defined pitch, radius and height

.. grid-item-card:: :class:`~objects_curve.IntersectingLine`

.. image:: assets/intersecting_line_example.svg

+++
Intersecting line defined by start, direction & other line

.. grid-item-card:: :class:`~objects_curve.JernArc`

.. image:: assets/jern_arc_example.svg
Expand Down Expand Up @@ -185,6 +192,7 @@ Reference
.. autoclass:: EllipticalCenterArc
.. autoclass:: FilletPolyline
.. autoclass:: Helix
.. autoclass:: IntersectingLine
.. autoclass:: JernArc
.. autoclass:: Line
.. autoclass:: PolarLine
Expand Down
23 changes: 17 additions & 6 deletions docs/objects_1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# [Ex. 5]
s = 100 / max(*example_5.line.bounding_box().size)
svg = ExportSVG(scale=s)
svg.add_layer("dashed", line_type=LineType.DASHED)
svg.add_layer("dashed", line_type=LineType.ISO_DASH_SPACE)
svg.add_shape(example_5.line)
svg.add_shape(dot.moved(Location(l1 @ 1)))
svg.add_shape(dot.moved(Location(l2 @ 1)))
Expand Down Expand Up @@ -139,7 +139,7 @@
JernArc((1, 1), (1, 0.5), 2, 100)
s = 100 / max(*jern_arc.line.bounding_box().size)
svg = ExportSVG(scale=s)
svg.add_layer("dashed", line_type=LineType.DASHED)
svg.add_layer("dashed", line_type=LineType.ISO_DASH_SPACE)
svg.add_shape(jern_arc.line)
svg.add_shape(dot.moved(Location(Vector((1, 1)))))
svg.add_shape(PolarLine((1, 1), 0.5, direction=(1, 0.5)), "dashed")
Expand All @@ -158,7 +158,7 @@
PolarLine((1, 1), 2.5, 60)
s = 100 / max(*polar_line.line.bounding_box().size)
svg = ExportSVG(scale=s)
svg.add_layer("dashed", line_type=LineType.DASHED)
svg.add_layer("dashed", line_type=LineType.ISO_DASH_SPACE)
svg.add_shape(polar_line.line)
svg.add_shape(dot.moved(Location(Vector((1, 1)))))
svg.add_shape(PolarLine((1, 1), 4, angle=60), "dashed")
Expand Down Expand Up @@ -188,7 +188,7 @@
RadiusArc((1, 1), (3, 3), 2)
s = 100 / max(*radius_arc.line.bounding_box().size)
svg = ExportSVG(scale=s)
svg.add_layer("dashed", line_type=LineType.DASHED)
svg.add_layer("dashed", line_type=LineType.ISO_DASH_SPACE)
svg.add_shape(radius_arc.line)
svg.add_shape(dot.moved(Location(Vector((1, 1)))))
svg.add_shape(dot.moved(Location(Vector((3, 3)))))
Expand Down Expand Up @@ -219,7 +219,7 @@
TangentArc((1, 1), (3, 3), tangent=(1, 0))
s = 100 / max(*tangent_arc.line.bounding_box().size)
svg = ExportSVG(scale=s)
svg.add_layer("dashed", line_type=LineType.DASHED)
svg.add_layer("dashed", line_type=LineType.ISO_DASH_SPACE)
svg.add_shape(tangent_arc.line)
svg.add_shape(dot.moved(Location(Vector((1, 1)))))
svg.add_shape(dot.moved(Location(Vector((3, 3)))))
Expand All @@ -235,7 +235,18 @@
svg.add_shape(dot.moved(Location(Vector((1.5, 2)))))
svg.add_shape(dot.moved(Location(Vector((3, 3)))))
svg.write("assets/three_point_arc_example.svg")
#

with BuildLine() as intersecting_line:
other = Line((2, 0), (2, 2), mode=Mode.PRIVATE)
IntersectingLine((1, 0), (1, 1), other)
s = 100 / max(*intersecting_line.line.bounding_box().size)
svg = ExportSVG(scale=s)
svg.add_layer("dashed", line_type=LineType.ISO_DASH_SPACE)
svg.add_shape(other, "dashed")
svg.add_shape(intersecting_line.line)
svg.add_shape(dot.moved(Location(Vector((1, 0)))))
svg.write("assets/intersecting_line_example.svg")
show(other, intersecting_line)
# show_object(example_1.line, name="Ex. 1")
# show_object(example_2.line, name="Ex. 2")
# show_object(example_3.line, name="Ex. 3")
Expand Down
Loading

0 comments on commit 7862705

Please sign in to comment.