Categories
Uncategorized

OpenSCAD Viewing Angles

I’ve found that more and more I am exporting images from OpenSCAD, and while in the past I was satisfied with just spinning the object to an angle and exporting a PNG file, I’m now doing more step-by-step things where I want consistency and don’t want things jumping around. Instead of carefully setting the view with the mouse and doing all the exports, I now set the viewing parameters directly in the file, because you can do that in OpenSCAD…

Time to go back to the OpenSCAD User Manual! While the Cheat Sheet is an excellent resource, I find myself hitting up the manual a lot more frequently lately. The Cheat Sheet will show you this of course:

$vpr viewport rotation angles in degrees
$vpt viewport translation
$vpd viewport camera distance
$vpf viewport camera field of view

And that’s what we need! So over to the manual section for $vpr,_$vpt,_$vpf_and_$vpd.

Pop open that Viewport-Control in the Window menu and look at that… it shows you values and you can change them…

(Note: You can also set the aspect ratio, and lock it. Sweet!)

But the real powerful bit is that you can just set those parameters in your code. When you preview your code it will set those values and you get the same viewing angle, rotation, distance and field of view each time. Brilliant!

You can see my commented out code for the bottom versus top view on line 37.

I love finding stuff like this and them implementing it into my code… It’s probably not some amazing killer feature, but it’s one more nicety that helps me keep things consistent and adds a bit more power to what I can do with OpenSCAD.

Categories
Uncategorized

Circular Positioning in OpenSCAD

This post is about a problem… it’s about looking at a problem from the wrong angle, and eventually realizing it.

I wrote some code in OpenSCAD, and then I wanted to change something and I could not figure out how to get the positioning right. I should confess I am terrible at maths. In school I took geometry, but never did calculus or trigonometry, and know almost nothing about those areas of mathematics.

Since I tend to work in Cartesian coordinate systems I think about moving things in X and Y. Left, right, up, down… Sure, there are angles, but they can be difficult. But maybe they shouldn’t be…

Here’s what I wanted to do: Create a circle with three smaller circles evenly placed into a triangle. Now typically in OpenSCAD I move things around in the X and Y and for the mostly rectilinear things I design (mostly enclosures) that’s simple, but circles can get weird. So what I tried to do was move each of the holes along the X and Y axes, but I could not get them evenly spaced…

See, this is easy for me. Four things, evenly spaced. Everything moves from the center an equal amount in X and Y. My simple maths brain has no issue with this. I’m so used to doing it this way I can bang it out without any thought. But this way (while simple) is sometimes not ideal.

As is often the case, I took to Mastodon with my problem, because there are people there much smarter than I am… Luckily @GeekAndDad was on the case! While he was busy doing the hard math I was distracted with some other projects… but when I returned I realized I knew how to do it… because I did it ten years ago! Check out this post about Derby Wheels.

Okay, so I did it before, but didn’t have easy access to the code I had written, but remembered how it worked, so I banged this out:


// Position things in a circular pattern in OpenSCAD

$fn=100;

howMany    = 3;
distance   = 10;
holeSize   = 10;
startAngle = 30;

difference() {

    // create the object
    translate([0,0,0])
        cylinder(d=40, h=3, center=true);

    // loop around in a circle and difference some holes
    for(variable = [startAngle : 360/howMany : 360+startAngle]) {
        rotate([0,0,variable])
            translate([distance,0,0])
                cylinder(d=holeSize, h=3.1, center=true);   
    }
}

(You can also find this code in my gists repository.)

Here we go! Three holes, evenly spaced… We do this by rotating around the center and placing the hole X number of units from the center, every X number of degrees. You can set the number of holes howMany, the distance from the center, and of course the holeSize and also the startAngle which helps rotate the whole set into something that matches up properly.

Hey, you can even do four holes! They are all still evenly spaced from the center…

You can do seven holes… The bit with 360/howMany does the maths to determine how many degrees there are before adding another hole.

Heck, you can even do just two. Want them top and bottom instead of left and right? Just change the startAngle appropriately.

You can put the holes on a square instead… or a rectangle, or anything, really. And they don’t even need to be holes… I just needed holes for this specific example.

Another square with some holes…

And yet another square with some holes… This time with a different startAngle set.

