Skip to content

STL Manipulation Tools ​

All STL tools load the full mesh into memory. Tools that change a model write a new file to the server's temporary directory, named after the input with a suffix such as _scaled, and return its path; the input file is not modified.

get_stl_info ​

Inspect an STL file without modifying it. Returns the bounding box, dimensions, center, vertex count, and face count.

json
{
  "stl_path": "/path/to/model.stl"
}

scale_stl ​

Scale a model uniformly with scale_factor, or per axis with scale_x, scale_y, and scale_z. When any axis value is given, unspecified axes stay at 1.0.

json
{
  "stl_path": "/path/to/model.stl",
  "scale_factor": 1.2
}
json
{
  "stl_path": "/path/to/model.stl",
  "scale_x": 1.2,
  "scale_y": 1.0,
  "scale_z": 1.5
}

rotate_stl ​

Rotate a model around the X, Y, and Z axes, in degrees. Omitted axes default to 0.

json
{
  "stl_path": "/path/to/model.stl",
  "rotate_x": 0,
  "rotate_y": 0,
  "rotate_z": 90
}

translate_stl ​

Move a model along the X, Y, and Z axes, in millimeters. Omitted axes default to 0.

json
{
  "stl_path": "/path/to/model.stl",
  "translate_x": 10,
  "translate_y": 5,
  "translate_z": 0
}

extend_stl_base ​

Add solid geometry underneath the model to raise and widen its base. extension_inches is in inches and is converted to millimeters (25.4 mm per inch).

json
{
  "stl_path": "/path/to/model.stl",
  "extension_inches": 0.25
}

merge_vertices ​

Merge vertices closer together than tolerance (millimeters, default 0.01). This can close small gaps and slightly simplify the mesh.

json
{
  "stl_path": "/path/to/model.stl",
  "tolerance": 0.01
}

center_model ​

Move the model so the center of its bounding box is at the origin (0, 0, 0).

json
{
  "stl_path": "/path/to/model.stl"
}

lay_flat ​

Find the model's largest flat face and rotate the model so that face rests on the XY plane (Z = 0). Works best on models with a clearly dominant flat face.

json
{
  "stl_path": "/path/to/model.stl"
}

modify_stl_section ​

Apply a scale, rotation, or translation to one section of a model: the top, bottom, or center third of its bounding box, or a custom box. value_x, value_y, and value_z are scale factors, degrees, or millimeters depending on transformation_type.

json
{
  "stl_path": "/path/to/model.stl",
  "section": "top",
  "transformation_type": "scale",
  "value_x": 1.5,
  "value_y": 1.5,
  "value_z": 1.5
}

A custom section requires all six bounds:

json
{
  "stl_path": "/path/to/model.stl",
  "section": "custom",
  "transformation_type": "rotate",
  "value_x": 0,
  "value_y": 0,
  "value_z": 45,
  "custom_min_x": -10,
  "custom_min_y": 0,
  "custom_min_z": -10,
  "custom_max_x": 10,
  "custom_max_y": 20,
  "custom_max_z": 10
}

generate_stl_visualization ​

Render an SVG with front, side, top, and isometric views of a model. width and height set each view's size in pixels (default 300).

json
{
  "stl_path": "/path/to/model.stl",
  "width": 400,
  "height": 400
}

The SVG is a simplified schematic, not a photorealistic render.

Released under the GPL-2.0 license. An independent open-source project, not affiliated with any printer manufacturer or host software.