This GCode Post-Processor Squeezes Lines Into Arcs

When the slicer software for a 3D printer model files into GCode, it’s essentially creating a sequential list of connected line segments, organized by layer. But when the features of the original model are dense, or when the model is representing small curves, slicers end up creating a proliferation of teeny segments to represent this information.

This is just the nature of the beast; lots of detail translates into lots of teeny segments. Unfortunately, some printers actually struggle to print these models at the desired speeds, not because of some mechanical limitation, but because the processor cannot recalculate the velocities of these segments fast enough. The result is that some printers simply stutter or slow down the print, resulting in print times that are much higher than they should be.

Enter Arc Welder, a GCode compression tool written by [FormerLurker] that scrutinizes GCode files, hunts for these tiny segments, and attempts to replace contiguous clusters of them with a smaller number of arcs. The result is that the number of GCode commands needed to represent the model drop dramatically as connected clusters of segment commands become single arc commands.

“Now wait”, you might say, “isn’t an arc an approximation of these line segments?” And yes–you’re right! But here lies the magic behind Arc Welder. The program is written such that arcs only replace segments if (1) an arc can completely intersect all the segment-to-segment intersections and (2) the error in distance between segment and arc representation is within a certain threshold. These constraints act such that the resulting post-processing is true to the original to a very high degree of detail.

A concise description of Arc Welder’s main algorithm as pulled from the docs

This whole program operates under the assumption that your 3D printer’s onboard motion controller accepts arc commands, specifically G2 and G3. A few years ago, this would’ve been uncommon since, technically, 3D printing and STL file only requires moving in straight line segments. But with more folks jumping on the bandwagon to use these motion control boards for other non-printing applications, we’re starting to see arc implementations on boards running Marlin, Smoothieware, and the Duet flavor of RepRap Firmware.

For the curious, this program is kindly both well documented on operating principles and open source. And if [FormerLurker] seems like a familiar name before–you’d be right–as they’re also the mind behind Octolapse, the 3D printing timelapse tool that’s a hobbyist crowd favorite. Finally, if you give Arc Welder a spin, why not show us what you get in the comments?

Thanks for the tip [ImpC]!

The Mother(board) Of All CNC Controllers

If you’re building a CNC machine from scratch, the number of decisions you have to make is nearly boundless. Metal or wood construction? Welded or bolted? Timing belts or lead screws? And even once the mechanical bits are sorted, you still face a universe of choices in terms of control electronics. That’s where something like this modular CNC controller could really prove to be a game-changer.

The idea behind [Barton Dring]’s latest creation started with his port of GRBL to the ESP32. In fact, the current controller bears a strong family resemblance to his version 1.0 dev board, with a few conspicuous and intriguing additions. First, everything is modular — the main PCB is basically a motherboard with little more than a 5-volt power supply and some housekeeping electronics, plus a lot of headers. There’s support for up to six channels of steppers, either directly on the board with Pololu-style modules or as external drivers using pluggable screw terminal blocks. There’s also room for five IO modules; the current collection of modules includes a four-channel switch input, a relay output, an RS-485 module and a 0-10-V interface for talking to a variable frequency drive (VFD) spindle controllers, and buffered 5-V output module. The best part is that the IO module spec is completely open, so designing custom modules should be a snap.

The video below gives a quick tour of the controller. We’re really impressed with the thought that went into this, and we’ll venture a guess that having something like this available is going to kickstart a lot of stalled CNC machine projects. We can think of one shop that finally lost its last excuse for making the move.

Continue reading “The Mother(board) Of All CNC Controllers”

Interactive CNC Foam Cutter Churns Out Abstract Art

Foam is certainly an indispensable raw material for various craft and construction projects. Any serious sculptor however, inevitably grows tired of grinding through a foam block using a simple preheated utensil. The next step up, is to assemble a simple but thoroughly effective hot wire cutting contraption, formed out of a thin guitar wire held taut on a “C” shaped mounting frame. Finally, the addition of some electronics to regulate the power delivery makes this simple tool useful for most settings.

[Freddie] has taken this basic idea a step further, by building a complete multi-axis CNC foam cutter intended as an interactive exhibit on computational art. The CNC has the traditional three Cartesian axes but the platform hosting the foam piece can also rotate, introducing an additional degree of freedom. As this is indented to be controlled by attendees, there is no G-code in the mix, rather the inputs of an Xbox controller are applied directly to the work piece.

What is very interesting is how the resulting tool path is visualised and displayed. [Freddie] explains that while the user input tool path could be generated and displayed as equivalent G-code, it does not capture and convey the inherent organic nature of the finished pieces. The solution [Freddie] came up with is to display the toolpath much like a series of musical notes!

We would have loved to have a go at this machine in person, but seeing that isn’t possible in the current circumstances, you can either build a simpler machine we featured earlier or [Freddie] could perhaps fire up a camera and let us control it via the interweb, with a live video feed ofcourse!

Continue reading “Interactive CNC Foam Cutter Churns Out Abstract Art”

Fusing Plastic Sheets With A 3D Printer (Sort Of)

If you want to experiment with pneumatic devices, you’ll likely find yourself in need of custom inflatable bladders eventually. These can be made in arbitrary 2D shapes by using a soldering iron to fuse the edges of two plastic sheets together, but it’s obviously a pretty tedious and finicky process. Now, if only there was some widely available machine that had the ability to accurately apply heat and pressure over a large surface…