Those holes look a little large… can we make them smaller?

We sure can! Look at that… Obviously you are not limited to just making circles, and this technique of using a for loop to put things around the center of an object can be expanded in many ways. I just wanted to share this recent remembrance so I can find it again when I need it!

By the way, these OpenSCAD renders were all done using my Cyber Night theme for OpenSCAD.

Categories
Uncategorized

Hardware Gridbox

After I got the Bambu Lab P1S I stress tested it a bit with the 3D Printed Pegboard but before that project I actually printed this Gridbox which uses the Gridfinity organizational system.

The way Gridfinity works is that there is a grid (duh) and you print bins or other “things” that fit into the grid. The bins can be 1×1 or 2×1 or 4×4 or whatever fits into the grid. I actually used Gridfinity Rebuilt in OpenSCAD to generate these little bins because I prefer OpenSCAD to Fusion 360.

I scaled the height of the bins to the internal height of the Gridbox. I can tip the box over and all the hardware stays where it should. Almost. The washers are small and thin enough they occasionally end up in the top part of the bin where the labels are. I could probably solve this by gluing a piece of foam inside the top lid so it closes and provides just an extra bit of cushion. I may try that… If I did this again I would perhaps alter the bins just a bit to have flatter tops since I won’t be stacking these bins.

This really is a great way to store all of my 3mm hardware. As I’ve mentioned in other recent posts, I’m really trying to organize my shop and maximize efficiency. Before this I kept all the hardware in individual bags and then in a larger bag, which meant pulling out all the bags, grabbing the one I wanted, opening that bag, getting the hardware, etc. Again, let’s make this easy. I can also see how much hardware I have in each size easily, as compared to being stuffed into bags.

This Gridbox is a really nice design. I used the 4×4 version and will probably make another for my 2.5mm and 2mm hardware. There’s also a version that allows for a clear acrylic laser cut piece to fit into the top lid so you can see what’s inside. I don’t need that for my hardware, but it is a useful feature.

The model is based on the Rugged Box (Parametric) by Whity, which sadly is only parametric if you use Fusion 360. Sigh… I did find this Parametrizable Rugged Box (OpenSCAD) by Dochni but I don’t love it. I’ve started to try improving the code to do what I want but then I just started to write my own which I haven’t finished yet. (Note: See Rugged Parametric Box in OpenSCAD for a great new model!)

Besides a few things that give it away as 3D printed, this is another print that just does not look printed. The quality of the print is so good, and the design is top notch, so yeah… we’ve come a long way since 2011.

Anyway, the 3mm hardware is now sorted! That said, I have been using my Parts Tray with Sliding Lid for over a year now and I’ve been quite pleased with it. I may make a few changes to it though, as there are a few specific pieces of hardware I like to have at the ready.

Categories
Uncategorized

Filament Containers

I’ve been working on reorganizing (or just “cleaning”) my workshop and that’s forced me to look at the processes and tools that I use. In the case of filament storage I used to just stick an opened roll into the plastic bag it came in, toss some desiccant into the bag, and then shove it into an old filament box. It works, but I find it annoying. The bags are a pain, and once they are in a box I don’t know what color is in what box.

So I looked around for some filament storage solutions that involved clear containers. This STACKER F-Box is about $50 USD and I don’t need a container I can print from. This Kingroon is under $30 USD, but again, not quite right. There are these PrintDry containers but it’s $75 USD for 6 of them and I’ve seen a few non-favorable reviews…

Ultimately I got a six-pack of these PRAKI Dry Food Storage Containers for less than $25 USD. And every roll of filament I have actually fits. (About $4 USD per container is not bad at all!)

I was concerned the containers would be crap, or not air-tight, but they’re probably more air-tight than the plastic bags I use over and over again and just fold over and tape shut. These work well for my needs, fit on my shelves, and are nice and clear so I can see what filament is inside. I remember that there was a huge tub at Milwaukee Makerspace that could hold a dozen or more rolls, but that’s not a good solution for my needs, so these individual containers work quite well.

I think this is a good example of COTS (commercially available off-the-shelf) where you can find an existing item which has a specific purpose, and then repurpose it for your needs, and it ends up being less expensive than the item that was specifically designed for a need. So while a few companies created filament storage containers it makes a lot of sense to just repurpose something like a food storage container, of which there are hundreds (or thousands) of different varieties.


