From b14c187ca2ec623ec90116dbd40e3f973aa8c81a Mon Sep 17 00:00:00 2001 From: Luz Paz Date: Sun, 2 Feb 2025 09:08:01 -0500 Subject: [PATCH] Fix various typos Found with `codespell -q 3 -L parm,parms,re-use` --- docs/algebra_definition.rst | 2 +- docs/joints.rst | 2 +- docs/key_concepts_algebra.rst | 2 +- docs/tips.rst | 2 +- docs/tutorial_design.rst | 2 +- src/build123d/build_sketch.py | 2 +- src/build123d/drafting.py | 2 +- src/build123d/geometry.py | 2 +- src/build123d/mesher.py | 2 +- src/build123d/topology/one_d.py | 2 +- tests/test_pack.py | 4 ++-- tools/refactor_topo.py | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/algebra_definition.rst b/docs/algebra_definition.rst index ae98eb5..e87c42c 100644 --- a/docs/algebra_definition.rst +++ b/docs/algebra_definition.rst @@ -61,7 +61,7 @@ with :math:`B^3 \subset C^3, B^2 \subset C^2` and :math:`B^1 \subset C^1` * This definition also includes that neither ``-`` nor ``&`` are commutative. -Locations, planes and location arithmentic +Locations, planes and location arithmetic --------------------------------------------- **Set definitions:** diff --git a/docs/joints.rst b/docs/joints.rst index 3ffaaab..e6a7e7c 100644 --- a/docs/joints.rst +++ b/docs/joints.rst @@ -196,7 +196,7 @@ is found within a rod end as shown here: :emphasize-lines: 40-44,51,53 Note how limits are defined during the instantiation of the ball joint when ensures that the pin or bolt -within the rod end does not interfer with the rod end itself. The ``connect_to`` sets the three angles +within the rod end does not interfere with the rod end itself. The ``connect_to`` sets the three angles (only two are significant in this example). .. autoclass:: BallJoint diff --git a/docs/key_concepts_algebra.rst b/docs/key_concepts_algebra.rst index b76a1df..655b6c7 100644 --- a/docs/key_concepts_algebra.rst +++ b/docs/key_concepts_algebra.rst @@ -60,7 +60,7 @@ The generic forms of object placement are: location * alg_compound 2. Placement on the ``plane`` and then moved relative to the ``plane`` by ``location`` -(the location is relative to the local corrdinate system of the plane). +(the location is relative to the local coordinate system of the plane). .. code-block:: python diff --git a/docs/tips.rst b/docs/tips.rst index 8bd9d7f..ad5c299 100644 --- a/docs/tips.rst +++ b/docs/tips.rst @@ -271,7 +271,7 @@ reoriented, all ``BuildLine`` instances within the scope of ``BuildSketch`` shou on the default ``Plane.XY``. *************************************************************** -Don't Builders inherit workplane/coordinate sytems when nested +Don't Builders inherit workplane/coordinate systems when nested *************************************************************** Some users expect that nested Builders will inherit the workplane or coordinate system from diff --git a/docs/tutorial_design.rst b/docs/tutorial_design.rst index 250de88..3950399 100644 --- a/docs/tutorial_design.rst +++ b/docs/tutorial_design.rst @@ -106,7 +106,7 @@ For solid or prismatic shapes, extrude the 2D profiles along the necessary axis. also combine multiple extrusions by intersecting or unionizing them to form complex shapes. Use the resulting geometry as sub-parts if needed. -*The next step in implmenting our design in build123d is to convert the above sketch into +*The next step in implementing our design in build123d is to convert the above sketch into a part by extruding it as shown in this code:* .. code-block:: python diff --git a/src/build123d/build_sketch.py b/src/build123d/build_sketch.py index b42721e..7509000 100644 --- a/src/build123d/build_sketch.py +++ b/src/build123d/build_sketch.py @@ -50,7 +50,7 @@ class BuildSketch(Builder): Note that all sketch construction is done within sketch_local on Plane.XY. When objects are added to the sketch they must be coplanar to Plane.XY, usually handled automatically but may need user input for Edges and Wires - since their construction plane isn't alway able to be determined. + since their construction plane isn't always able to be determined. Args: workplanes (Union[Face, Plane, Location], optional): objects converted to diff --git a/src/build123d/drafting.py b/src/build123d/drafting.py index 2c995ab..b1388dd 100644 --- a/src/build123d/drafting.py +++ b/src/build123d/drafting.py @@ -227,7 +227,7 @@ class Draft: """Convert a raw number to a unit of measurement string based on the class settings""" def simplify_fraction(numerator: int, denominator: int) -> tuple[int, int]: - """Mathematically simplify a fraction given a numerator and demoninator""" + """Mathematically simplify a fraction given a numerator and denominator""" greatest_common_demoninator = gcd(numerator, denominator) return ( int(numerator / greatest_common_demoninator), diff --git a/src/build123d/geometry.py b/src/build123d/geometry.py index 418d98c..2f3b626 100644 --- a/src/build123d/geometry.py +++ b/src/build123d/geometry.py @@ -1134,7 +1134,7 @@ class Color: @overload def __init__(self, color_code: int, alpha: int = 0xFF): - """Color from a hexidecimal color code with an optional alpha value + """Color from a hexadecimal color code with an optional alpha value Args: color_code (hexidecimal int): 0xRRGGBB diff --git a/src/build123d/mesher.py b/src/build123d/mesher.py index f4ba23c..de102a1 100644 --- a/src/build123d/mesher.py +++ b/src/build123d/mesher.py @@ -242,7 +242,7 @@ class Mesher: return meta_data_contents def get_meta_data_by_key(self, name_space: str, name: str) -> dict: - """Retrive the metadata value and type for the provided name space and name""" + """Retrieve the metadata value and type for the provided name space and name""" meta_data_group = self.model.GetMetaDataGroup() meta_data_contents = {} meta_data = meta_data_group.GetMetaDataByKey(name_space, name) diff --git a/src/build123d/topology/one_d.py b/src/build123d/topology/one_d.py index 366cf51..e412478 100644 --- a/src/build123d/topology/one_d.py +++ b/src/build123d/topology/one_d.py @@ -997,7 +997,7 @@ class Mixin1D(Shape): split_result = unwrap_topods_compound(split_result, True) # For speed the user may just want all the objects which they - # can sort more efficiently then the generic algoritm below + # can sort more efficiently then the generic algorithm below if keep == Keep.ALL: return ShapeList( self.__class__.cast(part) diff --git a/tests/test_pack.py b/tests/test_pack.py index 56f64f7..1d733d5 100644 --- a/tests/test_pack.py +++ b/tests/test_pack.py @@ -39,7 +39,7 @@ class TestPack(unittest.TestCase): test_boxes = [ Box(random.randint(1, 20), random.randint(1, 20), 1) for _ in range(50) ] - # Not raising in this call shows successfull non-overlap. + # Not raising in this call shows successful non-overlap. packed = pack(test_boxes, 1) self.assertEqual( "bbox: 0.0 <= x <= 94.0, 0.0 <= y <= 86.0, -0.5 <= z <= 0.5", @@ -54,7 +54,7 @@ class TestPack(unittest.TestCase): widths = [random.randint(2, 20) for _ in range(50)] heights = [random.randint(1, width - 1) for width in widths] inputs = [SlotOverall(width, height) for width, height in zip(widths, heights)] - # Not raising in this call shows successfull non-overlap. + # Not raising in this call shows successful non-overlap. packed = pack(inputs, 1) bb = (Sketch() + packed).bounding_box() self.assertEqual(bb.min, Vector(0, 0, 0)) diff --git a/tools/refactor_topo.py b/tools/refactor_topo.py index 8aadbb1..be56a28 100644 --- a/tools/refactor_topo.py +++ b/tools/refactor_topo.py @@ -7,7 +7,7 @@ date: Dec 05, 2024 desc: This python script refactors the very large topology.py module into several - files based on the topological heirarchical order: + files based on the topological hierarchical order: + shape_core.py - base classes Shape, ShapeList + utils.py - utility classes & functions + zero_d.py - Vertex