File: OpenSCAD_meta.sats

package info (click to toggle)
ats2-lang 0.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 40,064 kB
  • sloc: ansic: 389,637; makefile: 7,123; lisp: 812; sh: 657; php: 573; python: 387; perl: 365
file content (407 lines) | stat: -rw-r--r-- 7,271 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
(* ****** ****** *)
(*
** For implementing a DSL
** that supports ATS and OpenSCAD co-programming
*)
(* ****** ****** *)

#staload "./OpenSCAD.sats"

(* ****** ****** *)
//
fun
scadexp_v2d_int2
  (x: int, y: int): scadexp
fun
scadexp_v2d_float2
  (x: double, y: double): scadexp
//
fun
scadexp_v3d_int3
  (x: int, y: int, z: int): scadexp
fun
scadexp_v3d_float3
  (x: double, y: double, z: double): scadexp
//
symintr scadexp_v2d
symintr scadexp_v3d
overload scadexp_v2d with scadexp_v2d_int2
overload scadexp_v2d with scadexp_v2d_float2
overload scadexp_v3d with scadexp_v3d_int3
overload scadexp_v3d with scadexp_v3d_float3
//
(* ****** ****** *)
//
fun
scadobj_cube_int1
  (x: int): scadobj
fun
scadobj_cube_int1_bool
  (x: int, ct: bool): scadobj
//
fun
scadobj_cube_float1
  (x: double): scadobj
fun
scadobj_cube_float1_bool
  (x: double, ct: bool): scadobj
//
(* ****** ****** *)
//
fun
scadobj_cube_int3
  (x: int, y: int, z: int): scadobj
fun
scadobj_cube_int3_bool
  (x: int, y: int, z: int, ct: bool): scadobj
//
fun
scadobj_cube_float3
  (x: double, y: double, z: double): scadobj
fun
scadobj_cube_float3_bool
  (x: double, y: double, z: double, ct: bool): scadobj
//
(* ****** ****** *)
//
symintr
scadobj_cube
//
overload
scadobj_cube with scadobj_cube_int1
overload
scadobj_cube with scadobj_cube_int1_bool
//
overload
scadobj_cube with scadobj_cube_float1
overload
scadobj_cube with scadobj_cube_float1_bool
//
overload
scadobj_cube with scadobj_cube_int3
overload
scadobj_cube with scadobj_cube_int3_bool
//
overload
scadobj_cube with scadobj_cube_float3
overload
scadobj_cube with scadobj_cube_float3_bool
//
(* ****** ****** *)
//
fun
scadobj_square_int1
  (x: int): scadobj
fun
scadobj_square_int1_bool
  (x: int, ct: bool): scadobj
//
fun
scadobj_square_float1
  (x: double): scadobj
fun
scadobj_square_float1_bool
  (x: double, ct: bool): scadobj
//
(* ****** ****** *)
//
fun
scadobj_square_int2
  (x: int, y: int): scadobj
fun
scadobj_square_int2_bool
  (x: int, y: int, ct: bool): scadobj
//
fun
scadobj_square_float2
  (x: double, y: double): scadobj
fun
scadobj_square_float2_bool
  (x: double, y: double, ct: bool): scadobj
//
(* ****** ****** *)
//
symintr
scadobj_square
//
overload
scadobj_square with scadobj_square_int1
overload
scadobj_square with scadobj_square_int1_bool
overload
scadobj_square with scadobj_square_float1
overload
scadobj_square with scadobj_square_float1_bool
//
overload
scadobj_square with scadobj_square_int2
overload
scadobj_square with scadobj_square_int2_bool
overload
scadobj_square with scadobj_square_float2
overload
scadobj_square with scadobj_square_float2_bool
//
(* ****** ****** *)
//
fun
scadobj_circle_int1(rad: int): scadobj
fun
scadobj_circle_float1(rad: double): scadobj
//
symintr
scadobj_circle
overload
scadobj_circle with scadobj_circle_int1
overload
scadobj_circle with scadobj_circle_float1
//
(* ****** ****** *)
//
fun
scadobj_sphere_int1(rad: int): scadobj
fun
scadobj_sphere_float1(rad: double): scadobj
//
symintr
scadobj_sphere
overload
scadobj_sphere with scadobj_sphere_int1
overload
scadobj_sphere with scadobj_sphere_float1
//
(* ****** ****** *)
//
fun
scadobj_sphere_at
  (center: point3, radius: double): scadobj
//
(* ****** ****** *)
//
fun
scadobj_cylinder1_int2
  (h: int, r: int): scadobj
fun
scadobj_cylinder1_int2_bool
  (h: int, r: int, ct: bool): scadobj
//
fun
scadobj_cylinder1_float2
  (h: double, r: double): scadobj
fun
scadobj_cylinder1_float2_bool
  (h: double, r: double, ct: bool): scadobj
