Taking Distance Based CAD To The Next Level

For those who model CAD models regularly, a pair of calipers is essential as it allows reasonably accurate measurements to fit a specific part. However, [Jason Harris] is taking that concept to the next level with a signed distance function-based CAD tool, SDFX.

For those who don’t know, Signed Distance Functions can tell you from a given point how close the nearest part of the model is. The model is represented as a single function that offers some exciting benefits. For instance, chamfering and fileting are often quite complex in traditional CAD programs and trivial in an SDF setting. SDFX is a golang library that allows you to write golang programs to describe the model. OpenSCAD is a favorite of Hackaday as it is a beautiful parametric code-first CAD package. But the syntax and language are somewhat cludgy, to say the best. The advantage of using golang rather than a DSL is that you can use all the niceties that a full-featured language brings. For example, you can export multiple objects, make network requests, and interface with GUI libraries to recreate something like the customizer for OpenSCAD.

Objects are rendered to STL using Marching squares. Then, they can be printed in whatever slicing software suits your fancy. It’s an excellent project with a great API and almost a hundred examples.

The code is available on GitHub under an MIT License.

OnShape To Robot Models Made Easier

We live in a time where our phones have computing power that would have been the envy of NASA a few decades ago. So, in theory, we should be able to simulate just about anything. Thanks to [rhoban], robots you design in OnShape — a popular CAD tool — are now easier to simulate using several common simulation tools.

Electronic circuits are pretty easy to simulate, because we typically draw schematics and circuit simulators can capture those schematics readily. But simulating physics for robotic designs is a bit trickier. Gazebo and Pybullet both can use SDF files or URDF. However, building those files is often a separate process from actual physical design even though you probably did the design using a CAD tool. Even if you don’t use OnShape, you can probably import your preferred format and then bridge to the simulation file format without having to manually recreate your design. You can see the author walk through the process in the video below.

Continue reading “OnShape To Robot Models Made Easier”