Inspiration

While taking the advanced robotics elective in my senior year of high school, I constantly kept breaking the battery clips of our VEX robots. As a terrible CAD-der, I spent hours trying to draw perfect sketches on OnShape, but I soon realized that I was not cut out for this. That got me thinking: 3D printing is such an essential tool, and it doesn't make sense to only gatekeep it to only those who know how to CAD. That's why I found it essential to make an app where you can recreate everyday objects in just seconds to be print-ready.

What it does

Brassprint takes in a 2D image of the side profile of a symmetric object, and it generates a 3D mesh using only side of the object. For cylindrical objects, the front is revolved around axis, and for non-cylindrical objects, the front is mirrored across a midplane. Dimensions can also be manipulated to then download STL files that can be used in your favorite 3D printing slicer software.

How we built it

The 2D image is first processed, and then a Depth Anything V2 model is run to generate the depth map for all pixels, which is then carved out by segmenting the object with rembg. Using the depth map, the focal length and intrinsic matrix are calculated to make a point cloud of voxels. The revolve feature just moves the front visible side around an axis, while mirror reflects the front visible side across a RANSAC midplane. A blocky STL is made by representing the voxels as cubes, while the smooth STL adds Gaussian Blur and Marching Cubes on top. We used a Qwen3-VL-8B model to add descriptions of the object as well as auto selecting between mirror and revolve using geometric heuristics. The frontend was made using Three.js and React, while the backend was done with FastAPI and the data is stored in Supabase where users sign in with Google OAuth.

Challenges we ran into

At first, I tried implementing an "inflate" feature for completing the hidden side of the 3D object, which basically tries to expand the voxels on the midplane to create a blob shape. However, this only worked for simple objects like a ball, whereas more complex shapes like a duck were distorted. After that, I tried implementing a version of the mirror feature that tried to mirror the depth along the camera ray, but this turned out to not be a true reflection given that the midplane was often tilted. After debugging through this for a while, I decided to scratch that idea and opt for a much simpler approach of generating the visible side and reflecting it directly across the midplane. This definitely took a lot of my time during the hackathon, and it was a little surprising that the simpler approach was so much more accurate. It also took a while to ensure we had a watertight meshing, but doing some research allowed us to figure out that we just had to fix the non-manifold diagonal edges.

Accomplishments that we're proud of

I'm really proud that I was able to complete all of the original features I'd intended, and also that I'd been able to figure out how to split the tasks between my GPU and CPU efficiently since I constantly kept running into OOM errors. I was especially surprised by how well the mirror feature worked, with the 3D meshes looking stunning in the aesthetic UI. Most of all, I'm proud that I was able to learn a heck of a lot more about computer vision and linear algebra this weekend since my goal for a long time has been to pursue research in this field, so this was an awesome start.

What we learned

I was able to learn a lot more about computer graphics and vision. For example, I started my project by learning about calculating focal length, what the intrinsic matrix is, and processing operations like binary opening and closing. Not only that, I was able to learn how to apply some of my lessons from Calc 3 when I was making the symmetric RANSAC midplanes. Apart from the math, this was my first time integrating all these different languages and tools together, and I'm glad that I was able to see the finished product.

What's next for Brassprint

Right now, Brassprint only works for symmetric objects since it only takes a 2D image of one side of an object. In the future, multiple images could be combined to get more information on the depth from each direction, giving us a more robust 3D mesh.

Built With

Share this project:

Updates

Submission history