Skip to content

Commit b018d54

Browse files
authored
Fix inconsistent examples code style
1 parent 93623fa commit b018d54

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

doc/examples.rst

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ closed curve.
118118

119119
.. cadquery::
120120

121-
result = (cq.Workplane("front").lineTo(2.0, 0).lineTo(2.0, 1.0).threePointArc((1.0, 1.5),(0.0, 1.0))
121+
result = (cq.Workplane("front").lineTo(2.0, 0).lineTo(2.0, 1.0).threePointArc((1.0, 1.5), (0.0, 1.0))
122122
.close().extrude(0.25))
123123

124124

@@ -144,10 +144,10 @@ A new work plane center can be established at any point.
144144

145145
.. cadquery::
146146

147-
result = cq.Workplane("front").circle(3.0) #current point is the center of the circle, at (0,0)
148-
result = result.center(1.5, 0.0).rect(0.5, 0.5) # new work center is (1.5, 0.0)
147+
result = cq.Workplane("front").circle(3.0) #current point is the center of the circle, at (0, 0)
148+
result = result.center(1.5, 0.0).rect(0.5, 0.5) # new work center is (1.5, 0.0)
149149

150-
result = result.center(-1.5, 1.5).circle(0.25) # new work center is ( 0.0, 1.5).
150+
result = result.center(-1.5, 1.5).circle(0.25) # new work center is (0.0, 1.5).
151151
# The new center is specified relative to the previous center, not global coordinates!
152152

153153
result = result.extrude(0.25)
@@ -175,10 +175,10 @@ like :py:meth:`Workplane.circle` and :py:meth:`Workplane.rect`, will operate on
175175

176176
.. cadquery::
177177

178-
r = cq.Workplane("front").circle(2.0) # make base
179-
r = r.pushPoints( [ (1.5, 0),(0, 1.5),(-1.5, 0),(0, -1.5) ] ) # now four points are on the stack
180-
r = r.circle( 0.25 ) # circle will operate on all four points
181-
result = r.extrude(0.125 ) # make prism
178+
r = cq.Workplane("front").circle(2.0) # make base
179+
r = r.pushPoints([(1.5, 0), (0, 1.5), (-1.5, 0), (0, -1.5)]) # now four points are on the stack
180+
r = r.circle(0.25) # circle will operate on all four points
181+
result = r.extrude(0.125) # make prism
182182

183183
.. topic:: Api References
184184

@@ -198,7 +198,7 @@ correct for small hole sizes.
198198

199199
.. cadquery::
200200

201-
result = (cq.Workplane("front").box(3.0, 4.0, 0.25).pushPoints ( [ ( 0,0.75 ),(0, -0.75) ])
201+
result = (cq.Workplane("front").box(3.0, 4.0, 0.25).pushPoints([(0, 0.75), (0, -0.75)])
202202
.polygon(6, 1.0).cutThruAll())
203203

204204
.. topic:: Api References
@@ -219,16 +219,16 @@ This example uses a polyline to create one half of an i-beam shape, which is mir
219219

220220
.. cadquery::
221221

222-
(L,H,W,t) = ( 100.0, 20.0, 20.0, 1.0)
222+
(L,H,W,t) = (100.0, 20.0, 20.0, 1.0)
223223
pts = [
224-
(0,H/2.0),
225-
(W/2.0,H/2.0),
226-
(W/2.0,(H/2.0 - t)),
227-
(t/2.0,(H/2.0-t)),
228-
(t/2.0,(t - H/2.0)),
229-
(W/2.0,(t -H/2.0)),
230-
(W/2.0,H/-2.0),
231-
(0,H/-2.0)
224+
(0, H/2.0),
225+
(W/2.0, H/2.0),
226+
(W/2.0, (H/2.0 - t)),
227+
(t/2.0, (H/2.0 - t)),
228+
(t/2.0, (t - H/2.0)),
229+
(W/2.0, (t - H/2.0)),
230+
(W/2.0, H/-2.0),
231+
(0, H/-2.0)
232232
]
233233
result = cq.Workplane("front").polyline(pts).mirrorY().extrude(L)
234234

0 commit comments

Comments
 (0)