summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVG <vg@devys.org>2016-12-09 11:25:11 +0100
committerVG <vg@devys.org>2016-12-09 11:25:11 +0100
commit7baec10b5c7e454276fafee86fdf91409b242715 (patch)
tree05ed33ffda659796778a4815ea7f1116421f7dbd
parent96cd0418f870ea0c2fc9870761dd1f19d7277e67 (diff)
downloadcatcad-7baec10b5c7e454276fafee86fdf91409b242715.tar.gz
catcad-7baec10b5c7e454276fafee86fdf91409b242715.tar.bz2
catcad-7baec10b5c7e454276fafee86fdf91409b242715.zip
organize files in a package
-rw-r--r--cad/__init__.py0
-rw-r--r--cad/assembly.py12
-rw-r--r--cad/parameters.py (renamed from parameters.py)0
-rwxr-xr-xmain.py9
-rwxr-xr-xtest.py11
5 files changed, 21 insertions, 11 deletions
diff --git a/cad/__init__.py b/cad/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/cad/__init__.py
diff --git a/cad/assembly.py b/cad/assembly.py
new file mode 100644
index 0000000..32c8202
--- /dev/null
+++ b/cad/assembly.py
@@ -0,0 +1,12 @@
+#!venv/bin/python3
+
+from solid import *
+from solid.utils import *
+
+def main():
+ d = difference()(
+ cube(10),
+ sphere(15)
+ )
+
+ scad_render_to_file(d, 'test.scad')
diff --git a/parameters.py b/cad/parameters.py
index 705a41a..705a41a 100644
--- a/parameters.py
+++ b/cad/parameters.py
diff --git a/main.py b/main.py
new file mode 100755
index 0000000..3903c79
--- /dev/null
+++ b/main.py
@@ -0,0 +1,9 @@
+#!/usr/bin/python3
+# SPDX-License-Identifier: MIT
+
+
+from cad import assembly
+
+
+if __name__ == '__main__':
+ assembly.main()
diff --git a/test.py b/test.py
deleted file mode 100755
index 7557963..0000000
--- a/test.py
+++ /dev/null
@@ -1,11 +0,0 @@
-#!venv/bin/python3
-
-from solid import *
-from solid.utils import *
-
-d = difference()(
- cube(10),
- sphere(15)
-)
-
-scad_render_to_file(d, 'test.scad')