posts tagged with the keyword ‘3d’

2017.02.11

When it comes to 3D modeling for the majority of the 3D printing I do, I tend to turn to OpenSCAD. OpenSCAD is known as “The Programmers Solid 3D CAD Modeller”, and it’s free software available for Linux/UNIX, Windows and Mac OS X. Yeah, you create objects by writing code. It’s weird, but so am I.

If you’re one of those cloud-loving weirdos (who also uses Chrome) you can also opt to use OpenSCAD.net, which is a (blah) “browser-based” version of OpenSCAD. Sort of. It definitely has it’s usefulness (Chromebooks!) but anytime I can download and install an open source application, I’ll opt for that route.

Now, once you get used to OpenSCAD (assuming you want to) you can refer to the cheat sheet or read the entire OpenSCAD manual. But suppose you don’t exactly want to write code, or you aren’t good at it yet… Perhaps BlocksCAD can help.

Functions

BlocksCAD puts a “blocks” interface on top of OpenSCAD. You may have seen this block-thing in use with Scratch. It’s a good way to teach kids how programming works. (There’s an Arduino-ish block application call mBlock that works with the Makeblock robots. And yes, there’s lots more scratch blocks stuff out there.)

Blocks

I took a model I made in OpenSCAD last week and recreated it in BlocksCAD. It took quite a bit longer (probably because I can write code fairly quickly) but the results were good. The blocks really help show the structure of things. For anyone whose had to remember bracket placement, semicolons (and tabs & indents if you care about readable code) the blocks interface hides all of those things. Again, possibly a good thing for beginner coders.

Code

In BlocksCAD you can toggle between the blocks interface and seeing the code. This is great, as you can see the code that gets created by the blocks. Note that you cannot edit the code in the code view. This is (slightly) annoying, but I can understand why this decision was made.

There are things that BlocksCAD doesn’t support, but the basics are there. (I’d love to see comments added.) The basics are enough to get a beginner (child or adult) started with building blocks into a program that generates a 3D model. Sweet!

Share

You can also easily share the models you create. (Okay, that’s probably the one nice feature about a browser/cloud-based thingy.) You might notice from the image above that the holes are weird looking, as in, not very round. What’s going on?

Rod Holder

Here’s the original model that I created in OpenSCAD running on my computer. Note that the round holes are super-round! I get them round by adding the line:

$fn = 100;

to the top of my code. The $fn thing controls the number of facets used to generate an arc. It’s the difference between a round circle and a low-resolution circle consisting of x number of flat sides. (You can also use the $fn to allow you to quickly render models by setting the number low, and then raising the number before you do your final render.)

Rod Holder

Here’s what I got when I copied the code from the “code view” of BlocksCAD and pasted it into OpenSCAD and rendered it. Blah! Low-resolution holes. If I added my $fn = 100; line it rendered what I really wanted.

STL

Okay, so I also downloaded an STL file from BlocksCAD and it looked like this. Hmmm, much better quality than the low-resolution version I got from the code I copied. So what’s up? Well…

When you render objects in BlocksCAD there’s a “smooth” option with Low, Medium, and High settings. So, if you choose the High setting, you get a much better model. The code view doesn’t show whatever the $fn/facet setting is for the model, but it must be adding it when it does the render. Makes sense.

BlocksCAD has a few quirks, but I think it’s a great concept. While I’d love to see a downloadable version, I hope Einsteins Workshop continues to provide the web-based offering for those who want to use it.

2015.05.02

Parts

There comes a time when every designer who designs things in two dimensions that get assembled into something that has three dimensions wants to have a diagram with some… dimensions.

Above is a dimensional illustration of the parts of the mount for the shaft for the machine I am building.

If I were to provide assembly instructions I’d probably want such a drawing. Here are some notes on the process, so I can do it again next time.

Parts in Inkscape

In Inkscape, each piece must be an object. The ‘holes’ cannot be separate objects, but must be cut out (differenced) from the main object. (This is the same method needed when bringing a 2D drawing into OpenSCAD, so nothing new there.)

Sadly, Rhino cannot import SVG files. (Mini-rant: I’m always surprised at the number of applications that do not support SVG. The SVG specification has been an open standard from the WC3 since 1999!) Rhino can import PDF files, so export your Inkscape file as a PDF. Your PDF should be a vector PDF, by default. Inkscape should do the right thing unless you’ve done something silly to your file. (Which is possible, I’ve done it.)

Parts in Rhino

Our vector file is now in Rhino! Double-check to make sure each line/object did not get doubled-up. I’ve had it happen a few times but could not conclusively determine what causes it. It may be the width of the stoke of the objects in Inkscape.

You can now extrude your object(s) in Rhino. I make them the height of the material I am using. Oh, I’ll be laser cutting these pieces with 4.45mm acrylic. YMMV.

Solids in Rhino

Change the view in Rhino from wireframe to solid and you’ll see your new 3D object(s)…

Extruded in Rhino

Make sure the holes are really holes! If not, re-read the part above about objects and holes and such. You need to difference any cut out things!

Make2D in Rhino

