# fogleman/sdf

Simple SDF mesh generation in Python

Repository: https://github.com/fogleman/sdf
Canonical: https://ross.abutalabs.com/products/sdf
Language: Python
License: MIT
License Family: permissive
Topics: signed-distance-functions, sdf, python, mesh, 3d, 3d-printing, 3d-models
Last push: 2024-08-10T20:40:33+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 2052, "days_push": 753, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2000, forks 169 (observed 2026-08-28T04:06:03.857941+00:00)

## What it is
A Python library for generating 3D meshes from signed distance functions (SDFs) with a simple, operator-based API supporting constructive solid geometry. It exports binary STL natively and other formats via meshio, making it well suited for 3D printing workflows.

## Use cases
- generate 3d printable models from code
- create meshes using signed distance functions in python
- constructive solid geometry modeling with union intersection difference
- export stl files programmatically for 3d printing
- procedurally generate gears, knurling, and woven patterns
- convert sdf shapes to obj ply or vtk meshes

## When to choose
- you want a minimal Python API for CSG-style 3D modeling
- you need to 3D print models generated from code
- you prefer defining geometry mathematically rather than in a CAD tool

## When to avoid
- you need interactive GUI-based 3D modeling
- you require high-performance real-time rendering of SDFs
- you need mesh editing or repair of existing models

## Facets
- artifact type: library
- maturity: stable
- function: graphics, simulation, image-processing
- domain: graphics, developer-tools
- platform: python, cross-platform
- tags: signed-distance-functions, 3d-printing, mesh-generation, stl, constructive-solid-geometry, procedural-modeling, game-development

## Member repositories
- fogleman/sdf (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:03.857941+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:02:07.440632+00:00, confidence not recorded.
  - readme: https://github.com/fogleman/sdf (fetched 2026-08-28T04:06:03.857941+00:00, sha 74a709acea1c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
