Skip to content

Latest commit

 

History

History
125 lines (90 loc) · 2.03 KB

File metadata and controls

125 lines (90 loc) · 2.03 KB

global function

Code

Usage

code(object)
  • object
    • d3object type
      • Object to view

Returns the openscad code for the given object.

Example

cube1 = d3object.cube({10, 10, 10}, true);
transform.postion(cube1, {10, 10, 10});
print(code(cube1));

export

Usage

export("filepath", object);

-- or
export("filepath", "code");

-filepath

  • string type
    • Specify the path to the export file
  • object
    • d3object type
      • Specify the object to be exported. If object is specified, object will no longer be accepted. -code
    • string type
      • 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.

Example

cube1 = d3object.cube({10, 10, 10}, true);
transform.postion(cube1, {10, 10, 10});
export("export.scad", cube1);

-- or
export("export.scad", code(cube1));

##include

Usage

include("include_path")
  • include_path
    • string type
      • Specify the path to the openscad file to include

Contains the specified openscad file, returning a string.

Example

include_hole = include("hole.scad");

import

Usage

import("import_path")

-import_path

  • string type
    • Specify the path to the stl file to include

Import the specified stl file and return a string.

Example

import_obj = include("obj.stl");

Global variables

output_mode = string

This variable sets the output format of the current program. The optional parameters are openscad and so on.

Optional parameters:

output_mode
openscad
....