Now you can move your new object(s) because the original vector lines we imported in are probably sitting right underneath them. Swing your object(s) into the view you want… get that angle just right, and then choose “Make 2-D Drawing” from the “Dimension” menu.

2D from 3D

You should now have a 2D version of your 3D object. Rhino should also select it by default, so you can use the “Export Selection” menu to save it out as… A DXF file. :( Sadly, Rhino cannot export as an SVG or vector PDF, or even an EPS file. Rhino can export as an Illustrator file (.ai) but Inkscape cannot open those. The AI file it exports starts with “%!PS-Adobe-3.0″ which is probably a format from that was popular in the 1990s.

3D/2D in Inkscape

Anyway, we can certainly import that DXF file back into Inkscape and work with it, and make it look like a nice vector drawing. Mostly. Sort of. I mean, if you want to just fill it with a color or change the stroke, it’s not quite that easy. If you just want a line drawing that isn’t too fancy, mission accomplished!

Oh, and not that I want to turn Inkscape in a 3D application, but I could see great value in being able to extrude and change the view angle of a vector drawing… maybe through an extension?

Note: Lots of comments about this post are on Facebook.

2014.11.29

brocstl001

One of my, uh, “hobbies” is figuring out alternative workflows, or ways of solving a specific problem. I often do this with a bias towards open source or free software, because I like to know how to do things, and share how to do things, even when you don’t have expensive commercial software.

If you remember reading about Broc’s model in one of my Digital Fabrication posts, he mentioned using the “Unroll Developable Srf” function in Rhino to create flat pieces. Well, I have access to Rhino at UWM, but any piece of software on my own machines is preferable because I have easy and immediate access to it 24 hours a day, 7 days a week.

Broc's STL in 123D Make

With this in mind, I set about trying to do what Broc did, without using Rhino. I ended up using 123D Make from Autodesk. It’s not open source, but it’s (mostly) free if you’re willing to create an account and share your personal info.

Broc's STL in 123D Make

123D Make has a bunch of nice options for breaking 3D objects into “slices” that can be assembled using various methods. (Supposedly there’s a beta version that does finger joint boxes.) It took a bit of tweaking things, but I was able to create slices just like the ones Broc made in Rhino.

Broc's STL in pieces

The output from 123D Make was a vector-based PDF file with all the parts in 2D.

Broc's STL in pieces

The PDF was easily imported into Inkscape, where it can be set up for being cut by a CNC machine. There’s a minimal amount of clean-up needed to remove any attachment tabs that the application generates. Try as I might, it did not allow me to put a value of zero on some of the parameters. Maybe in the next version. :/

(Oh, you could always print out paper templates and cut things the old fashioned way if you’re not a CNC user.)

Here’s a great promo video 123D Make that shows some of the slicing capabilities.

2014.05.08

3D Drawing Pens

There’s a number of so-called “3D Printing Pens” on the market now, or coming soon, though in reality I think they should be called “3D Drawing Pens”. I mean, you don’t have a “2D Printing Pen” do you? Pens are for drawing, they are not printers that print.

I know a lot of people are excited about these things, thinking it’s the cheapest way to get into 3D Printing (if they work) because you’ve probably seed some amazing photos of things people are creating with these things…

Well, here’s my thought on these pens:

If you’re terrible at drawing in two dimensions, you’re probably going to be terrible at drawing in three dimensions.

Yeah, if you’re a skilled artist who knows how to work a pen, you might make some awesome things. That’s how art works, but don’t expect to pick one of these up and create a masterpiece the first time.

That said, I do think these “3D Drawing Pens” are interesting, and I look forward to see where they go, and I await an open hardware version.

2012.10.16

I’ve been digging into OpenSCAD lately and managed to come across this Flickr photo with the most minimal of explanation of how to do a reverse object in OpenSCAD, but it was all I needed…

Space Invader SVG

I started with the SVG file of the classic Space Invader character, sized to the width and height I wanted, and then exported it from Inkscape as a DXF file.

Space Invader STL

Once we’ve got the DXF we can pull that into OpenSCAD and extrude it into a 2.5 dimensional object. (It might be 3 dimensional, but I’m not going to argue 2.5D versus 3D right now.)


linear_extrude(height = 10, center = false) import("spaceinvader.dxf");

After we compile the code we can then export our object as an STL file. We can then pull that STL file into OpenSCAD again for the next step…

Space Invader STL (reversed)


difference() {
	translate([40,42,2.5]){
		cube([90,70,14.5], center=true);
	}
	# import("spaceinvader.stl", center=true);
}

You’ll need to tweak those numbers of course, and as for the # at the start of the import line, that’s to show us the object even when we can’t see it, as it were… sort of. It’s an OpenSCAD trick I learned from Mark Finn at BarCampMilwaukee.

So now that we’ve got the object dropped into a block (at the proper height) we can then export it as an STL file, which could be cut on a CNC machine, or 3D printed.

Space Invader G-code

I’ve not yet attempted to 3D print this, and I’ve had not much luck in printing things that are water-tight. I might try getting some silicone to coat the piece which would make it water-tight, and food-safe.

« Older Entries |


buy the button:

Buy The Button