openscad-pyoptimizer/data/example.scad
2021-08-16 23:28:31 +01:00

78 lines
1.8 KiB
OpenSCAD

// Random value with no section
Value = 2; // Number
/* [Drop down box:] */
// combo box for number
Numbers=2; // [0, 1, 2, 3]
// combo box for string
Strings="foo"; // [foo, bar, baz]
//labeled combo box for numbers
Labeled_values=10; // [10:L, 20:M, 30:XL]
//labeled combo box for string
Labeled_value="S"; // [S:Small, M:Medium, L:Large]
/*[ Slider ]*/
// slider widget for number
slider =34; // [10:100]
//step slider for number
stepSlider=2; //[0:5:100]
/* [Checkbox] */
//description
Variable = true;
/*[Spinbox] */
// spinbox with step size 1
Spinbox = 5;
/* [Textbox] */
//Text box for vector with more than 4 elements
Vector6=[12,34,44,43,23,23];
// Text box for string
String="hello";
/* [Special vector] */
//Text box for vector with less than or equal to 4 elements
Vector1=[12]; //[0:2:50]
Vector2=[12,34]; //[0:2:50]
Vector3=[12,34,46]; //[0:2:50]
Vector4=[12,34,46,24]; //[0:2:50]
cube([2,3,4]);
echo(version=version());
intersection()
{
linear_extrude(height = 100, center = true, convexity= 3)
import(file = "advance_intersection.dxf");
rotate([0, 90, 0])
linear_extrude(height = 100, center = true, convexity= 3)
import(file = "advance_intersection.dxf");
rotate([90, 0, 0])
linear_extrude(height = 100, center = true, convexity= 3)
import(file = "advance_intersection.dxf");
}
// Written by Clifford Wolf <clifford@clifford.at> and Marius
// Kintel <marius@kintel.net>
//
// To the extent possible under law, the author(s) have dedicated all
// copyright and related and neighboring rights to this software to the
// public domain worldwide. This software is distributed without any
// warranty.
//
// You should have received a copy of the CC0 Public Domain
// Dedication along with this software.
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.