Skip to content

Commit

Permalink
Merge pull request #837 from luzpaz/typos
Browse files Browse the repository at this point in the history
Typo fixes
  • Loading branch information
jmwright authored Aug 7, 2021
2 parents 9b65709 + a7f62f2 commit 4c45eb2
Show file tree
Hide file tree
Showing 15 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/modelling-question.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ are appreciated.
If you want to discuss something in a more casual environment, we have other options under [Getting help in the README.md](https://github.com/CadQuery/cadquery#getting-help). There are also additional examples in the [cadquery-contrib repository](https://github.com/CadQuery/cadquery-contrib).
-->

<!-- We are all volunteers here, you can help us help you by making this question quick to answer. Minimal examples, trimmed of all unreleated code are appreciated. It also helps if you provide code that can be cut and pasted into CQ-Editor. ie. instead of:
<!-- We are all volunteers here, you can help us help you by making this question quick to answer. Minimal examples, trimmed of all unrelated code are appreciated. It also helps if you provide code that can be cut and pasted into CQ-Editor. ie. instead of:
> I have a box, how to I fillet a top corner?
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CadQuery is often compared to [OpenSCAD](http://www.openscad.org/). Like OpenSCA
* Create parametric models that can be very easily customized by end users.
* Output high quality (loss-less) CAD formats like STEP and DXF in addition to STL, VRML and AMF.
* Provide a non-proprietary, plain text model format that can be edited and executed with only a web browser.
* Offer advanced modeling capabilities such as fillets, curvelinear extrudes, parametric curves and lofts.
* Offer advanced modeling capabilities such as fillets, curvilinear extrudes, parametric curves and lofts.
* Build nested assemblies out of individual parts and other assemblies.

### Why this fork
Expand Down Expand Up @@ -175,7 +175,7 @@ If you are going to contribute code, make sure to follow this steps:
start working on your changes
- Create a conda development environment with something like:
- `conda env create -n cq-dev -f environment.yml`
- Activate the new conda enviornment:
- Activate the new conda environment:
- `conda activate cq-dev`
- If desired, install the master branch of cq-editor (Note; a release version may not be compatible with the master branch of cadquery):
- `conda install -c cadquery -c conda-forge cq-editor=master`
Expand Down
8 changes: 4 additions & 4 deletions cadquery/assembly.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

PATH_DELIM = "/"

# enitity selector grammar definiiton
# entity selector grammar definiiton
def _define_grammar():

from pyparsing import (
Expand Down Expand Up @@ -83,11 +83,11 @@ def __init__(
"""
Construct a constraint.
:param objects: object names refernced in the constraint
:param objects: object names referenced in the constraint
:param args: subshapes (e.g. faces or edges) of the objects
:param sublocs: locations of the objects (only relevant if the objects are nested in a sub-assembly)
:param kind: constraint kind
:param param: optional arbitrary paramter passed to the solver
:param param: optional arbitrary parameter passed to the solver
"""

self.objects = objects
Expand Down Expand Up @@ -411,7 +411,7 @@ def constrain(self, *args, param=None):
elif len(args) == 6:
id1, s1, id2, s2, kind, param = args
else:
raise ValueError(f"Incompatibile arguments: {args}")
raise ValueError(f"Incompatible arguments: {args}")

loc1, id1_top = self._subloc(id1)
loc2, id2_top = self._subloc(id2)
Expand Down
14 changes: 7 additions & 7 deletions cadquery/cq.py
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,7 @@ def rotateAboutCenter(self: T, axisEndPoint: VectorLike, angleDegrees: float) ->
Future Enhancements:
* A version of this method that returns a transformed copy, rather than modifying
the originals
* This method doesnt expose a very good interface, because the axis of rotation
* This method doesn't expose a very good interface, because the axis of rotation
could be inconsistent between multiple objects. This is because the beginning
of the axis is variable, while the end is fixed. This is fine when operating on
one object, but is not cool for multiple.
Expand Down Expand Up @@ -1687,7 +1687,7 @@ def polarLineTo(
self: T, distance: float, angle: float, forConstruction: bool = False
) -> T:
"""
Make a line from the current point to the given polar co-ordinates
Make a line from the current point to the given polar coordinates
Useful if it is more convenient to specify the end location rather than
the distance and angle from the current point
Expand Down Expand Up @@ -1817,7 +1817,7 @@ def spline(
where a tangent constraint is specified.
:param periodic: creation of periodic curves
:param parameters: the value of the parameter at each interpolation point.
(The intepolated curve is represented as a vector-valued function of a
(The interpolated curve is represented as a vector-valued function of a
scalar parameter.)
If periodic == True, then len(parameters) must be
Expand Down Expand Up @@ -2767,7 +2767,7 @@ def cutEach(

return self.newObject([s])

# but parameter list is different so a simple function pointer wont work
# but parameter list is different so a simple function pointer won't work
def cboreHole(
self: T,
diameter: float,
Expand Down Expand Up @@ -2822,7 +2822,7 @@ def cboreHole(
return self.cutEach(lambda loc: r.moved(loc), True, clean)

# TODO: almost all code duplicated!
# but parameter list is different so a simple function pointer wont work
# but parameter list is different so a simple function pointer won't work
def cskHole(
self: T,
diameter: float,
Expand Down Expand Up @@ -2879,7 +2879,7 @@ def cskHole(
return self.cutEach(lambda loc: res.moved(loc), True, clean)

# TODO: almost all code duplicated!
# but parameter list is different so a simple function pointer wont work
# but parameter list is different so a simple function pointer won't work
def hole(
self: T, diameter: float, depth: Optional[float] = None, clean: bool = True,
) -> T:
Expand Down Expand Up @@ -3589,7 +3589,7 @@ def interpPlate(
maxSegments: int = 9,
) -> T:
"""
Returns a plate surface that is 'thickness' thick, enclosed by 'surf_edge_pts' points, and going through 'surf_pts' points. Using pushpoints directly with interpPlate and combine=True, can be very ressources intensive depending on the complexity of the shape. In this case set combine=False.
Returns a plate surface that is 'thickness' thick, enclosed by 'surf_edge_pts' points, and going through 'surf_pts' points. Using pushpoints directly with interpPlate and combine=True, can be very resources intensive depending on the complexity of the shape. In this case set combine=False.
:param surf_edges
:type 1 surf_edges: list of [x,y,z] float ordered coordinates
Expand Down
4 changes: 2 additions & 2 deletions cadquery/occ_impl/geom.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def Center(self) -> "Vector":
"""Return the vector itself
The center of myself is myself.
Provided so that vectors, vertexes, and other shapes all support a
Provided so that vectors, vertices, and other shapes all support a
common interface, when Center() is requested for all objects on the
stack.
"""
Expand Down Expand Up @@ -693,7 +693,7 @@ def mirrorInPlane(self, listOfShapes, axis="X"):
for w in listOfShapes:
mirrored = w.transformShape(Matrix(T))

# attemp stitching of the wires
# attempt stitching of the wires
resultWires.append(mirrored)

return resultWires
Expand Down
4 changes: 2 additions & 2 deletions cadquery/occ_impl/importers.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@ def _dxf_spline(el):
knots.SetValue(i + 1, k)
multiplicities.SetValue(i + 1, m)

# assemble wieghts if present:
# assemble weights if present:
if el.weights:
rational = True

weights = OCP.TColStd.TColStd_Array1OfReal(1, len(el.weights))
for i, w in enumerate(el.weights):
weights.SetValue(i + 1, w)

# assmeble conotrol points
# assemble control points
pts = TColgp_Array1OfPnt(1, len(el.control_points))
for i, p in enumerate(el.control_points):
pts.SetValue(i + 1, gp_Pnt(*p))
Expand Down
26 changes: 13 additions & 13 deletions cadquery/occ_impl/shapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@

from OCP.TopExp import TopExp_Explorer # Toplogy explorer

# used for getting underlying geoetry -- is this equvalent to brep adaptor?
# used for getting underlying geoetry -- is this equivalent to brep adaptor?
from OCP.BRep import BRep_Tool, BRep_Builder

from OCP.TopoDS import (
Expand Down Expand Up @@ -420,7 +420,7 @@ def cast(
}

t = shapetype(obj)
# NB downcast is nedded to handly TopoDS_Shape types
# NB downcast is needed to handly TopoDS_Shape types
tr = constructor_LUT[t](downcast(obj))
tr.forConstruction = forConstruction

Expand Down Expand Up @@ -1045,7 +1045,7 @@ def split(self, *splitters: "Shape") -> "Shape":

def mesh(self, tolerance: float, angularTolerance: float = 0.1):
"""
Generate traingulation if none exists.
Generate triangulation if none exists.
"""

if not BRepTools.Triangulation_s(self.wrapped, tolerance):
Expand Down Expand Up @@ -1115,7 +1115,7 @@ def toVtkPolyData(

rv = shape_data.getVtkPolyData()

# convert to traingles and split edges
# convert to triangles and split edges
t_filter = vtkTriangleFilter()
t_filter.SetInputData(rv)
t_filter.Update()
Expand Down Expand Up @@ -1353,7 +1353,7 @@ def positionAt(
d: float,
mode: Literal["length", "parameter"] = "length",
) -> Vector:
"""Generate a postion along the underlying curve.
"""Generate a position along the underlying curve.
:param d: distance or parameter value
:param mode: position calculation mode (default: length)
:return: A Vector on the underlying curve located at the specified d value.
Expand Down Expand Up @@ -1567,8 +1567,8 @@ def makeSpline(
:param listOfVector: a list of Vectors that represent the points
:param tangents: tuple of Vectors specifying start and finish tangent
:param periodic: creation of peridic curves
:param parameters: the value of the parameter at each interpolation point. (The intepolated
:param periodic: creation of periodic curves
:param parameters: the value of the parameter at each interpolation point. (The interpolated
curve is represented as a vector-valued function of a scalar parameter.) If periodic ==
True, then len(parameters) must be len(intepolation points) + 1, otherwise len(parameters)
must be equal to len(interpolation points).
Expand Down Expand Up @@ -1899,7 +1899,7 @@ def makeHelix(
gp_Ax3(center.toPnt(), dir.toDir()), angle * DEG2RAD, radius
)

# 2. construct an semgent in the u,v domain
# 2. construct an segment in the u,v domain
if lefthand:
geom_line = Geom2d_Line(gp_Pnt2d(0.0, 0.0), gp_Dir2d(-2 * pi, pitch))
else:
Expand Down Expand Up @@ -2415,7 +2415,7 @@ def isInside(
object within the specified tolerance.
:param point: tuple or Vector representing 3D point to be tested
:param tolerance: tolerence for inside determination, default=1.0e-6
:param tolerance: tolerance for inside determination, default=1.0e-6
:return: bool indicating whether or not point is within solid
"""
if isinstance(point, Vector):
Expand Down Expand Up @@ -2765,7 +2765,7 @@ def extrudeLinearWithRotation(
straight_spine_e = Edge.makeLine(vecCenter, vecCenter.add(vecNormal))
straight_spine_w = Wire.combine([straight_spine_e,])[0].wrapped

# make an auxliliary spine
# make an auxiliary spine
pitch = 360.0 / angleDegrees * vecNormal.Length
radius = 1
aux_spine_w = Wire.makeHelix(
Expand All @@ -2783,7 +2783,7 @@ def extrudeLinearWithRotation(
for w in innerWires
]

# combine the inner solids into compund
# combine the inner solids into compound
inner_comp = Compound._makeCompound(inner_solids)

# subtract from the outer solid
Expand Down Expand Up @@ -2933,7 +2933,7 @@ def sweep(
:param outerWire: the outermost wire
:param innerWires: a list of inner wires
:param path: The wire to sweep the face resulting from the wires over
:param boolean makeSolid: return Solid or Shell (defualt True)
:param boolean makeSolid: return Solid or Shell (default True)
:param boolean isFrenet: Frenet mode (default False)
:param mode: additional sweep mode parameters.
:param transitionMode:
Expand Down Expand Up @@ -3027,7 +3027,7 @@ def dprism(
"""
Make a prismatic feature (additive or subtractive)
:param basis: face to perfrom the operation on
:param basis: face to perform the operation on
:param profiles: list of profiles
:param depth: depth of the cut or extrusion
:param thruAll: cut thruAll
Expand Down
6 changes: 3 additions & 3 deletions cadquery/selectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ def filterResults(self, r_left, r_right):

class SubtractSelector(BinarySelector):
"""
Difference selector. Substract results of a selector from another
Difference selector. Subtract results of a selector from another
selectors results.
"""

Expand Down Expand Up @@ -842,7 +842,7 @@ class StringSyntaxSelector(Selector):
:return: objects that match the specified selector
***Modfiers*** are ``('|','+','-','<','>','%')``
***Modifiers*** are ``('|','+','-','<','>','%')``
:\|:
parallel to ( same as :py:class:`ParallelDirSelector` ). Can return multiple objects.
Expand All @@ -862,7 +862,7 @@ class StringSyntaxSelector(Selector):
***axisStrings*** are: ``X,Y,Z,XY,YZ,XZ`` or ``(x,y,z)`` which defines an arbitrary direction
It is possible to combine simple selectors together using logical operations.
The following operations are suuported
The following operations are supported
:and:
Logical AND, e.g. >X and >Y
Expand Down
2 changes: 1 addition & 1 deletion doc/apireference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ Selectors
------------------------

Objects that filter and select CAD objects. Selectors are used to select existing geometry
as a basis for futher operations.
as a basis for further operations.

.. currentmodule:: cadquery.selectors
.. autosummary::
Expand Down
4 changes: 2 additions & 2 deletions doc/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ like :py:meth:`Workplane.circle` and :py:meth:`Workplane.rect`, will operate on
Polygons
-------------------------

You can create polygons for each stack point if you would like. Useful in 3d printers whos firmware does not
You can create polygons for each stack point if you would like. Useful in 3d printers whose firmware does not
correct for small hole sizes.

.. cadquery::
Expand Down Expand Up @@ -739,7 +739,7 @@ Here we fillet all of the edges of a simple plate.
Tagging objects
----------------

The :py:meth:`Workplane.tag` method can be used to tag a particular object in the chain with a string, so that it can be refered to later in the chain.
The :py:meth:`Workplane.tag` method can be used to tag a particular object in the chain with a string, so that it can be referred to later in the chain.

The :py:meth:`Workplane.workplaneFromTagged` method applies :py:meth:`Workplane.copyWorkplane` to a tagged object. For example, when extruding two different solids from a surface, after the first solid is extruded it can become difficult to reselect the original surface with CadQuery's other selectors.

Expand Down
2 changes: 1 addition & 1 deletion doc/primer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ The output is now:
tags: {'base': <cadquery.cq.Workplane object at 0xaa90>}
Modelling operations take their wires and edges from the modelling context's pending lists. In order
to use the :meth:`~cadquery.Workplane.loft` command futher down the chain, we need to push this wire
to use the :meth:`~cadquery.Workplane.loft` command further down the chain, we need to push this wire
to the modelling context with::

part = part.toPending()
Expand Down
2 changes: 1 addition & 1 deletion doc/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ There are a couple of things to note about this line:
1. The :py:meth:`cadquery.Workplane.rect` function draws a rectangle. **forConstruction=True**
tells CadQuery that this rectangle will not form a part of the solid,
but we are just using it to help define some other geometry.
2. Unless you specifiy otherwise, a rectangle is drawn with its center on the current workplane center-- in
2. Unless you specify otherwise, a rectangle is drawn with its center on the current workplane center-- in
this case, the center of the top face of the block. So this rectangle will be centered on the face.


Expand Down
4 changes: 2 additions & 2 deletions examples/Ex024_Sweep_With_Multiple_Sections.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
.sweep(path, multisection=True)
)

# We can sweep thrue different shapes
# We can sweep through different shapes
recttocircleSweep = (
cq.Workplane("YZ")
.workplane(offset=-10.0)
Expand Down Expand Up @@ -63,7 +63,7 @@

# Placement of different shapes should follow the path
# cylinder r=1.5 along first line
# then sweep allong arc from r=1.5 to r=1.0
# then sweep along arc from r=1.5 to r=1.0
# then cylinder r=1.0 along last line
arcSweep = (
cq.Workplane("YZ")
Expand Down
Loading

0 comments on commit 4c45eb2

Please sign in to comment.