Skip to content

STL Manipulation Tools ​

All STL tools load the full mesh geometry into memory. For files larger than 10 MB, monitor memory usage and prefer testing on smaller files first.

get_stl_info ​

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

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

scale_stl ​

Scale an STL model along individual axes. Omit any axis to leave it unchanged (defaults to 1.0).

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

For uniform scaling, set all three axes to the same value:

json
{
  "stl_path": "/path/to/model.stl",
  "scale_x": 2.0,
  "scale_y": 2.0,
  "scale_z": 2.0
}

rotate_stl ​

Rotate an STL model around one or more axes. Angles are in degrees. Omitted axes default to 0.

json
{
  "stl_path": "/path/to/model.stl",
  "angle_x": 0,
  "angle_y": 0,
  "angle_z": 90
}

extend_stl_base ​

Add solid geometry underneath the model to increase its base height. Useful for improving bed adhesion on models with a small or unstable footprint.

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

extension_height is in millimeters.

merge_vertices ​

Merge vertices that are closer together than the specified tolerance. This can close small gaps in a mesh and slightly reduce file size. Useful as a cleanup step before slicing.

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

tolerance is in millimeters and defaults to 0.01 if omitted.

center_model ​

Translate the model so the center of its bounding box sits at the world origin (0, 0, 0). Useful before applying transformations or exporting for use in another tool.

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

lay_flat ​

Identify the largest flat surface on the model and rotate the model so that face is oriented downward on the XY plane (Z = 0). This is a common preparation step before slicing to minimize the need for supports.

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

Note: this works best on models with a clearly dominant flat face. Results on organic or rounded shapes may be unpredictable.

Released under the GPL-2.0 license. An independent open-source project, not affiliated with Bambu Lab.