16 ms·
CADing and 3D printing like a software engineer
- rekttrader 2y agoOpenSCAD is your friend.
- fragmede 2y agoOpenSCAD feels very dated, not only due to the editor and the fonts used, but shortcomings due to language limitations when coming from other software, but it works.
- Klaster_1 2y agoI had much better experience with a VSCode and anOpenSCAD extension compared to the stitch editor. Pair that with the latest master build for extra performance.
- wickedsight 2y agoAlso the fact that sometimes things can take ages to render. I did have some fun results getting ChatGPT to create OpenSCAD scripts. It created a fully functional parametric christmas tree for me, which I thought was kinda cool.
- gotts 2y agohow big are your assemblies? I had some issues on large assemblies but after Manifold rendering release it became much much faster.
- tliltocatl 2y agoThere is also https://github.com/mirmik/zencad https://github.com/mirmik/zencad. Full Python and OpenCASCADE core, so feels less quirky than OpenSCAD.
- throw646577 2y agoIs it? IMO sticking with OpenSCAD is fundamentally limiting your progress with modelling for 3D printing. It's not CAD. Simple parts, yes. Geometry and trigonometry demos? Yes. Actual computer-aided design... no not really.
- WillAdams 2y agoThe great thing about OpenSCAD is that it makes representing things which can be described mathematically easy. The awful limitation of OpenSCAD is that one's ability to model in it is limited by one's knowledge of math and trigonometry. The funny thing is, when it comes down to actual manufacture, ultimately, one is making G-code, which is limited to lines and arcs in most implementations --- so I'm approaching it thus by way of Python in OpenSCAD: https://github.com/WillAdams/gcodepreview https://github.com/WillAdams/gcodepreview
- Joel_Mckay 2y agoIn some ways, but for off axis parabolic mirrors with internal geometry Openscad seemed to work fine. Additionally, the parametric formats are fundamentally necessary when working in plastics which tend to shift around during additive manufacturing. I like that OpenScad integrates into FreeCad, and can do more than lousy STL outputs. It is far from perfect, but can solve some problems with ease. Most cloud based software strips one of long-term stability in the design folder (can no longer store a version snapshot of the project binary dependencies), and so poses a liability to any firm running large infrastructures. For one-off stuff, one could argue it doesn't matter. But in someways, FreeCad beside the project files will be viewable/exportable forever. Unfortunately, now the Solidworks offline workflow also requires the online license nag screen every 30 days. However, it is not part of Autodesks walled garden built on internet stability (a significant issue in a remote field deployment.) Good luck, =3
- throw646577 2y agoOh I'm a FreeCAD person anyway. OpenSCAD was a useful stepping stone for me, from programming to 3D. But I've been doing my own designs in FreeCAD for two and a half years or so. I just think the typical groundswell of HN support for OpenSCAD is a bit misguided; it sort of relies on near-wilfully ignoring what GUI CAD -- even FreeCAD -- can do for one's designs. Yes, it's good for simple geometry, and some more advanced mathematical geometry. But it boxes you in pretty quickly because you cannot easily compose geometry based on the outputs of previous operations.
- chasd00 2y agoI’ve used openscad and some of my friends swear by it. I eventually just bit the bullet and climbed the fusion360 learning curve. Everything has been smooth sailing once over that hump.
- criddell 2y agoRight now you can get a year of SolidWorks for Makers for $24. If all you've ever used is OpenSCAD or OpenCascade-based software, you are in for a pleasant surprise.
- WillAdams 2y agoI bought the Veterans' license for Solidworks a couple of times --- the UI never really clicked for me (fortunately, it was at least useful for my son to do homework with). The one 3D CAD program which I was successful with, after a fashion is the nascent Dune 3D: https://dune3d.org/ https://dune3d.org/ which has been discussed here a bit: https://news.ycombinator.com/item?id=40228068 https://news.ycombinator.com/item?id=40228068 https://news.ycombinator.com/item?id=37979758 https://news.ycombinator.com/item?id=37979758 https://news.ycombinator.com/item?id=41975958 https://news.ycombinator.com/item?id=41975958
- constantcrying 2y ago>Parametric CAD is basically functional programming. It very sadly is not. Parametric CAD does not have the invariants that functional programming has. If you insert an operation in the timeline, which changes e.g. the number of faces, the CAD software can only guess to which faces the operations after it apply. In functional programming you explicitly state which elements you mean, in Parametric CAD this is done by guessing. OpenSCAD is functional programming, it also is orders of magnitude less powerful than Fusion360.
- i_am_a_squirrel 2y agoI just went through this journey, except I learned freecad. You end up having to click and enter so many numbers if you need exact dimensions, so I'm planning on switching to cadquery. It would be cool to make a framework for modifying cadquery code with natural language, for example "make box 1 and box 1 flush" or "create two concentric semi-spheres and subtract the smaller one from the larger one" But idk, maybe once you're fast at fusion this kinda stuff is faster to hotkey than speak
- Klaster_1 2y agoHave you tried the new VarSet in 1.0? I found it more ergonomic than the old spreadsheet approach. With a formulas first approach, I find the modeling flow more controllable. Come to think about it, it starts to resemble a view/model arrangement I am used as a frontend dev.
- throw646577 2y agoVarSet has an incomplete GUI but you're right it's a better fit; it has fewer massive recalculation bombs than the Spreadsheet approach (and it can still AFAIK work as an interface to a configuration table sheet). The Spreadsheet module is awesome (particularly configuration tables, which I used even in one of my first serious designs) but I still don't really know why my model has to recalculate because I changed the background colour in a cell. That seems to me to be unnecessarily deep integration.
- tony69 2y agoClaude can write cadquery, worked well for me
- xemoka 2y agoI’ve had such a hard time with Claude and cadquery/build123d; did you do anything specific to get better results? I tried turning the examples into a markdown document to feed into sonnet as part of the prompt, and that helped a bit, but still couldn’t get it to build basic parts reliably.
- freeqaz 2y agoI've been 3D printing slinkies (helical coils) and I used build123d for it. Somebody on HN recommended it as a first pass if you don't know CAD. It's a little rough but I was able to get it to do what I needed it to! Here's my code: https://github.com/freeqaz/light-coil-model https://github.com/freeqaz/light-coil-model Let me know if you want one. They're pretty rad!
- fragmede 2y agoCan you do other shapes of slinkies, not just circles?
- bravetraveler 2y agoI've seen mass-produced ones in various shapes. For instance, stars. OP probably could, not especially complicated. Notably worse at the act of 'slinking'. Would tangle like no other!
- freeqaz 2y agoYes haha exactly. I'm sure I could figure out the code to slinkify any object which would be pretty fun For a non-circle that still works for slinky purposes, I'm sure some sort of geometric prism would be cool. Maybe I'll take a crack at it over winter break!
- randomghost1 2y agoHey, shameless plug in case you are interested. We're building this AI copilot for Fusion 360 called MechAI. Like a SWE, it enables you to store files on GitHub in JSON format with diffs, merging, etc. ;). Beta coming out soon, check out the demos and waitlist on our website: https://www.trymechai.com/ https://www.trymechai.com/.
- gotts 2y agofunctional programming is such an (semantically) overloaded term, it means completely different things to different people. Each time I read it in a blog post/tweet it makes comprehension slightly more difficult.
- throw646577 2y agoIn this case the poster is not actually going that far off the reservation. A parametric CAD package starts off with some variables, makes 2D representations of them that can be solved by a constraint solver, extends those 2D representations into a third dimension parametrically, connects 2D representations to earlier generated geometry etc. If you change an early parametric variable, it ripples through the design because the design is a directed graph (indeed, CAD designers often run into situations where they have tried to do things which would create a cycle in a graph -- use the dimensions of a subsequent part in an earlier part, which the CAD package cannot solve). Most of the core calculations involved are functional in this regard -- for example a 2D sketch to a 3D extrusion, a 2D sketch to a sweep along a path.
- willvarfar 2y agoOf course this title triggers me and I need to share/rant about my own programming struggles with CAD :) Sorry Coming at the problem from another end, I have have been designing dream houses as a hobby but have been struggling and frustrated by the current CAD and 3D editors. There are a lot of drawing-house-plans apps like SweetHome3D and Homestyler etc, and they are all really good at getting some wall lines down quickly, but quickly start to get hard to do anything advanced and all give up on real roofs and attics. From the other end there is Sketchup, which is both good and easy yet also difficult to control. The general advice for people wanting to see a house design in 3D is to draw the plan in some house plan software then save that as a jpg and import that into sketchup and then to build the walls on top of the drawing etc. Of course, being a programmer, I had some ideas... and have about a dozen abandoned starts on a house drawing program that actually understands that 'this is a wall, and this is how thick walls are' etc. The openscad approach is good and I have some routines that do sensible tricky roofing angles and things, but you can't really go and and parameterise whole houses. Its a nut that still hasn't cracked. I've watched and talked with a lot of architects and tbh they are sketching and treating their CAD as a bunch of lines rather than the CAD knowing what walls and beams really are.
- WillAdams 2y agoActually, there was a start-up a while back which developed a system for just that --- parameterizing house designs completely so that end-users could customize designs to their heart's content. If you look up "Flood Editor" it should take you to information on it. Interestingly, the company founded by the guy who developed the nailing plate which arguably made McMansions possible was an early investor in CAD, spending ~$1 million for one of the first systems.
- josiahpeters 2y agoI used Home Designer - https://www.homedesignersoftware.com/products/home-designer-architectural/ https://www.homedesignersoftware.com/products/home-designer-... to draw a house we purchased (built in the 1970s) and the changes we intended to make during a remodel. The person reviewing my permit application was very impressed that I showed up with proper plans and not some kind of sketch done hastily on a napkin. It definitely tries to think about walls, rooms, windows, floors as they are meant to be modeled. You can even get a materials estimate based on the properties of the wall.
- atoav 2y agoI thought immidiately: "CAD for programmers? This has to be about OpenSCAD/CadQuery or the likes", but no. So if you want (need) to create parametric CAD parts and can program this might interest you: https://cadquery.readthedocs.io/en/latest/quickstart.html#quickstart https://cadquery.readthedocs.io/en/latest/quickstart.html#qu... I e.g. used it to create parametric electronic parts for visualizations of printed circuit boards where modelling each slightly differently sized variant manually was too much effort.
- jakeogh 2y agoAlso see https://github.com/gumyr/build123d https://github.com/gumyr/build123d (which is closely related to CadQuery, my understanding is it's successor). I used b123d for a project this year and it turned out perfect. When I need to make a change, editing some version controlled py and watching the model update is very satisfying. Best resources to get a feel of why programmatic parametric modeling is so interesting: https://cq-warehouse.readthedocs.io/en/latest/fastener.html https://cq-warehouse.readthedocs.io/en/latest/fastener.html https://bd-warehouse.readthedocs.io/en/latest/index.html https://bd-warehouse.readthedocs.io/en/latest/index.html
- atoav 2y agoThanks for the tip, a pain point with cadquery was the installation so if b123d manages to solve that it is worth checking out.
- throw646577 2y agoI like OpenSCAD for what it is good for: limited, geometrically simple parts and geometry demos. I think CadQuery/Build123D are fine tools with much better abstractions than OpenSCAD. The latter is not, IMO, really a CAD tool at all; at no point does the Computer Aid the Design, in the CAD sense, whereas you can argue that the various OpenCascade code-CAD environments can at least expose generated geometry to code. But the post is right: parametric GUI CAD is pretty much a visual analogue of functional programming. Once you get your head around the ways sketches or their equivalents can map onto existing geometry, a lot of the ways programmers think are very applicable to CAD. You're basically working with a directed graph, which means you can do things like drive designs from parameter sets, or spreadsheets, and e.g. in FreeCA drive some variables from configuration tables (rows in a spreadsheet with different parameter sets) so you can make variations of objects. As much as I think code-CAD has uses, especially perhaps for analysing and post-processing STEP files for download customisers, at this point someone with parametric CAD requirements should at least try a GUI CAD package like FreeCAD or any of the free/low-cost tiers of the commercial packages. FreeCAD can do OpenSCAD, and has a (verbose) Python layer, so it's accessible to code CAD. The tools may initially be a little frustrating for programmers used to writing code, athough IMO less frustrating than the many quirks and significant limitations of OpenSCAD. But CAD methodology is logical and scaleable, and with a little learning you will be able to do things much more quickly and much less repetitively than OpenSCAD, which admittedly is a counterintuitive claim to a programmer. I think programmers tend to think that GUI CAD must be to code-CAD what visual programming tools are to text IDEs: unnecessary fuss keeping you from the truth. But it's really not like that.
- synack 2y agoI had the same problem with my webcam and solved it with 3d printing: https://www.printables.com/model/370558-logitech-c920-shim https://www.printables.com/model/370558-logitech-c920-shim
- hurtuvac78 2y agoI have been using Blender to design 3D models, since I had some knowledge of it. Wondering why not more people are using it for CAD. Are the other tools much better? Why?
- tliltocatl 2y agoIt's perfect for artistic stuff, but for technical you would rather use something that is oriented towards CSG (so that non-manifold topology is no longer an issue). Then you want edit tree, so that you don't have to redo all of the work to change one little thing in the beginning, and then parametric modelling and a constrain solver.
- an_aparallel 2y agoBlender is a bunch of things - but it is not, 1)a parametric program. 2)deals with complex geometry as mesh, VS nurbs 3) isnt really built to dimension 4)isnt really built for generating documentation which 99% of teh time is primary output of these programs - 2d sheets. You can use it for 3d printing - but for engineering...nope. The Autodesk family of products / Solidworks are defacto for a reason - they have decades of tooling, libraries and so on that make lightwork of complex tasks. I'd tear my hair out trying to do my work in Blender which i easily do in Inventor, Autocad or Revit.
- Joel_Mckay 2y agoThere are constraint based CAD addons for blender, and the black art of Geometry node rendering pipelines to auto-generate objects/features. There is also the fact most of the system is open Python API based, and thus everything can be generated from code. However, Blender was not meant to be a constraint based CAD/CAM package. Solidworks still seems like the leader in offline mode, but parametric-everything FreeCad is evolving at an astonishing rate. For critical professional work, gambling on opensource is still inappropriate most of the time. =3
- an_aparallel 2y agoI'm keen on trying freecad 1.0. After professional training in engineering drafting, I'm interested to see if I can get by with a lot more understanding of the processes.
- ansgri 2y agoBambu and Fusion360 sure look nice, but if you're on tighter budget, 3D printers became both cheaper and more reliable in general, and FreeCAD recently got to 1.0 and is quite capable. I worked alongside people using early versions of Makerbot and Ultimaker, and those were a maintenance nightmare. But recently I got a Kobra 2 Pro for $200, and it's both more capable and easier to use than those old monsters. With PLA it's pretty much hassle-free, no need to tweak anything except print orientation and maybe some support options.
- S0und 2y agoFusion360 has a free tier and it's enough for most people.
- zihotki 2y agoFreecad is fully free and after 1.0 release it's enough for most people.
- grumbel 2y agoThe Fusion360 free-tier has been getting ever more restrictive over time. At the moment it is at: > users who generate less than $1,000 USD in annual revenue and use for home-based, non-commercial projects only. Which already makes it unsuitable for any Open Source work. While one might still accept those restrictions for quick one-off projects, those projects are also the ones that FreeCAD can handle fine.
- Mumps 2y agoand only 10 editable projects :/
- baby_souffle 2y agoEditable files! A project might have tens of files in it and you’ll find yourself having to toggle which ones are in the active set. It’s maddening!
- soneil 2y agoA bit of a tangent, but on your note amount multi-material being wasteful - you can improve that a lot by thinking ahead in your design and being strategic about where you use colour. Your benchy is almost a worst-case scenario (which is likely intentional) - because the coloured features are vertical, there will be several changes per printed layer. If you can constrain your material changes to layer boundaries you'll get a much better waste ratio. A good example of this is printing coloured labels/features on a faceplate. So you print the whole faceplate in a single material, then switch material and print the highlight colour as raised features. That gets you a lot of result for a single material change. (On single-material printers there's a method where you strategically pause the print and swap the materials by hand. Learning lessons from that will really hammer home the mindset of optimising tool changes!) There's a lot of lessons like this you'll pick up, where making your design sympathetic to the print process can have huge payoffs.
- Ambadassor 2y agoI agree, designing for 3D printing and more specifically designing for multi-color or multi-material can help save a lot of time and material. Additionally, printing any number of copies of the same multicolor object will result in the same amount of waste. This doesn't reduce the absolute amount of waste, just makes it a smaller % of the total material used. Also worth looking into the "wipe into object" setting in the slicer, which will use the color changes in an extra model instead of purging them.
- fecal_henge 2y agoI bought a Stratasys J35 and its just a bucket to dump money into... I mean it can print absolutely tiny features but maintinance and consumables are so expensive. Meanwhile my colleague bought a Bambu Carbon for I think 2% of the price of my J35 and its such a brilliant machine. Fillament printers just seem to be getting better and better.
- 082349872349872 2y ago> [the webcam's] mount’s front-facing part dips too much down beyond the bezel, and it ends up blocking my screen. As an old-school software engineer, I would've been strongly tempted to solve this excess material problem with a file.
- fmeyer 2y agoNice post, let me build up on the software engineering analogy. I've had a 3D printer for a while, and I have to say that Bambu has completely changed my perspective on the whole experience. Before, I treated it mostly as a time-consuming hobby - setting up my own Octopi for remote printing, tinkering with different settings and parts on my Prusa. It was all trial and error, with most prints turning out below average. Now it feels more like a continuous integration system. It runs mostly unattended, always ready to execute my next batch of prints. I recently traveled for a week and only needed my wife to refill the filament and remove finished prints, allowing my workflow to continue uninterrupted. I don't regret my initial experience since I learned a lot, but I really appreciate having a more streamlined process now.
- wdfx 2y ago> and only needed my wife ... to continue uninterrupted That's some sweet workflow optimisation. :) I'd have tons more free time if I just outsource all the little tasks that keep me busy to my significant other.
- Ambadassor 2y agoThat has been my experience as well. I had a bunch of printers before the X1C, from 3 different countries, and all of them needed various amounts of tweaking and hacking to reach the print quality and ease-of-use I was expecting. Even the Prusa MK3 (upgraded to MK3S, then MK3S+...) required a Raspberry Pi to be able to print without lugging an SD card from my PC to the printer, and a USB webcam to add print monitoring. Now when people ask for FDM printer recommendations, I tell them that this hobby has two main paths: One path regards the printer as a tool to create things for other projects; the other path has the printer as the project itself. An analogy I use is buying a car that's working and ready to drive vs buying a car that doesn't work and repairing it. Are you looking to drive or are you looking to fix/build a car? Bambu printers are an easy recommendation for a printer which is a tool. The new Prusa CORE One might be a good fit as well, but it's still too early to tell what its quirks are. For printers that are projects, the Ender 3 comes to mind as a very cheap base for countless tinkering and upgrades.
- 2y ago
- self_awareness 2y agoBeing on a budget and buying X1C with AMS has nothing in common. It's a bad choice. It's a really awesome printer that just works, but it's not a budget option. If you're on a budget, buy yourself BambuLab A1M, which is the best quality-to-money ratio.
- frickinLasers 2y agoDid Bambu fix that thing where their printers need to be online and waiting for instructions from the cloud to be useful? I'm not about to send my designs through their servers. https://arstechnica.com/gadgets/2023/08/3d-printers-print-break-on-their-own-due-to-cloud-outage/ https://arstechnica.com/gadgets/2023/08/3d-printers-print-br...
- sdflhasjd 2y agoThey fixed it in the sense that there's an opt-in offline-only print mode and they do work without a connection. It still requires you to do an initial setup using the mobile app, so if you're an offline-first kind of person, their printers are definitely not for you
- proee 2y agoWhen you start designing products with lots of gears and linkages, does animating/simulating your design become critical? What CAD tools are best for simulating your design, or is this even the right way to verify all your mechanical items are working together as expected?
- mlsu 2y agoThis is pretty typical. The first step of CAD is learning simple solid modeling (i.e. producing 3d parts from sketches, features, etc). The next step is assemblies and motion. Writing a solid modeling CAD engine is impressive, but kinematics and simulation is really the tough part (and why these CAD softwares are so expensive and so worth the money). For example, SolidWorks has a separate "motion study" package that you pay for on top of the solid modeling tool, a separate "fluid simulation package," to calculate stresses, drag, and so on on a part. Assemblies are also huge, most CAD programs have utilities for creating relations between different parts to figure out where screws, clasps, hinges, etc, should go where and in what order. Many professional CAD packages also have things like mold tools, sheet metal tools, etc. that make manufacturing much much easier. You typically have a drawing tool, to create marked up drawings to send off to a machine shop for fabrication. Manufacturability is huge and mostly invisible to hobbyists who are doing 3-d prints. In general, software that makes manufacturing stuff easier, is where CAD packages capture the most value from their users. The manufacturing stuff is why you might pay $5,000 per year per seat for a CAD suite. It's also why they're not too worried about open source CAD, because the open source guys don't care, or know enough to care, how to add this type of value. Finally, the big big boys (like CATIA and so on) have utilities to track part revisions, quality tracking, assembly and QC workflows etc. For when you need to manufacture hundreds of thousands of something, test it, have it fail in predictable ways, manage spare parts for it, be tracked and regulated etc. Those are generally used for stuff like cars and jets which have complex supply chains.
- 65 2y agoFusion 360 has an API in C# and Python. I use the Python API to write 3D modeling scripts for everything I 3D model. It takes a little longer to build up your own utility function library so you can make models quicker, but once you've got a solid utility library of your own, making 3D models with code is really easy and fun.
- bschwindHN 2y agoI recently gave a talk on this topic though it was more focused on code-based CAD, and with extra emphasis on Rust because it was at a Rust meetup. But very similar vibes overall, I think there will be many software engineers picking up CAD and 3D printing in the near future. https://youtu.be/0wn7vUmWQgg https://youtu.be/0wn7vUmWQgg
- timonoko 2y agoI did not understand what this was about, I why it was upvoted. Anyways. I have solved the only problem OpenSCAD ever had. And that was -- you cannot tweak parameters just by pointing at them: https://youtu.be/eG5lhLYvihQ?si=WiCnxahDx7_mJTrC https://youtu.be/eG5lhLYvihQ?si=WiCnxahDx7_mJTrC