27 ms·
Fornjot – The world needs another CAD program
- dang 5y agoRelated: Fornjot: A next-generation Code-CAD application - https://news.ycombinator.com/item?id=30597061 https://news.ycombinator.com/item?id=30597061 - March 2022 (46 comments)
- TaylorAlexander 5y ago“Code-cad” as they put it clearly appeals to a lot of people, and more CAD is good. But as a long time mechanical engineer and robotics engineer what I really want is a completely open source parametric cad program that is as good as Solidworks or OnShape. FreeCAD is an impressive project but clearly needs more resources to ever compete. Solvespace seems cool and I want to play with it more, but I can’t comment on how good it is as I have only tinkered. I do wish the Solvespace UI was more akin to tools I am familiar with (OnShape or Solidworks).
- gundmc 5y agoHow is your experience with OnShape? I find the web-based approach really appealing but have been concerned it would be more limited than desktop counterparts like Creo or SOLIDWORKS, and potentially more painful to integrate with PLM systems.
- erikw 5y agoOnShape is definitely more limited, even compared to Fusion 360. However, I've moved to it as my main CAD tool, since it works on Linux and Fusion 360 licensing is so problematic. Fusion 360 also has a web interface, but it doesn't support Linux, and even on Windows doesn't work very well. The only thing I've needed to go back to Fusion 360 for is thread modeling.
- TaylorAlexander 5y agoAside from the fact that is is proprietary and cloud based, I love OnShape. It does have some limitations, like operations that logically should make sense but will just fail, but this is what makes CAD very hard even for a large experienced team like OnShape. But I like that I can run it in Linux because it is browser based, tho I would prefer a local native app. Onshape is hard to use on a slow connection. But I use it to design all kinds of complex robots and it is great.
- syntaxing 5y agoI'm guessing you've been fortunate enough to have never used Catia. I used to think FreeCAD was super meh because I was extremely familiar with Solidworks (I've used Inventor, NX, and Creo as well professionally). I learned and use Catia recently and finally understand why FreeCAD is made the way it is.
- benhurmarcel 5y agoI find Catia a lot better than FreeCAD. It's not my preferred interface but on the other hand it can handle anything, including projects so large and complex that Solidworks/Fusion/FreeCAD can't even be considered.
- twarge 5y agoWhat is that way in your mind?
- sreevisakh 5y agoCompeting with those proprietary mcad will take a much better CAD kernel. FreeCAD uses OpenCASCADE. It's going to take a lot of time and effort to create a new one. There are a few projects around. I hope that one of them will catch on and get enough developer attention.
- walrus 5y agoWhat are some limitations of OpenCASCADE that are holding back CAD tools built on it?
- aaaaaygug 5y agoHelp as well documentation needs a lot of work. It is very difficult to even start using it. Even class names seem out of place sometimes.
- wiz21c 5y agoI second that question. I'd like to know...
- ur-whale 5y ago> What are some limitations of OpenCASCADE To name one: Booleans on NURBS are fare less robust in OpenCASCADE than their equivalent in commercial offerings.
- deleted 5y ago[deleted]
- enginoor 5y agoAs a long time CAD user I was surprised to learn that a CAD kernel exists as a concept and that the same kernel is licensed and used in competing CAD packages. Solidworks, Siemens NX, and OnShape all use the Parasolid kernel. Inventor and Fusion360 use the ShapeManager kernel. https://en.wikipedia.org/wiki/Geometric_modeling_kernel https://en.wikipedia.org/wiki/Geometric_modeling_kernel
- mhb 5y agoI think that a non-open source, native desktop, sane license, competitor for Solidworks/Inventor/Fusion would do well too. Solidworks is on a path to subscription-only / in the browser where Fusion and Inventor already are. Jetbrains?
- fps-hero 5y agoI love solvespace, the UI is quick, minimal and easy to come up to speed with. I use it as a 2D parametric sketch pad, for 2D designs for laser cutting, making 3D models for kicad, and a few basic 3D printed fixtures, but it is in no way a replacement for even Freecad. The constraints are feature complete, but minimal. Some basic geometry is often a pain to get setup. Once you hit 3D you’ll realise that your basically limited to extruding and revoking sketches. Still a powerful tool but not suitable for serious mechanical design. What world really needs is for FreeCad to be as usable is it’s paid equivalents. I don’t understand why free software always neglects the UI. How hard is it to even simply copy the time tested work flows in proprietary software. Once you learn Solidworks, Inventor, or Fusion 360, you can pickup any other parametric modeller. Code as CAD as an idea I believe is flawed. It doesn’t solve any of the hard problems of mechanical design. Designing physical objects requires good visualisations and iterative feedback. I.e changing this dimension solves this interference in a complex assembly. Besides, most mechanical engineering are not proficient coders.
- chrisshroba 5y agoWoah thanks for the rec! I’ve been frustrated with the tools I’ve tried for making laser cutter designs and something free and parametric is just what I’m looking for!
- adastra22 5y ago> How hard is it to even simply copy the time tested work flows in proprietary software. A straight copy would be sued out of existence.
- rapsey 5y ago> Code as CAD as an idea I believe is flawed. It doesn’t solve any of the hard problems of mechanical design. Designing physical objects requires good visualisations and iterative feedback. I.e changing this dimension solves this interference in a complex assembly. Besides, most mechanical engineering are not proficient coders. I mean there is no reason why a visualization of the code could not be produced? It could visualize it in realtime after every save of the code.
- FpUser 5y ago>"...what I really want is a completely open source parametric cad program that is as good as Solidworks or OnShape..." I will sign this with my blood. Why on Earth every free solution is trying to reinvent the wheel when it comes to proven and ergonomic UI is beyond my comprehension.
- IshKebab 5y agoI agree. OpenSCAD is good for very few things - fasteners, gears, art, that's about it. For 99% of CAD you want something like Solidworks. The only open source program I've tried that comes anywhere close is Solvespace, but it's still not in the same league. FreeCAD is rubbish. Fusion 360 was a reasonable free, legal but proprietary option until recently, but they changed the terms of the deal. Now I just pirate Solidworks.
- brianhorakh 5y agoOpenscad is rough around the edges. The object libraries aren't well assembled or documented, lacking a good packaging tool.
- l33tman 5y agoWould you want this because its open or because it is free? I've always found SW amazing and intuitive with great help and assist, and sure it's expensive for a hobbyist but for a company it's not a big deal.
- cweagans 5y agohttps://news.ycombinator.com/item?id=30695360 https://news.ycombinator.com/item?id=30695360 was posted a couple weeks ago. Curious if that's sort of along the lines of what you're looking for. It's not exactly free software, but maybe it's open enough?
- TaylorAlexander 5y agoNo because it is a NURBS modeler and not parametric CAD, so it is not at all the right kind of CAD, but also because it is not really open source (uses an expensive closed kernel) and will be less open source soon. What I want is a project that is open source like Blender is open source. One that intends to be open source forever and also knows how to raise funds to manage a real engineering team.
- c_o_n_v_e_x 5y agoWhat are use cases for a code first cad tool?
- adhesive_wombat 5y agoFor me, the big ones are version control and command-line or some other kind of declarative generation.
- nikitaga 5y agoSubjectively – it's a much more sane environment for programmers than point-and-click UI. If you want parametric design (and you probably do want it unless you're building simple one-off designs), with GUI CAD tools you need to deal with complex constraint systems, and either expensive subscriptions or quirky GUI (or both). With code, you just deal with... code, aka math. Parametricity comes essentially built-in, the way variables and functions are built-in to a programming language. Plus all the standard things we take for granted in coding – straightforward component and logic reuse, versioning, etc. This domain is very complex, and really good code-cad tools don't exist (CadQuery is the most decent IMO, but it's far from perfect), so it's nice to see more attempts at solving this problem.
- krisoft 5y ago> Parametricity comes essentially built-in, the way variables and functions are built-in to a programming language. That is a common misconception, but in reality that's not how it shakes out. Realworld CAD software uses a geometric constraint solver because real world design problems have geometric constraints. If you want to draw a rectangle with width X and height Y, sure you can handle that with variables. What do you do if you want a triangle where one side is tangential with an arc, the other two sides have an angle Z between them and the intersection between that two sides is straight down from the center of the arc (that is they have the same x coordinate)? Is this description well-defined or do we need to give one more measure/constraint before it becomes so? Or maybe even over-defined and we can't possibly satisfy all these constraints? This is the kind of question a geometric solver can answer, realtime as you are editing the sketch. You can try to cook up an ad-hoc solver every time you need one (with variables and functions) but then you are not in the business of designing stuff, but in the business of ad-hoc CAD development.
- deleted 5y ago[deleted]
- j-james 5y agoHow does this program differ from OpenSCAD? (https://openscad.org https://openscad.org, https://github.com/openscad/openscad https://github.com/openscad/openscad) I'm a bit surprised there's no mention of it anywhere in the repository or on the website.
- alanbernstein 5y agoThe modeling language is completely different?
- progre 5y agoThe modeling language for Fornjot is Rust. To me, this seems like an akward language to write models in. Not saying that OpenSCAD:s modeling is amazing though.
- ur-whale 5y ago> The modeling language for Fornjot is Rust. To me, this seems like an akward language Yeah, that is a very weird choice indeed. Brings a ton of constraints to the user (borrow checker for 3d? why?) that have nothing to do with 3D modeling. I would have understood something like Python or Lua a lot better.
- riidom 5y agoThis should be a good use-case for rust-based scripting languages, I think. I loosely followed a project of that kind a while ago, I don't quite remember if it was Gluon [0] or Dyon [1]. Not sure if these are still active, or if another competitor showed up in meantime. ___ [0] https://github.com/gluon-lang/gluon https://github.com/gluon-lang/gluon [1] https://github.com/PistonDevelopers/dyon https://github.com/PistonDevelopers/dyon
- hannobraun 5y agoHey, author of Fornjot here. > The modeling language for Fornjot is Rust. To me, this seems like an akward language to write models in. I fully agree! Given that Fornjot is written in Rust, starting with Rust as the modeling language was just the most straight-forward option. But Fornjot is architected to be language-agnostic. Right now, it uses a plugin system based on dynamic linking, and you could plug anything in there that can generate C-ABI-compatible structs (the plan is to replace that with a system based on WASM). In addition, I've started splitting Fornjot into self-contained libraries[1]. Once that effort is complete, there will be lots of ways to make Fornjot available to other languages. That said, I think there's merit in having options when using Code-CAD, and Rust is certainly different enough from the typical alternatives to be valuable. I don't think it will ever be the best option for regular CAD modeling, but it might have a niche in infrastructure code that CAD models (written in other languages) use. [1] https://github.com/hannobraun/Fornjot/issues/141 https://github.com/hannobraun/Fornjot/issues/141
- billconan 5y agois there a book teaching b-rep? I know half-edge and similar data structures for polygon modeling, but I seldom see any materials on b-rep.
- fsloth 5y agoAs an innocent bystander my perception is that B-Rep modelling is 75% academically well known and 25% implementation specific black magic. Academic works: Mäntylä: "Solid modeling" Faigin: "Curves and Surfaces for Computer-Aided Geometric Design" Stroud: "Boundary representation modeling techniques" Implementations: Parasolid, Acis, OpenCascade. From implementation point of it's CSG (i.e. implementing the boolean operations) that will be among the biggest hurdles and where most of the black art is.
- hannobraun 5y agoI've been reading Boundary Representation Modelling Techniques by Ian Stroud. Not the most approachable book, and I haven't read nearly all of it, but I already found it very valuable.
- numpad0 5y agoOne big feature that I think missing in modern CAD is gamepad support. It’s predominantly a mouse and Ctrl/Shift-WSAD game, with basic joystick accommodations, so to speak. If you could put together something on a Valve Steam Deck and send it to 3D printing, that’ll be a great step towards Drafting Dan.
- fsloth 5y agoThe goal "a new b-rep CAD kernel, written in Rust;"[0] is extremely ambitious. This would be the single most valuable long term contribution coming from this project if it succeeds. [0] https://github.com/sponsors/hannobraun https://github.com/sponsors/hannobraun
- phkahler 5y agoThis one seems furthest along: https://github.com/ricosjp/truck https://github.com/ricosjp/truck And it has a long way to go. They are tackling some hard problems like dealing with STEP format already. There is also a geometric constraint solver written in Rust. He's moved to (I think gitlab) but here's the old repo: https://github.com/phkahler/constraints https://github.com/phkahler/constraints
- lavela 5y agoWhat I really miss is a parametric vector drawing software (like earlier Vectorworks). I don't need 3d capabilities, as long as I don't 3d-print, and with a good 3 axis cross section drawing you are almost there anyways in most cases. 2d construction drawings are usually enough to reason about your mechanical problems and I wish there was an open source software that would augment the worklflow based on a pencil-and-paper metaphor. That is coming from a civil engineering background though, so there are less complex shapes I guess. You can get somewhere with Incscape, but there is just so much missing, from file format handling to workflow. Being able to type in line lengths while drawing would already be much of an improvement. I thought about learning enough c++ to implement some of the features, but as far as I could tell, submissions for more technical features coming from other people were (probably rightfully) dismissed as not fitting for the original intent of Incscape.
- idleproc 5y agoI'd be very happy with a LibreOffice style replacement for AutoCAD LT. It's not ever likely to happen though.
- ofrzeta 5y agoNot exactly legal, I guess, but Autocad R12 runs nicely in FreeDOS.
- rlpb 5y agoHave you tried FreeCAD's Sketcher workbench? I think it fits your requirements. The only thing I'm not sure about are your import/export requirements.
- lavela 5y agoI have tried it, but ages ago. Maybe I'll give it another try. If I remember correctly, apart from clunky workflow it had too much visual clutter for me, especially when it comes to large drawings. Those visible constraints and anchor points let me loose the overview. I really only need black lines on white background; various thicknesses and hatchings. Using FreeCAD I'm always under the impression, that it's primarily made for smaller but more complex parts and not, say, a larger wood structure with wall details, where you need to take care of both the micro and macro view. I don't need constraints, as the placed lines are already the source of truth; measurements are mainly important while creating the object and for communicating to others while laying out plans, but rarely in between. Maybe that's just an interface configuration issue though? And I guess the workflow is just something to get used to. In the end my primary reason for looking for a program that is more drawing-like is to be able to teach people how to draw simple things on paper and then go "here's this program where you can do what you can do on paper, but you can edit it afterwards, align stuff easily and build complexity".
- oxplot 5y agoI wish someone would work on a free onshape alternative. They recently banned the use of their free tier for commercial use. Out of half a dozen parametric CADs I've used, onshape is by far the most intuitive and pleasant one to use. Not to mention it runs in the browser and gets updates every other week with no effort on my part.
- wrnr 5y agoLibfive does something similar but uses lisp instead of rust. https://libfive.com/studio/ https://libfive.com/studio/
- Diggsey 5y agoI do question whether Rust is the right choice for defining models, but it does seem like a cool project.
- hannobraun 5y agoHey, creator of Fornjot here. > I do question whether Rust is the write choice for defining models, You're not the only one :-) As I've written in reply to other comments (here and elsewhere), it was just the easiest option to start with, given that the rest of the project is also written in Rust. Fornjot is architected to be language-agnostic, so we're not bound to Rust on the modeling side. > but it does seem like a cool project. Thank you!
- d--b 5y agoHonestly Rust is a poor choice for scripting. It is too low level and not aimed at the same people. Embedding a Lua engine or some language in that vein would help drive adoption a lot.
- hannobraun 5y agoHey, creator of Fornjot here. Fornjot is written in Rust, so starting with Rust as the modeling language was the most straight-forward option. I do agree that Rust is not ideal for this use case. Fornjot is architected to be language-agnostic. Long-term, I hope there will be a selection of interoperable options for the modeling language.
- d--b 5y agoNeat! And yes, I do agree the world needs a code first open source CAD program :-) I've used openjscad in the past. It's fairly basic but easy enough to do the modeling part.
- syl_sau 5y agoThis is a really exciting to me. As a libre-enthusiast who happens to be working in architecture, it seems I have been cursed by fate. Architecture is probably one of the least penetrable field of FOSS. I work in both 2D (for "classical" architectural plans) and 3D (for renders) and even though I make my photorealistic renders in Blender, I still have to rely on extremely locked-down and frankly annoying proprietary software (namely from the Autodesk brand), and there's no sign of improvement anywhere. Tangentially, I have reached the conclusion that spending less time in front of the computer is the surest way to feel better about and (actually) improve the quality of my work. I've been testing a new workflow involving Wings3D (as a SketchUp-replacement) but it's a tough call. Anyway I'm happy to see this kind of projects even if I don't use "CAD-code"-oriented modelers (isn't it kind of similar to OpenSCAD?). In any case I will consider paying for any FOSS project if it proves to be a viable alternative to Autodesk bloatwares.
- hannobraun 5y agoHey, creator of Fornjot here. Support for architecture use cases is currently listed on Fornjot's feature wishlist: https://github.com/hannobraun/Fornjot/discussions/146 https://github.com/hannobraun/Fornjot/discussions/146 As is noted there, I lack any expertise in this field, and it's largely unclear what specifically would be required to support it. Feedback is very welcome! > isn't it kind of similar to OpenSCAD? Yes, OpenSCAD is one example (the most prominent, I think) of the Code-CAD approach. The Fornjot FAQ addresses OpenSCAD: https://www.fornjot.app/faq/ https://www.fornjot.app/faq/ Second question. (Sorry, there isn't a way to link to specific questions in the FAQ yet. I've made a note to add that.)
- snarfy 5y agoI'm not sure about a CAD program, but the world definitely needs another geometric modeling kernel. If you are writing free software you have two choices - OpenCascade and CGAL. I looked at the source to see which this uses and ... it's rust. It uses neither. Probably why it doesn't have many features.
- amelius 5y ago> is based on a new b-rep CAD kernel, written in Rust Shouldn't this be a separate project?
- hannobraun 5y agoHey, creator of Fornjot here. > Shouldn't this be a separate project? Maybe. Not right now, I think. Not much of a point, as long as I'm the one doing most of the work. The kernel is available now as a separate library though, that can be used independently. If it attracts its own set of users and contributors, it might make sense to have a separate website and repository.
- amelius 5y agoOk, thanks. One more question: how does your library deal with robustness of geometric predicates (as better explained in [1])? [1] https://en.wikipedia.org/wiki/Robust_geometric_computation https://en.wikipedia.org/wiki/Robust_geometric_computation
- hannobraun 5y agoI have a concept in mind, but have no idea yet whether it's going to work out: My idea is to require relationships between geometric objects to always be explicit. For example, you're not allowed to define a point that happens to lie on a surface. You must instead explicitly define the point in terms of the surface. By extruding from a sketch that lies in the surface, or by saying "extrude until the shape hits the surface", or by specifying some kind of constraint. I hope that it is practical to design CAD models in a way, such that these relationships are always explicit, and I hope that this will enable the CAD kernel to not have to rely on messy floating point stuff comparisons. But as I said, not no idea if it's going to work out like that.
- amelius 5y agoI have no idea whether that will work, but it sounds like you might paint yourself into a corner, so I'd suggest to read about how others maintain geometric robustness. I know this is a tough problem, that's why I asked if this could be done in a separate library, so others can benefit from the work. Another direction you could take is to define just the API, and use the opencascade kernel (like FreeCAD) until the rest of your code is ready.
- pgt 5y agoFor the HN crowd, it may be worth noting that AutoCAD was developed in a dialect of Lisp called AutoLISP.
- Avlin67 5y agohow can we code a vulkan + cgal + web assembly in a multiplateform cad software ? can we put together open souce bricks to create a cad software ? KiCad afaik is not in rust yet powerfull. I dont care of rust, but how can use latest rendering features from vulkan combined with CGal completeness ? or should we try from scratch in rust a 30 years old problem ? wejave blender and kicad, the other one is missing. Also not sure about a code based cad workflow, really