Skip to content

Commit 9328364

Browse files
authored
Merge pull request #852 from revolter/fix/inconsistent-documentation
Fix inconsistent 2D and 3D spellings
2 parents ac4840a + e623d06 commit 9328364

File tree

8 files changed

+33
-33
lines changed

8 files changed

+33
-33
lines changed

cadquery/cq.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def popPendingWires(self, errorOnEmpty: bool = True) -> List[Wire]:
130130

131131
class Workplane(object):
132132
"""
133-
Defines a coordinate system in space, in which 2-d coordinates can be used.
133+
Defines a coordinate system in space, in which 2D coordinates can be used.
134134
135135
:param plane: the plane in which the workplane will be done
136136
:type plane: a Plane object, or a string in (XY|YZ|XZ|front|back|top|bottom|left|right)
@@ -501,7 +501,7 @@ def workplane(
501501
origin: Optional[VectorLike] = None,
502502
) -> T:
503503
"""
504-
Creates a new 2-D workplane, located relative to the first face on the stack.
504+
Creates a new 2D workplane, located relative to the first face on the stack.
505505
506506
:param offset: offset for the work plane in the Z direction. Default
507507
:param invert: invert the Z direction from that of the face.
@@ -518,7 +518,7 @@ def workplane(
518518
item on the chain immediately before the vertex must be a
519519
face.
520520
521-
The result will be a 2-d working plane
521+
The result will be a 2D working plane
522522
with a new coordinate system set up as follows:
523523
524524
* The centerOption parameter sets how the center is defined.
@@ -1531,7 +1531,7 @@ def polarArray(
15311531
def pushPoints(self: T, pntList: Iterable[Union[VectorLike, Location]]) -> T:
15321532
"""
15331533
Pushes a list of points onto the stack as vertices.
1534-
The points are in the 2-d coordinate space of the workplane face
1534+
The points are in the 2D coordinate space of the workplane face
15351535
15361536
:param pntList: a list of points to push onto the stack
15371537
:type pntList: list of 2-tuples, in *local* coordinates
@@ -2356,11 +2356,11 @@ def wire(self: T, forConstruction: bool = False) -> T:
23562356
:param forConstruction: whether the wire should be used to make a solid, or if it is just
23572357
for reference
23582358
2359-
This method is primarily of use to plugin developers making utilities for 2-d construction.
2360-
This method should be called when a user operation implies that 2-d construction is
2359+
This method is primarily of use to plugin developers making utilities for 2D construction.
2360+
This method should be called when a user operation implies that 2D construction is
23612361
finished, and we are ready to begin working in 3d.
23622362
2363-
SEE '2-d construction concepts' for a more detailed explanation of how CadQuery handles
2363+
SEE '2D construction concepts' for a more detailed explanation of how CadQuery handles
23642364
edges, wires, etc.
23652365
23662366
Any non edges will still remain.
@@ -2693,11 +2693,11 @@ def polyline(
26932693

26942694
def close(self: T) -> T:
26952695
"""
2696-
End 2-d construction, and attempt to build a closed wire.
2696+
End 2D construction, and attempt to build a closed wire.
26972697
26982698
:return: a CQ object with a completed wire on the stack, if possible.
26992699
2700-
After 2-d drafting with methods such as lineTo, threePointArc,
2700+
After 2D drafting with methods such as lineTo, threePointArc,
27012701
tangentArcPoint and polyline, it is necessary to convert the edges
27022702
produced by these into one or more wires.
27032703

cadquery/occ_impl/exporters/svg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def getSVG(shape, opts=None):
223223
hidden = list(map(Shape, hidden))
224224
(hiddenPaths, visiblePaths) = getPaths(visible, hidden)
225225

226-
# get bounding box -- these are all in 2-d space
226+
# get bounding box -- these are all in 2D space
227227
bb = Compound.makeCompound(hidden + visible).BoundingBox()
228228

229229
# width pixels for x, height pixels for y

cadquery/occ_impl/geom.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
class Vector(object):
2828
"""Create a 3-dimensional vector
2929
30-
:param args: a 3-d vector, with x-y-z parts.
30+
:param args: a 3D vector, with x-y-z parts.
3131
3232
you can either provide:
3333
* nothing (in which case the null vector is return)
@@ -377,7 +377,7 @@ class Plane(object):
377377
A 2D coordinate system in space, with the x-y axes on the plane, and a
378378
particular point as the origin.
379379
380-
A plane allows the use of 2-d coordinates, which are later converted to
380+
A plane allows the use of 2D coordinates, which are later converted to
381381
global, 3d coordinates when the operations are complete.
382382
383383
Frequently, it is not necessary to create work planes, as they can be
@@ -587,7 +587,7 @@ def setOrigin2d(self, x, y):
587587
:param float y: offset in the y direction
588588
:return: void
589589
590-
The new coordinates are specified in terms of the current 2-d system.
590+
The new coordinates are specified in terms of the current 2D system.
591591
As an example:
592592
593593
p = Plane.XY()
@@ -609,9 +609,9 @@ def toLocalCoords(self, obj):
609609
610610
611611
Most of the time, the z-coordinate returned will be zero, because most
612-
operations based on a plane are all 2-d. Occasionally, though, 3-d
612+
operations based on a plane are all 2D. Occasionally, though, 3D
613613
points outside of the current plane are transformed. One such example is
614-
:py:meth:`Workplane.box`, where 3-d corners of a box are transformed to
614+
:py:meth:`Workplane.box`, where 3D corners of a box are transformed to
615615
orient the box in space correctly.
616616
617617
"""

doc/_static/cadquery_cheatsheet.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ <h2>Core Classes</h2><br />
153153
</tr>
154154
<tr>
155155
<td>Workplane(inPlane[origin, obj])</td>
156-
<td>Defines a coordinate system in space, in which 2-d coordinates can be used.</td>
156+
<td>Defines a coordinate system in space, in which 2D coordinates can be used.</td>
157157
</tr>
158158
</table>
159159
</div>

doc/apireference.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ CadQuery API Reference
66

77
The CadQuery API is made up of 2 main objects:
88

9-
* **Workplane** -- Wraps a topological entity and provides a 2-D modelling context.
9+
* **Workplane** -- Wraps a topological entity and provides a 2D modelling context.
1010
* **Selector** -- Filter and select things
1111

1212
This page lists methods of these objects grouped by **functional area**
@@ -29,12 +29,12 @@ Creating new workplanes and object chains
2929

3030
.. _2dOperations:
3131

32-
2-d Operations
32+
2D Operations
3333
-----------------
3434

35-
Creating 2-d constructs that can be used to create 3 d features.
35+
Creating 2D constructs that can be used to create 3D features.
3636

37-
All 2-d operations require a **Workplane** object to be created.
37+
All 2D operations require a **Workplane** object to be created.
3838

3939
.. currentmodule:: cadquery
4040

@@ -73,12 +73,12 @@ All 2-d operations require a **Workplane** object to be created.
7373

7474
.. _3doperations:
7575

76-
3-d Operations
76+
3D Operations
7777
-----------------
7878

79-
Some 3-d operations also require an active 2-d workplane, but some do not.
79+
Some 3D operations also require an active 2D workplane, but some do not.
8080

81-
3-d operations that require a 2-d workplane to be active:
81+
3D operations that require a 2D workplane to be active:
8282

8383
.. autosummary::
8484
Workplane.cboreHole
@@ -100,7 +100,7 @@ Some 3-d operations also require an active 2-d workplane, but some do not.
100100
Workplane.text
101101

102102

103-
3-d operations that do NOT require a 2-d workplane to be active:
103+
3D operations that do NOT require a 2D workplane to be active:
104104

105105
.. autosummary::
106106
Workplane.shell

doc/examples.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ Building Profiles using lines and arcs
112112
--------------------------------------
113113

114114
Sometimes you need to build complex profiles using lines and arcs. This example builds a prismatic
115-
solid from 2-d operations.
115+
solid from 2D operations.
116116

117-
2-d operations maintain a current point, which is initially at the origin. Use close() to finish a
117+
2D operations maintain a current point, which is initially at the origin. Use close() to finish a
118118
closed curve.
119119

120120

@@ -281,7 +281,7 @@ needs a complex profile
281281
Mirroring Symmetric Geometry
282282
-----------------------------
283283

284-
You can mirror 2-d geometry when your shape is symmetric. In this example we also
284+
You can mirror 2D geometry when your shape is symmetric. In this example we also
285285
introduce horizontal and vertical lines, which make for slightly easier coding.
286286

287287

doc/extending.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ are designed to aid in plugin creation:
103103

104104
* :py:meth:`cadquery.Workplane.wire` gathers up all of the edges that have been drawn ( eg, by line, vline, etc ), and
105105
attempts to combine them into a single wire, which is returned. This should be used when your plugin creates
106-
2-d edges, and you know it is time to collect them into a single wire.
106+
2D edges, and you know it is time to collect them into a single wire.
107107

108108
* :py:meth:`cadquery.Workplane.plane` provides a reference to the workplane, which allows you to convert between workplane
109109
coordinates and global coordinates:

doc/roadmap.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ implement more constraints
2929
in plane, on axis, parallel to vector
3030

3131

32-
2-d operations
32+
2D operations
3333
-------------------
3434

3535
arc construction using relative measures
@@ -47,10 +47,10 @@ trimming
4747
construction lines
4848
especially centerlines
4949

50-
2-d fillets
50+
2D fillets
5151
for a rectangle, or for consecutive selected lines
5252

53-
2-d chamfers
53+
2D chamfers
5454
based on rectangles, polygons, polylines, or adjacent selected lines
5555

5656
mirror around centerline
@@ -72,7 +72,7 @@ feature snap
7272
polyline edges
7373
allow polyline to be combined with other edges/curves
7474

75-
3-d operations
75+
3D operations
7676
---------------------
7777

7878
rotation/transform that return a copy
@@ -86,4 +86,4 @@ primitive creation
8686
* wedge
8787

8888
extrude/cut up to surface
89-
allow a cut or extrude to terminate at another surface, rather than either through all or a fixed distance
89+
allow a cut or extrude to terminate at another surface, rather than either through all or a fixed distance

0 commit comments

Comments
 (0)