summaryrefslogtreecommitdiff
path: root/testdata
diff options
context:
space:
mode:
Diffstat (limited to 'testdata')
-rw-r--r--testdata/dxf/multiple-layers.dxf2140
-rw-r--r--testdata/scad/bugs/gridbug.scad9
-rw-r--r--testdata/scad/bugs/polygon-illegal-winding.scad (renamed from testdata/scad/polygon-illegal-winding.scad)0
-rw-r--r--testdata/scad/bugs/polygon-touch.scad5
-rw-r--r--testdata/scad/bugs/polyset-reduce-crash.scad (renamed from testdata/scad/polyset-reduce-crash.scad)0
-rw-r--r--testdata/scad/bugs/polyset-reduce-crash.txt (renamed from testdata/scad/polyset-reduce-crash.txt)0
-rw-r--r--testdata/scad/difference-tests.scad4
-rw-r--r--testdata/scad/features/2d-3d.scad3
-rw-r--r--testdata/scad/features/assign-tests.scad6
-rw-r--r--testdata/scad/features/background-modifier.scad4
-rw-r--r--testdata/scad/features/circle-tests.scad10
-rw-r--r--testdata/scad/features/color-tests.scad15
-rw-r--r--testdata/scad/features/cube-tests.scad4
-rw-r--r--testdata/scad/features/cylinder-tests.scad15
-rw-r--r--testdata/scad/features/difference-tests.scad30
-rw-r--r--testdata/scad/features/dim-all.dxf (renamed from testdata/scad/dim-all.dxf)0
-rw-r--r--testdata/scad/features/dim-all.scad (renamed from testdata/scad/dim-all.scad)0
-rw-r--r--testdata/scad/features/disable-modifier.scad4
-rw-r--r--testdata/scad/features/dxf-export.scad12
-rw-r--r--testdata/scad/features/for-nested-tests.scad3
-rw-r--r--testdata/scad/features/for-tests.scad41
-rw-r--r--testdata/scad/features/highlight-modifier.scad4
-rw-r--r--testdata/scad/features/hull2-tests.scad30
-rw-r--r--testdata/scad/features/hull3-tests.scad (renamed from testdata/scad/convex_hull.scad)28
-rw-r--r--testdata/scad/features/import.stl (renamed from testdata/scad/import.stl)0
-rw-r--r--testdata/scad/features/import_dxf-tests.scad9
-rw-r--r--testdata/scad/features/import_stl-tests.scad (renamed from testdata/scad/import_stl-tests.scad)0
-rw-r--r--testdata/scad/features/include test6.scad7
-rw-r--r--testdata/scad/features/include-test5.scad4
-rw-r--r--testdata/scad/features/include-tests.scad (renamed from testdata/scad/include-test.scad)10
-rw-r--r--testdata/scad/features/intersection-tests.scad41
-rw-r--r--testdata/scad/features/intersection_for-tests.scad10
-rw-r--r--testdata/scad/features/linear_extrude-tests.scad13
-rw-r--r--testdata/scad/features/minkowski2-tests.scad31
-rw-r--r--testdata/scad/features/minkowski3-tests.scad35
-rw-r--r--testdata/scad/features/null-polygons.dxf (renamed from testdata/scad/null-polygons.dxf)0
-rw-r--r--testdata/scad/features/null-polygons.scad2
-rw-r--r--testdata/scad/features/polygon-tests.scad17
-rw-r--r--testdata/scad/features/projection-tests.scad (renamed from testdata/scad/projection-tests.scad)7
-rw-r--r--testdata/scad/features/render-tests.scad36
-rw-r--r--testdata/scad/features/root-modifier.scad4
-rw-r--r--testdata/scad/features/rotate_extrude-tests.scad30
-rw-r--r--testdata/scad/features/sphere-tests.scad10
-rw-r--r--testdata/scad/features/square-tests.scad8
-rw-r--r--testdata/scad/features/string-test.scad (renamed from testdata/scad/string-test.scad)0
-rw-r--r--testdata/scad/features/sub1/sub2/sub3/include-test4.scad4
-rw-r--r--testdata/scad/features/sub1/sub2/sub3/sub4/include-test2.scad (renamed from testdata/scad/sub1/sub2/sub3/sub4/include-test2.scad)2
-rw-r--r--testdata/scad/features/sub1/sub2/sub3/sub4/include-test3.scad4
-rw-r--r--testdata/scad/features/surface-tests.scad2
-rw-r--r--testdata/scad/features/surface.dat (renamed from testdata/scad/surface.dat)0
-rw-r--r--testdata/scad/features/testcolornames.scad (renamed from testdata/scad/testcolornames.scad)0
-rw-r--r--testdata/scad/features/transform-tests.scad18
-rw-r--r--testdata/scad/features/union-tests.scad29
-rw-r--r--testdata/scad/include test6.scad4
-rw-r--r--testdata/scad/include-test5.scad4
-rw-r--r--testdata/scad/intersection-tests.scad4
-rw-r--r--testdata/scad/linear_extrude-tests.scad7
-rw-r--r--testdata/scad/minimal/allfunctions.scad24
-rw-r--r--testdata/scad/minimal/allmodules.scad (renamed from testdata/scad/allmodules.scad)2
-rw-r--r--testdata/scad/minimal/assign.scad (renamed from testdata/scad/assign.scad)0
-rw-r--r--testdata/scad/minimal/child.scad (renamed from testdata/scad/child.scad)0
-rw-r--r--testdata/scad/minimal/circle.scad (renamed from testdata/scad/circle.scad)0
-rw-r--r--testdata/scad/minimal/color.scad (renamed from testdata/scad/color.scad)0
-rw-r--r--testdata/scad/minimal/cube.scad (renamed from testdata/scad/cube.scad)0
-rw-r--r--testdata/scad/minimal/cylinder.scad (renamed from testdata/scad/cylinder.scad)0
-rw-r--r--testdata/scad/minimal/difference.scad (renamed from testdata/scad/difference.scad)0
-rw-r--r--testdata/scad/minimal/dxf_linear_extrude.scad (renamed from testdata/scad/dxf_linear_extrude.scad)0
-rw-r--r--testdata/scad/minimal/dxf_rotate_extrude.scad (renamed from testdata/scad/dxf_rotate_extrude.scad)0
-rw-r--r--testdata/scad/minimal/echo.scad (renamed from testdata/scad/echo.scad)0
-rw-r--r--testdata/scad/minimal/for.scad (renamed from testdata/scad/for.scad)0
-rw-r--r--testdata/scad/minimal/glide.scad (renamed from testdata/scad/glide.scad)0
-rw-r--r--testdata/scad/minimal/group.scad (renamed from testdata/scad/group.scad)0
-rw-r--r--testdata/scad/minimal/hull.scad1
-rw-r--r--testdata/scad/minimal/if.scad (renamed from testdata/scad/if.scad)0
-rw-r--r--testdata/scad/minimal/import.scad1
-rw-r--r--testdata/scad/minimal/import_dxf.scad (renamed from testdata/scad/import_dxf.scad)0
-rw-r--r--testdata/scad/minimal/import_off.scad (renamed from testdata/scad/import_off.scad)0
-rw-r--r--testdata/scad/minimal/import_stl.scad (renamed from testdata/scad/import_stl.scad)0
-rw-r--r--testdata/scad/minimal/intersection.scad (renamed from testdata/scad/intersection.scad)0
-rw-r--r--testdata/scad/minimal/intersection_for.scad (renamed from testdata/scad/intersection_for.scad)0
-rw-r--r--testdata/scad/minimal/linear_extrude.scad (renamed from testdata/scad/linear_extrude.scad)0
-rw-r--r--testdata/scad/minimal/minkowski.scad1
-rw-r--r--testdata/scad/minimal/mirror.scad (renamed from testdata/scad/mirror.scad)0
-rw-r--r--testdata/scad/minimal/multmatrix.scad (renamed from testdata/scad/multmatrix.scad)0
-rw-r--r--testdata/scad/minimal/polygon.scad (renamed from testdata/scad/polygon.scad)0
-rw-r--r--testdata/scad/minimal/polyhedron.scad (renamed from testdata/scad/polyhedron.scad)0
-rw-r--r--testdata/scad/minimal/projection.scad (renamed from testdata/scad/projection.scad)0
-rw-r--r--testdata/scad/minimal/render.scad (renamed from testdata/scad/render.scad)0
-rw-r--r--testdata/scad/minimal/rotate.scad (renamed from testdata/scad/rotate.scad)0
-rw-r--r--testdata/scad/minimal/rotate_extrude.scad (renamed from testdata/scad/rotate_extrude.scad)0
-rw-r--r--testdata/scad/minimal/scale.scad (renamed from testdata/scad/scale.scad)0
-rw-r--r--testdata/scad/minimal/sphere.scad (renamed from testdata/scad/sphere.scad)0
-rw-r--r--testdata/scad/minimal/square.scad (renamed from testdata/scad/square.scad)0
-rw-r--r--testdata/scad/minimal/subdiv.scad (renamed from testdata/scad/subdiv.scad)0
-rw-r--r--testdata/scad/minimal/surface.scad (renamed from testdata/scad/surface.scad)0
-rw-r--r--testdata/scad/minimal/transform-insert.dxf (renamed from testdata/scad/transform-insert.dxf)0
-rw-r--r--testdata/scad/minimal/transform-insert.scad (renamed from testdata/scad/transform-insert.scad)0
-rw-r--r--testdata/scad/minimal/translate.scad (renamed from testdata/scad/translate.scad)0
-rw-r--r--testdata/scad/minimal/union.scad (renamed from testdata/scad/union.scad)0
-rw-r--r--testdata/scad/minkowski.scad67
-rw-r--r--testdata/scad/null-polygons.scad2
-rw-r--r--testdata/scad/rotate_extrude-tests.scad2
-rw-r--r--testdata/scad/sphere-tests.scad4
-rw-r--r--testdata/scad/sub1/sub2/sub3/include-test4.scad4
-rw-r--r--testdata/scad/sub1/sub2/sub3/sub4/include-test3.scad4
-rw-r--r--testdata/scad/surface-tests.scad1
106 files changed, 2697 insertions, 135 deletions
diff --git a/testdata/dxf/multiple-layers.dxf b/testdata/dxf/multiple-layers.dxf
new file mode 100644
index 0000000..88b530f
--- /dev/null
+++ b/testdata/dxf/multiple-layers.dxf
@@ -0,0 +1,2140 @@
+999
+dxflib 2.2.0.0
+ 0
+SECTION
+ 2
+HEADER
+ 9
+$ACADVER
+ 1
+AC1015
+ 9
+$HANDSEED
+ 5
+FFFF
+ 9
+$DIMASZ
+ 40
+2.5
+ 9
+$PLIMMIN
+ 10
+0.0
+ 20
+0.0
+ 9
+$DIMEXE
+ 40
+1.25
+ 9
+$DIMGAP
+ 40
+0.625
+ 9
+$PLIMMAX
+ 10
+210.0
+ 20
+297.0
+ 9
+$INSUNITS
+ 70
+4
+ 9
+$DIMEXO
+ 40
+0.625
+ 9
+$DIMTXT
+ 40
+2.5
+ 9
+$CLAYER
+ 8
+Layer with a pretty long name including \ "special" /'\\ characters
+ 0
+ENDSEC
+ 0
+SECTION
+ 2
+TABLES
+ 0
+TABLE
+ 2
+VPORT
+ 5
+8
+100
+AcDbSymbolTable
+ 70
+1
+ 0
+VPORT
+ 5
+30
+100
+AcDbSymbolTableRecord
+100
+AcDbViewportTableRecord
+ 2
+*Active
+ 70
+0
+ 10
+0.0
+ 20
+0.0
+ 11
+1.0
+ 21
+1.0
+ 12
+286.3055555555554861
+ 22
+148.5
+ 13
+0.0
+ 23
+0.0
+ 14
+10.0
+ 24
+10.0
+ 15
+10.0
+ 25
+10.0
+ 16
+0.0
+ 26
+0.0
+ 36
+1.0
+ 17
+0.0
+ 27
+0.0
+ 37
+0.0
+ 40
+297.0
+ 41
+1.92798353909465
+ 42
+50.0
+ 43
+0.0
+ 44
+0.0
+ 50
+0.0
+ 51
+0.0
+ 71
+0
+ 72
+100
+ 73
+1
+ 74
+3
+ 75
+1
+ 76
+1
+ 77
+0
+ 78
+0
+281
+0
+ 65
+1
+110
+0.0
+120
+0.0
+130
+0.0
+111
+1.0
+121
+0.0
+131
+0.0
+112
+0.0
+122
+1.0
+132
+0.0
+ 79
+0
+146
+0.0
+ 0
+ENDTAB
+ 0
+TABLE
+ 2
+LTYPE
+ 5
+5
+100
+AcDbSymbolTable
+ 70
+21
+ 0
+LTYPE
+ 5
+14
+100
+AcDbSymbolTableRecord
+100
+AcDbLinetypeTableRecord
+ 2
+ByBlock
+ 70
+0
+ 3
+
+ 72
+65
+ 73
+0
+ 40
+0.0
+ 0
+LTYPE
+ 5
+15
+100
+AcDbSymbolTableRecord
+100
+AcDbLinetypeTableRecord
+ 2
+ByLayer
+ 70
+0
+ 3
+
+ 72
+65
+ 73
+0
+ 40
+0.0
+ 0
+LTYPE
+ 5
+16
+100
+AcDbSymbolTableRecord
+100
+AcDbLinetypeTableRecord
+ 2
+CONTINUOUS
+ 70
+0
+ 3
+Solid line
+ 72
+65
+ 73
+0
+ 40
+0.0
+ 0
+LTYPE
+ 5
+31
+100
+AcDbSymbolTableRecord
+100
+AcDbLinetypeTableRecord
+ 2
+DOT
+ 70
+0
+ 3
+Dot . . . . . . . . . . . . . . . . . . . . . .
+ 72
+65
+ 73
+2
+ 40
+6.3499999999999996
+ 49
+0.0
+ 74
+0
+ 49
+-6.3499999999999996
+ 74
+0
+ 0
+LTYPE
+ 5
+32
+100
+AcDbSymbolTableRecord
+100
+AcDbLinetypeTableRecord
+ 2
+DOT2
+ 70
+0
+ 3
+Dot (.5x) .....................................
+ 72
+65
+ 73
+2
+ 40
+3.1749999999999998
+ 49
+0.0
+ 74
+0
+ 49
+-3.1749999999999998
+ 74
+0
+ 0
+LTYPE
+ 5
+33
+100
+AcDbSymbolTableRecord
+100
+AcDbLinetypeTableRecord
+ 2
+DOTX2
+ 70
+0
+ 3
+Dot (2x) . . . . . . . . . . . . .
+ 72
+65
+ 73
+2
+ 40
+12.6999999999999993
+ 49
+0.0
+ 74
+0
+ 49
+-12.6999999999999993
+ 74
+0
+ 0
+LTYPE
+ 5
+34
+100
+AcDbSymbolTableRecord
+100
+AcDbLinetypeTableRecord
+ 2
+DASHED
+ 70
+0
+ 3
+Dashed __ __ __ __ __ __ __ __ __ __ __ __ __ _
+ 72
+65
+ 73
+2
+ 40
+19.0500000000000007
+ 49
+12.6999999999999993
+ 74
+0
+ 49
+-6.3499999999999996
+ 74
+0
+ 0
+LTYPE
+ 5
+35
+100
+AcDbSymbolTableRecord
+100
+AcDbLinetypeTableRecord
+ 2
+DASHED2
+ 70
+0
+ 3
+Dashed (.5x) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
+ 72
+65
+ 73
+2
+ 40
+9.5250000000000004
+ 49
+6.3499999999999996
+ 74
+0
+ 49
+-3.1749999999999998
+ 74
+0
+ 0
+LTYPE
+ 5
+36
+100
+AcDbSymbolTableRecord
+100
+AcDbLinetypeTableRecord
+ 2
+DASHEDX2
+ 70
+0
+ 3
+Dashed (2x) ____ ____ ____ ____ ____ ___
+ 72
+65
+ 73
+2
+ 40
+38.1000000000000014
+ 49
+25.3999999999999986
+ 74
+0
+ 49
+-12.6999999999999993
+ 74
+0
+ 0
+LTYPE
+ 5
+37
+100
+AcDbSymbolTableRecord
+100
+AcDbLinetypeTableRecord
+ 2
+DASHDOT
+ 70
+0
+ 3
+Dash dot __ . __ . __ . __ . __ . __ . __ . __
+ 72
+65
+ 73
+4
+ 40
+25.3999999999999986
+ 49
+12.6999999999999993
+ 74
+0
+ 49
+-6.3499999999999996
+ 74
+0
+ 49
+0.0
+ 74
+0
+ 49
+-6.3499999999999996
+ 74
+0
+ 0
+LTYPE
+ 5
+38
+100
+AcDbSymbolTableRecord
+100
+AcDbLinetypeTableRecord
+ 2
+DASHDOT2
+ 70
+0
+ 3
+Dash dot (.5x) _._._._._._._._._._._._._._._.
+ 72
+65
+ 73
+4
+ 40
+12.6999999999999993
+ 49
+6.3499999999999996
+ 74
+0
+ 49
+-3.1749999999999998
+ 74
+0
+ 49
+0.0
+ 74
+0
+ 49
+-3.1749999999999998
+ 74
+0
+ 0
+LTYPE
+ 5
+39
+100
+AcDbSymbolTableRecord
+100
+AcDbLinetypeTableRecord
+ 2
+DASHDOTX2
+ 70
+0
+ 3
+Dash dot (2x) ____ . ____ . ____ . ___
+ 72
+65
+ 73
+4
+ 40
+50.7999999999999972
+ 49
+25.3999999999999986
+ 74
+0
+ 49
+-12.6999999999999993
+ 74
+0
+ 49
+0.0
+ 74
+0
+ 49
+-12.6999999999999993
+ 74
+0
+ 0
+LTYPE
+ 5
+3A
+100
+AcDbSymbolTableRecord
+100
+AcDbLinetypeTableRecord
+ 2
+DIVIDE
+ 70
+0
+ 3
+Divide ____ . . ____ . . ____ . . ____ . . ____
+ 72
+65
+ 73
+6
+ 40
+31.75
+ 49
+12.6999999999999993
+ 74
+0
+ 49
+-6.3499999999999996
+ 74
+0
+ 49
+0.0
+ 74
+0
+ 49
+-6.3499999999999996
+ 74
+0
+ 49
+0.0
+ 74
+0
+ 49
+-6.3499999999999996
+ 74
+0
+ 0
+LTYPE
+ 5
+3B
+100
+AcDbSymbolTableRecord
+100
+AcDbLinetypeTableRecord
+ 2
+DIVIDE2
+ 70
+0
+ 3
+Divide (.5x) __..__..__..__..__..__..__..__.._
+ 72
+65
+ 73
+6
+ 40
+15.875
+ 49
+6.3499999999999996
+ 74
+0
+ 49
+-3.1749999999999998
+ 74
+0
+ 49
+0.0
+ 74
+0
+ 49
+-3.1749999999999998
+ 74
+0
+ 49
+0.0
+ 74
+0
+ 49
+-3.1749999999999998
+ 74
+0
+ 0
+LTYPE
+ 5
+3C
+100
+AcDbSymbolTableRecord
+100
+AcDbLinetypeTableRecord
+ 2
+DIVIDEX2
+ 70
+0
+ 3
+Divide (2x) ________ . . ________ . . _
+ 72
+65
+ 73
+6
+ 40
+63.5
+ 49
+25.3999999999999986
+ 74
+0
+ 49
+-12.6999999999999993
+ 74
+0
+ 49
+0.0
+ 74
+0
+ 49
+-12.6999999999999993
+ 74
+0
+ 49
+0.0
+ 74
+0
+ 49
+-12.6999999999999993
+ 74
+0
+ 0
+LTYPE
+ 5
+3D
+100
+AcDbSymbolTableRecord
+100
+AcDbLinetypeTableRecord
+ 2
+CENTER
+ 70
+0
+ 3
+Center ____ _ ____ _ ____ _ ____ _ ____ _ ____
+ 72
+65
+ 73
+4
+ 40
+50.7999999999999972
+ 49
+31.75
+ 74
+0
+ 49
+-6.3499999999999996
+ 74
+0
+ 49
+6.3499999999999996
+ 74
+0
+ 49
+-6.3499999999999996
+ 74
+0
+ 0
+LTYPE
+ 5
+3E
+100
+AcDbSymbolTableRecord
+100
+AcDbLinetypeTableRecord
+ 2
+CENTER2
+ 70
+0
+ 3
+Center (.5x) ___ _ ___ _ ___ _ ___ _ ___ _ ___
+ 72
+65
+ 73
+4
+ 40
+28.5749999999999993
+ 49
+19.0500000000000007
+ 74
+0
+ 49
+-3.1749999999999998
+ 74
+0
+ 49
+3.1749999999999998
+ 74
+0
+ 49
+-3.1749999999999998
+ 74
+0
+ 0
+LTYPE
+ 5
+3F
+100
+AcDbSymbolTableRecord
+100
+AcDbLinetypeTableRecord
+ 2
+CENTERX2
+ 70
+0
+ 3
+Center (2x) ________ __ ________ __ _____
+ 72
+65
+ 73
+4
+ 40
+101.5999999999999943
+ 49
+63.5
+ 74
+0
+ 49
+-12.6999999999999993
+ 74
+0
+ 49
+12.6999999999999993
+ 74
+0
+ 49
+-12.6999999999999993
+ 74
+0
+ 0
+LTYPE
+ 5
+40
+100
+AcDbSymbolTableRecord
+100
+AcDbLinetypeTableRecord
+ 2
+BORDER
+ 70
+0
+ 3
+Border __ __ . __ __ . __ __ . __ __ . __ __ .
+ 72
+65
+ 73
+6
+ 40
+44.4500000000000028
+ 49
+12.6999999999999993
+ 74
+0
+ 49
+-6.3499999999999996
+ 74
+0
+ 49
+12.6999999999999993
+ 74
+0
+ 49
+-6.3499999999999996
+ 74
+0
+ 49
+0.0
+ 74
+0
+ 49
+-6.3499999999999996
+ 74
+0
+ 0
+LTYPE
+ 5
+41
+100
+AcDbSymbolTableRecord
+100
+AcDbLinetypeTableRecord
+ 2
+BORDER2
+ 70
+0
+ 3
+Border (.5x) __.__.__.__.__.__.__.__.__.__.__.
+ 72
+65
+ 73
+6
+ 40
+22.2250000000000014
+ 49
+6.3499999999999996
+ 74
+0
+ 49
+-3.1749999999999998
+ 74
+0
+ 49
+6.3499999999999996
+ 74
+0
+ 49
+-3.1749999999999998
+ 74
+0
+ 49
+0.0
+ 74
+0
+ 49
+-3.1749999999999998
+ 74
+0
+ 0
+LTYPE
+ 5
+42
+100
+AcDbSymbolTableRecord
+100
+AcDbLinetypeTableRecord
+ 2
+BORDERX2
+ 70
+0
+ 3
+Border (2x) ____ ____ . ____ ____ . ___
+ 72
+65
+ 73
+6
+ 40
+88.9000000000000057
+ 49
+25.3999999999999986
+ 74
+0
+ 49
+-12.6999999999999993
+ 74
+0
+ 49
+25.3999999999999986
+ 74
+0
+ 49
+-12.6999999999999993
+ 74
+0
+ 49
+0.0
+ 74
+0
+ 49
+-12.6999999999999993
+ 74
+0
+ 0
+ENDTAB
+ 0
+TABLE
+ 2
+LAYER
+ 5
+2
+100
+AcDbSymbolTable
+ 70
+3
+ 0
+LAYER
+ 5
+10
+100
+AcDbSymbolTableRecord
+100
+AcDbLayerTableRecord
+ 2
+0
+ 70
+0
+ 62
+7
+420
+0
+ 6
+CONTINUOUS
+370
+25
+390
+F
+ 0
+LAYER
+ 5
+43
+100
+AcDbSymbolTableRecord
+100
+AcDbLayerTableRecord
+ 2
+noname
+ 70
+0
+ 62
+7
+420
+0
+ 6
+CONTINUOUS
+370
+0
+390
+F
+ 0
+LAYER
+ 5
+44
+100
+AcDbSymbolTableRecord
+100
+AcDbLayerTableRecord
+ 2
+Layer with a pretty long name including \ "special" /'\\ characters
+ 70
+0
+ 62
+7
+420
+0
+ 6
+CONTINUOUS
+370
+0
+390
+F
+ 0
+ENDTAB
+ 0
+TABLE
+ 2
+STYLE
+ 5
+3
+100
+AcDbSymbolTable
+ 70
+1
+ 0
+STYLE
+ 5
+11
+100
+AcDbSymbolTableRecord
+100
+AcDbTextStyleTableRecord
+ 2
+Standard
+ 70
+0
+ 40
+0.0
+ 41
+0.75
+ 50
+0.0
+ 71
+0
+ 42
+2.5
+ 3
+txt
+ 4
+
+ 0
+ENDTAB
+ 0
+TABLE
+ 2
+VIEW
+ 5
+6
+100
+AcDbSymbolTable
+ 70
+0
+ 0
+ENDTAB
+ 0
+TABLE
+ 2
+UCS
+ 5
+7
+100
+AcDbSymbolTable
+ 70
+0
+ 0
+ENDTAB
+ 0
+TABLE
+ 2
+APPID
+ 5
+9
+100
+AcDbSymbolTable
+ 70
+1
+ 0
+APPID
+ 5
+12
+100
+AcDbSymbolTableRecord
+100
+AcDbRegAppTableRecord
+ 2
+ACAD
+ 70
+0
+ 0
+ENDTAB
+ 0
+TABLE
+ 2
+DIMSTYLE
+ 5
+A
+100
+AcDbSymbolTable
+ 70
+1
+100
+AcDbDimStyleTable
+ 71
+0
+ 0
+DIMSTYLE
+105
+27
+100
+AcDbSymbolTableRecord
+100
+AcDbDimStyleTableRecord
+ 2
+Standard
+ 41
+2.5
+ 42
+0.625
+ 43
+3.75
+ 44
+1.25
+ 70
+0
+ 73
+0
+ 74
+0
+ 77
+1
+ 78
+8
+140
+2.5
+141
+2.5
+143
+0.03937007874016
+147
+0.625
+171
+3
+172
+1
+271
+2
+272
+2
+274
+3
+278
+44
+283
+0
+284
+8
+340
+11
+ 0
+ENDTAB
+ 0
+TABLE
+ 2
+BLOCK_RECORD
+ 5
+1
+100
+AcDbSymbolTable
+ 70
+1
+ 0
+BLOCK_RECORD
+ 5
+1F
+100
+AcDbSymbolTableRecord
+100
+AcDbBlockTableRecord
+ 2
+*Model_Space
+340
+22
+ 0
+BLOCK_RECORD
+ 5
+1B
+100
+AcDbSymbolTableRecord
+100
+AcDbBlockTableRecord
+ 2
+*Paper_Space
+340
+1E
+ 0
+BLOCK_RECORD
+ 5
+23
+100
+AcDbSymbolTableRecord
+100
+AcDbBlockTableRecord
+ 2
+*Paper_Space0
+340
+26
+ 0
+ENDTAB
+ 0
+ENDSEC
+ 0
+SECTION
+ 2
+BLOCKS
+ 0
+BLOCK
+ 5
+20
+100
+AcDbEntity
+ 8
+0
+100
+AcDbBlockBegin
+ 2
+*Model_Space
+ 70
+0
+ 10
+0.0
+ 20
+0.0
+ 30
+0.0
+ 3
+*Model_Space
+ 1
+
+ 0
+ENDBLK
+ 5
+21
+100
+AcDbEntity
+ 8
+0
+100
+AcDbBlockEnd
+ 0
+BLOCK
+ 5
+1C
+100
+AcDbEntity
+ 67
+1
+ 8
+0
+100
+AcDbBlockBegin
+ 2
+*Paper_Space
+ 70
+0
+ 10
+0.0
+ 20
+0.0
+ 30
+0.0
+ 3
+*Paper_Space
+ 1
+
+ 0
+ENDBLK
+ 5
+1D
+100
+AcDbEntity
+ 67
+1
+ 8
+0
+100
+AcDbBlockEnd
+ 0
+BLOCK
+ 5
+24
+100
+AcDbEntity
+ 8
+0
+100
+AcDbBlockBegin
+ 2
+*Paper_Space0
+ 70
+0
+ 10
+0.0
+ 20
+0.0
+ 30
+0.0
+ 3
+*Paper_Space0
+ 1
+
+ 0
+ENDBLK
+ 5
+25
+100
+AcDbEntity
+ 8
+0
+100
+AcDbBlockEnd
+ 0
+ENDSEC
+ 0
+SECTION
+ 2
+ENTITIES
+ 0
+LINE
+ 5
+45
+100
+AcDbEntity
+100
+AcDbLine
+ 8
+0
+ 62
+256
+370
+-1
+ 6
+ByLayer
+ 10
+-40.0
+ 20
+40.0
+ 30
+0.0
+ 11
+40.0
+ 21
+40.0
+ 31
+0.0
+ 0
+LINE
+ 5
+46
+100
+AcDbEntity
+100
+AcDbLine
+ 8
+0
+ 62
+256
+370
+-1
+ 6
+ByLayer
+ 10
+40.0
+ 20
+40.0
+ 30
+0.0
+ 11
+40.0
+ 21
+-40.0
+ 31
+0.0
+ 0
+LINE
+ 5
+47
+100
+AcDbEntity
+100
+AcDbLine
+ 8
+0
+ 62
+256
+370
+-1
+ 6
+ByLayer
+ 10
+40.0
+ 20
+-40.0
+ 30
+0.0
+ 11
+-40.0
+ 21
+-40.0
+ 31
+0.0
+ 0
+LINE
+ 5
+48
+100
+AcDbEntity
+100
+AcDbLine
+ 8
+0
+ 62
+256
+370
+-1
+ 6
+ByLayer
+ 10
+-40.0
+ 20
+-40.0
+ 30
+0.0
+ 11
+-40.0
+ 21
+40.0
+ 31
+0.0
+ 0
+CIRCLE
+ 5
+49
+100
+AcDbEntity
+100
+AcDbCircle
+ 8
+noname
+ 62
+256
+370
+-1
+ 6
+ByLayer
+ 10
+0.0
+ 20
+0.0
+ 30
+0.0
+ 40
+70.7106781186547551
+ 0
+LINE
+ 5
+4A
+100
+AcDbEntity
+100
+AcDbLine
+ 8
+Layer with a pretty long name including \ "special" /'\\ characters
+ 62
+256
+370
+-1
+ 6
+ByLayer
+ 10
+100.0
+ 20
+0.0
+ 30
+0.0
+ 11
+50.0000000000000142
+ 21
+86.6025403784438623
+ 31
+0.0
+ 0
+LINE
+ 5
+4B
+100
+AcDbEntity
+100
+AcDbLine
+ 8
+Layer with a pretty long name including \ "special" /'\\ characters
+ 62
+256
+370
+-1
+ 6
+ByLayer
+ 10
+50.0000000000000142
+ 20
+86.6025403784438623
+ 30
+0.0
+ 11
+-49.9999999999999858
+ 21
+86.6025403784438907
+ 31
+0.0
+ 0
+LINE
+ 5
+4C
+100
+AcDbEntity
+100
+AcDbLine
+ 8
+Layer with a pretty long name including \ "special" /'\\ characters
+ 62
+256
+370
+-1
+ 6
+ByLayer
+ 10
+-49.9999999999999858
+ 20
+86.6025403784438907
+ 30
+0.0
+ 11
+-100.0000000000000142
+ 21
+0.0000000000000122
+ 31
+0.0
+ 0
+LINE
+ 5
+4D
+100
+AcDbEntity
+100
+AcDbLine
+ 8
+Layer with a pretty long name including \ "special" /'\\ characters
+ 62
+256
+370
+-1
+ 6
+ByLayer
+ 10
+-100.0000000000000142
+ 20
+0.0000000000000122
+ 30
+0.0
+ 11
+-50.0000000000000497
+ 21
+-86.6025403784438481
+ 31
+0.0
+ 0
+LINE
+ 5
+4E
+100
+AcDbEntity
+100
+AcDbLine
+ 8
+Layer with a pretty long name including \ "special" /'\\ characters
+ 62
+256
+370
+-1
+ 6
+ByLayer
+ 10
+-50.0000000000000497
+ 20
+-86.6025403784438481
+ 30
+0.0
+ 11
+49.9999999999998579
+ 21
+-86.6025403784439618
+ 31
+0.0
+ 0
+LINE
+ 5
+4F
+100
+AcDbEntity
+100
+AcDbLine
+ 8
+Layer with a pretty long name including \ "special" /'\\ characters
+ 62
+256
+370
+-1
+ 6
+ByLayer
+ 10
+49.9999999999998579
+ 20
+-86.6025403784439618
+ 30
+0.0
+ 11
+100.0000000000000142
+ 21
+-0.0000000000002021
+ 31
+0.0
+ 0
+ENDSEC
+ 0
+SECTION
+ 2
+OBJECTS
+ 0
+DICTIONARY
+ 5
+C
+100
+AcDbDictionary
+280
+0
+281
+1
+ 3
+ACAD_GROUP
+350
+D
+ 3
+ACAD_LAYOUT
+350
+1A
+ 3
+ACAD_MLINESTYLE
+350
+17
+ 3
+ACAD_PLOTSETTINGS
+350
+19
+ 3
+ACAD_PLOTSTYLENAME
+350
+E
+ 3
+AcDbVariableDictionary
+350
+50
+ 0
+DICTIONARY
+ 5
+D
+100
+AcDbDictionary
+280
+0
+281
+1
+ 0
+ACDBDICTIONARYWDFLT
+ 5
+E
+100
+AcDbDictionary
+281
+1
+ 3
+Normal
+350
+F
+100
+AcDbDictionaryWithDefault
+340
+F
+ 0
+ACDBPLACEHOLDER
+ 5
+F
+ 0
+DICTIONARY
+ 5
+17
+100
+AcDbDictionary
+280
+0
+281
+1
+ 3
+Standard
+350
+18
+ 0
+MLINESTYLE
+ 5
+18
+100
+AcDbMlineStyle
+ 2
+STANDARD
+ 70
+0
+ 3
+
+ 62
+256
+ 51
+90.0
+ 52
+90.0
+ 71
+2
+ 49
+0.5
+ 62
+256
+ 6
+BYLAYER
+ 49
+-0.5
+ 62
+256
+ 6
+BYLAYER
+ 0
+DICTIONARY
+ 5
+19
+100
+AcDbDictionary
+280
+0
+281
+1
+ 0
+DICTIONARY
+ 5
+1A
+100
+AcDbDictionary
+281
+1
+ 3
+Layout1
+350
+1E
+ 3
+Layout2
+350
+26
+ 3
+Model
+350
+22
+ 0
+LAYOUT
+ 5
+1E
+100
+AcDbPlotSettings
+ 1
+
+ 2
+C:\Program Files\AutoCAD 2002\plotters\DWF ePlot (optimized for plotting).pc3
+ 4
+
+ 6
+
+ 40
+0.0
+ 41
+0.0
+ 42
+0.0
+ 43
+0.0
+ 44
+0.0
+ 45
+0.0
+ 46
+0.0
+ 47
+0.0
+ 48
+0.0
+ 49
+0.0
+140
+0.0
+141
+0.0
+142
+1.0
+143
+1.0
+ 70
+688
+ 72
+0
+ 73
+0
+ 74
+5
+ 7
+
+ 75
+16
+147
+1.0
+148
+0.0
+149
+0.0
+100
+AcDbLayout
+ 1
+Layout1
+ 70
+1
+ 71
+1
+ 10
+0.0
+ 20
+0.0
+ 11
+420.0
+ 21
+297.0
+ 12
+0.0
+ 22
+0.0
+ 32
+0.0
+ 14
+100000000000000000000.0
+ 24
+100000000000000000000.0
+ 34
+100000000000000000000.0
+ 15
+-100000000000000000000.0
+ 25
+-100000000000000000000.0
+ 35
+-100000000000000000000.0
+146
+0.0
+ 13
+0.0
+ 23
+0.0
+ 33
+0.0
+ 16
+1.0
+ 26
+0.0
+ 36
+0.0
+ 17
+0.0
+ 27
+1.0
+ 37
+0.0
+ 76
+0
+330
+1B
+ 0
+LAYOUT
+ 5
+22
+100
+AcDbPlotSettings
+ 1
+
+ 2
+C:\Program Files\AutoCAD 2002\plotters\DWF ePlot (optimized for plotting).pc3
+ 4
+
+ 6
+
+ 40
+0.0
+ 41
+0.0
+ 42
+0.0
+ 43
+0.0
+ 44
+0.0
+ 45
+0.0
+ 46
+0.0
+ 47
+0.0
+ 48
+0.0
+ 49
+0.0
+140
+0.0
+141
+0.0
+142
+1.0
+143
+1.0
+ 70
+1712
+ 72
+0
+ 73
+0
+ 74
+0
+ 7
+
+ 75
+0
+147
+1.0
+148
+0.0
+149
+0.0
+100
+AcDbLayout
+ 1
+Model
+ 70
+1
+ 71
+0
+ 10
+0.0
+ 20
+0.0
+ 11
+12.0
+ 21
+9.0
+ 12
+0.0
+ 22
+0.0
+ 32
+0.0
+ 14
+0.0
+ 24
+0.0
+ 34
+0.0
+ 15
+0.0
+ 25
+0.0
+ 35
+0.0
+146
+0.0
+ 13
+0.0
+ 23
+0.0
+ 33
+0.0
+ 16
+1.0
+ 26
+0.0
+ 36
+0.0
+ 17
+0.0
+ 27
+1.0
+ 37
+0.0
+ 76
+0
+330
+1F
+ 0
+LAYOUT
+ 5
+26
+100
+AcDbPlotSettings
+ 1
+
+ 2
+C:\Program Files\AutoCAD 2002\plotters\DWF ePlot (optimized for plotting).pc3
+ 4
+
+ 6
+
+ 40
+0.0
+ 41
+0.0
+ 42
+0.0
+ 43
+0.0
+ 44
+0.0
+ 45
+0.0
+ 46
+0.0
+ 47
+0.0
+ 48
+0.0
+ 49
+0.0
+140
+0.0
+141
+0.0
+142
+1.0
+143
+1.0
+ 70
+688
+ 72
+0
+ 73
+0
+ 74
+5
+ 7
+
+ 75
+16
+147
+1.0
+148
+0.0
+149
+0.0
+100
+AcDbLayout
+ 1
+Layout2
+ 70
+1
+ 71
+2
+ 10
+0.0
+ 20
+0.0
+ 11
+12.0
+ 21
+9.0
+ 12
+0.0
+ 22
+0.0
+ 32
+0.0
+ 14
+0.0
+ 24
+0.0
+ 34
+0.0
+ 15
+0.0
+ 25
+0.0
+ 35
+0.0
+146
+0.0
+ 13
+0.0
+ 23
+0.0
+ 33
+0.0
+ 16
+1.0
+ 26
+0.0
+ 36
+0.0
+ 17
+0.0
+ 27
+1.0
+ 37
+0.0
+ 76
+0
+330
+23
+ 0
+DICTIONARY
+ 5
+50
+100
+AcDbDictionary
+281
+1
+ 3
+DIMASSOC
+350
+52
+ 3
+HIDETEXT
+350
+51
+ 0
+DICTIONARYVAR
+ 5
+51
+100
+DictionaryVariables
+280
+0
+ 1
+2
+ 0
+DICTIONARYVAR
+ 5
+52
+100
+DictionaryVariables
+280
+0
+ 1
+1
+ 0
+ENDSEC
+ 0
+EOF
diff --git a/testdata/scad/bugs/gridbug.scad b/testdata/scad/bugs/gridbug.scad
new file mode 100644
index 0000000..678a22a
--- /dev/null
+++ b/testdata/scad/bugs/gridbug.scad
@@ -0,0 +1,9 @@
+// This crashes OpenSCAD including 2011.06 in PolyReducer due to two vertices of
+// a triangle evaluating to the same index
+linear_extrude(height=2)
+ polygon(points=[[0, 0],
+ [1, 0],
+ [1.0014, 1],
+ [1, 1],
+ [0, 1]],
+ paths=[[0,1,2,3,4]]);
diff --git a/testdata/scad/polygon-illegal-winding.scad b/testdata/scad/bugs/polygon-illegal-winding.scad
index 612154a..612154a 100644
--- a/testdata/scad/polygon-illegal-winding.scad
+++ b/testdata/scad/bugs/polygon-illegal-winding.scad
diff --git a/testdata/scad/bugs/polygon-touch.scad b/testdata/scad/bugs/polygon-touch.scad
new file mode 100644
index 0000000..afa2938
--- /dev/null
+++ b/testdata/scad/bugs/polygon-touch.scad
@@ -0,0 +1,5 @@
+# Somehow the 2D union/tessellation algorithm doesn't support touching polygons
+# Changing translate([-10,-10,0]) to translate([-9.99,-9.99,0]) works
+
+square([10,10]);
+translate([-10,-10,0]) square([10,10]);
diff --git a/testdata/scad/polyset-reduce-crash.scad b/testdata/scad/bugs/polyset-reduce-crash.scad
index ce9fae7..ce9fae7 100644
--- a/testdata/scad/polyset-reduce-crash.scad
+++ b/testdata/scad/bugs/polyset-reduce-crash.scad
diff --git a/testdata/scad/polyset-reduce-crash.txt b/testdata/scad/bugs/polyset-reduce-crash.txt
index bc9e8d5..bc9e8d5 100644
--- a/testdata/scad/polyset-reduce-crash.txt
+++ b/testdata/scad/bugs/polyset-reduce-crash.txt
diff --git a/testdata/scad/difference-tests.scad b/testdata/scad/difference-tests.scad
deleted file mode 100644
index f945246..0000000
--- a/testdata/scad/difference-tests.scad
+++ /dev/null
@@ -1,4 +0,0 @@
-difference() {
- sphere(3);
- cube([3,3,8], center=true);
-}
diff --git a/testdata/scad/features/2d-3d.scad b/testdata/scad/features/2d-3d.scad
new file mode 100644
index 0000000..ca9f966
--- /dev/null
+++ b/testdata/scad/features/2d-3d.scad
@@ -0,0 +1,3 @@
+// Test a mix of toplevel 2D and 3D objects
+cube();
+translate([2,0,0]) square();
diff --git a/testdata/scad/features/assign-tests.scad b/testdata/scad/features/assign-tests.scad
new file mode 100644
index 0000000..b86dabe
--- /dev/null
+++ b/testdata/scad/features/assign-tests.scad
@@ -0,0 +1,6 @@
+for(i=[0:5]) {
+ translate([i*i/2,0,0]) {
+ cube(i);
+ translate([0,-5,0]) assign(f=1.0*i/2) cube(f);
+ }
+}
diff --git a/testdata/scad/features/background-modifier.scad b/testdata/scad/features/background-modifier.scad
new file mode 100644
index 0000000..ec7b28d
--- /dev/null
+++ b/testdata/scad/features/background-modifier.scad
@@ -0,0 +1,4 @@
+difference() {
+ sphere(r=10);
+ %cylinder(h=30, r=6, center=true);
+}
diff --git a/testdata/scad/features/circle-tests.scad b/testdata/scad/features/circle-tests.scad
new file mode 100644
index 0000000..6b54d55
--- /dev/null
+++ b/testdata/scad/features/circle-tests.scad
@@ -0,0 +1,10 @@
+circle();
+translate([0,3,0]) circle(1);
+translate([5,1,0]) circle(r=3);
+translate([0,-1,0]) circle(r=0);
+translate([0,-3,0]) circle(1, $fn=4);
+translate([3,-3,0]) circle(1, $fn=8);
+translate([6,-3,0]) circle(1, $fn=12);
+translate([0,-6,0]) circle(1, $fa=20, $fs=0.3);
+translate([3,-6,0]) circle(1, $fa=30, $fs=0.3);
+translate([6,-6,0]) circle(1, $fa=40, $fs=0.3);
diff --git a/testdata/scad/features/color-tests.scad b/testdata/scad/features/color-tests.scad
new file mode 100644
index 0000000..3ef2540
--- /dev/null
+++ b/testdata/scad/features/color-tests.scad
@@ -0,0 +1,15 @@
+// Empty
+color();
+// No children
+color() { }
+
+module object() cube([10,10,10]);
+
+translate([12,12,0]) object();
+color([1,0,0]) translate([24,12,0]) object();
+translate([0,12,0]) color("Purple") object();
+color([0,0,1,0.5]) object();
+translate([12,0,0]) color([0,0,1],0.5) object();
+translate([24,0,0]) color(c="Green",alpha=0.2) object();
+translate([-12,12,0]) color() object();
+translate([-12,0,0]) color(alpha=0.5) object();
diff --git a/testdata/scad/features/cube-tests.scad b/testdata/scad/features/cube-tests.scad
new file mode 100644
index 0000000..ae2ead1
--- /dev/null
+++ b/testdata/scad/features/cube-tests.scad
@@ -0,0 +1,4 @@
+cube();
+cube([1,1,0]); cube([1,0,1]); cube([0,1,1]); cube([0,0,0]);
+translate([2,0,0]) cube([2,3,1]);
+translate([6,0,0]) cube([2,4,2], center=true);
diff --git a/testdata/scad/features/cylinder-tests.scad b/testdata/scad/features/cylinder-tests.scad
new file mode 100644
index 0000000..54e88cd
--- /dev/null
+++ b/testdata/scad/features/cylinder-tests.scad
@@ -0,0 +1,15 @@
+cylinder();
+translate([1,0,0]) cylinder(r=0);
+translate([2,0,0]) cylinder(r1=0, r2=0);
+translate([0,-11,0]) cylinder(r=5);
+translate([0,11,0]) cylinder(r=5, h=10, center=true);
+
+translate([11,-11,0]) cylinder(h=5, r1=5);
+translate([11,0,0]) cylinder(h=5, r1=5, r2=0);
+translate([11,11,0]) cylinder(h=8, r1=5, r2=5);
+
+translate([22,-11,0]) cylinder(h=5, r=5, r1=0, center=true);
+translate([22,0,0]) cylinder(h=5, r=5, r2=0);
+translate([22,11,0]) cylinder(h=15, r=5, r2=5);
+
+// FIXME: We could test $fs, $fa, $fn as well
diff --git a/testdata/scad/features/difference-tests.scad b/testdata/scad/features/difference-tests.scad
new file mode 100644
index 0000000..4d82676
--- /dev/null
+++ b/testdata/scad/features/difference-tests.scad
@@ -0,0 +1,30 @@
+// Empty
+difference();
+// No children
+difference() { }
+
+difference() {
+ cube([10,10,10], center=true);
+ cylinder(r=4, h=20, center=true);
+}
+
+translate([12,0,0]) difference() {
+ cube([10,10,10], center=true);
+ cylinder(r=4, h=10, center=true);
+}
+
+translate([0,12,0]) difference() {
+ cube([10,10,10], center=true);
+ cylinder(r=4, h=11, center=true);
+ rotate([0,90,0]) cylinder(r=4, h=11, center=true);
+}
+
+translate([12,12,0]) difference() {
+ cube([10,10,10], center=true);
+ translate([0,0,7]) cylinder(r=4, h=4, center=true);
+}
+
+translate([24,0,0]) difference() {
+ cube([10,10,10], center=true);
+ translate([0,0,6.99]) cylinder(r=4, h=4, center=true);
+}
diff --git a/testdata/scad/dim-all.dxf b/testdata/scad/features/dim-all.dxf
index 6ae7610..6ae7610 100644
--- a/testdata/scad/dim-all.dxf
+++ b/testdata/scad/features/dim-all.dxf
diff --git a/testdata/scad/dim-all.scad b/testdata/scad/features/dim-all.scad
index 454ed11..454ed11 100644
--- a/testdata/scad/dim-all.scad
+++ b/testdata/scad/features/dim-all.scad
diff --git a/testdata/scad/features/disable-modifier.scad b/testdata/scad/features/disable-modifier.scad
new file mode 100644
index 0000000..b47e074
--- /dev/null
+++ b/testdata/scad/features/disable-modifier.scad
@@ -0,0 +1,4 @@
+difference() {
+ *sphere(r=10);
+ cylinder(h=30, r=6, center=true);
+}
diff --git a/testdata/scad/features/dxf-export.scad b/testdata/scad/features/dxf-export.scad
new file mode 100644
index 0000000..7f4b8cb
--- /dev/null
+++ b/testdata/scad/features/dxf-export.scad
@@ -0,0 +1,12 @@
+circle(r=5);
+
+translate([15,0,0]) square(size=[10,10], center=true);
+
+translate([30,0,0]) polygon(points=[[-5,-5],[5,-5],[0,5]], paths=[[0,1,2]]);
+
+translate([0,-15,0]) {
+ difference() {
+ circle(r=5);
+ translate([0,-6,0]) square([12,12], center=true);
+ }
+} \ No newline at end of file
diff --git a/testdata/scad/features/for-nested-tests.scad b/testdata/scad/features/for-nested-tests.scad
new file mode 100644
index 0000000..e3b5877
--- /dev/null
+++ b/testdata/scad/features/for-nested-tests.scad
@@ -0,0 +1,3 @@
+for(x=[0:3], y=[0:0.5:1], z=[0,2,3]) {
+ translate(10*[x,y,z]) sphere(r=3);
+}
diff --git a/testdata/scad/features/for-tests.scad b/testdata/scad/features/for-tests.scad
new file mode 100644
index 0000000..fe36789
--- /dev/null
+++ b/testdata/scad/features/for-tests.scad
@@ -0,0 +1,41 @@
+// Empty
+for();
+// No children
+for(i=2) { }
+
+// Null
+translate([-10,0,0]) for() cylinder(r=4);
+
+// Scalar
+translate([10,0,0]) for(i=3) cylinder(r=i);
+
+// Range
+for(r=[1:5]) translate([r*10-30,10,0]) cylinder(r=r);
+
+// Reverse
+for(r=[5:1]) translate([r*10-30,20,0]) cylinder(r=r);
+
+// Step
+for(r=[1:2:6]) translate([r*10-30,30,0]) difference() {cylinder(r=r, center=true); cylinder(r=r/2, h=2, center=true);}
+
+// Fractional step
+for(r=[1.5:0.2:2.5]) translate([r*10-30,30,0]) cube([1, 4*r, 2], center=true);
+
+// Negative range, negative step
+for(r=[5:-1:1]) translate([r*10-60,40,0]) cylinder(r=r);
+
+// Negative range, positive step
+for(r=[5:1:1]) translate([r*10-30,40,0]) cylinder(r=r);
+
+// Zero step
+
+for(r=[1:0:5]) translate([r*10+60,40,0]) cylinder(r=r);
+
+// Negative step
+for(r=[1:-1:5]) translate([r*10-30,50,0]) cylinder(r=r);
+
+// Illegal step value
+for(r=[1:true:5]) translate([r*10-60,50,0]) cylinder(r=r);
+
+// Vector
+for(r=[1,2,5]) translate([r*10-30,0,0]) cylinder(r=r);
diff --git a/testdata/scad/features/highlight-modifier.scad b/testdata/scad/features/highlight-modifier.scad
new file mode 100644
index 0000000..1156a88
--- /dev/null
+++ b/testdata/scad/features/highlight-modifier.scad
@@ -0,0 +1,4 @@
+difference() {
+ sphere(r=10);
+ #cylinder(h=30, r=6, center=true);
+}
diff --git a/testdata/scad/features/hull2-tests.scad b/testdata/scad/features/hull2-tests.scad
new file mode 100644
index 0000000..3bea3c5
--- /dev/null
+++ b/testdata/scad/features/hull2-tests.scad
@@ -0,0 +1,30 @@
+module convex2dSimple() {
+ hull() {
+ translate([15,10]) circle(10);
+ circle(10);
+ }
+}
+
+module concave2dSimple() {
+ hull() {
+ translate([15,10]) square(2);
+ translate([15,0]) square(2);
+ square(2);
+ }
+}
+
+// Works correctly
+module convex2dHole() {
+ hull() {
+ translate([15,10,0]) circle(10);
+ difference() {
+ circle(10);
+ circle(5);
+ }
+ }
+}
+
+
+convex2dHole();
+translate([40,0,0]) convex2dSimple();
+translate([0,-20,0]) concave2dSimple();
diff --git a/testdata/scad/convex_hull.scad b/testdata/scad/features/hull3-tests.scad
index 3114ac5..2bd7d73 100644
--- a/testdata/scad/convex_hull.scad
+++ b/testdata/scad/features/hull3-tests.scad
@@ -1,22 +1,3 @@
-// Works correctly
-module convex2dSimple() {
- hull() {
- translate([15,10]) circle(10);
- circle(10);
- }
-}
-
-// Works correctly
-module convex2dHole() {
- hull() {
- translate([15,10,0]) circle(10);
- difference() {
- circle(10);
- circle(5);
- }
- }
-}
-
// 3d not currently implemented
module convex3dSimple() {
hull() {
@@ -36,8 +17,11 @@ module convex3dHole() {
}
}
-
-convex2dHole();
-translate([40,0,0]) convex2dSimple();
translate([0,40,0]) convex3dHole();
translate([40,40,0]) convex3dSimple();
+
+// Empty
+hull();
+// No children
+hull() { }
+
diff --git a/testdata/scad/import.stl b/testdata/scad/features/import.stl
index c8dc5db..c8dc5db 100644
--- a/testdata/scad/import.stl
+++ b/testdata/scad/features/import.stl
diff --git a/testdata/scad/features/import_dxf-tests.scad b/testdata/scad/features/import_dxf-tests.scad
new file mode 100644
index 0000000..814a46c
--- /dev/null
+++ b/testdata/scad/features/import_dxf-tests.scad
@@ -0,0 +1,9 @@
+import_dxf();
+translate([-210,0,0]) import_dxf(file="../../dxf/polygons.dxf");
+translate([-210,0,0]) import_dxf(file="../../dxf/polygons.dxf", origin=[0,110]);
+translate([-210,0,0]) import_dxf(file="../../dxf/polygons.dxf", origin=[110,110], scale=0.5);
+import_dxf(file="../../dxf/multiple-layers.dxf");
+translate([-200,200,0]) import_dxf(file="../../dxf/multiple-layers.dxf", layer="0");
+translate([0,200,0]) import_dxf(file="../../dxf/multiple-layers.dxf", layer="0");
+translate([200,200,0]) import_dxf(file="../../dxf/multiple-layers.dxf", layer="noname");
+translate([0,200,0]) import_dxf(file="../../dxf/multiple-layers.dxf", layer="Layer with a pretty long name including \\ \"special\" /'\\\\ characters");
diff --git a/testdata/scad/import_stl-tests.scad b/testdata/scad/features/import_stl-tests.scad
index b634d12..b634d12 100644
--- a/testdata/scad/import_stl-tests.scad
+++ b/testdata/scad/features/import_stl-tests.scad
diff --git a/testdata/scad/features/include test6.scad b/testdata/scad/features/include test6.scad
new file mode 100644
index 0000000..0d96b26
--- /dev/null
+++ b/testdata/scad/features/include test6.scad
@@ -0,0 +1,7 @@
+module test6()
+{
+ difference() {
+ cube(center=true);
+ cylinder(r=0.4, h=2, center=true);
+ }
+}
diff --git a/testdata/scad/features/include-test5.scad b/testdata/scad/features/include-test5.scad
new file mode 100644
index 0000000..e4393cb
--- /dev/null
+++ b/testdata/scad/features/include-test5.scad
@@ -0,0 +1,4 @@
+module test5()
+{
+ sphere(r=0.5, $fn=8);
+}
diff --git a/testdata/scad/include-test.scad b/testdata/scad/features/include-tests.scad
index 5db02d7..36c04ca 100644
--- a/testdata/scad/include-test.scad
+++ b/testdata/scad/features/include-tests.scad
@@ -28,13 +28,13 @@ include <>
module test1()
{
test2();
- test3();
- test4();
- test5();
- test6();
+ translate([2,0,0]) test3();
+ translate([2,-2,0]) test4();
+ translate([-2,0,0]) test5();
+ translate([-2,-2,0]) test6();
//Just to give a top level object
- sphere(1);
+ translate([0,-2,0]) sphere(0.7, $fn=16);
}
test1();
diff --git a/testdata/scad/features/intersection-tests.scad b/testdata/scad/features/intersection-tests.scad
new file mode 100644
index 0000000..e53f3c9
--- /dev/null
+++ b/testdata/scad/features/intersection-tests.scad
@@ -0,0 +1,41 @@
+// Empty
+intersection();
+
+// No children
+intersection() { }
+
+intersection() {
+ sphere(r=5);
+ translate([0,0,3]) cube([4,4,6], center=true);
+}
+
+translate([0,12,0]) intersection() {
+ cube([10,10,10], center=true);
+ cylinder(r=4, h=12, center=true);
+}
+
+translate([12,0,0]) intersection() {
+ cube([10,10,10], center=true);
+ cylinder(r=4, h=12, center=true);
+ rotate([0,90,0]) cylinder(r=4, h=12, center=true);
+}
+
+translate([12,12,0]) intersection() {
+ cube([10,10,10], center=true);
+ translate([0,0,7]) cylinder(r=4, h=4, center=true);
+}
+
+translate([24,0,0]) intersection() {
+ cube([10,10,10], center=true);
+ translate([0,0,6.99]) cylinder(r=4, h=4, center=true);
+}
+
+translate([-12,0,0]) intersection() {
+ cube([10,10,10], center=true);
+ translate([0,-10,-10]) cube([10,10,10], center=true);
+}
+
+translate([-12,12,0]) intersection() {
+ cube([10,10,10], center=true);
+ translate([0,-9.99,-9.99]) cube([10,10,10], center=true);
+}
diff --git a/testdata/scad/features/intersection_for-tests.scad b/testdata/scad/features/intersection_for-tests.scad
new file mode 100644
index 0000000..6ab1a89
--- /dev/null
+++ b/testdata/scad/features/intersection_for-tests.scad
@@ -0,0 +1,10 @@
+// Empty
+intersection_for();
+// No children
+intersection_for(i=1) { }
+
+intersection_for(i = [[0, 0, 0],
+ [10, 20, 300],
+ [200, 40, 57],
+ [20, 88, 57]])
+ rotate(i) cube([100, 20, 20], center = true);
diff --git a/testdata/scad/features/linear_extrude-tests.scad b/testdata/scad/features/linear_extrude-tests.scad
new file mode 100644
index 0000000..67de8e6
--- /dev/null
+++ b/testdata/scad/features/linear_extrude-tests.scad
@@ -0,0 +1,13 @@
+// Empty
+rotate_extrude();
+// No children
+rotate_extrude() { }
+// 3D child
+rotate_extrude() { cube(); }
+
+linear_extrude(height=10) square([10,10]);
+translate([19,5,0]) linear_extrude(height=10, center=true) difference() {circle(5); circle(3);}
+translate([31.5,2.5,0]) linear_extrude(height=10, twist=-45) polygon(points = [[-5,-2.5], [5,-2.5], [0,2.5]]);
+
+translate([0,20,0]) linear_extrude(height=20, twist=45, slices=2) square([10,10]);
+translate([19,20,0]) linear_extrude(height=20, twist=45, slices=10) square([10,10]);
diff --git a/testdata/scad/features/minkowski2-tests.scad b/testdata/scad/features/minkowski2-tests.scad
new file mode 100644
index 0000000..08f3d98
--- /dev/null
+++ b/testdata/scad/features/minkowski2-tests.scad
@@ -0,0 +1,31 @@
+module roundedBox2dSimple() {
+ minkowski() {
+ square([10,10]);
+ circle(r=5);
+ }
+}
+
+module roundedBox2dCut() {
+ minkowski() {
+ difference() {
+ square([10,10]);
+ square([5,5]);
+ }
+ circle(r=5);
+ }
+}
+
+// Not quite correct, result does not contain a hole, since the impl currently returns the outer boundary of the polygon_with_holes.
+module roundedBox2dHole() {
+ minkowski() {
+ difference() {
+ square([10,10], center=true);
+ square([8,8], center=true);
+ }
+ circle(r=2);
+ }
+}
+
+translate([-20,5,0]) roundedBox2dHole();
+translate([0,0,0]) roundedBox2dCut();
+translate([25,0,0]) roundedBox2dSimple();
diff --git a/testdata/scad/features/minkowski3-tests.scad b/testdata/scad/features/minkowski3-tests.scad
new file mode 100644
index 0000000..0451b57
--- /dev/null
+++ b/testdata/scad/features/minkowski3-tests.scad
@@ -0,0 +1,35 @@
+module roundedBox3dSimple() {
+ minkowski() {
+ cube([10,10,5]);
+ cylinder(r=5, h=5);
+ }
+}
+
+module roundedBox3dCut() {
+ minkowski() {
+ difference() {
+ cube([10,10,5]);
+ cube([5,5,5]);
+ }
+ cylinder(r=5, h=5);
+ }
+}
+
+module roundedBox3dHole() {
+ minkowski() {
+ difference() {
+ cube([10,10,5], center=true);
+ cube([8,8,10], center=true);
+ }
+ cylinder(r=2);
+ }
+}
+
+translate([-20,30,0]) roundedBox3dHole();
+translate([0,25,0]) roundedBox3dCut();
+translate([25,25,0]) roundedBox3dSimple();
+
+// Empty
+minkowski();
+// No children
+minkowski() { }
diff --git a/testdata/scad/null-polygons.dxf b/testdata/scad/features/null-polygons.dxf
index 390e42e..390e42e 100644
--- a/testdata/scad/null-polygons.dxf
+++ b/testdata/scad/features/null-polygons.dxf
diff --git a/testdata/scad/features/null-polygons.scad b/testdata/scad/features/null-polygons.scad
new file mode 100644
index 0000000..4849c15
--- /dev/null
+++ b/testdata/scad/features/null-polygons.scad
@@ -0,0 +1,2 @@
+linear_extrude() import_dxf("null-polygons.dxf");
+linear_extrude("null-polygons.dxf");
diff --git a/testdata/scad/features/polygon-tests.scad b/testdata/scad/features/polygon-tests.scad
new file mode 100644
index 0000000..ab3a345
--- /dev/null
+++ b/testdata/scad/features/polygon-tests.scad
@@ -0,0 +1,17 @@
+polygon();
+polygon([]);
+polygon([[],[]]);
+polygon([[[]]]);
+translate([2,0,0]) polygon([[0,0], [1,0], [1,1]]);
+translate([0,2,0]) polygon([[0,0]]);
+translate([2,2,0]) polygon([[0,0],[1,1]]);
+translate([2,2,0]) polygon([[0,0],[1,1],[2,2]]);
+translate([0,-2,0]) polygon(points=[[0,0], [1,0], [1,1], [0,1]]);
+translate([0,-4,0]) polygon(points=[[0,0], [1,0], [1,1], [0,1]], paths=[]);
+translate([2,-2,0]) polygon([[0,0], [1,0], [0.8,0.5], [1,1], [0,1]]);
+
+points = [[0,0], [0.5,-0.2], [1,0], [1.2,0.5], [1,1], [0.5,1.2], [0,1], [-0.2,0.5]];
+translate([-2,0,0]) polygon(points);
+translate([-2,-2,0]) polygon(points=points, paths=[[0,1,2,3], [4,5,6,7]]);
+
+// FIXME: convexity
diff --git a/testdata/scad/projection-tests.scad b/testdata/scad/features/projection-tests.scad
index 619aa01..e1b05c7 100644
--- a/testdata/scad/projection-tests.scad
+++ b/testdata/scad/features/projection-tests.scad
@@ -1,3 +1,10 @@
+// Empty
+projection();
+// No children
+projection() { }
+// 2D child
+projection(cut=true) { square(); }
+
linear_extrude(height=20) projection(cut=false) sphere(r=10);
translate([22,0,0]) linear_extrude(height=20) projection(cut=true) translate([0,0,9]) sphere(r=10);
translate([44,0,0]) linear_extrude(height=20) projection(cut=true) translate([0,0,7]) sphere(r=10);
diff --git a/testdata/scad/features/render-tests.scad b/testdata/scad/features/render-tests.scad
new file mode 100644
index 0000000..5fcb026
--- /dev/null
+++ b/testdata/scad/features/render-tests.scad
@@ -0,0 +1,36 @@
+module edgeprofile()
+{
+ difference() {
+ cube([20, 20, 150], center = true);
+ translate([-10, -10, 0]) cylinder(h = 80, r = 10, center = true);
+ }
+}
+
+module rendered_edgeprofile()
+{
+ render(convexity = 2) edgeprofile();
+}
+
+module mycube() {
+ difference() {
+ cube(100, center = true);
+ translate([ -50, -50, 0 ]) rotate(180, [0, 0, 1]) edgeprofile();
+ translate([ 50, -50, 0 ]) rotate(270, [0, 0, 1]) edgeprofile();
+ }
+}
+
+module rendered_mycube() {
+ difference() {
+ cube(100, center = true);
+ translate([ -50, -50, 0 ]) rotate(180, [0, 0, 1]) rendered_edgeprofile();
+ translate([ 50, -50, 0 ]) rotate(270, [0, 0, 1]) rendered_edgeprofile();
+ }
+}
+
+// Empty
+render();
+// No children
+render() { }
+
+mycube();
+translate([110,0,0]) rendered_mycube();
diff --git a/testdata/scad/features/root-modifier.scad b/testdata/scad/features/root-modifier.scad
new file mode 100644
index 0000000..6c36433
--- /dev/null
+++ b/testdata/scad/features/root-modifier.scad
@@ -0,0 +1,4 @@
+difference() {
+ sphere(r=10);
+ !cylinder(h=30, r=6, center=true);
+}
diff --git a/testdata/scad/features/rotate_extrude-tests.scad b/testdata/scad/features/rotate_extrude-tests.scad
new file mode 100644
index 0000000..347bc78
--- /dev/null
+++ b/testdata/scad/features/rotate_extrude-tests.scad
@@ -0,0 +1,30 @@
+// Empty
+rotate_extrude();
+// No children
+rotate_extrude() { }
+// 3D child
+rotate_extrude() { cube(); }
+
+// Normal
+rotate_extrude() translate([20,0,0]) circle(r=10);
+
+// Sweep of polygon with hole
+translate([50,-20,0]) {
+ difference() {
+ rotate_extrude() translate([20,0,0]) difference() {
+ circle(r=10); circle(r=8);
+ }
+ translate([-50,0,0]) cube([100,100,100], center=true);
+ }
+}
+
+// Alternative, difference between two solid sweeps
+translate([50,50,0]) {
+ difference() {
+ difference() {
+ rotate_extrude() translate([20,0,0]) circle(r=10);
+ rotate_extrude() translate([20,0,0]) circle(r=8);
+ }
+ translate([-50,0,0]) cube([100,100,100], center=true);
+ }
+}
diff --git a/testdata/scad/features/sphere-tests.scad b/testdata/scad/features/sphere-tests.scad
new file mode 100644
index 0000000..e666c1b
--- /dev/null
+++ b/testdata/scad/features/sphere-tests.scad
@@ -0,0 +1,10 @@
+sphere();
+translate([2,0,0]) sphere(r=0);
+translate([0,11,0]) sphere(5);
+translate([0,-11,0]) sphere(r=5);
+translate([11,-11,0]) sphere(5, $fn=5);
+translate([11,0,0]) sphere(5, $fn=10);
+translate([11,11,0]) sphere(5, $fn=15);
+translate([22,-11, 0]) sphere(5, $fa=20, $fs=0.3);
+translate([22, 0, 0]) sphere(5, $fa=30, $fs=0.3);
+translate([22, 11, 0]) sphere(5, $fa=40, $fs=0.3);
diff --git a/testdata/scad/features/square-tests.scad b/testdata/scad/features/square-tests.scad
new file mode 100644
index 0000000..57ec1c4
--- /dev/null
+++ b/testdata/scad/features/square-tests.scad
@@ -0,0 +1,8 @@
+square();
+translate([2,0,0]) square([1,1], true);
+translate([4,0,0]) square(size=[1,1], center=true);
+translate([6,0,0]) square([0,0], true);
+translate([0,2,0]) square([1,0], true);
+translate([2,2,0]) square([0,1], true);
+translate([4,2,0]) square([1,2], true);
+translate([6,2,0]) square([2,1], true);
diff --git a/testdata/scad/string-test.scad b/testdata/scad/features/string-test.scad
index 5ec4cfb..5ec4cfb 100644
--- a/testdata/scad/string-test.scad
+++ b/testdata/scad/features/string-test.scad
diff --git a/testdata/scad/features/sub1/sub2/sub3/include-test4.scad b/testdata/scad/features/sub1/sub2/sub3/include-test4.scad
new file mode 100644
index 0000000..c13368c
--- /dev/null
+++ b/testdata/scad/features/sub1/sub2/sub3/include-test4.scad
@@ -0,0 +1,4 @@
+module test4()
+{
+ cylinder(r=0.5, $fn=10, center=true);
+}
diff --git a/testdata/scad/sub1/sub2/sub3/sub4/include-test2.scad b/testdata/scad/features/sub1/sub2/sub3/sub4/include-test2.scad
index 9f4c963..140c4ed 100644
--- a/testdata/scad/sub1/sub2/sub3/sub4/include-test2.scad
+++ b/testdata/scad/features/sub1/sub2/sub3/sub4/include-test2.scad
@@ -6,5 +6,5 @@ include <../include-test4.scad>
module test2 ()
{
- echo("included from include-test2.scad");
+ cube(center=true);
}
diff --git a/testdata/scad/features/sub1/sub2/sub3/sub4/include-test3.scad b/testdata/scad/features/sub1/sub2/sub3/sub4/include-test3.scad
new file mode 100644
index 0000000..6e3537e
--- /dev/null
+++ b/testdata/scad/features/sub1/sub2/sub3/sub4/include-test3.scad
@@ -0,0 +1,4 @@
+module test3()
+{
+ cylinder(r1=0.7, r2=0.2, center=true);
+}
diff --git a/testdata/scad/features/surface-tests.scad b/testdata/scad/features/surface-tests.scad
new file mode 100644
index 0000000..5a67293
--- /dev/null
+++ b/testdata/scad/features/surface-tests.scad
@@ -0,0 +1,2 @@
+surface();
+surface("surface.dat", center=true);
diff --git a/testdata/scad/surface.dat b/testdata/scad/features/surface.dat
index 21d10af..21d10af 100644
--- a/testdata/scad/surface.dat
+++ b/testdata/scad/features/surface.dat
diff --git a/testdata/scad/testcolornames.scad b/testdata/scad/features/testcolornames.scad
index b9ad334..b9ad334 100644
--- a/testdata/scad/testcolornames.scad
+++ b/testdata/scad/features/testcolornames.scad
diff --git a/testdata/scad/features/transform-tests.scad b/testdata/scad/features/transform-tests.scad
new file mode 100644
index 0000000..a591695
--- /dev/null
+++ b/testdata/scad/features/transform-tests.scad
@@ -0,0 +1,18 @@
+module mycyl() {
+ cylinder(r1=10, r2=0, h=20);
+}
+
+translate([25,0,0]) scale([1,2,0.5]) mycyl();
+translate([20,-30,0]) scale(0.5) mycyl();
+translate([0,-20,0]) rotate([90,0,0]) mycyl();
+rotate(v=[-1,0,0], a=45) mycyl();
+multmatrix([[1,0,0,-25],
+ [0,1,0,0],
+ [0,0,1,0],
+ [0,0,0,1]]) mycyl();
+multmatrix([[1,0.4,0.1,-25],
+ [0.4,0.8,0,-25],
+ [0.2,0.2,0.5,0],
+ [0,0,0,1]]) mycyl();
+
+//FIXME: mirror() \ No newline at end of file
diff --git a/testdata/scad/features/union-tests.scad b/testdata/scad/features/union-tests.scad
new file mode 100644
index 0000000..718aa8c
--- /dev/null
+++ b/testdata/scad/features/union-tests.scad
@@ -0,0 +1,29 @@
+translate([-12,0,0]) union() {
+ cube([10,10,10]);
+ translate([4,4,8]) cube([2,2,10]);
+}
+
+union() {
+ cube([10,10,10]);
+ translate([0,0,10]) cube([2,2,10]);
+}
+
+translate([12,0,0]) union() {
+ cube([10,10,10]);
+ translate([0,0,11]) cube([2,2,10]);
+}
+
+translate([24,0,0]) union() {
+ cube([10,10,10]);
+ translate([4,4,10]) cube([2,2,10]);
+}
+
+translate([-12,12,0]) union() {
+ cube([10,10,10]);
+ translate([-2,10,10]) cube([2,2,10]);
+}
+
+translate([0,12,0]) union() {
+ cube([10,10,10]);
+ translate([0,10,10]) cube([2,2,10]);
+}
diff --git a/testdata/scad/include test6.scad b/testdata/scad/include test6.scad
deleted file mode 100644
index 7a79456..0000000
--- a/testdata/scad/include test6.scad
+++ /dev/null
@@ -1,4 +0,0 @@
-module test6()
-{
- echo("included from include test6.scad");
-}
diff --git a/testdata/scad/include-test5.scad b/testdata/scad/include-test5.scad
deleted file mode 100644
index 4f6e656..0000000
--- a/testdata/scad/include-test5.scad
+++ /dev/null
@@ -1,4 +0,0 @@
-module test5()
-{
- echo("included from include-test5.scad");
-}
diff --git a/testdata/scad/intersection-tests.scad b/testdata/scad/intersection-tests.scad
deleted file mode 100644
index 4101b03..0000000
--- a/testdata/scad/intersection-tests.scad
+++ /dev/null
@@ -1,4 +0,0 @@
-intersection() {
- sphere(3);
- cube([3,3,8], center=true);
-}
diff --git a/testdata/scad/linear_extrude-tests.scad b/testdata/scad/linear_extrude-tests.scad
deleted file mode 100644
index af050fb..0000000
--- a/testdata/scad/linear_extrude-tests.scad
+++ /dev/null
@@ -1,7 +0,0 @@
-linear_extrude(height=10) square([10,10]);
-translate([19,5,0]) linear_extrude(height=10) circle(5);
-translate([31.5,2.5,0]) linear_extrude(height=10) polygon(points = [[-5,-2.5], [5,-2.5], [0,2.5]]);
-
-translate([0,-12,0]) linear_extrude(height=20, twist=45) square([10,10]);
-translate([19,-7,0]) linear_extrude(height=20, twist=90) circle(5);
-translate([31.5,-9.5,0]) linear_extrude(height=20, twist=180) polygon(points = [[-5,-2.5], [5,-2.5], [0,2.5]]);
diff --git a/testdata/scad/minimal/allfunctions.scad b/testdata/scad/minimal/allfunctions.scad
new file mode 100644
index 0000000..e58bd07
--- /dev/null
+++ b/testdata/scad/minimal/allfunctions.scad
@@ -0,0 +1,24 @@
+a = abs();
+a = sign();
+a = rands();
+a = min();
+a = max();
+a = sin();
+a = cos();
+a = asin();
+a = acos();
+a = tan();
+a = atan();
+a = atan2();
+a = round();
+a = ceil();
+a = floor();
+a = pow();
+a = sqrt();
+a = exp();
+a = log();
+a = ln();
+a = str();
+a = lookup();
+a = dxf_dim();
+a = dxf_cross();
diff --git a/testdata/scad/allmodules.scad b/testdata/scad/minimal/allmodules.scad
index 9d6635c..4395fd7 100644
--- a/testdata/scad/allmodules.scad
+++ b/testdata/scad/minimal/allmodules.scad
@@ -1,6 +1,7 @@
minkowski();
glide();
subdiv();
+hull();
child();
echo();
assign();
@@ -14,6 +15,7 @@ dxf_linear_extrude();
linear_extrude();
dxf_rotate_extrude();
rotate_extrude();
+import();
import_stl();
import_off();
import_dxf();
diff --git a/testdata/scad/assign.scad b/testdata/scad/minimal/assign.scad
index e4dba58..e4dba58 100644
--- a/testdata/scad/assign.scad
+++ b/testdata/scad/minimal/assign.scad
diff --git a/testdata/scad/child.scad b/testdata/scad/minimal/child.scad
index ba69caf..ba69caf 100644
--- a/testdata/scad/child.scad
+++ b/testdata/scad/minimal/child.scad
diff --git a/testdata/scad/circle.scad b/testdata/scad/minimal/circle.scad
index c702f98..c702f98 100644
--- a/testdata/scad/circle.scad
+++ b/testdata/scad/minimal/circle.scad
diff --git a/testdata/scad/color.scad b/testdata/scad/minimal/color.scad
index b0ae89c..b0ae89c 100644
--- a/testdata/scad/color.scad
+++ b/testdata/scad/minimal/color.scad
diff --git a/testdata/scad/cube.scad b/testdata/scad/minimal/cube.scad
index 406bf16..406bf16 100644
--- a/testdata/scad/cube.scad
+++ b/testdata/scad/minimal/cube.scad
diff --git a/testdata/scad/cylinder.scad b/testdata/scad/minimal/cylinder.scad
index 91c2c30..91c2c30 100644
--- a/testdata/scad/cylinder.scad
+++ b/testdata/scad/minimal/cylinder.scad
diff --git a/testdata/scad/difference.scad b/testdata/scad/minimal/difference.scad
index c3fd0fe..c3fd0fe 100644
--- a/testdata/scad/difference.scad
+++ b/testdata/scad/minimal/difference.scad
diff --git a/testdata/scad/dxf_linear_extrude.scad b/testdata/scad/minimal/dxf_linear_extrude.scad
index 06d6f33..06d6f33 100644
--- a/testdata/scad/dxf_linear_extrude.scad
+++ b/testdata/scad/minimal/dxf_linear_extrude.scad
diff --git a/testdata/scad/dxf_rotate_extrude.scad b/testdata/scad/minimal/dxf_rotate_extrude.scad
index dee7f49..dee7f49 100644
--- a/testdata/scad/dxf_rotate_extrude.scad
+++ b/testdata/scad/minimal/dxf_rotate_extrude.scad
diff --git a/testdata/scad/echo.scad b/testdata/scad/minimal/echo.scad
index 34fc70f..34fc70f 100644
--- a/testdata/scad/echo.scad
+++ b/testdata/scad/minimal/echo.scad
diff --git a/testdata/scad/for.scad b/testdata/scad/minimal/for.scad
index 62356c0..62356c0 100644
--- a/testdata/scad/for.scad
+++ b/testdata/scad/minimal/for.scad
diff --git a/testdata/scad/glide.scad b/testdata/scad/minimal/glide.scad
index 9a5f69d..9a5f69d 100644
--- a/testdata/scad/glide.scad
+++ b/testdata/scad/minimal/glide.scad
diff --git a/testdata/scad/group.scad b/testdata/scad/minimal/group.scad
index 0a04719..0a04719 100644
--- a/testdata/scad/group.scad
+++ b/testdata/scad/minimal/group.scad
diff --git a/testdata/scad/minimal/hull.scad b/testdata/scad/minimal/hull.scad
new file mode 100644
index 0000000..096b0b0
--- /dev/null
+++ b/testdata/scad/minimal/hull.scad
@@ -0,0 +1 @@
+hull();
diff --git a/testdata/scad/if.scad b/testdata/scad/minimal/if.scad
index 9e5c706..9e5c706 100644
--- a/testdata/scad/if.scad
+++ b/testdata/scad/minimal/if.scad
diff --git a/testdata/scad/minimal/import.scad b/testdata/scad/minimal/import.scad
new file mode 100644
index 0000000..6f375fe
--- /dev/null
+++ b/testdata/scad/minimal/import.scad
@@ -0,0 +1 @@
+import();
diff --git a/testdata/scad/import_dxf.scad b/testdata/scad/minimal/import_dxf.scad
index b8b8fd0..b8b8fd0 100644
--- a/testdata/scad/import_dxf.scad
+++ b/testdata/scad/minimal/import_dxf.scad
diff --git a/testdata/scad/import_off.scad b/testdata/scad/minimal/import_off.scad
index 353597f..353597f 100644
--- a/testdata/scad/import_off.scad
+++ b/testdata/scad/minimal/import_off.scad
diff --git a/testdata/scad/import_stl.scad b/testdata/scad/minimal/import_stl.scad
index 416ca6a..416ca6a 100644
--- a/testdata/scad/import_stl.scad
+++ b/testdata/scad/minimal/import_stl.scad
diff --git a/testdata/scad/intersection.scad b/testdata/scad/minimal/intersection.scad
index 8340c00..8340c00 100644
--- a/testdata/scad/intersection.scad
+++ b/testdata/scad/minimal/intersection.scad
diff --git a/testdata/scad/intersection_for.scad b/testdata/scad/minimal/intersection_for.scad
index 7b08d61..7b08d61 100644
--- a/testdata/scad/intersection_for.scad
+++ b/testdata/scad/minimal/intersection_for.scad
diff --git a/testdata/scad/linear_extrude.scad b/testdata/scad/minimal/linear_extrude.scad
index a621959..a621959 100644
--- a/testdata/scad/linear_extrude.scad
+++ b/testdata/scad/minimal/linear_extrude.scad
diff --git a/testdata/scad/minimal/minkowski.scad b/testdata/scad/minimal/minkowski.scad
new file mode 100644
index 0000000..26cd972
--- /dev/null
+++ b/testdata/scad/minimal/minkowski.scad
@@ -0,0 +1 @@
+minkowski();
diff --git a/testdata/scad/mirror.scad b/testdata/scad/minimal/mirror.scad
index 8d74882..8d74882 100644
--- a/testdata/scad/mirror.scad
+++ b/testdata/scad/minimal/mirror.scad
diff --git a/testdata/scad/multmatrix.scad b/testdata/scad/minimal/multmatrix.scad
index 7477fa2..7477fa2 100644
--- a/testdata/scad/multmatrix.scad
+++ b/testdata/scad/minimal/multmatrix.scad
diff --git a/testdata/scad/polygon.scad b/testdata/scad/minimal/polygon.scad
index 6a1f288..6a1f288 100644
--- a/testdata/scad/polygon.scad
+++ b/testdata/scad/minimal/polygon.scad
diff --git a/testdata/scad/polyhedron.scad b/testdata/scad/minimal/polyhedron.scad
index 941851f..941851f 100644
--- a/testdata/scad/polyhedron.scad
+++ b/testdata/scad/minimal/polyhedron.scad
diff --git a/testdata/scad/projection.scad b/testdata/scad/minimal/projection.scad
index 43ea0a2..43ea0a2 100644
--- a/testdata/scad/projection.scad
+++ b/testdata/scad/minimal/projection.scad
diff --git a/testdata/scad/render.scad b/testdata/scad/minimal/render.scad
index e035a6f..e035a6f 100644
--- a/testdata/scad/render.scad
+++ b/testdata/scad/minimal/render.scad
diff --git a/testdata/scad/rotate.scad b/testdata/scad/minimal/rotate.scad
index e4acc9c..e4acc9c 100644
--- a/testdata/scad/rotate.scad
+++ b/testdata/scad/minimal/rotate.scad
diff --git a/testdata/scad/rotate_extrude.scad b/testdata/scad/minimal/rotate_extrude.scad
index d11484c..d11484c 100644
--- a/testdata/scad/rotate_extrude.scad
+++ b/testdata/scad/minimal/rotate_extrude.scad
diff --git a/testdata/scad/scale.scad b/testdata/scad/minimal/scale.scad
index 5e9baab..5e9baab 100644
--- a/testdata/scad/scale.scad
+++ b/testdata/scad/minimal/scale.scad
diff --git a/testdata/scad/sphere.scad b/testdata/scad/minimal/sphere.scad
index 8e7ddc1..8e7ddc1 100644
--- a/testdata/scad/sphere.scad
+++ b/testdata/scad/minimal/sphere.scad
diff --git a/testdata/scad/square.scad b/testdata/scad/minimal/square.scad
index 5e44b7d..5e44b7d 100644
--- a/testdata/scad/square.scad
+++ b/testdata/scad/minimal/square.scad
diff --git a/testdata/scad/subdiv.scad b/testdata/scad/minimal/subdiv.scad
index 4c1eb74..4c1eb74 100644
--- a/testdata/scad/subdiv.scad
+++ b/testdata/scad/minimal/subdiv.scad
diff --git a/testdata/scad/surface.scad b/testdata/scad/minimal/surface.scad
index c0b213a..c0b213a 100644
--- a/testdata/scad/surface.scad
+++ b/testdata/scad/minimal/surface.scad
diff --git a/testdata/scad/transform-insert.dxf b/testdata/scad/minimal/transform-insert.dxf
index 40064c2..40064c2 100644
--- a/testdata/scad/transform-insert.dxf
+++ b/testdata/scad/minimal/transform-insert.dxf
diff --git a/testdata/scad/transform-insert.scad b/testdata/scad/minimal/transform-insert.scad
index 1237bb2..1237bb2 100644
--- a/testdata/scad/transform-insert.scad
+++ b/testdata/scad/minimal/transform-insert.scad
diff --git a/testdata/scad/translate.scad b/testdata/scad/minimal/translate.scad
index c7c0b0b..c7c0b0b 100644
--- a/testdata/scad/translate.scad
+++ b/testdata/scad/minimal/translate.scad
diff --git a/testdata/scad/union.scad b/testdata/scad/minimal/union.scad
index e3fa0d5..e3fa0d5 100644
--- a/testdata/scad/union.scad
+++ b/testdata/scad/minimal/union.scad
diff --git a/testdata/scad/minkowski.scad b/testdata/scad/minkowski.scad
deleted file mode 100644
index 6d0dade..0000000
--- a/testdata/scad/minkowski.scad
+++ /dev/null
@@ -1,67 +0,0 @@
-
-// Rounded box using 3d minkowski
-module roundedBox3dSimple() {
- minkowski() {
- cube([10,10,5]);
- cylinder(r=5, h=5);
- }
-}
-
-// Currently segfaults
-module roundedBox3dCut() {
- minkowski() {
- difference() {
- cube([10,10,5]);
- cube([5,5,5]);
- }
- cylinder(r=5, h=5);
- }
-}
-
-// Currently segfaults
-module roundedBox3dHole() {
- minkowski() {
- difference() {
- cube([10,10,5]);
- translate([2,2,-2]) cube([6,6,10]);
- }
- cylinder(r=2);
- }
-}
-
-// Works correctly
-module roundedBox2dSimple() {
- minkowski() {
- square([10,10]);
- circle(r=5);
- }
-}
-
-// Works correctly
-module roundedBox2dCut() {
- minkowski() {
- difference() {
- square([10,10]);
- square([5,5]);
- }
- circle(r=5);
- }
-}
-
-// Not quite correct, result does not contain a hole, since the impl currently returns the outer boundary of the polygon_with_holes.
-module roundedBox2dHole() {
- minkowski() {
- difference() {
- square([10,10]);
- translate([2,2]) square([6,6]);
- }
- circle(r=2);
- }
-}
-
-translate([-25,0,0]) roundedBox2dHole();
-translate([0,0,0]) roundedBox2dCut();
-translate([25,0,0]) roundedBox2dSimple();
-translate([-25,25,0]) roundedBox3dHole();
-translate([0,25,0]) roundedBox3dCut();
-translate([25,25,0]) roundedBox3dSimple();
diff --git a/testdata/scad/null-polygons.scad b/testdata/scad/null-polygons.scad
deleted file mode 100644
index d945325..0000000
--- a/testdata/scad/null-polygons.scad
+++ /dev/null
@@ -1,2 +0,0 @@
-linear_extrude() import_dxf("null-polygons.dxf"); // doen's crash
-linear_extrude("null-polygons.dxf"); // crashes
diff --git a/testdata/scad/rotate_extrude-tests.scad b/testdata/scad/rotate_extrude-tests.scad
deleted file mode 100644
index 7bbcef0..0000000
--- a/testdata/scad/rotate_extrude-tests.scad
+++ /dev/null
@@ -1,2 +0,0 @@
-rotate_extrude() translate([20,0,0]) circle(r=10);
-
diff --git a/testdata/scad/sphere-tests.scad b/testdata/scad/sphere-tests.scad
deleted file mode 100644
index f87aa26..0000000
--- a/testdata/scad/sphere-tests.scad
+++ /dev/null
@@ -1,4 +0,0 @@
-sphere(5);
-translate([0,12,0]) sphere(5, $fa=5, $fs=0.5);
-translate([12,0,0]) sphere(r=6);
-translate([12,12,0]) sphere(r=6, $fn=5);
diff --git a/testdata/scad/sub1/sub2/sub3/include-test4.scad b/testdata/scad/sub1/sub2/sub3/include-test4.scad
deleted file mode 100644
index 1cb7eab..0000000
--- a/testdata/scad/sub1/sub2/sub3/include-test4.scad
+++ /dev/null
@@ -1,4 +0,0 @@
-module test4()
-{
- echo("included from include-test4.scad");
-}
diff --git a/testdata/scad/sub1/sub2/sub3/sub4/include-test3.scad b/testdata/scad/sub1/sub2/sub3/sub4/include-test3.scad
deleted file mode 100644
index 2f67e93..0000000
--- a/testdata/scad/sub1/sub2/sub3/sub4/include-test3.scad
+++ /dev/null
@@ -1,4 +0,0 @@
-module test3()
-{
- echo("included from include-test3.scad");
-}
diff --git a/testdata/scad/surface-tests.scad b/testdata/scad/surface-tests.scad
deleted file mode 100644
index 32072fa..0000000
--- a/testdata/scad/surface-tests.scad
+++ /dev/null
@@ -1 +0,0 @@
-surface("surface.dat");
contact: Jan Huwald // Impressum