fogleman/sdf
View on GitHub ↗ ★ 2,019 Python
Simple SDF mesh generation in Python
16 mentions on Hacker News by 11 people: 4 stories, 12 comments · first 2021-02-15 · latest 2025-12-20
20082026
-
…and I never really updated the README with examples, but it does work. There is one example script: https://github.com/fogleman/sdf/blob/main/examples/mesh.py You basically just say: f = Mesh.from_file(path).sdf(voxel_size=0.25,…
comment by fogleman · 2025-12-20 · in OpenSCAD is kinda neat -
…motivated me to write this Python library to generate 3D meshes used signed distance functions: https://github.com/fogleman/sdf One big plus to doing it this way is that it's "just" Python and you can use arbitrary logic to help construct…
comment by fogleman · 2025-12-20 · in OpenSCAD is kinda neat -
…SDFs seem like the best option but I'm not 100% confident. I am considering using your SDF library though (github.com/fogleman/sdf) but need do do some experimenting/benchmarking first.
comment by WillMorr · 2025-11-10 · in Marble Fountain -
…[1]. This is perfect if you are a programmer that doesn't know anything about CAD-Software. 1.: https://github.com/fogleman/sdf
comment by sprash · 2023-03-08 · in FreeCAD User Book (2019) -
…you can do a fillet where you subtract one object from another, something that SDFs can do easily: https://github.com/fogleman/sdf#smooth_difference
comment by traverseda · 2023-02-19 · in CAD Sketcher, free and open-source project bringing CAD like tools to Blender3d -
…in a few thousand lines of python+numpy, that seems to be about as fast as openscad. Maybe faster. https://github.com/fogleman/sdf
comment by traverseda · 2023-02-19 · in CAD Sketcher, free and open-source project bringing CAD like tools to Blender3d -
…be interested in a Python library that I wrote for generating 3D meshes (STL files) from SDFs : https://github.com/fogleman/sdf It just uses marching cubes for triangulation but the SDFs are all numpy'd and the SDF is evaluated in batches…
comment by fogleman · 2022-12-21 · in Signed distance functions in 46 lines of Python -
…OpenSCAD in many ways but the distance field model gives you offsets and fillets more easily. [1] https://github.com/fogleman/sdf
comment by hksh · 2021-10-21 · in Getting the best out of OpenSCAD -
…I see you have libfive) - https://solvespace.com/index.pl - https://mirmik.github.io/zencad/en/ - https://github.com/fogleman/sdf This is from a list entitled "migrate away from OpenSCAD", but somehow I can never manage to do that...…
comment by alanbernstein · 2021-07-01 · in Curated Code CAD (2020) -
…things like signed distance fields make that easier* because it'd just be "expand the SDF by 3mm" - https://github.com/fogleman/sdf has `shell` for this. * if you can wrap your head around the math/geometry, I guess
comment by zimpenfish · 2021-06-29 · in Curated Code CAD (2020) -
> https://github.com/fogleman/sdf Holy crap, why have I not seen this before?!?!!? I was even planning to start coding something like this myself. This is awesome! Thanks!!!!
comment by axegon_ · 2021-06-27 · in Guerrilla guide to CNC machining, mold making, and resin casting (2015) -
…object parametrically (I used it to make a Switch controller middle-bit.) Or there's stuff like https://github.com/fogleman/sdf which I've used to make resin-printed buttons for my mother. (I also cannot get the hang of Blender despite…
comment by zimpenfish · 2021-06-27 · in Guerrilla guide to CNC machining, mold making, and resin casting (2015)