News for hackers. Stuff that matters.
Re:FreeCAD: A free and open source multiplatform 3D parametr... by deadsy on Friday September 18, 2020 @08:49AM (#24516009)
I started with OpenSCAD but: a) found the language to be clunky b) had a hard time doing chamfered unions between objects (needed for sand casting patterns).

So - I wrote my own tool/library in Go and it's essentially replaced my OpenSCAD usage.

https://github.com/deadsy/sdfx

Re:FreeCAD: A free and open source multiplatform 3D parametr... by phkahler on Friday September 18, 2020 @08:57AM (#24516113)
>> So - I wrote my own tool/library in Go and it's essentially replaced my OpenSCAD usage.

That looks really cool. What kind of files can it output?

Re:FreeCAD: A free and open source multiplatform 3D parametr... by tomcam on Friday September 18, 2020 @09:25AM (#24516444)
Well, I looked at the linked page[0] and it says STL files.

0. https://github.com/deadsy/sdfx

Re:FreeCAD: A free and open source multiplatform 3D parametr... by deadsy on Friday September 18, 2020 @12:12PM (#24518603)
3d = stl, 2d = svg or dxf
Re:FreeCAD: A free and open source multiplatform 3D parametr... by amelius on Friday September 18, 2020 @11:26AM (#24517979)
The examples in your README look cool. But, I was wondering about this sentence:

> SDFs make CSG easy

Can you share some more info about how this works?

Re:FreeCAD: A free and open source multiplatform 3D parametr... by deadsy on Friday September 18, 2020 @12:06PM (#24518514)
SDF = signed distance function. A function mapping a 2d/3d coordinate onto a scalar. The scalar is the shortest distance from that point to the surface of the object. (+ve outside, -ve inside)

CSG = constructive solid geometry: Take primitive 3d shapes and do unions, differences, intersections on them to build more complex shapes.

Fairly obviously the union of 2 sdf functions is going to be the minimum of those values. That pretty simple.

Intersections and differences are not much more complex....

See: https://iquilezles.org/www/articles/distfunctions/distfuncti...

for some quick examples.