code(object)- object
d3objecttype- Object to view
Returns the openscad code for the given object.
cube1 = d3object.cube({10, 10, 10}, true);
transform.postion(cube1, {10, 10, 10});
print(code(cube1));export("filepath", object);
-- or
export("filepath", "code");
-filepath
stringtype- Specify the path to the export file
- object
d3objecttype- Specify the object to be exported. If object is specified, object will no longer be accepted. -code
stringtype- Specifies the string to be exported. If code is specified, object is no longer accepted.
Exports the specified object or string to the specified openscad code file.
cube1 = d3object.cube({10, 10, 10}, true);
transform.postion(cube1, {10, 10, 10});
export("export.scad", cube1);
-- or
export("export.scad", code(cube1));##include
include("include_path")- include_path
stringtype- Specify the path to the openscad file to include
Contains the specified openscad file, returning a string.
include_hole = include("hole.scad");
import("import_path")-import_path
stringtype- Specify the path to the stl file to include
Import the specified stl file and return a string.
import_obj = include("obj.stl");
output_mode = stringThis variable sets the output format of the current program. The optional parameters are openscad and so on.
Optional parameters:
| output_mode |
|---|
| openscad |
| .... |