Realizing his 3D printer had all the makings of an ideal bladder fusing machine, [Koppany Horvath] recently performed some fascinating experiments to test this concept out in the real-world. Ultimately he considers the attempt to be a failure, but we think he might be being a bit too hard on himself. While he didn’t get the sheets to fuse hard enough to resist being pulled apart by hand, we think he’s definitely on the right track and would love to see more research into this approach.

For these early tests, [Koppany] wrapped the hotend of his Monoprice Maker Select Plus with some aluminum foil, and covered the bed with a piece of cardboard. Stretched over this were two sheets of plastic, approximately 0.5 mil in thickness. Specifically, he used pieces cut from the bags that his favorite sandwiches come in; but we imagine you could swap it out for whatever bag your takeout of choice is conveyed in, assuming it’s of a similar thickness anyway.

There were problems getting the plastic pulled tight enough, but that was mostly solved with the strategic placement of binder clips and a cardboard frame. Once everything was in place, [Koppany] wrote a Python script that commanded the printer to drag the hotend over the plastic at various speeds while simultaneously adjusting the temperature. The goal was to identify the precise combination of these variables that would fuse the sheets of plastic together without damaging them.

In the end, his biggest takeaway (no pun intended) was that the plastic he was using probably isn’t the ideal material for this kind of process. While he got some decent seams at around 180 °C , the thin plastic had a strong tendency towards bunching up. Though he also thinks that a convex brass probe inserted into the hotend could help, as it would smooth the plastic while applying heat.

We’ve already seen some very promising results when using LDPE film in a CO2 laser cutter, but if a entry-level 3D printer could be modified to produce similar results, it could be a real game changer for folks experimenting with soft robotics.

Signal The End Of A Print With MIDI Of Your Choice

The end of every 3D print should be a triumphant moment, and deserves a theme song. [FuseBox2R] decided to make it a reality, and wrote tool for converting MIDI tracks to G-code that uses the buzzer on your 3D printer.

The tool is up on GitHub, and uses the M300 speaker command that is available in Marlin and some other 3D printer firmware packages. It takes the form of a static HTML page with in-line JavaScript that converts a midi track to series of speaker commands with the appropriate frequency and duration parameters, using the Tone.js framework. Simply add to your slicer G-code to add a bit of spice to your prints. You can also build a MIDI jukebox using the RAMPS board and LCD you probably have gathering dust somewhere. See the video after the break for a demonstration, including a rendition of the DOOM theme song, and off course Mario Bros.

For more quarantine projects, you can also play MIDI using the stepper motors on your printer, or build a day clock if time is becoming too much of a blur.

Continue reading “Signal The End Of A Print With MIDI Of Your Choice”

Gradient Infill Puts More Plastic Where You Want It

It is always tricky setting the infill for a 3D printed part. High infill parts are strong but take longer to print, while low infill prints take less time, but are weaker internally and in danger of surface layer droop between the infill pattern. [Stephan] has a better answer: gradient infill. You can see a video below and find his Python code on GitHub.

The idea is simple enough. In most cases, parts under stress see higher stress near the surface. Putting more material there will make the part stronger than adding plastic in places where the stress is lower. [Stephan] has done finite element analysis to determine an optimal infill pattern before, but this is somewhat difficult to do. Since the majority of parts can follow the more at the edges and less at the center rule, gradient infill makes sense except for a few special cases.

Continue reading “Gradient Infill Puts More Plastic Where You Want It”

Relive The Dot Matrix Glory Days With Your 3D Printer

With the cost of 3D printers dropping rapidly, we’ve started to see a trend of hackers re-purposing them for various tasks. It makes perfect sense; with the hotend and extruder turned off (or removed entirely), you’ve got a machine that can move a tool around in two or three dimensions with exceptional accuracy. Printers modified to carry lasers, markers, and even the occasional rotary tool, are becoming a common sight in our tip line.

Last year [Matthew Rayfield] attached a marker to his 3D printer and had it sketch out some pictures, but recently he decided to revisit the idea and try to put a unique spin on it. The end result is a throwback to the classic dot matrix printers of yore utilizing decidedly modern hardware and software. There’s something undeniably appealing about the low-fi nature of dot matrix printing, and when fed the appropriate images this setup is capable of producing something which we’ve got to admit is dangerously close to being art.

To create these images, [Matthew] has created “Pixels-to-Gcode”, an online service that anyone can use to turn an arbitrary image into GCode they can feed their 3D printer. There’s a number of options available for you to play with so you can dial in the specific effect you’re looking for. Pointillist images can be created using a tight spacing of dots, but widen them up, and your final image becomes increasingly abstract.

The hardware side of this project is left largely as an exercise for the reader. [Matthew] has attached a fine-point pen to his printer’s head using a rubber band, but admits that it’s far from ideal. A more robust approach would be some kind of 3D printed device that allows you to quickly attach your pen or marker so the printer can be easily switched between 2D and 3D modes. We’d also be interested in seeing what this would look like if you used a laser mounted on the printer to burn the dots.

Back in the ancient days of 2012, we saw somebody put together a very similar project using parts from floppy and optical drives. The differences between these two projects, not only in relative difficulty level but end result, is an excellent example of how the hacker community is benefiting from the widespread availability of cheap 3D motion platforms.

Continue reading “Relive The Dot Matrix Glory Days With Your 3D Printer”