Update: In this thread Mastodon user @GeekAndDad pointed out these large IRIS 44 Quart WeatherPro™ Containers they use which can each hold 7 rolls, so the 2-pack will set you up for 14 rolls of open filament! It also looks like there are a variety of other sizes if you prefer the “large container” approach.


Note: This post may contain Affiliate Links. Read More.

Categories
Uncategorized

Bambu Lab P1S 3D Printer

I got a Bambu Lab P1S 3D Printer and wow does it print nice… and fast! We’ll get into that in a bit, but first…

When I got the Prusa MINI back in January 2022 I didn’t really expect to get another printer so soon. I was sort of on a “five year plan”, where approximately every 5 years I would get a new printer (2012, 2017, 2022 if I round the numbers a bit) and I would reap the rewards of the new technology that became the norm over time.

I should note those are just my “own” printers. At my day job (and other places) I’ve used MakerBots, Enders, Monoprice, Flashforge, RepRaps, and Prusa printers. I even gave away two printers without ever really using them because I only have so much space in my shop.

So after getting the Prusa MINI the quality was so good I pretty much stopped using my Monoprice Maker Select Plus unless I had a print that was too large for the MINI. Even then, I would sometimes just split a file and print two parts on the Prusa since it was much more reliable. I even considered (briefly) getting another Prusa MINI but somehow just never did it. I’m glad I didn’t.

I was feeling the itch for larger prints, as the one thing about the MINI that is lacking is… size. It’s print area is 180x180x180 and sometimes you just want a little bit more space. I contemplated a cheap (and large) Ender, but wasn’t impressed by them too much, besides the size and price. Quality is okay, but nothing amazing.

So a few months ago a friend of mine who is even more into 3D printing than I am mentioned the Bambu Lab X1-Carbon he had and told me I should look into Bambu Lab machines… We discussed them a bit, and with the combination of speed, size, and pricing, it was really tempting to get one. My friend then offered me the following: “Get a P1P or P1S and if you don’t like it in a few months I will buy it from you for exactly what you paid for it.” Well, I couldn’t lose. I ordered the P1S a week later.

I had some concerns about The Cloud™ and Bambu Lab being a Chinese company, and not perhaps being a good citizen of open source, and you know what? If I’ve learned anything about my time in this life, it’s that you always have to make compromises. I should also note that the Bambu Lab P1S (and the Prusa MINI) are primarily used for my business, so things like cost and quality come into play there. If I can produce high quality parts in less time, that’s good, and sometimes I have to choose what is good for my own business and my clients. (Or at least be willing to compromise a bit on things.)

Now, I am a huge fan of open source, and I contribute to projects like OpenSCAD and Inkscape which I use in my work, because I want to see them continue. I like the fact that I could probably rip apart my Prusa and rebuild it and feel like I’m in control of the hardware. With the Bambu Lab machine, it feels a bit more proprietary and difficult to repair or replace parts. An acquaintance suggested to me that “Bambu Lab represents everything you’re against!” and sadly, I take part in things every day that I’m against, but that’s living in the modern world. I try to make choices that cause less harm, but it’s not always easy.

Okay, have I justified the printer yet? Let’s hope so… Moving on to the actual device, the Bambu Lab P1S is pretty damn amazing. It prints about three times the speed of previous printers I’ve owned, and the quality is off the freaking charts. I’ve seriously never seen prints look this good from a “consumer” grade printer. They say “Works right out of the box, set up in 15 minutes” and that is pretty accurate.

You can avoid the cloud stuff if you want. You can use LAN mode, you can FTP files to the machine’s SD card, or you can sneakernet the SD card if you want. You can also use OrcaSlicer if you don’t like the Bambu Studio software. You also definitely do not have to use Bambu Lab filament. Buying replacement parts is probably best done through Bambu Lab (for now) but there are some third party items already… I got a third party build plate that works just fine.

I know with more proprietary devices you’re somewhat at the whim of the manufacturer, and can see it two ways. If things go south you (and every other owner) can attempt to hack the crap out of it, load new firmware, replace components/brains, etc… or replace it. Machines are getting cheaper all the time, and let’s be honest, most people don’t keep things around as long as we used to. (I mean, it’s sad but true.)

