Showing posts with label Cura. Show all posts
Showing posts with label Cura. Show all posts

Wednesday, October 9, 2019

Art Deco Lightswitch Cover and Multi-color Prints

This started off as a project to make a lightswitch cover that was interesting and unique. We've been looking at buying a house, and when I mentioned that maybe doing custom ones would be fun — yes.

For this project, I used Blender 2.8 and older developer version Cura (2.x, but is able to run on an ancient OSX desktop). The file can be found here - https://www.thingiverse.com/thing:3907742

Lightswitch Cover Design & the Foray into Art Deco


It would have been an easier start if I had just remixed someone else's lightswitch cover as a base. In this case, I decided to do everything from scratch. Starting with digital calipers, I decided the plate would be 114 mm tall and 71 mm wide. I measured the slot and the holes, using blocks and cylinders to punch holes in the plate. (The cylinder was wider at the top, to represent the tapered screw that lightswitches use.)

I did some beveling on the top and the underside to get a rounded feel for the cover — one of the useful techniques when using control-B to bevel, or Edge>Bevel Edges is using "M" to change the mode...I clicked M several times to get to "percent", which turned out really well. I've done some basic bevels in the past, but this is the first time I experimented with every combination of options before settling on the one true way.

Added some cylinders on the bottom for more screw support. The bevel on the actual bottom came from inset, followed by moving the portion up past the top's bevels, then applying bevel/percentage to the rectangle that had moved up. Tricky.
Before printing this cover, I downloaded someone else's plate from thingiverse, compared the slots and holes...pretty close. I did end up moving the screw holes .3mm closer to the center, but not bad. Printing it, I realized I had not put enough taper space into the plate for the screws. Ah well.

With the basic object shape out of the way, we get into an introduction of "art deco". As I'm not a designer, I went to Google Images, and searched for "art deco pattern". After browsing a ton of images and styles, I decided on one that was relatively simple. (Showing my beta version to an actual designer type person, he asked if I was a designer, and explained that I got the style right - basically a simple image that repeats...that's what I got out of his comments at least.)

The goal was an image that would merge together with itself. Didn't like my design at first, but it looks good printed. 

I created the basic image, sized it up to 15 mm, then used the array modifier for the relative offset y-axis at "1.25", 20 times. I created a second array modifier, .65 for x-axis, .025 y-axis. This wasn't science, it was trial and error to get a feel for what it would look like.



Next was...ugly. I clearly need to learn better habits on how to merge the art deco design onto an object.  It *eventually* worked. I needed to use a lot of the 3D Print Toolbox plugin to look for non-manifold edges. There were over 300, and I did too much manual fixes and partially manual fixes to get down to 0.

Multi-color Prints & How to Pause in Mid-print


A friend asked me how hard it was to imbed something within a print. Specifically, adding a metal nut into a knob as it prints. Sure, it could be done, but I didn't know how or had a project that needed me to stop in mid-print...until NOW.

The idea was to print the art deco image in a different color - imagine a white plate with a series of black stamps. There's a plugin that comes native to Cura, found under Extensions>Post-Processing>Modify G-Code>Add a script>"Pause at height". From Blender, I recognized I needed about 5mm of white before switching over to black. Loading the cover, clicking on the View, Layers...it looked like I needed to switch over at layer 21, at a .24 mm layer height. The only number I had to change for the input was the Pause Height to 5.04mm (arrived at by multiplying 21 * .24).

[edit: I came back a year later to update some of this.]

If you have a different initial layer height, make sure that is figured as layer 1. (For example, a .3mm layer height, and 20 layers at .24...5.10mm.) You can also resume the print from your Octoprint browser window, if you don't have Cura open.

I'm trying out "Extrude Amount" with a new print - it's supposed to extrude filament after you resume. You'll still need to be quick, to clean off that extruded filament before it starts printing on the model.

[edit end. November 29th, 2020.]

You can add multiple pause at heights, for multiple color changes from highest (top) to lowest (bottom).


