Merge pull request #1143 from jwagenet/doc-fixes

Documentation: Formatting corrections and code style fixes
This commit is contained in:
Roger Maitland 2025-11-19 09:23:56 -05:00 committed by GitHub
commit bc96e84dc2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 73 additions and 77 deletions

View file

@ -21,8 +21,8 @@ with BuildSketch(Location((0, -r1, y3))) as sk_body:
m3 = IntersectingLine(m2 @ 1, m2 % 1, c1) m3 = IntersectingLine(m2 @ 1, m2 % 1, c1)
m4 = Line(m3 @ 1, (r1, r1)) m4 = Line(m3 @ 1, (r1, r1))
m5 = JernArc(m4 @ 1, m4 % 1, r1, -90) m5 = JernArc(m4 @ 1, m4 % 1, r1, -90)
m6 = Line(m5 @ 1, m1 @ 0) mirror(about=Plane.YZ)
mirror(make_face(l.line), Plane.YZ) make_face()
fillet(sk_body.vertices().group_by(Axis.Y)[1], 12) fillet(sk_body.vertices().group_by(Axis.Y)[1], 12)
with Locations((x1 / 2, y_tot - 10), (-x1 / 2, y_tot - 10)): with Locations((x1 / 2, y_tot - 10), (-x1 / 2, y_tot - 10)):
Circle(r2, mode=Mode.SUBTRACT) Circle(r2, mode=Mode.SUBTRACT)

View file

@ -3,7 +3,6 @@
Location arithmetic for algebra mode Location arithmetic for algebra mode
====================================== ======================================
Position a shape relative to the XY plane Position a shape relative to the XY plane
--------------------------------------------- ---------------------------------------------
@ -19,7 +18,6 @@ For the following use the helper function:
circle = Circle(scale * .8).edge() circle = Circle(scale * .8).edge()
return (triad + circle).locate(plane.location) return (triad + circle).locate(plane.location)
1. **Positioning at a location** 1. **Positioning at a location**
.. code-block:: build123d .. code-block:: build123d
@ -46,8 +44,7 @@ For the following use the helper function:
.. image:: assets/location-example-07.png .. image:: assets/location-example-07.png
Note that the ``x``-axis and the ``y``-axis of the plane are on the ``x``-axis and the ``z``-axis of the world coordinate system (red and blue axis) Note: The ``x``-axis and the ``y``-axis of the plane are on the ``x``-axis and the ``z``-axis of the world coordinate system (red and blue axis).
Relative positioning to a plane Relative positioning to a plane
------------------------------------ ------------------------------------
@ -70,7 +67,7 @@ Relative positioning to a plane
.. image:: assets/location-example-02.png .. image:: assets/location-example-02.png
The ``x``, ``y``, ``z`` components of ``Pos(0.2, 0.4, 0.1)`` are relative to the ``x``-axis, ``y``-axis or The ``X``, ``Y``, ``Z`` components of ``Pos(0.2, 0.4, 0.1)`` are relative to the ``x``-axis, ``y``-axis or
``z``-axis of the underlying location ``loc``. ``z``-axis of the underlying location ``loc``.
Note: ``Plane(loc) *``, ``Plane(face.location) *`` and ``loc *`` are equivalent in this example. Note: ``Plane(loc) *``, ``Plane(face.location) *`` and ``loc *`` are equivalent in this example.
@ -83,7 +80,7 @@ Relative positioning to a plane
face = loc * Rectangle(1,2) face = loc * Rectangle(1,2)
box = Plane(loc) * Rot(z=80) * Box(0.2, 0.2, 0.2) box = Plane(loc) * Rot(Z=80) * Box(0.2, 0.2, 0.2)
show_object(face, name="face") show_object(face, name="face")
show_object(location_symbol(loc), name="location") show_object(location_symbol(loc), name="location")
@ -91,7 +88,7 @@ Relative positioning to a plane
.. image:: assets/location-example-03.png .. image:: assets/location-example-03.png
The box is rotated via ``Rot(z=80)`` around the ``z``-axis of the underlying location The box is rotated via ``Rot(Z=80)`` around the ``z``-axis of the underlying location
(and not of the z-axis of the world). (and not of the z-axis of the world).
More general: More general:
@ -148,5 +145,4 @@ Relative positioning to a plane
.. image:: assets/location-example-06.png .. image:: assets/location-example-06.png
Note: This is the same as `box = loc * Location((0.2, 0.4, 0.1), (20, 40, 80)) * Box(0.2, 0.2, 0.2)` Note: This is the same as ``box = loc * Location((0.2, 0.4, 0.1), (20, 40, 80)) * Box(0.2, 0.2, 0.2)``

View file

@ -20,7 +20,7 @@ the object. To illustrate this process, we will create the following game token:
Useful :class:`~topology.Face` creation methods include Useful :class:`~topology.Face` creation methods include
:meth:`~topology.Face.make_surface`, :meth:`~topology.Face.make_bezier_surface`, :meth:`~topology.Face.make_surface`, :meth:`~topology.Face.make_bezier_surface`,
and :meth:`~topology.Face.make_surface_from_array_of_points`. See the and :meth:`~topology.Face.make_surface_from_array_of_points`. See the
:doc:`surface_modeling` overview for the full list. :doc:`tutorial_surface_modeling` overview for the full list.
In this case, we'll use the ``make_surface`` method, providing it with the edges that define In this case, we'll use the ``make_surface`` method, providing it with the edges that define
the perimeter of the surface and a central point on that surface. the perimeter of the surface and a central point on that surface.
@ -128,5 +128,5 @@ from the heart.
Next steps Next steps
---------- ----------
Continue to :doc:`tutorial_heart_token` for an advanced example using Continue to :doc:`tutorial_spitfire_wing_gordon` for an advanced example using
:meth:`~topology.Face.make_gordon_surface` to create a Supermarine Spitfire wing. :meth:`~topology.Face.make_gordon_surface` to create a Supermarine Spitfire wing.

View file

@ -547,7 +547,7 @@ class Mixin1D(Shape[TOPODS]):
A curvature comb is a set of short line segments (teeth) erected A curvature comb is a set of short line segments (teeth) erected
perpendicular to the curve that visualize the signed curvature κ(u). perpendicular to the curve that visualize the signed curvature κ(u).
Tooth length is proportional to |κ| and the direction encodes the sign Tooth length is proportional to \|κ\| and the direction encodes the sign
(left normal for κ>0, right normal for κ<0). This is useful for inspecting (left normal for κ>0, right normal for κ<0). This is useful for inspecting
fairness and continuity (C0/C1/C2) of edges and wires. fairness and continuity (C0/C1/C2) of edges and wires.