Jump to content

STL format surprisingly simple


donmilne

Recommended Posts

Posted · STL format surprisingly simple

I'm a total noob to 3D printing and I must admit that I had no idea that Cura is only used for printing 3D models, not for creating them.

So, having learned my mistake I've been having a look at what 3D model creation software is available for a reasonable price - ideally try for free - that isn't too complicated. (Recommendations welcome). Frankly I'm so far finding that software seems to fall into two categories: either bug ridden garbage, or very flashy but intimidatingly complex.

Interestingly, I had a look at the STL format itself and discovered that it's very easy to understand. I'm a C programmer myself and it so happens I did a lot of 3D graphics calculation work back in the 90's, so the purpose of everything in the STL file is very clear to me - I reckon I could "roll my own" STLs far more easily than learning how to get a complex 3D CAD package to do it for me.

However, the implications of such a simple 3D format (that Cura seems to use by default) then occurred to me. First, everything is made out of facets - no true curves. Doesn't this make a nonsense of high printer resolutions? Also, the facets will let you distinguish between "inside" and "outside" of an object, but not vary the density (fill factor?) of parts of the inside. This scuppers a plan I had in mind for my printer, which was to make custom enclosures for certain electronics projects, with strengthened lugs where (say) the enclosure is to be bolted down. Of course I can still make the whole thing at the higher density, I guess that's the cost of simplicity. Maybe the tweakatz plugin would be useful for this in some projects too.

