9
9
margin : 0.5em ;
10
10
padding : 0px 0.5em 0.5em ;
11
11
background-color : # EBEBEB ;
12
+ min-width : 300px ;
13
+ max-width : 30vw ;
14
+ }
15
+ {
16
+
17
+ }
18
+ h2 a , h2 a : visited , .section a , .section a : visited {
19
+ color : # 1f4b8f ;
20
+ font-weight : bold;
21
+ text-decoration : none;
22
+
12
23
}
13
24
.column {
14
25
float : left;
15
- width : 375px ;
16
26
}
17
27
tr {
18
28
background-color : # FFFFFF ;
26
36
}
27
37
</ style >
28
38
</ head >
29
- < body >
30
- < div class ="column " style ="width:475px; ">
31
- < div class ="section ">
39
+ < body style ="text-align: center ">
40
+ < div style ="background-color: #ddd; padding: 2px; ">
41
+ < h1 > < img src ="https://cadquery.readthedocs.io/en/latest/_static/cadquery_logo_dark.svg " height =30 > Cheatsheet</ h1 >
42
+ < i > A Quick Guide To The Most Commonly Used Functions!
43
+ < br />
44
+ < sub > For the full API ref < a href ="https://cadquery.readthedocs.io/en/latest/apireference.html " target ="_blank "> click here!</ a > </ sub > </ i >
45
+ </ div >
46
+ < div style ="display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-around; ">
47
+ < div class ="section " hidden >
32
48
< h2 > Documentation</ h2 >
33
49
< ul style ="background-color:#ffffff;margin-bottom:0px;margin-top:0px; ">
34
50
< li > < a href ="https://cadquery.readthedocs.io/en/latest/ "> CadQuery Documentation</ a > </ li >
@@ -38,6 +54,81 @@ <h2>Documentation</h2>
38
54
</ ul >
39
55
</ div >
40
56
< div class ="section ">
57
+ < h2 > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/apireference.html#id1 "> 3D Construction</ a > </ h2 >
58
+ < table style ="width:100%; ">
59
+ < thead >
60
+ < th > Primitives</ th >
61
+ < th > Additive</ th >
62
+ < th > Subtractive</ th >
63
+ </ thead >
64
+ < tr >
65
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.box "> Workplane.box</ a > < br > (length, width, height)</ td >
66
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.extrude "> Workplane.extrude</ a > < br > (until)</ td >
67
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.cut "> Workplane.cut</ a > < br > (toCut)</ td >
68
+ </ tr >
69
+ < tr >
70
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.sphere "> Workplane.sphere</ a > < br > (radius)</ li > </ td >
71
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.sweep "> Workplane.sweep</ a > < br > (path)</ td >
72
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.cutThruAll "> Workplane.cutThruAll</ a > < br > (until)</ td >
73
+ </ tr >
74
+ < tr >
75
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.cylinder "> Workplane.sphere</ a > < br > (height, radius)</ td >
76
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.loft "> Workplane.loft</ a > < br > (ruled, combine, clean)</ td >
77
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.extrude "> Workplane.hole</ a > < br > (diameter, depth)</ td >
78
+ </ tr >
79
+ < tr >
80
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.text "> Workplane.text</ a > < br > (txt, fontsize, distance)</ td >
81
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.revolve "> Workplane.revolve</ a > < br > (angleDegrees)</ td >
82
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.extrude "> Workplane.intersect</ a > < br > (toIntersect)</ td >
83
+ </ tr >
84
+ </ table >
85
+ </ div >
86
+ < div class ="section ">
87
+ < h2 > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/apireference.html#d-operations "> 2D Construction</ a > </ h2 >
88
+ < table style ="width:100%; ">
89
+ < tr >
90
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.rect "> Workplane.rect</ a > < br > (xLen, yLen)</ td >
91
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.circle "> Workplane.circle</ a > < br > (radius)</ td >
92
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.ellipse "> Workplane.ellipse</ a > < br > (x_radius, y_radius)</ td >
93
+ </ tr >
94
+ < tr >
95
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.center "> Workplane.center</ a > < br > (x, y)</ td >
96
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.moveTo "> Workplane.moveTo</ a > < br > (x, y)</ td >
97
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.move "> Workplane.move</ a > < br > (xDist, yDist)</ td >
98
+ </ tr >
99
+ < tr >
100
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.lineTo "> Workplane.lineTo</ a > < br > (x, y)</ td >
101
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.line "> Workplane.line</ a > < br > (xDist, yDist)</ td >
102
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.polarLine "> Workplane.polarLine</ a > < br > (distance, angle)</ td >
103
+ </ tr >
104
+ < tr >
105
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.vLine "> Workplane.vLine</ a > < br > (distance)</ li > </ td >
106
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.hLine "> Workplane.hLine</ a > < br > (distance)</ td >
107
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.polyline "> Workplane.polyline</ a > < br > (listOfXYTuple)</ td >
108
+ </ tr >
109
+ </ table >
110
+ </ div >
111
+ < div class ="section ">
112
+ < h2 > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/apireference.html#sketch-initialization "> Sketching</ a > </ h2 >
113
+ < table style ="width:100%; ">
114
+ < tr >
115
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Sketch.rect "> Sketch.rect</ a > < br > (w, h)</ td >
116
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Sketch.circle "> Sketch.circle</ a > < br > (r)</ td >
117
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Sketch.ellipse "> Sketch.ellipse</ a > < br > (a1, a2)</ td >
118
+ </ tr >
119
+ < tr >
120
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Sketch.trapezoid "> Sketch.trapezoid</ a > < br > (w, h, a1)</ td >
121
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Sketch.regularPolygon "> Sketch.regularPolygon</ a > < br > (r, n)</ td >
122
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Sketch.polygon "> Sketch.polygon</ a > < br > (pts)</ td >
123
+ </ tr >
124
+ < tr >
125
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Sketch.fillet "> Sketch.fillet</ a > < br > (d)</ td >
126
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Sketch.chamfer "> Sketch.chamfer</ a > < br > (d)</ td >
127
+ < td > < a target ="_blank " href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Sketch.clean "> Sketch.clean</ a > < br > ()</ td >
128
+ </ tr >
129
+ </ table >
130
+ </ div >
131
+ < div class ="section " style ="min-width: 300px; " hidden >
41
132
< h2 > BREP Terminology</ h2 > < br />
42
133
< table style ="width:100%; ">
43
134
< tr >
@@ -72,7 +163,7 @@ <h2>BREP Terminology</h2><br />
72
163
</ div >
73
164
< div class ="section ">
74
165
< h2 > Named Planes</ h2 > < br />
75
- Available named planes are as follows. Direction references refer to the global directions.
166
+ < i > </ i > Direction references refer to the global directions.</ i >
76
167
< table style ="width:100%; ">
77
168
< tr >
78
169
< th style ="width:25%; "> Name</ th >
@@ -136,7 +227,7 @@ <h2>Named Planes</h2><br />
136
227
</ tr >
137
228
</ table >
138
229
</ div >
139
- < div class ="section ">
230
+ < div class ="section " hidden >
140
231
< h2 > Core Classes</ h2 > < br />
141
232
< table style ="width:100%; ">
142
233
< tr >
@@ -157,75 +248,6 @@ <h2>Core Classes</h2><br />
157
248
</ tr >
158
249
</ table >
159
250
</ div >
160
- </ div >
161
- < div class ="column " style ="width:600px; ">
162
- < div class ="section ">
163
- < h2 > Selector Methods</ h2 > < br />
164
- CadQuery selector strings allow filtering various types of object lists.
165
- Most commonly, Edges, Faces, and Vertices are used, but all objects types can be filtered.< br />
166
- < table style ="width:100%; ">
167
- < tr >
168
- < th style ="width:40%; "> Selector Method</ th >
169
- < th style ="width:60%; "> Description</ th >
170
- </ tr >
171
- < tr >
172
- < td > < a href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.faces "> CQ.faces(selector=None)</ a > </ td >
173
- < td > Select the faces of objects on the stack, optionally filtering the selection.</ td >
174
- < tr >
175
- < td > < a href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.edges "> CQ.edges(selector=None)</ a > </ td >
176
- < td > Select the edges of objects on the stack, optionally filtering the selection.</ td >
177
- </ tr >
178
- < tr >
179
- < td > < a href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.vertices "> CQ.vertices(selector=None)</ a > </ td >
180
- < td > Select the vertices of objects on the stack, optionally filtering the selection.</ td >
181
- </ tr >
182
- < tr >
183
- < td > < a href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.solids "> CQ.solids(selector=None)</ a > </ td >
184
- < td > Select the solids of objects on the stack, optionally filtering the selection.</ td >
185
- </ tr >
186
- < tr >
187
- < td > < a href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.shells "> CQ.shells(selector=None)</ a > </ td >
188
- < td > Select the shells of objects on the stack, optionally filtering the selection.</ td >
189
- </ tr >
190
- </ table >
191
- </ div >
192
- < div class ="section ">
193
- < h2 > Selector Classes</ h2 > < br />
194
- < table style ="width:100%; ">
195
- < tr >
196
- < th style ="width:40%; "> Class</ th >
197
- < th style ="width:60%; "> Description</ th >
198
- </ tr >
199
- < tr >
200
- < td > NearestToPointSelector(pnt)</ td >
201
- < td > Selects object nearest the provided point.</ td >
202
- </ tr >
203
- < tr >
204
- < td > ParallelDirSelector(vector[tolerance])</ td >
205
- < td > Selects objects parallel with the provided direction.</ td >
206
- </ tr >
207
- < tr >
208
- < td > DirectionSelector(vector[tolerance])</ td >
209
- < td > Selects objects aligned with the provided direction.</ td >
210
- </ tr >
211
- < tr >
212
- < td > PerpendicularDirSelector(vector[tolerance])</ td >
213
- < td > Selects objects perpendicular with the provided direction.</ td >
214
- </ tr >
215
- < tr >
216
- < td > TypeSelector(typeString)</ td >
217
- < td > Selects objects of the prescribed topological type.</ td >
218
- </ tr >
219
- < tr >
220
- < td > DirectionMinMaxSelector(vector[directionMax])</ td >
221
- < td > Selects objects closest or farthest in the specified direction.</ td >
222
- </ tr >
223
- < tr >
224
- < td > StringSyntaxSelector(selectorString)</ td >
225
- < td > Filter lists objects using a simple string syntax.</ td >
226
- </ tr >
227
- </ table >
228
- </ div >
229
251
< div class ="section ">
230
252
< h2 > Selector String Modifiers</ h2 > < br />
231
253
Selectors are a complex topic: see < a href ="https://cadquery.readthedocs.io/en/latest/selectors.html "> CadQuery String Selectors</ a > for more information.< br />
@@ -265,6 +287,37 @@ <h2>Selector String Modifiers</h2><br />
265
287
</ tr >
266
288
</ table >
267
289
</ div >
290
+ < div class ="section ">
291
+ < h2 > Selector Methods</ h2 > < br />
292
+ CadQuery selector strings allow filtering various types of object lists.
293
+ Most commonly, Edges, Faces, and Vertices are used, but all objects types can be filtered.< br />
294
+ < table style ="width:100%; ">
295
+ < tr >
296
+ < th style ="width:40%; "> Selector Methods</ th >
297
+ < th style ="width:60%; "> Selector Classes
298
+ </ th >
299
+ </ tr >
300
+ < tr >
301
+ < td > < a href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.faces "> CQ.faces</ a > (selector)</ td >
302
+ < td > < a href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.selectors.NearestToPointSelector "> NearestToPointSelector</ a > (pnt)</ td >
303
+ < tr >
304
+ < td > < a href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.edges "> CQ.edges</ a > (selector)</ td >
305
+ < td > < a href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.selectors.ParallelDirSelector "> ParallelDirSelector</ a > (vector)</ td >
306
+ </ tr >
307
+ < tr >
308
+ < td > < a href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.vertices "> CQ.vertices</ a > (selector)</ td >
309
+ < td > < a href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.selectors.DirectionSelector "> DirectionSelector</ a > (vector)</ td >
310
+ </ tr >
311
+ < tr >
312
+ < td > < a href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.solids "> CQ.solids</ a > (selector)</ td >
313
+ < td > < a href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.selectors.DirectionMinMaxSelector "> DirectionMinMaxSelector</ a > (vector)</ td >
314
+ </ tr >
315
+ < tr >
316
+ < td > < a href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.shells "> CQ.shells</ a > (selector)</ td >
317
+ < td > < a href ="https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.selectors.TypeSelector "> TypeSelector</ a > (typeString)</ td >
318
+ </ tr >
319
+ </ table >
320
+ </ div >
268
321
< div class ="section ">
269
322
< h2 > Examples of Filtering Faces</ h2 > < br />
270
323
All types of filters work on faces. In most cases, the selector refers to the direction of the normal vector of the face.
0 commit comments