//
(* ****** ****** *)
//
symintr
scadobj_cylinder1
//
overload
scadobj_cylinder1 with scadobj_cylinder1_int2
overload
scadobj_cylinder1 with scadobj_cylinder1_int2_bool
//
overload
scadobj_cylinder1 with scadobj_cylinder1_float2
overload
scadobj_cylinder1 with scadobj_cylinder1_float2_bool
//
(* ****** ****** *)
//
fun
scadobj_unionlst
  (objs: scadobjlst): scadobj
fun
scadobj_interlst
  (objs: scadobjlst): scadobj
fun
scadobj_differlst
  (objs: scadobjlst): scadobj
//
(* ****** ****** *)
//
fun
scadobj_union2
  (obj1: scadobj, obj2: scadobj): scadobj
//
fun
scadobj_inter2
  (obj1: scadobj, obj2: scadobj): scadobj
//
fun
scadobj_differ
  (obj1: scadobj, obj2: scadobj): scadobj
//
(* ****** ****** *)
//
symintr cap cup diff
//
overload cap with scadobj_inter2
overload cup with scadobj_union2
overload diff with scadobj_differ
//
(* ****** ****** *)
//
fun
scadtfm_scale_int3
  (x: int, y: int, z: int): scadtfm
fun
scadtfm_scale_float3
  (x: double, y: double, z: double): scadtfm
//
symintr
scadtfm_scale
overload
scadtfm_scale with scadtfm_scale_int3
overload
scadtfm_scale with scadtfm_scale_float3
//
(* ****** ****** *)
//
fun
scadtfm_rotate_int3
  (x: int, y: int, z: int): scadtfm
fun
scadtfm_rotate_float3
  (x: double, y: double, z: double): scadtfm
//
symintr
scadtfm_rotate
overload
scadtfm_rotate with scadtfm_rotate_int3
overload
scadtfm_rotate with scadtfm_rotate_float3
//
(* ****** ****** *)
//
fun
scadtfm_translate_int3
  (x: int, y: int, z: int): scadtfm
fun
scadtfm_translate_float3
  (x: double, y: double, z: double): scadtfm
//
symintr
scadtfm_translate
overload
scadtfm_translate with scadtfm_translate_int3
overload
scadtfm_translate with scadtfm_translate_float3
//
(* ****** ****** *)
//
fun
scadtfm_color_name
  (name: string): scadtfm
fun
scadtfm_color_rgba
(
  r: double, g: double, b: double, a: double
): scadtfm // end-of-function
//
(* ****** ****** *)
//
fun
scadtfm_compose(scadtfm, scadtfm): scadtfm
//
(* ****** ****** *)
//
fun
scadobj_tfmapp_one
  (tfm: scadtfm, x0: scadobj): scadobj
fun
scadobj_tfmapp_list
  (tfm: scadtfm, xs: scadobjlst): scadobj
//
(* ****** ****** *)
//
symintr scadobj_tfmapp
//
overload scadobj_tfmapp with scadobj_tfmapp_one
overload scadobj_tfmapp with scadobj_tfmapp_list
//
(* ****** ****** *)
//
fun
scadobj_scale_int3
  (x: int, y: int, z: int, obj: scadobj): scadobj
fun
scadobj_scale_float3
  (x: double, y: double, z: double, obj: scadobj): scadobj
//
(* ****** ****** *)
//
symintr
scadobj_scale
overload
scadobj_scale with scadobj_scale_int3
overload
scadobj_scale with scadobj_scale_float3
//
(* ****** ****** *)
//
fun
scadobj_rotate_int3
  (x: int, y: int, z: int, obj: scadobj): scadobj
fun
scadobj_rotate_float3
  (x: double, y: double, z: double, obj: scadobj): scadobj
//
(* ****** ****** *)
//
symintr
scadobj_rotate
overload
scadobj_rotate with scadobj_rotate_int3
overload
scadobj_rotate with scadobj_rotate_float3
//
(* ****** ****** *)
//
fun
scadobj_translate_int3
  (x: int, y: int, z: int, obj: scadobj): scadobj
fun
scadobj_translate_float3
  (x: double, y: double, z: double, obj: scadobj): scadobj
//
(* ****** ****** *)
//
symintr
scadobj_translate
overload
scadobj_translate with scadobj_translate_int3
overload
scadobj_translate with scadobj_translate_float3
//
(* ****** ****** *)

fun
scadobj_polyhedron
  {n:int | n >= 4}
(
  pts: list(point3, n)
, faces: List0(listGte(natLt(n), 3))
, convexity: intGte(0)
) : scadobj // end-of-function

(* ****** ****** *)

fun
scadobj_tetrahedron
(
p0: point3, p1: point3, p2: point3, p3: point3
) : scadobj // end-of-function

(* ****** ****** *)

fun
scadobj_square_pyramid
(
p0: point3, p1: point3, p2: point3, p3: point3, p4: point3
) : scadobj // end-of-function

(* ****** ****** *)

(* end of [OpenSCAD_meta.sats] *)