#PythonSDF

Yann Büchau :nixos:nobodyinperson@fosstodon.org
2023-09-16

Application: Bending a 3D object along a path.

Such a transformation would make #pythonSDF (or #sdfCAD how I renamed my fork) very versatile.

It already can:

- parametrically twist along a line
- parametrically thicken/modulate along a line

Being able to arbitrarily bend space would make for some really flexible design possibilities.

gitlab.com/nobodyinperson/sdf

Yann Büchau :nixos:nobodyinperson@fosstodon.org
2023-08-02

@linux_mclinuxface @gklyne @Floppy @3dprinting @vandam Wow, impressive! I could never do something as interactive like that, I just dislike web development too much 😅

I think a basic website where you can at max view the object with ThreeJS or something would be cool, where you can only set some predefined parameters and values and it spits out the STL. That for #CadQuery, #OpenSCAD, #PythonSDF
and the like. You could launch it with your git project in the url, so no need to register it.

Yann Büchau :nixos:nobodyinperson@fosstodon.org
2023-07-14

I added twist_between() to #PythonSDF to twist an object between two control points with a custom angle easing function.

Still amazed how 'simple' adding such a feature is with that codebase.

gitlab.com/nobodyinperson/sdf

#3dDesign #3dModelling #Python

Jupyter screenshot. Python SDF Code:

slab(z0=0, dx=5, dy=20, z1=30,k=2).twist_between(
    5*Z, 25 * Z, e=units("80°").to("radians").m * ease.smoothstep
).save(verbose=False, screenshot="docs/images/twist_between.png")

Shows a flat slat that's twisted smoothly vertically by 80°.
Yann Büchau :nixos:nobodyinperson@fosstodon.org
2023-07-01
Yann Büchau :nixos:nobodyinperson@fosstodon.org
2023-07-01

Upcoming: my talk about #3DDesign with @OpenSCAD and #PythonSDF

#Tübix2023

Yann Büchau :nixos:nobodyinperson@fosstodon.org
2023-06-30

Finished my slides for the #Tübix2023 #Tübix #LinuxDay tomorrow in Tübingen:

- File syncing like a pro with @joeyh's :gitannex: #gitAnnex
- #3DDesign with :openscad: @OpenSCAD #OpenSCAD and #pythonSDF
- #plainTextAccounting with @simonmic's #hledger

I'll try to record the talks. They'll be in German though.

Title slide in German: "Git Annex: Syncing Files like a Pro"Title slide in German: "Plaintextaccounting with hledger"Title slide in German: "Procedural Modelling with OpenSCAD and Python-SDF"

@nobodyinperson @Jupyter

I'll check #PythonSDF out. Honestly, I've never heard of it before you mentioned it. It is my best language so I think I would be able to have fun with it. Thanks!

@3dprinting #3dprinting

Yann Büchau :nixos:nobodyinperson@fosstodon.org
2023-06-21

@Stark9837 @Jupyter @3dprinting It should be quite easy to make a simple #Flask app that serves a basic website with a quite lame form input, then you hit 'Generate', server makes the STL and gives a download link, all from Python.

I am using #pythonSDF for pretty much all my #3DDesign's now because it makes (some) things much easier (smoothness, rounding, infinite objects, etc.).

Yann Büchau :nixos:nobodyinperson@fosstodon.org
2023-06-20

@Stark9837 @3dprinting I am still looking for way to easily make the #pythonSDF designs customizable with a shareable link, no setup required.

Many solutions are possible. Easiest ist probably @Jupyter Binder. But a self-hosted simple webserver providing a basic GUI for parameters and the finished render and STL is also possible.

Yann Büchau :nixos:nobodyinperson@fosstodon.org
2023-06-20

@Stark9837 @3dprinting Me too. I don't like the original #HoneycombStorageWall press-fit concept. I print with larger nozzles, layer heights and speeds and this frequently caused the original to not fit at all. My #Screwiverse inserts snap into place, lock extremely tightly when something is screwed in, and are just as easily to remove. The #Screwiverse with all its attachments is my first real project with #PythonSDF and I'm really happy how well it works for designing.

gitlab.com/nobodyinperson/hsw-

Yann Büchau :nixos:nobodyinperson@fosstodon.org
2023-06-11

@mcdanlj Cool! Sounds like a job for :openscad: @OpenSCAD #OpenScad or #pythonSDF

Yann Büchau :nixos:nobodyinperson@fosstodon.org
2023-05-30
Yann Büchau :nixos:nobodyinperson@fosstodon.org
2023-05-29

In #pythonSDF pretty much every operation (difference, union, intersection, etc.) has a parameter k to do it smoothly. This is such an incredibly powerful feature to make parts stronger with fillets, more compliant, easier to print, better looking and so much more. Sorely missing in #OpenSCAD.

One of the huge benefits of every object being just a mathematical function of the distance to the nearest surface.

I forked it btw: gitlab.com/nobodyinperson/sdf

#3Dprinting #3DDesign #3DModelling

3D printed black belt clamp
Yann Büchau :nixos:nobodyinperson@fosstodon.org
2023-05-22

⚠️ Today is Call For Papers deadline for the #Tübix2023 #LinuxDay in #Tübingen the 01.07.2023.

I submitted a workshop on :gitannex: #gitAnnex, a talk about #3DModelling :openscad: @OpenSCAD and :python: #pythonSDF and a lightning talk about #plainTextAccounting with #hledger.

💪 Make this an awesome day with your contribution: tuebix.org/callforpapers/

@tuebix

Yann Büchau :nixos:nobodyinperson@fosstodon.org
2023-05-19

@stepheneb With my fork of #pythonSDF: gitlab.com/nobodyinperson/sdf

The code for these particular screws is here: gitlab.com/nobodyinperson/hsw-

But vase mode is a setting of the slicer, it's not in the model. Though it's trivial to shell an object in #pythonSDF and probably many other CAD programs.

Yann Büchau :nixos:nobodyinperson@fosstodon.org
2023-05-14

I added modulating the width along a bezier curve to my fork of #pythonSDF. So now we can make an octopus 🐙 with it! 🥳

gitlab.com/nobodyinperson/sdf

#3DDesign #Python #3Dprinting

Jupyter Lab screenshot showing 3D renderr of modeled smiling octopus with random pointing tentacles that get thinner at the end
Yann Büchau :nixos:nobodyinperson@fosstodon.org
2023-05-08

@rcarmo I'm curious, how did you initially find #pythonSDF? It's an awesome way to do #3ddesign but it's known very little.

Yann Büchau :nixos:nobodyinperson@fosstodon.org
2023-05-08

I added functions to examine the distance to the object surface to #pythonSDF. Coming from :openscad: @OpenSCAD, being able to examine the object on the fly and include e.g. measurement results into your design is huge. (In #OpenSCAD you need to code all dimensions from the start, no feedback possible).

Here is a demonstration of moving an object depending on its size so it's only in a specific quadrant. Handy! 👍

#3ddesign #3dprinting #HoneycombStorageWall #Screwiverse #Python #Jupyter

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst