From Dress to Python
Nobubo: curves, coding, and pdfs.

“The best way to learn Python is to find a project”, they said.

I did not have a “project”. In 2017, there was a one-file web scraper. I’ve just completed my first Python steps, eager to learn more, but did not know how to continue.

Then there was the dress.

“Belle Curve”, a vintage sewing pattern from the 1940s, with intriguing lines and many, many darts (and some).

I’ve been circling those darts from Decades of Style, a pattern company who specializes in vintage patterns, right after the first stitch on my own sewing machine in 2016.

Also, there were 56 pages to assemble.

See, sewing garments needs sewing patterns. Here’s a short digression: You, the sewist, buy a pattern, and out of some flat paper shapes you create all your jackets, pants, dresses, by transferring the paper shapes to fabric, then sewing the fabric together to fit your non-flat body. In the analog world, patterns are sold in brick-and-mortar stores, rarely going beyond the big brands of Burda, Butterick, McCalls, Vogue, Simplicity. In the digital world, patterns are sold as (cheaper) downloadable pdfs, from tiny bedroom publications to medium-sized pattern companies with social media managers. You, the happy owner of the pattern pdf, are then supposed to print it at home or in a copy shop. Digital patterns then skip the necessity for companies to print patterns on special extra-large tissue paper and to wrap them in expensive packaging.

There’s just one issue.

Yes, the pages.

No regular sewist calls a A0 plotter their standard home printer. A jacket has roughly 55 A4 pages to assemble, a dress 70, a coat 70-80 pages. Pages that you tape together, either by giving your back a hard time (table) or your knees (floor). If those pages do not align with computer-logic precision, lines mismatch and the final garment will be ill-fitting.

Unfortunately, I am human. Also, lazy. And fortunately a developer with ideas.

There was no way I was going to tape those 56 pages together, not with those gazillion darts that require inhuman precision.

And so, I had My Project.

Patterns and Pdfs

The concept: A tool that takes a pdf, applies magic, then spits out a new pdf. One that I could send to a copy shop to print everything on A0 instead of those tiny print-at-home A4 pages. Fewer pages, happy knees. An n-up tool, but for sewists. And so, “nobubo” was born, a twist on the German “Uhu” brand that sells crafting glue.1

After the name, the algorithm. Sleep was wasted over code and pdf structures, until I finally figured out the process to assemble the individual pattern pages into one big digital collage. The collage itself is then chopped up again into individual pages following the user’s (aka my) printing preference. With delight I deep-dived into the thousand-page long pdf standard, learned about user-space units, crop and media boxes, how a pdf is structured, and researched Python libraries to deal with pdfs.2

Early on, I experimented locally, until I felt confident enough to publish it on GitHub in 2019. At that point, nobubo was ready to be tested in an initial version. The initial copy shop print was scaled (who wears a size XXS when they wanted an L?), but since printing is black magic, I performed some necessary rituals and held my first A0-printed Belle Curve (The Pattern) in my hands. I quickly added more features to nobubo, such as the vaguely-defined “US copy shop” format as output size.3 However, while I’ve been using nobubo ever since for a range of patterns, Belle Curve (The Dress) did not see the light of day for quite a while.

After the pages, the darts.

Somehow, 32 darts and more kept me from sewing it, and I dreaded the required adjustments for my giraffe size, since thou shalt not distort the Curve of the dress.

A couple of weeks ago, I pulled myself together and tackled Belle Curve, the dress that sparked My Python Project. I used nobubo to assemble the pages, sent the pdf to a copy shop, cut out my size and applied some minor adjustments to the pattern.4

And lo and behold! A red dress appears!

Within roughly 16 hours including a muslin (a prototype), Belle Curve (The Dress) was done.5

Sewing Dresses, Coding Python

In 2017, I had just picked up my sewing needle and my first meager Python script took four hours.6 Nobubo turned into my first big and public Python project to improve my sewing experience (and to skip on the taping). Since then, my sewing skills have evolved from a simple knit dress with a wobbly collar to a full-blown speed-tailored wool blazer; in my day job I write lots of Python and teach others to use it.

Belle Curve started it all, the dress marked the beginning of my sewing and my Python journey - and now, a couple of years later (and countless sewing failures and successes), I can finally wear what started it all. Wearing Belle Curve also marks another nobubo release, version 1.5.0 brings updated dependencies and code. Last but not least, all those years for The Dress to be made led to the image AI revolution: Nobubo now finally has a logo, courtesy of Dall-E.

Logo of nobubo, as assembled by Dall-E / Nightcafe

Links


  1. German for the Eurasian eagle-owl, Latin bubo bubo. It’s also some kind of a dig at Burda, who still sells only A4 pdfs, while most indie pattern companies have managed to sell A4 and A0 together in one purchase. ↩︎

  2. There are not many - and PyPDF2 is no longer maintained, and soon I transitioned to pikepdf as my go-to library. ↩︎

  3. What else can you expect from a country that writes instructions such as “5/8 inches seam allowance included”, where “1.5 cm seam allowance included” would make everyone else on earth happy? ↩︎

  4. Guess nothing helps more than the resolution to finally eliminate my fabric stash and 4 meters of random red cotton poplin bought on a fabric sale spree. ↩︎

  5. I still do not own a dress form, only bad lightning, so sadly no pictures. Say “Nice Curves” if you ever meet me in a red cotton poplin dress with fancy darts. ↩︎

  6. A CTF challenge - four hours for ten lines of Python, but I got the flag. Ha! ↩︎


Last modified on 2023-05-16

Comments Disabled.