Skip to content

Any part from images

The impeller route uses a template. This page is the generic route: a solid built from silhouettes, a planner that works on any solid, and a check of whether a three-axis torch can build it.

pip install "openwaam[vision]"      # adds scikit-image
openwaam from-image plate.png  --kind extrude --size 0.14 --height 0.024
openwaam from-image nozzle.png --kind revolve --size 0.12 --bore 0.018
from openwaam.vision import part_from_images
from openwaam.workflow import run_part

solid = part_from_images({"front": "f.png", "side": "s.png", "top": "t.png"}, size=0.12)
solid, up, table = solid.best_orientation()        # build direction with the least overhang
plan, model, report = run_part(solid, "Ti-6Al-4V")

A mesh from anywhere else (CAD, a scan, a learned image-to-3-D model) enters at the same point: VoxelSolid.from_stl("part.stl").

What was tried

Four parts with known geometry were rendered to images and reconstructed, and two real photos were run without ground truth.

results

input route overlap with the true part volume 3-axis printable
nozzle, one side view revolve 0.77 x1.28 yes
nozzle, side view, bore given revolve 0.99 x1.00 yes
plate with holes, top view extrude 0.95 x0.98 yes
gusseted bracket, three views visual hull 0.51 x1.82 yes
pipe tee, three views visual hull 0.66 x1.40 no, 36 % overhangs
pipe tee, one oblique photo extrude 0.15 x2.70 (wrong shape)
impeller photo, oblique revolve no ground truth no, 45 % overhangs
topology-optimised bracket photo extrude no ground truth yes

On every solid the planner's beads reach 98 % or more of each slice, and the wire volume is within 10 % of the solid.

What this says

  • From images to a WAAM program works when the views fix the shape. A flat part seen from above and a round part seen from the side come out within a few percent, once the bore of a round part is given.
  • Silhouettes cannot see concavities. The gusset's hull fills the space on both sides of the web; the tee comes out solid, with a square branch. More views would not fix a bore or a pocket.
  • One oblique photo does not contain the depth. The tee photographed from a corner and the impeller photo both give a confident, wrong solid. The bracket photo gives a flat truss with the right outline, 16 mm thick, where the real part is curved tubes in three dimensions. It plans and simulates end to end (8 layers, 65 m of bead, all robot points reachable), but it is a different part from the one in the photo.
  • The step that is missing is reconstruction, not manufacturing. Once there is a solid, slicing, the robot program, the thermal history and the defect indicators need nothing part-specific. True 3-D from one photo needs a learned image-to-3-D model or a scan; its mesh goes in through from_stl. No such model was tried: this environment cannot download one.
  • Not every shape is a three-axis job. The printability check flags the tee and proposes the best of six build directions; anything it still flags needs a positioner, supports, or a split into segments. None of those is planned by OpenWAAM yet.

One photo through a learned model

openwaam.reconstruct puts an image-to-3-D model in front of the same chain. The model is TRELLIS.2-4B (Microsoft, MIT licence). It handles open and lattice-like shapes, which is what brackets are.

pip install "openwaam[reconstruct]"
openwaam from-image bracket.jpg --kind learned --size 0.4 --material Ti-6Al-4V       # hosted Space
openwaam from-image bracket.jpg --kind learned --backend trellis2-local --size 0.4   # your own GPU
openwaam from-image bracket.glb --kind mesh --size 0.4                               # a mesh you already have
from openwaam.reconstruct import image_to_solid
from openwaam.workflow import run_part

solid = image_to_solid("bracket.jpg", size=0.4, backend="trellis2-space")
plan, model, report = run_part(solid, "Ti-6Al-4V")
  • trellis2-local needs the TRELLIS.2 code installed: Linux and an NVIDIA GPU with 24 GB. Weights download from Hugging Face on first use.
  • trellis2-space calls a hosted Gradio Space, so no GPU is needed. Pass space= to use your own duplicate of the demo.
  • Any other model works as backend=function(image, out) -> mesh file.

A generated mesh has no scale, an invented hidden side, and sometimes small holes. So size is yours to give, the build direction is chosen by the printability check, and the mesh is filled by a majority vote of rays in three directions. On the four test parts, exported the way a generated asset arrives (unit scale, y up) and with 2 % of the faces deleted, the solids come back with 0.87 to 0.96 overlap and volume within 3 %.

Not yet run against the real model

The environment this was written in cannot reach Hugging Face. The two TRELLIS.2 backends follow the model's published example and demo code and are tested against stand-ins, and everything from the mesh onwards is tested for real. The first call against the live model or Space is still to be made.