Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorJoseph Lenox <lordofhyphens@gmail.com>2016-06-03 03:18:29 +0300
committerJoseph Lenox <lordofhyphens@gmail.com>2016-06-03 03:18:29 +0300
commit223065221888e202a762bfeaff125f960896b009 (patch)
tree9e4de4aae060f4d87cc56e33602eef3003f1e0cc /utils
parent2e1a3eaf16de1a66eaaa8297755af129907d5fc8 (diff)
Added simple JSCAD modifier helper
Simple cube oriented around the center with a parametric interface. Just copy/paste into openjscad.org and hit shift+enter.
Diffstat (limited to 'utils')
-rw-r--r--utils/modifier_helpers/layer_generator.jscad19
1 files changed, 19 insertions, 0 deletions
diff --git a/utils/modifier_helpers/layer_generator.jscad b/utils/modifier_helpers/layer_generator.jscad
new file mode 100644
index 000000000..fc193a53f
--- /dev/null
+++ b/utils/modifier_helpers/layer_generator.jscad
@@ -0,0 +1,19 @@
+// title: Layer_generator
+// written by: Joseph Lenox
+// Used for generating cubes oriented about the center
+// for making simple modifier meshes.
+
+var width = 100;
+var layer_height = 0.3;
+var z = 30;
+function main() {
+
+ return cube(size=[width,width,layer_height], center=true).translate([0,0,z]);
+}
+function getParameterDefinitions() {
+ return [
+ { name: 'width', type: 'float', initial: 100, caption: "Width of the cube:" },
+ { name: 'layer_height', type: 'float', initial: 0.3, caption: "Layer height used:" },
+ { name: 'z', type: 'float', initial: 0, caption: "Z:" }
+ ];
+}