Wednesday, 6 January 2016

In which I get derailed into compiling OpenSCAD, and print things

Ok, next project: An endcap for the wire that has broken off our dog's favorite basket, and is now sticking out randomly, endangering everyone, but especially that cute little creature whose eyes are at exactly that height, and that we would hate to see hurt.

Should be easy: A plate that can be sewn on, a cone with an appropriate hole. Starting with the plate, which is just a hull of four circles, one with a larger diameter (here shown after a bit of getting the syntax wrong and without the appropriate offsets to make it square):

module wire_endstop(width) {
    hull() {
        for (x = [-width, width]) {
            for (y = [-width, width]) {
                radius = (x+y==width*2?30:10);


Why won't this compile? This is perfectly cromulent code, but it balks at the assignment to radius, even though variables have been assignable in any scope since the 2015.03 release. Oh. I have the 2014.01.29 release. How altmodisch! Well, I'll just compile it, then (this being a work laptop, I'm not too happy about installing binaries from random repositories). How hard can it be?

Hard, it appears. OpenSCAD was not made with home-compilation in mind. It doesn't use autoconf like in the good old days, but rather has a home-made script that downloads the sources from github (unnecessarily, since I have the sources here and want the released version), then lists some libraries that must be installed, and then has a script that checks if they are of appropriate versions. That's ... not what I'm used to. The script that checks dependencies finds nothing except make, and has an error about "-query not found"!

  • [Qt4 (4.4 - 5.4)](
    • Available as libqt4-dev, version 4.8.5
  • [QScintilla2 (2.7 - 2.8)](
    • Available as libqscintilla2-dev, version 2.8.1
  • [CGAL (3.6 - 4.5)](
    • Available as libcgal-dev, version 4.2
  • [GMP (5.x)](
    • Available as libgmp-dev, version 5.1.3
  • [MPFR (3.x)](
    • Available as libmpfr-dev, version 3.1.2
  • [cmake (2.8 - 3.0, required by CGAL and the test framework)](
    • Available as cmake, version 2.8.12
  • [boost (1.35 - 1.57)](
    • Available as libboost-dev, version 1.54
  • [OpenCSG (1.3.2 ->)](
    • Available as libopencsg-dev, version 1.3.2
  • [GLEW (1.5.4 ->)](
    • Available as libglew-dev, version 1.10
  • [Eigen (3.x)](
    • Available as libeigen3-dev, version 3.2.0
  • [glib2 (2.x)](
    • Available as libglib2.0-dev, version 2.40.2
  • [fontconfig (2.10 -> )](
    • Available as libfontconfig1-dev, version 2.11.0
  • [freetype2 (2.4 -> )](
    • Available as libfreetype6-dev, version 2.5.2
  • [harfbuzz (0.9.19 -> )](
    • Available as libharfbuzz-dev, version 0.9.27
  • [Bison (2.4 -> )](
    • Available as libbison-dev, version 3.0.2
  • [Flex (2.5.35 -> )](
    • Available as flex, version 2.5.39
  • [pkg-config (0.26 -> )](
    • Available as pkg-config, version 0.26

I'm still not a fan of apt/dpkg. Between apt-get, apt-cache, and dpkg, figuring out which command to use is just random. And their output formats are of course all different, and really wordy. I ran this list of packages through dpkg -l, and half of them were just unknown, the other half not installed. Weird.

Having created this list, it went smoothly to apt-get install them (which is not always the case). The check-dependencies script, even more surprising, found everything to its liking. So on to building. Supposedly, the script (with --build-only) should download the sources (which I don't really want it to, but oh well) and build, but alas it has a syntax error.

Went away to do some LAN partying, but in the break designed the end-stop plus a first iteration on a dish rag holder. OpenSCAD 2015-03 is really a lot nicer, but now that I'm back and ready to print, I have to transfer the files from one computer to another. Grrr.

Three wishes for Pronterface/Slic3r: Ability to place objects off-center easily, to avoid the blue tape getting overused in one spot, ability to reduce the wait after heating, and ability to add extra skirts.

This is the first print I've done that features retraction. There's some fuzziness at the start of each new layer. 

Oddly, there is one corner that tends to be poorly connected. 

I will have to try higher speed calibration cubes and see where it starts breaking down.

Print came out reasonably nice, except a lot of holes were too big due to using radius instead of diameter. Also it was overall larger than necessary. Scaling it down made the tower part be rather flimsy, though. I think this is the time where I attach the fan.

Shrunk version. The cylinder poking out should be a straight cone.
Found the Slic3r config for #skirts, trying with two, since I had to abort one print for oozed material getting in the way. 

Back to compiling. Rooted through the script to find the qmake and make commands, and ran them plainly. Missing boost-regexp and boost-filesystem, readily available. Running make again, and it works. Excellent!

Carl-Eric's brother called, needed a specific hex nut, because his was too wide on the outside to fit in the space available. I didn't have one lying around, but I could print one, given the dimensions. So I hacked that up, but it was rather wobbly. Probably the fan again, so I attached the fan, with a little hacking around the broken wires it actually works. Definitely helped on the shape, though there's a bit of over-extrusion making the inner dimensions too small. I fudged around until it worked, though at the last print of the evening, it stopped extruding enough. It's not that the filament is stripped, it still moves, just at about 2/3 speed according to a test extrusion. Could be a side-effect of the nozzle having gotten more cooling (though there was no cooling on it while test-extruding), could be some of the wires having gotten pulled funny.
Two versions of the bit. Fanless on the right, with fan on the left. Notice the left having a nice flat hex part at the top and the cylinder is fairly straight, while the right one is more rounded and the cylinder is wobbly.
I need to print spares of the most stressed parts of the printer, just in case. I'm also inclined to print a fan that isn't quite so much in the way.

Update: Pulled out the filament. It doesn't look badly stripped, but there are marks on it. Tried extruding with more or less tension, with no obvious difference, speed is about 1/2 of before. There's a slight clicking every few seconds, but it can't account for this amount of difference.

No comments:

Post a Comment