Code / Sango
ActiveCode

Sango

An open source FreeCAD plugin for generative design. Give it a blank, the mounts and the loads. It finds where the part needs material and drops the rest, leaving shapes that look like bone.

Overview

Almost every load bearing part carries material that does nothing. Finding it by eye is guesswork. Topology optimization answers by calculation instead: split the blank into thousands of small pieces and work out, for each one, whether the part would notice if it were gone. Material gathers along the paths the load travels and vanishes everywhere else. What comes out rarely looks like anything a person would draw: lattices, struts and rounded webs, much like bone. Nature arrives at the same shapes for the same reason.

The long term goal is a FreeCAD plugin, so that generative design is available in free CAD and not only in expensive commercial packages. The nearer goal matters just as much: to understand the method from the inside, rather than installing a library and trusting whatever picture falls out of it.

The loop itself is short. Solve how the part deforms under load. Work out how much each piece of material contributes to stiffness. Smooth the result so the answer follows the physics and not the mesh. Shift material towards where it earns its place. Repeat a hundred or so times, until the shape stops changing.

Physics is handled by sfepy and meshing by Gmsh. Everything above that layer is written from scratch on numpy and scipy.

Milestones

Major steps in the project — a progress map from concept to where it is now.