Anyway, I'm curious: is this simplicity just because STL is old and predates 3D printing, or are other 3D object description languages equally limited?

 

  • Link to post
    Share on other sites

    Posted · STL format surprisingly simple

    So much!

    Welcome.

    Regarding cad software - I really love sketchup because I know it. It's pretty damn easy. It's free. It's from google. The free version doesn't let you do boolean operations (like subtract a cylinder from a square to make a hole). But it's pretty good. Also sometimes it gets slightly buggy when there is rounding error and your flat surface won't fill in because one of the 50 odd points is at the wrong z height but it's not visible.

    However if I were to do it again I think I might rather learn blender. But I really don't know what's the best. Blender is also free.

    If you want to "design STLs yourself with your own code" I recommend you look at openSCAD. It's a programming language to create STLs. It has an amazing debugger and it does variables, "for" loops and such and comes with lots of free libraries that have things like screws, gears, 3D fonts, etc. It's what "Emmet" uses over on thingiverse and he's my favorite person on thingiverse. He's amazing.

    Regarding strength. PLA is pretty damn strong. I'm always printing hollow objects with .8mm shell thickness and it's pretty strong. A .4mm string filament coming out of the nozzle, after it cools, is hard to break with my fingers. Having said that you could add "fins" to your lug holes. Or you could add hollow cylinders in the area that have an inner diameter of say .01mm and Cura will print "shell" up against it. Some slicers will change infill density and other parameters for certain areas of your print but of course these slicers are very complicated to use.

     

  • Link to post
    Share on other sites

    Posted · STL format surprisingly simple

    Anyway, I'm curious: is this simplicity just because STL is old and predates 3D printing, or are other 3D object description languages equally limited?

     

    3D printing is 25 years old, but did not really take off before thanks to patents and limited availability of tech needed.

    STL was made for 3D printing.

    AMF has been made as a replacement, and the standard support curved surfaces. However, the AMF reader of Cura does not.

    STEP files support curved surfaces (but Cura cannot read those)

    What is generally done to get high resolution models is exporting it with many small facets for the curves. I usually use 0.4mm segment lengths.

    As for software. OpenSCAD would suit you. You can also look at DesignSpark-Mechanical, which does not have a huge learning curve, but is very powerful.

     

  • Link to post
    Share on other sites

    Posted · STL format surprisingly simple

    To give you a background - I'm an engineer, not an artistic type, I plan to make only practical objects in my 3D printer. I'm used to making things for myself: I have a hobby workshop of my own, and I own a lathe and a milling machine. I expected to be able to do anything in a 3D model that I could on either of those two machines: for example start with a cylinder, drill a hole and thread it.

    I've seen mention of Sketchup in my searches. I believe Google has ditched it, and from what you describe it sounds quite limited anyway?

     

  • Link to post
    Share on other sites

    Posted · STL format surprisingly simple

    Yes, I realize that smaller facets is how I would get better curves. In fact there's an argument for saying that there's no point in going for anything more complex because the motors have finite precision anyway.

    Do any other standards handle variations in density inside the model? And does Cura support these?

    Thanks for the OpenSCAD and DesignSpark_Mech tips. As it happens I'm already signed up with DesignSpark to use their PCB package, so hopefully I can access that package without going through the hasse I had with the latter! :-)

     

  • Link to post
    Share on other sites

    Posted · STL format surprisingly simple

    @gr5: Oooh... just noticed your description of OpenSCAD. That sounds very appealing, I'll definitely look at that.

     

  • Link to post
    Share on other sites

    Posted · STL format surprisingly simple

    it sounds quite limited anyway?

     

    Well - it doesn't do stress calculations or temperature simulations. But it's pretty good. If you want to create animals go for blender. If you want to create "parts" then most cad software should work okay. I doubt google dropped sketchup but I don't know. I know some professional architects who swear by it.

     

    just noticed your description of OpenSCAD

     

    Daid mentioned it also. Daid wrote/writes Cura.

     

  • Link to post
    Share on other sites

    Posted · STL format surprisingly simple

    Daid mentioned it also. Daid wrote/writes Cura.

     

    Yes, I already acknowledged Daid's mention, and I do know who he is. :) I specifically thanked you for your description of OpenSCAD, as that's what raised it above the level of "yet another app to look at". It sounds ideal for me, though the docs seem a bit lacking so far.

    My source of Sketchup info is the Wikipedia article, which says that Google sold it to Trimble in 2012. Obviously this puts a big question mark beside it from the pov of someone selecting an app to invest learning time in.

    [Edit] I found the OpenSCAD online manual linked from the Wikipedia article.

     

  • Link to post
    Share on other sites

    Posted · STL format surprisingly simple

    In fact there's an argument for saying that there's no point in going for anything more complex because the motors have finite precision anyway.

     

    Having played with OpenSCAD (generally just perfect for me) and seen how it grinds to a halt when the number of facets is still just a few thousand, I take it back: there's a clear argument for expressing curves directly rather than as a zillion facets! :)

     

  • Link to post
    Share on other sites

    Posted · STL format surprisingly simple

    Do not use SketchUp. It has a huge tendency to generate rubbish for 3D printing. Internal faces, none-closed meshes.

    DesignsparkMechanical is sort of a SketchUp, but on a solid modeling level instead of a polygon level. Works awesome.

    (As for curves in OpenSCAD. Doing boolean operations on curved surfaces is still an open math problem as far as I know)

     

  • Link to post
    Share on other sites

    Posted · STL format surprisingly simple

    It is a shame that OpenScad doesn't do as many polygons as you would like. I thought it looked like a pretty cool program and was thinking about learning it. Anyone know what the main limitation is for its polygon count?

    If you are just doing this for a hobbies, I believe solid works has a relatively cheap (i think in the range of $100/year) licence for non commercial use and is super easy to learn.

  • Link to post
    Share on other sites

    Posted · STL format surprisingly simple

    It is a shame that OpenScad doesn't do as many polygons as you would like. I thought it looked like a pretty cool program and was thinking about learning it. Anyone know what the main limitation is for its polygon count?

     

    I'd say it's still worth your while looking at it, because it's such an effective way to create 3D engineering models. With no prior experience I was able to start creating a complex model within minutes, and without being hamstrung by a poorly designed GUI. If you don't need lots of nice curved surfaces and hole then perhaps you won't need to worry about the speed constaints.

    Speaking of which, I assume it's a combinatorial problem (searching for possible intersections?), and I think they just chose a particularly slow computational graphics library, CGAL. Reading up about it, the library seems to be using variable precision data types for coordinates. What's more they claim that they decide after each calculation how much precision is needed to store a result. Sounds clever - and slow. In most calculations I don't need massive precision, I just want a quick rendering of the model so far. The heavy duty stuff could wait until a "publish" step or similar.

     

  • Link to post
    Share on other sites

    Posted · STL format surprisingly simple

    When I use openSCAD I usually have a "$fs=0.4; $fa=5;" at the top, which I comment out while quick rendering, and only enable when I build the final model. This increases circle persision.

    Also, OpenSCAD has the tricked OpenCSG rendering, which uses rendering tricks to draw the result.

    You might want to take a look at my TITAN OpenSCAD code, it contains quite a few tricks: https://github.com/daid/TITAN

     

  • Link to post
    Share on other sites

    Posted · STL format surprisingly simple

    When I use openSCAD I usually have a "$fs=0.4; $fa=5;" at the top, which I comment out while quick rendering, and only enable when I build the final model.

     

    I started doing something similar, though using $fn only. $fn~=40 gives me something that resembles the default. $fn=100 gives nice results for what I've done so far, however it does have to be tuned for the object diameter. Even so, even at teh lowest quality OpenSCAD is pig slow once you have several diameters and holes in play.

     

  • Link to post
    Share on other sites

    Posted · STL format surprisingly simple

    With $fn it's going to be slow, never use that unless you want an exact number of facets (like 6 sided holes for nuts)

    With $fn=100 on a 3mm hole you're adding 100 faces for a 3mm hole, that's just silly, no wonder it's slow. $fs=0.4 gives faces that are max 0.4mm long, which is about the resolution the Ultimaker can get, when you use it you'll never see the polygons in your print. $fa=5 is to prevent very large circles from having too many faces.

     

  • Link to post
    Share on other sites

    Posted · STL format surprisingly simple

    Thanks for the tip - I'll give that a try.

     

  • Link to post
    Share on other sites

    Posted · STL format surprisingly simple

    It is a shame that OpenScad doesn't do as many polygons as you would like. I thought it looked like a pretty cool program and was thinking about learning it. Anyone know what the main limitation is for its polygon count?

     

    Maybe you are interested in:

    Bezier surfaces: http://williamaadams.wordpress.com/2011/05/26/linear-extrusion-of-bezier-surfaces/

    Rounded surfaces: http://williamaadams.wordpress.com/2011/07/01/revolutionary-surfaces-with-openscad/

     

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • UltiMaker Cura 5.8 Stable released 🎉
        In the Cura 5.8 stable release, everyone can now tune their Z seams to look better than ever. Method series users get access to new material profiles, and the base Method model now has a printer profile, meaning the whole Method series is now supported in Cura!
        • 5 replies
      • Introducing the UltiMaker Factor 4
        We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
          • Thanks
          • Like
        • 3 replies
    ×
    ×
    • Create New...