@@ -118,7 +118,7 @@ closed curve.
118
118
119
119
.. cadquery ::
120
120
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))
122
122
.close().extrude(0.25))
123
123
124
124
@@ -144,10 +144,10 @@ A new work plane center can be established at any point.
144
144
145
145
.. cadquery ::
146
146
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)
149
149
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).
151
151
# The new center is specified relative to the previous center, not global coordinates!
152
152
153
153
result = result.extrude(0.25)
@@ -175,10 +175,10 @@ like :py:meth:`Workplane.circle` and :py:meth:`Workplane.rect`, will operate on
175
175
176
176
.. cadquery ::
177
177
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
182
182
183
183
.. topic :: Api References
184
184
@@ -198,7 +198,7 @@ correct for small hole sizes.
198
198
199
199
.. cadquery ::
200
200
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)])
202
202
.polygon(6, 1.0).cutThruAll())
203
203
204
204
.. topic :: Api References
@@ -219,16 +219,16 @@ This example uses a polyline to create one half of an i-beam shape, which is mir
219
219
220
220
.. cadquery ::
221
221
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)
223
223
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)
232
232
]
233
233
result = cq.Workplane("front").polyline(pts).mirrorY().extrude(L)
234
234
0 commit comments