And I started the print. At layer 21, the printer paused and sent the printer head to the far right corner, and elevated on the z-axis slightly. The Cura software was still open, and registered as "Paused". I opened up the tensioner on the feeder, slowly pulled the white filament out, slowly pushed the black filament through. Caution! Try hard not to move the printer head - if it loses where it is, it won't be aligned when it starts with the new color. (If you look closely, you can see white at the top of each black circle, where I bumped it slightly when using the feeder gear to push it through. The second time, I just pushed it through manually, no gear.)

Going back to the Cura software, it was still paused. Click the resume button, and it goes back to printing. Sadly, my bed temperature was low for PETG (and the room was drafty), so you can see how the corners were pulling up. That's fine for experiments, but wouldn't be good for the final result.

Action shot, printing the black as layer 21

I also found that the cover no longer printed correctly. The screw holes and switch slot in the cover filled on some of the layers! Sure enough, back in Cura in View Layers, I noticed that it filled up. Spending some time in internet searches, the solution that I found suggested in the "Mesh Fixes" options, to DISABLE "Union Overlapping Volumes". That brought back the holes and slot that should have been there in the first place.

The screw holes are white, the switch was black...clearly neither were holes anymore This version had beveled edges on the outside, which meant they ended lower than 5.04 mm (still the white filament).

Having done that, I went back to printing the white/teal PETG to get this final product. (230 degrees nozzle, 70 degree plate, .24mm layer height, .5mm nozzle.) Polymaker's Polylite PETG, 2.85mm.

Ta-da!


Monday, April 22, 2019

Cura Lulzbot Edition - The Good, the Bad, and the Ugly

