a 3d mesh of a rabbit, and a knit version of the same

Knitting Software Automatically Converts 3D Models Into Machine-knit Stuffies

We’ve seen our fair share of interesting knitting hacks here at Hackaday. There has been a lot of creative space explored while mashing computers into knitting machines and vice versa, but for the most part the resulting knit goods all tend to be a bit… two-dimensional. The mechanical reality of knitting and hobbyist-level knitting machines just tends to lend itself to working with a simple grid of pixels in a flat plane.

However, a team at the [Carnegie Mellon Textiles Lab] have been taking the world of computer-controlled knitting from two dimensions to three, with software that can create knitting patterns for most any 3D model you feed it. Think of it like your standard 3D printing slicer software, except instead of simple layers of thermoplastics it generates complex multi-dimensional chains of knits and purls with yarn and 100% stuffing infill.

The details are discussed and very well illustrated in their paper entitled Automatic Machine Knitting of 3D Meshes and a video (unfortunately not embeddable) shows the software interface in action, along with some of the stuffing process and the final adorable (ok they’re a little creepy too) stuffed shapes.

Since the publication of their paper, [the Textiles Lab] has also released an open-source version of their autoknit software on GitHub. Although the compilation and installation steps look non-trivial, the actual interface seems approachable by a dedicated hobbyist. Anyone comfortable with 3D slicer software should be able to load a model, define the two seams necessary to close the shape, which will need to be manually sewn after stuffing, and output the knitting machine code.

Previous knits: the Knit Universe, Bike-driven Scarf Knitter, Knitted Circuit Board.

This Week In Security: Use Emacs, Crash A Windows Server, And A Cryptocurrency Heist

It looks like Al was right, we should all be using Emacs. On the 4th of June, [Armin Razmjou] announced a flaw in Vim that allowed a malicious text file to trigger arbitrary code execution. It’s not every day we come across a malicious text file, and the proof of concept makes use of a clever technique — escape sequences hide the actual payload. Printing the file with cat returns “Nothing here.” Cat has a “-v” flag, and that flag spills the secrets of our malicious text file. For simplicity, we’ll look at the PoC that doesn’t include the control characters. The vulnerability is Vim’s modeline function. This is the ability to include editor options in a text file. If a text file only works with 80 character columns, a modeline might set “textwidth=80”. Modeline already makes use of a sandbox to prevent the most obvious exploits, but [Armin] realized that the “:source!” command could run the contents of a file outside that sandbox. “:source! %” runs the contents of the current file — the malicious text file.

:!uname -a||" vi:fen:fdm=expr:fde=assert_fails("source\!\ \%"):fdl=0:fdt="

Taking this apart one element at a time, the “:!” is the normal mode command to run something in the shell, so the rest of the line is what gets run. “uname -a” is the arbitrary command, benign in this case. Up next is the OR operator, “||” which fully evaluates the first term first, and only evaluates what comes after the operator if the first term returns false. In this case, it’s a simple way to get the payload to run even though the rest of the line is garbage, as far as bash is concerned. “vi:” informs Vim that we have a modeline string. “:fen” enables folding, and “:fdm=expr” sets the folding method to use an expression. This feature is usually used to automatically hide lines matching a regular expression. “:fde=” is the command to set the folding expression. Here’s the exploit, the folding expression can be a function like “execute()” or “assert_fails()”, which allows calling the :source! command. This pops execution out of the sandbox, and begins executing the text file inside vim, just as if a user were typing it in from the keyboard. Continue reading “This Week In Security: Use Emacs, Crash A Windows Server, And A Cryptocurrency Heist”

Augmented Arthropod Gets A Self-Balancing Ride

There are many people who find being around insects uncomfortable. This is understandable, and only likely to get worse as technology gives these multi-legged critters augmented bodies to roam around with. [tech_support], for one, welcomes our new arthropod overlords, and has even built them a sweet new ride to get around in.

The build follows the usual hallmarks of a self-balancing bot, with a couple of interesting twists. There’s twin brushed motors for drive, an an Arduino Uno running the show. Instead of the more usual pedestrian IMUs however, this rig employs the Bosch BNO055 Absolute Orientation Sensor. This combines a magnetometer, gyroscope, and accelerometer all on a single die, and handles all the complicated sensor fusion maths onboard. This allows it to output simpler and more readily usable orientation data.

The real party piece is even more interesting, however. Rather than radio control or a line following algorithm, this self-balancer instead gets its very own insect pilot. The insect is placed in a small chamber with ultrasonic sensors used to determine its position. The insect may then control the movement of the bot by moving around this chamber itself. The team have even developed a variety of codes to dial in the sensor system for different types of insect.

It’s not the first time we’ve seen insects augmented with robotic hardware, and we doubt it will be the last. If you’re working on a mad science project of your own, drop us a line. Video after the break.

Continue reading “Augmented Arthropod Gets A Self-Balancing Ride”

Hyperlinking Comes To GitHub Via Extension

If you are browsing GitHub it is very tempting to open up the source code to some project and peek at how it works. The code view is easy to read, but the viewer lacks one important feature: the ability to click on an included file and find it. The Octolinker extension fixes that oversight.

If you want to try it without installing the extension, there is a mock-up demo available. Even though the demo wants you to click on specific things, if you don’t play by the rules it will still do the right thing and take you to either the code on GitHub or an appropriate page. You can even substitute the demo URL for github.com and try it out on any GitHub page without the extension.

Continue reading “Hyperlinking Comes To GitHub Via Extension”