This commit is contained in:
Scott Barlow 2023-11-10 00:05:11 -08:00
parent cdd00771f5
commit 25cfc9ecf1
5 changed files with 13 additions and 20 deletions

View file

@ -12,7 +12,7 @@ Objects and arithmetic
:math:`C^2` is the set of all ``Sketch`` objects ``s`` with ``s._dim = 2``
:math:`C^1` is the set of all ``Curve`` objects ``c`` with ``c._dim = 3``
:math:`C^1` is the set of all ``Curve`` objects ``c`` with ``c._dim = 1``
**Neutral elements:**
@ -49,7 +49,7 @@ with :math:`B^3 \subset C^3, B^2 \subset C^2` and :math:`B^1 \subset C^1`
:math:`\; a \; \& \; b :=` ``a.intersect(b)`` for each operation
* :math:`\&` is not defined for :math:`n=1` in build123d
* :math:`\&` is not defined for :math:`n=1` in build123d
* The following relationship holds: :math:`a \; \& \; b = (a + b) + -(a + (-b)) + -(b + (-a))`
@ -66,12 +66,12 @@ Locations, planes and location arithmentic
**Set definitions:**
:math:`L := \lbrace` ``Location((x, y, z), (a, b, c))`` :math:`: x,y,z \in R \land a,b,c \in R \rbrace\;`
:math:`L := \lbrace` ``Location((x, y, z), (a, b, c))`` :math:`: x,y,z \in R \land a,b,c \in R \rbrace\;`
with :math:`a,b,c` being angles in degrees.
:math:`P := \lbrace` ``Plane(o, x, z)`` :math:`: o,x,z ∈ R^3 \land \|x\| = \|z\| = 1\rbrace`
:math:`P := \lbrace` ``Plane(o, x, z)`` :math:`: o,x,z ∈ R^3 \land \|x\| = \|z\| = 1\rbrace`
with ``o`` being the origin and ``x``, ``z`` the x- and z-direction of the plane.
Neutral element: :math:`\; l_0 \in L`: ``Location()``
@ -79,7 +79,7 @@ Neutral element: :math:`\; l_0 \in L`: ``Location()``
**Operations:**
:math:`*: L \times L \rightarrow L` with :math:`(l_1,l_2) \mapsto l_1 * l_2`
:math:`\; l_1 * l_2 :=` ``l1 * l2`` (multiply two locations)
:math:`*: P \times L \rightarrow P` with :math:`(p,l) \mapsto p * l`

View file

@ -662,7 +662,7 @@ example.
* **Algebra mode**
Use the operator ``*`` to relocate the plane (post-mulitplication!).
Use the operator ``*`` to relocate the plane (post-multiplication!).
.. literalinclude:: general_examples_algebra.py
:start-after: [Ex. 22]

View file

@ -26,7 +26,6 @@ For the following use the helper function:
show_object(face, name="face")
show_object(location_symbol(loc), name="location")
.. image:: assets/location-example-01.png
@ -40,7 +39,6 @@ For the following use the helper function:
show_object(face, name="face")
show_object(plane_symbol(plane), name="plane")
.. image:: assets/location-example-07.png
@ -53,7 +51,7 @@ Relative positioning to a plane
1. **Position an object on a plane relative to the plane**
.. code-block:: python
loc = Location((0.1, 0.2, 0.3), (10, 20, 30))
face = loc * Rectangle(1,2)
@ -65,11 +63,10 @@ Relative positioning to a plane
show_object(face, name="face")
show_object(location_symbol(loc), name="location")
show_object(box, name="box")
.. 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``.
Note: ``Plane(loc) *``, ``Plane(face.location) *`` and ``loc *`` are equivalent in this example.
@ -87,7 +84,6 @@ Relative positioning to a plane
show_object(face, name="face")
show_object(location_symbol(loc), name="location")
show_object(box, name="box")
.. image:: assets/location-example-03.png
@ -107,7 +103,6 @@ Relative positioning to a plane
show_object(face, name="face")
show_object(location_symbol(loc), name="location")
show_object(box, name="box")
.. image:: assets/location-example-04.png
@ -127,11 +122,10 @@ Relative positioning to a plane
show_object(location_symbol(loc), name="location")
show_object(box, name="box")
show_object(location_symbol(loc * Rot(20, 40, 80), 0.5), options={"color":(0, 255, 255)}, name="local_location")
.. image:: assets/location-example-05.png
The box is positioned via ``Pos(0.2, 0.4, 0.1)`` relativce to the location ``loc * Rot(20, 40, 80)``
The box is positioned via ``Pos(0.2, 0.4, 0.1)`` relative to the location ``loc * Rot(20, 40, 80)``
4. **Position and rotate an object relative to a location**
@ -147,7 +141,6 @@ Relative positioning to a plane
show_object(location_symbol(loc), name="location")
show_object(box, name="box")
show_object(location_symbol(loc * Pos(0.2, 0.4, 0.1), 0.5), options={"color":(0, 255, 255)}, name="local_location")
.. image:: assets/location-example-06.png

View file

@ -22,7 +22,7 @@ with BuildPart() as latch:
offset(amount=-2)
fillet(slide_hole.vertices(), 1)
extrude(amount=-68, mode=Mode.SUBTRACT)
# Slot for the hangle to slide in
# Slot for the handle to slide in
with BuildSketch(latch.faces().sort_by(Axis.Z)[-1]):
SlotOverall(32, 8)
extrude(amount=-2, mode=Mode.SUBTRACT)

View file

@ -131,7 +131,7 @@ interchange objects between the two systems by transferring the ``wrapped`` obje
Self Intersection
*****************
Avoid creating objects that intersect themselves - even if at a single vertex - as these topoplogies
Avoid creating objects that intersect themselves - even if at a single vertex - as these topologies
will almost certainly be invalid (even if :meth:`~topology.Shape.is_valid` reports a ``True`` value).
An example of where this my arise is with the thread of a screw (or any helical shape) where after
one complete revolution the part may contact itself. One is likely be more successful if the part