I've been using the "Lulzbot" version of Cura for the whole time I've been printing. It uses a different number versioning system than the original Ultimaker Cura. (I'll refer to it as Cura LE.)

I have an ancient desktop OSX machine that is still functioning. Apple maxed out its upgrades at 10.9.5 which has caused some small headaches that will only get worse. For now, it works. It handles Blender with ease. It's stable. There's old software that I don't have replacements for. And it is maxed out in Cura "Developer edition" through Lulzbot - a test build from August 2017...every upgrade I've tried to install has failed.

The Must-Solve Issue


Lately though, the 2017 Cura LE has been problematic. The amazing Micro .25 SL toolhead prints fine objects with an uneven top relatively well. Sometimes on the bottom, the walls don't meet up with the infill, but it's been mostly minor. But give Cura LE a flat top, and...it gets bad.

You can see the bottom dino meeples have what appears to be support showing through - it's actually the top printing layer...and does not get any better than that.

Dinosaurs on the top, showing the "best results" for the side on the printer bed.
Dinosaurs on the bottom showing bad cross-hatching/spiraling for their top layer.

On this T(eal) Rex, you can also see the wall not meeting up with infill. Photo is a little blurry, not the dinosaur's fault...it wasn't moving THAT fast.

T-Rex from the printer bed side - walls and infill separating

The older Cura LE is fine for printing with the .5mm nozzle, and the Micro *could* print okay on non-flat surfaces, but why make bad prints if you can solve it? Incidentally, the upcoming experience has been summarized. I probably burned about 6-8 hours this weekend troubleshooting the logs, then trying various solutions.

The Good (eventually) - Ubuntu 18.04

Let's start with the Good — this morning I managed to get my laptop running Ubuntu 18.04 to run "one-step behind current", i.e. Cura LE 3.2.32. I finally have access to ironing, in case that was necessary for the fix (it wasn't necessary to resolve the surface issues, but it's nice). The best stories are one with an element of hope.

The Bad - OSX 10.9.5

Don't bother, it's not going to work. (I tried the various OSX installs on the Lulzbot site.) Some versions would just crash and terminate, not generating a log. The best case scenario, was when it generated a log as it failed to launch. You can poke around Console>Applications>cura (stderr.log) and learn some troubleshooting.

The "useful" error log:

  File "cura/CrashHandler.pyc", line 17, in <module>
ImportError: dlopen(/Applications/cura-lulzbot.app/Contents/Resources/lib/python3.5/lib-dynload/PyQt5/QtCore.so, 2): Symbol not found: _LSCopyDefaultApplicationURLForURL
  Referenced from: /Applications/cura-lulzbot.app/Contents/MacOS/../Frameworks/libQt5Core.5.9.1.dylib
 in /Applications/cura-lulzbot.app/Contents/MacOS/../Frameworks/libQt5Core.5.9.1.dylib
  File "/Applications/cura-lulzbot.app/Contents/Resources/__boot__.py", line 81, in <module>
  File "/Applications/cura-lulzbot.app/Contents/Resources/__boot__.py", line 66, in _run
  File "/Applications/cura-lulzbot.app/Contents/Resources/cura_app.py", line 86, in <module>
    import cura.CuraApplication
  File "cura/CuraApplication.pyc", line 4, in <module>
ImportError: dlopen(/Applications/cura-lulzbot.app/Contents/Resources/lib/python3.5/lib-dynload/PyQt5/QtNetwork.so, 2): Symbol not found: _LSCopyDefaultApplicationURLForURL
  Referenced from: /Applications/cura-lulzbot.app/Contents/MacOS/../Frameworks/libQt5Core.5.9.1.dylib
 in /Applications/cura-lulzbot.app/Contents/MacOS/../Frameworks/libQt5Core.5.9.1.dylib

It turns out that the modern libraries of PyQt5 (Qt 5.10+?) aren't compatible with 10.9.5. This won't stop someone from publishing software that "works" with 10.9.5...their code is fine. It's just PyQt5 that will reject you. There's a suggestion of this problem here: https://github.com/Ultimaker/Cura/issues/4466

The Ugly - Back to Ubuntu 18.04


How can it be both Good and Ugly? Because it is. I'm pretty sure that the Lulzbot developers are Debian folks. The Ubuntu instructions...*should* work. "Jessie" is Debian 8, "Stretch" is Debian 9, and "Buster" is Debian 10...what is Ubuntu 18.04? (You can check /etc/debian_version and find out.) Buster! So...it should be easy enough. But if it's ugly, clearly there is something up.

It turns out that their most recent (3.6.3) Buster build doesn't work with 18.04. (If you want to skip ahead to the solution, go to the Lulzbot site here and grab the older 3.2.32. Afterward, go to the directory you downloaded it to, and enter this command - "sudo dpkg -i cura-lulzbot_3.2.32_amd64.deb") The current Cura LE 3.6.3 is looking for a file (GLIBC_2.28), and Ubuntu 18.04 uses GLIBC_2.27. (The event viewer for Ubuntu 18.04 is called Gnome Logging, and you can find it as an application installed on the general build.) The problem is called out in the Cura backlog, but I don't expect it to be fixed again (although it had been previously fixed the 3.2.32 version) Someone else mentioned the same solution here: Ultimaker Cura github page. (Basically, use 3.2.32, install command is done differently.)

You might be able to install 3.6.3 by using "sudo apt-get install glib2.0", to get GLIBC_2.28. I'm not an expert on Linux, and don't know what it could break. (For the most part, I use my laptop for internet, and for portable Blender/Cura...easily refreshed if I needed to do a clean reinstall.) If I hadn't spent the time setting up preferences and printers in 3.2.32, I would go back and try it.

So...what does this mean?

If you're not running straight Debian, you might be stuck with 3.2.32. I wouldn't get too hung up...3.2.32 and ironing seems to work just fine. At least the ironed T-Rex on the left thinks so...

Ironed T-Rex on the left, regular 3.2.32 T-Rex on the right


Credits:

The T-Rex meeple was remixed (thickened) from here: https://www.thingiverse.com/thing:2749410
The Teal PETG is Polymaker's PolyLite.
The Stegosaurus meeple was taken from here: https://www.thingiverse.com/thing:2749406
The Silver PETG is Filastruder.
The Triceratops meeple was remixed (thickened) from here: https://www.thingiverse.com/thing:2749413
The Orange PETG is leftover from MakerGeeks. Sadly, I can't recommend shopping with them anymore...6+ months of not fulfilling an order, I'm still unhappy about that. Used to be so great.

Thursday, November 1, 2018

Figuring out bad meshes in Cura and Blender

One of my recent quick projects was making a simple "D" with a cut for a magnet. I was using magnets from my first project on Thingiverse, so I started by appending the "white" portion of that Blender file.

The benefits of appending, means that I get the Blender object, without having been converted to an STL. This means if I do edge loops, Blender already knows how to play with it...and I can use my current Blender startup file, instead of the dated one I used two years ago.

I switched into edit mode after the append, selected all of the planes of the magnet-holding portion, and hid all of that. I then selected the rest and deleted it. Looking back, I should have just done Control-I, to invert the selection. Oh well...un-hid the ring of planes and made it a cylinder (select an edge with Alt-A, F to create a face, repeat it for the other end of the cylinder. Renamed it Magnet.

Back in Object mode, I added Text, Edit Mode to make it a D. Object mode, Object>Convert to>Mesh from Curve/Text. I went back into Edit mode to scale the interior of the D in, so it would be a thicker letter. Boolean>Solidify>Thicken 1mm...Apply, easy.

It should be a simple matter just to Boolean>Difference the magnet out of the D...and it was. Opened the STL in Cura, and it was ready to print. But there's a red bit. Huh. (I'm posting the fix above it, the broken original beneath.)


It probably would have printed, but it also means something is wrong in the design.

Running Blender 2.78 on OSX, I re-examine the cutout...it's a slightly different shade. It's an easy enough fix, reseting normals in Edit mode. Mesh>Normals>Recalculate Outside. But it doesn't explain why this was a problem!


Remember my first steps? I used the magnet sizing from the STOP sign...and the cylinder part inside-outside normals were flipped. When I made the magnet cutout, by using those cylinder sides, it used those same normals. You can see the Magnet object that is off-color. (When I was doing work, I hid objects and never saw the color difference.)



Be wary of Boolean cuts with bad normals!

[The solution is: fix the normals on the "bad" magnet, so the colors look correct. When you use boolean on the D to remove the magnet shape, it will have the correct normals.]




Thursday, April 19, 2018

Octopi and Octoprint

Cura used to hang during long print jobs, when I used it to drive the printer from my desktop. (Lulzbot Mini has a USB connection, no SD card slot.) Octopi addresses that problem, and adds some additional useful features.

Octopi is a Raspberry Pi linux build that runs Octoprint, connecting on USB. It's basically a mini-computer that acts as the printer server.

The benefits of Octoprint:
  • A dedicated server - nothing else is running on it, making it very stable
  • Built-in web-based GUI - you can upload files directly to it, start/cancel jobs, extrude/retract, heat bed/nozzle...
  • Plugins are available, including API access (I use it for the Octowatch app for my Pebble)
  • Any computer on your network can access it (and there is id/password for control)
  • USB webcams can be easily added in for monitoring/time lapse
  • Modern Cura/slic3r plug directly into Octoprint, allowing you to send gcode directly from your laptop/desktop slicer application - can print these files without proper settings in Octoprint
  • If the micro SD card stops working correctly, wipe it, reinstall
The challenges of Octoprint:
  • Must open the web browser to reconnect to the printer, after the printer has been off
  • Has its own printer settings (used ONLY when uploading stl files to Octoprint)
It took a number of failures. Starting with a Raspberry Pi 2 B+, with a wifi USB stick, keyboard, mouse, monitor...Octoprint didn't work. I put the Octopi image on the micro SD card from my desktop OSX, following the instructions. Could see it on the network, log into it from ssh, but couldn't see it as http://octopi.local from a browser. Eventually it did work, after repeating the process again. Either the micro SD card's image got corrupted, or I don't follow directions easily.

I picked up a Raspberry Pi 3 and created the image (and made the changes to wifi) from a linux laptop. The only thing I plug into the USB ports are the $5 USB webcam from Goodwill and the printer's USB connection. It's magic. There's even a Pebble app (Octowatch, Gullickson Laboratories) that can connect to Octoprint with minimal fuss. Octowatch has some basic functions: time remaining, pause/restart, and my favorite "run again"/stop. Run again is pretty sweet, especially if you're duplicating a previously successful print.

Tips for setting up Octoprint correctly:

  • If you are on ANY system that auto-corrects you, be cautious when you are editing the octopi-network.txt file on your pre-Pi run. Smart quotes suck. Make sure it gets saved as plain text. (Edit: Current Octopi, edit octopi-wpa-supplicant.txt instead, as octopi-network.txt is non-functional.
  • If you are having problems later on, wipe the card and reinstall. Your image can get corrupted, through no fault of your own.
  • Change your password, when you first log in. When I set up my first pi, I thought I needed a keyboard and monitor...no. Maybe if you are going to troubleshoot it, otherwise...just remote into the pi from your existing computer.
  • Use the IP address seen from the router - your router might let you reserve the local IP for your Octopi, this is a benefit from finding it again on a webpage. (For example, Octoprint #1 is 192.168.1.11, while #2 manages a different printer on 192.168.1.12.) If you don't reserve an IP, the router will assign random IPs whenever it is powered back on. If you have octopi.local working 100%, maybe you won't be using IP anyways.
  • Sending files through web browser - that's when Octoprint's Cura set-up matters. If you are just sending it gcode through your Cura desktop application...I don't think settings need to be accurate. Nozzle size, etc...as long as you have it correct where you generate the gcode, you should be fine. (I ran Octoprint with an incorrect nozzle setting, and didn't notice it until I was trying to use Octoprint to measure how much filament was being sent through vs. e-steps. Impossible numbers.)

Useful Linux commands for your Pi:

  • ps -ef | grep oct
This will show any octoprint services running. If you don't have a line with "/home/pi/oprint/bin/python /home/pi/oprint/bin/octoprint serve --host=127.0.0.1 --port=5000" - this means you can't log in through the web browser. 

  • passwd
Changes the password for the user "pi", that you are logged in as. Always change the default from "raspberry".
  • exit

Will log you out.

For future readings, I also plan on looking at this: https://discourse.octoprint.org/t/how-do-i-backup-my-octoprint-settings-on-octopi/1489 - backing up an entire card (in addition to maybe backing up Octoprint settings).

Monday, January 18, 2016

Tips on Getting Started, Part 1 - Cura

Getting Started with Cura


My coworker from the first post suggested that I print existing models to learn what to expect.

I printed 8 cookie cutters from Thingiverse, then started printing the Pip-Boy pieces (also mentioned in the first post). Later on, I downloaded things like Open Forge terrain for D&D, D&D figures from Shapeways, and watch stands from Thingiverse.

After the first couple of items printed, I probably could have moved onto the "difficult" pieces. But as a caution: just because it was modeled in 3D, doesn't mean it will print well.

Profiles in Cura

Cura has a "basic" setting that didn't work for my first print - I ended up jumping straight into "Expert mode". Expert mode uses Profiles to manage general settings for what material you are using, and how fine you want the details. This is primarily addressing extruder temperature (melting the plastic), the bed temperature (so there's a consistent temperature once the plastic has been "printed" - allowing for regular adhesion)...and then Layer Height for detail (the smaller the number, the finer the detail). A distant fourth quality is "in-fill" - if you have 100% in-fill, it will be a solid object. More plastic, longer printing, heavier...20% is considered "enough", but if you want additional heft or strength...

If you need to use gcode to print, these profiles will be included in the gcode instructions.

Standard profiles can be found on the lulzbot website, and probably anywhere you downloaded Cura from. (I did fast printing for a long time. It's rare that I use "fine" printing.)

Adding Useful Information

You bought some PLA/HIPS? Great. In File>Preferences>, you can put the Cost/kg. This will give you an idea on the cost of your model - it's probably cheaper than you think. My current standard price is about $25-30 / kg.

Rules for 3D printing

It's ridiculous to have rules for this, right?
  1. The object needs to be small enough to fit on the printer bed. (I think the Lulzbot Mini has a 6" x 6" x 6" area.) One of my early-modelling projects was designing a 9" diameter braiding wheel. I cut it apart in quarters in Blender, then printed the 4 pieces in Cura.
  2. The printer can only reasonably handle 45 degree angles as it builds vertical layers. Beyond that, the plastic has nothing to layer on top of. If your object has overhang issues, Cura's answer is "Support: Everything". It will leave some rough parts where you remove the support, but it doesn't use a lot of plastic - and doesn't cause your model to collapse as it would without the supports. (I've aborted a half-dozen printings because of not having support turned on.) Cura is an all-or-nothing choice, when it comes to supports.

Slightly Advanced Choices

Rotating the Model

Sometimes I'll change the model's orientation to the printer bed. Usually so there's less support needed, or so that the smooth surface from the bed. Cura's generous with rotating (and bringing in models) - it will always bring the object up into the printing area. This is nice if you don't create your objects above the origin point in Blender.

Scaling the Model

Ugh. I think my biggest issue with Blender is scaling, due to its use of "Blender Units" or BU. They actually export as millimeters. I'll talk more about the measurements once I talk about Blender in-depth. Fortunately, Cura is good about scaling your models. My initial braiding wheel was usually boosted by 28:1 scale in each axis.

Printing Multiple Objects

When I'm printing multiple small objects, it's convenient to load them all onto the platform in Cura. This reduces the start-up time for the printer - the Lulzbot Mini needs to scrub off the plastic on the extruder from last printing session, and auto-level the bed again. This tacks on 3-5 minutes, which becomes a more onerous task if you're printing things one after another. Under Tools, you can choose to print all at once or one at a time - I recommend one at a time, so that the temperature is consistent for adhesion.

Thursday, January 14, 2016

The Software Tools

Overview of the Software Tools Used

The best part of these tools: they work regardless of OS - Windows, Mac, or Linux. There's a couple pieces of software I installed on my 2008 Mac Pro (this is nearly 8 years old). It has 16 GB of RAM and is running 10.9.5 Mavericks. I have a Linux laptop with 8GB that can handle Blender.

Cura

The first piece of software came with the Lulzbot Mini - Cura. Cura is an open source "slicer". Basically you need a slicer to create instructions to send to your printer. You can put multiple objects on the virtual bed, scale/rotate them, and add supports (we'll cover this later). The instructions are exported in "gcode" - mostly important if you are putting those instructions on a memory stick and putting the stick into your printer. (This is not an option for the Lulzbot - it needs a computer hooked up to it.)

If you are just downloading models from the internet - that's ALL you need.

Blender

The second piece of software I installed was a 3D modeling program, to create new objects. I settled on learning Blender - none of the software I found was strictly meant for 3D printing. Blender is also open source/free. It has a lot of features, including animation and video editing that I won't be needing. I considered Google's Sketch-up - it's supposed to be much simpler and easier to grasp. (As it wasn't meant for 3D printing, it can sometimes require MeshMixer to make it a solid object to print.) In the end, I was going for a complete learning experience, and wanted more tools than I needed. If you're a student, you might check out Maya - a friend mentioned he got a 3-year license for free/cheap. Tinkercad and Fusion 360 are often used by other 3D printing people.

The file type Blender saves is ".blend", but you can export it as an .stl file, which is what ...most? slicing software use. If I have made progress on an object, I will usually try to save it every 15 minutes. My naming convention is similar to what I practiced when learning ruby - 5.2.1. This would mean I've gone through 5 major revisions, I am on the second minor version (but pretty much version 5), and the first minor tweak to the minor version. I have a simple text file, where I take quick notes on what the new version added in case I come back to a project 6 months later.

If you are looking for a simple design+print solution, you can stop here.

Octoprint

Octoprint takes over the "print server" aspect. My Lulzbot needs a computer to push the gcode to it, but it doesn't care too much about what computer does it. I picked up a Raspberry Pi B, a wireless USB stick, and a 8+GB micro-SD card. I would probably wait a month or so before adding it to your process - I'll eventually have a documentation of how I set mine up. The cool part of Octoprint is that  if you attached a cheap USB camera (goodwill=win!), you can watch what it's printing or even get a time-lapse done. Another benefit of Octoprint is that you can have multiple computers feed their models to it - laptop, desktop...it doesn't care.