Skip to content
Back to skills

Render Stl Png

ASecurity

Render Stl Png

  • 33 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 5, 2026
developmentpythonbash

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add dvcrn/openclaw-skills-marketplace --skill render-stl-png --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Render Stl Png?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Render Stl Png
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dvcrn-render-stl-png/badge)](https://www.skillsdirectory.com/skills/dvcrn-render-stl-png)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: render-stl-png
description: "Render Stl Png"
---

# render-stl-png

Render an STL to a PNG from a nice, consistent 3D angle ("Blender-ish" default perspective) with a solid color.

This is a **deterministic software renderer**:
- No OpenGL
- No Blender dependency
- Uses a simple camera + z-buffer + Lambert shading

## Inputs

- STL file path (ASCII or binary)
- Output PNG path

## Parameters

- `--size <px>`: image width/height (square), default `1024`
- `--bg "#rrggbb"`: background color, default `#0b0f14`
- `--color "#rrggbb"`: mesh base color, default `#4cc9f0`
- `--azim-deg <deg>`: camera azimuth around Z, default `-35`
- `--elev-deg <deg>`: camera elevation, default `25`
- `--fov-deg <deg>`: perspective field of view, default `35`
- `--margin <0..0.4>`: framing margin as fraction of view, default `0.08`
- `--light-dir "x,y,z"`: directional light vector, default `-0.4,-0.3,1.0`

## Usage

### One-shot

```bash
python3 scripts/render_stl_png.py \
  --stl /path/to/model.stl \
  --out /tmp/model.png \
  --color "#ffb703" \
  --bg "#0b0f14" \
  --size 1200
```

### Wrapper (recommended)

The wrapper creates a cached venv (so `pillow` is available) and runs the renderer.

```bash
bash scripts/render_stl_png.sh /path/to/model.stl /tmp/model.png --color "#ffb703"
```

## Notes

- This is meant for **marketing/preview images**, not photorealism.
- If you need studio lighting / materials, use Blender — but this gets you 80% quickly and reproducibly.

Files in this skill

  • SKILL.md1.4 KB
  • scripts/render_stl_png.py11.1 KB
  • scripts/render_stl_png.sh607 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…