SecondCut

A cutting plan for the offcut you already have.

Inspiration

An irregular offcut can be too good to discard and too awkward to use without some planning. A small leather maker has a practical question: will the pieces for the next batch fit here? We wanted to make that first decision easier, starting with a photograph rather than a manually drawn material outline.

What it does

SecondCut turns a photograph of one flat remnant into a cutting-plan workspace. The maker prompts image AI to select the material, corrects the boundary and excludes unusable areas. A known-length reference or measured photo width establishes scale. The planner arranges requested rectangular or elliptical blanks, respects spacing and fixed or quarter-turn orientation, and keeps unplaced pieces visible. The maker can export an SVG and save a job in a guest or registered account. Reopening a job requires fresh review and scale confirmation.

How we built it

SlimSAM supplies a prompted material mask through local browser inference. The app caches image embeddings for further prompts, checks candidate masks and gives the maker editing tools. A conservative raster planner tries eight deterministic placement orders, prioritizing completed piece count and then nominal area. The SVG includes millimeter dimensions and a scale bar. React and Vite power the interface. Firebase Authentication supports guest access and email/password conversion that retains the library. Owner-scoped Firestore records, chunked photographs and atomic quota/reference updates support persistence.

Shivam Gupta is the project creator and provides product direction. Codex assisted with coding and research. Pretrained models, libraries and synthetic demonstration assets are credited in the source. The live application is https://secondcut-studio.web.app and the source is https://github.com/shi1720/secondcut.

Challenges we ran into

A plausible image boundary is not automatically usable cutting geometry. Shadows, holes, distorted photographs and incorrect scale can change what appears to fit. We kept corrections, exclusions and physical scale checks explicit. Browser model loading also needed debugging beyond successful Node inference.

Accomplishments that we're proud of

We connected real hosted browser segmentation to an editable material mask, constrained placement and a downloaded SVG. A synthetic leather example placed nine of fourteen requested pieces and exposed the five that did not fit. The downloaded SVG measured 300 × 335 mm in its XML. Verification includes 31 unit tests, 18 deployed-cloud integration checks, four actual Node model cases and a successful saved-job round trip. These software checks do not establish physical accuracy or material savings.

What we learned

The useful product is the complete path from photograph to a plan someone can inspect. Existing tools already offer nesting and tracing. Our opportunity is making remnant capture easier without hiding the maker's judgment. Planning time is a stronger first hypothesis than an unsupported waste-reduction percentage.

What's next for SecondCut

Observe real jobs with small leather makers. Measure total planning time, correction effort and physical fit. Test willingness to pay only after demonstrating value. Arbitrary pattern import and broader material support should follow evidence from those jobs.

Testing instructions

Open https://secondcut-studio.web.app in a modern desktop browser. Choose the leather sample and run image AI with the default points. Mark its visible defect, confirm the mask review and acknowledge the assumed sample scale. Generate the cutting plan, inspect the unplaced requests and download the SVG. Open a guest workspace to save a revision, then reopen it from Your library. Reopening requires fresh review and scale confirmation. You can create an email/password account while retaining the guest library. Complete testing instructions and verification evidence are included in the attached submission package and repository README.

Built With

Share this project:

Updates

Submission history