I should note I do not have the Bambu Lab AMS unit, which allows for multi-color and multi-material printing. I really don’t see the need for the things I produce, and the multi-color printing is extremely wasteful (in materials and time). For now I’ll stick to single color/material printing.


Let’s look at a few more prints…

Here’s a tray I printed to fit perfectly under my monitor stand. It’s 180x180x45, which is larger than I can print on the Prusa MINI. I ran out of filament when printing it so had to load a second spool, which worked just fine (as expected) and looks pretty good since it’s a two-tone green now.

I was always amazed at how smooth (and perfectly printed) the bottoms were on prints from the Prusa MINI, and the P1S does a good job as well, but damn… that textured bottom is beautiful. It just hides any imperfections and gives a “hey, this is not 3D printed” look to things. The “fake carbon fiber” look is from a cheap PET build plate I got from Amazon and it’s a nice option as well. (These were all early prints and I’ve improved the quality a bit since then.)


But wait, there’s got to be something(s) wrong with this printer, right? Of course!

Control Panel (and Screen)
The control panel & screen leave a bit to be desired. It’s been describe at a “90’s car stereo” and it’s barely a step up from the two line LCD displays that were popular on printers a decade ago. It’s usable, and I don’t totally hate it, but it does sort of suck. The X1-Carbon has a huge-ass screen! But hey, that’s how you differentiate products and justify pricing, right? Still, even the Ender-3 S1 has a better screen. I absolutely love the interface on my Prusa MINI, which is a nice screen with a click wheel. My old Monoprice MSP had touchscreen. So yeah, screens are a weird thing. (I’m considering adding a DIY xtouch controller.)

File Storage & Workflow
The P1S uses a Micro SD card. Yeah, those tiny ass little cards you could easily swallow. I much prefer a USB port I can stick a USB thumb drive into. Also, there is no support for folders, so managing files on the SD card is nightmare of one long list of all the files. There is a single folder called “cache” that holds any file that has been previously sent from the Bambu Studio software. I would love to see folders. I use the folder feature all the time on my Prusa MINI. (One more great feature of the Prusa MINI is that when you plug in a thumb drive it queues up the most recent file added to the drive and pops it up on the screen and you can print it with one click. This is the right way to do it.)

That said, most of the time I end up using Bambu Studio (the slicing software) to send files to the P1S. This is the first printer I’ve had with built-in WiFi. I do like the convenience, especially since the lack of folders makes it nearly impossible to manage files on the device. (I should probably just make a separate Micro SD card for production, with all of my regular files on it, and swap it in as needed.) I am, of course, not a huge fan of The Cloud™ and you can opt not to use the cloud, but you lose the ability to monitor prints remotely.

Slicing & Sending Files
Bambu Studio has a few weird quirks, but there’s always OrcaSlicer. Bambu Studio was forked from Prusa Slicer, so under the hood much is the same. (You can also do a few things in config files where there is no interface to do them in Bambu Studio.) So typically I slice a file in Bambu Studio and click “Print” then send the file. The file actually goes to the cloud and then to the printer. Now, there is a “LAN only” mode to avoid the cloud, and you can actually FTP files to the SD card as well, but you can’t start them from Bambu Studio. You can also just “Send” the file from your computer to the SD card, so you can hit “Print” on the machine, but every now and then this does just not work for me.

Beep Beep!
Believe it or not, the P1S lacks a piezo speaker. It cannot beep at you. M300 commands in G-code are ignored. I find this omission sort of ridiculous.

Conclusion
Overall it’s a weird mish-mash. If you just do the cloud thing that is the easiest, but for no-cloud you can put files on the SD card (but not in folders) and print from the machine but not from Bambu Studio. I didn’t even mention Bambu Handy, the mobile app for monitoring and controlling the P1S. (I may need a second post!)

Okay, that’s it. I’m gonna end this post by saying the Bambu Lab P1S is a printer that costs $700 USD, prints high quality prints, really fast, and has a lot of nice features. Does it lack a few nice features, yes it does, but again, at that price (for a 256x256x256 build volume) I can live without a few niceties. If you want those niceties and have the budget, go for the Bambu Lab X1-Carbon instead.