Open Source CAD and Open Science

Hopefully this is the right place for this as I could see it going in General too. Question #2 below is the most directly related to Skill Share.

I’m not a scientist, but I’m here on the GOSH forum because I contribute to open source CAD, and am interested in CAD as it relates to (and enables) open hardware projects. I’m interested to hear from the GOSH community on two main questions about open source CAD, although discussion may reveal others that need to be asked.

  1. Does open source CAD currently work for you, or are you forced to use other solutions like Fusion 360? If open source CAD does not work for you, why not?
  2. Are there open science projects that need CAD help from time to time? If so, how do I find out about these needs? We have members of the CadQuery community who are periodically looking for things to make and contribute to. There are no guarantees, but if there is a way to discover projects that need help with CAD, my thought is those needs can be forwarded to the open source CAD community (or at least my corner of it).

Please let me know your thoughts.

Some additional context: Two of the most directly relevant projects I contribute to are CadQuery and Semblage. CadQuery is a Python based CAD scripting API, which is parametric at its core. What this means is that you create a Python script to generate a CAD model, and it has settings that can be changed to alter the dimensions of that model. You could have a sensor box that has the parameters of “sensor_length” and “sensor_diameter” that change the dimensions of the box to fit a sensor. In this way you create one CAD model for a whole family of sensors, rather than creating a model for each sensor. Semblage is a newer CAD project I have started which is currently in rough alpha condition (not recommended for anything but technology preview). The goal of that project is to merge the mouse-driven and programmatic CAD worlds so that users get something akin to FreeCAD or Fusion360, with the power of programmatic CAD being accessible just below the surface.

5 Likes

Fantastic thread. This is again why I am so excited you joined the forum. Truly open science needs open instruments, and truly open instruments need open CAD. I know @Javier feel very strongly for electronics about the importance of open electronics CAD, and CERN support KiCAD. For mechanical CAD I feel we are much further from where we need for widespread adoption.

In direct answer to your questions:

  1. We only use Open Source CAD. For OpenFlexure we use OpenSCAD and it is also script based and parametric. This is a very powerful workflow for us, but script based CAD limits collaborations with many collaborators that are not comfortable with programming. Below I put some other things that I feel open CAD really needs.
  2. For me, personally, I often feel that explaining how I need something designed is harder than designing it. I would be more interested in the tools improving. But I can believe that is not true for many projects.

My Open Source CAD wishlist

  • Graphical CAD with less topological naming instabilities than FreeCAD (I know RealThunder’s work will merge in eventually). These instabilites cause models to break as they are altered.
  • Good CAD assembly, here things can be aligned not by just positions and rotations that are pre calculated (as we do in OpenSCAD), but by making faces co-planar, aligning hole axes, etc. i.e. Constraint based. There is some option for this in FreeCAD, but with multiple competing workbenches it is hard to know which horse to back.
  • Better support for mechanical drawings. In the OpenFlexure project we generally 3D print, but for many precision instruments (and especially vacuum instruments) the parts are all machined. For open science we need this sort of high-end, few in the world, type specialist equipment to have open plans too. For this we need good technical drawing capabilities, including the ability to spec tolerances, parallelism, etc. Again TechDraw in FreeCAD has come along leaps and bounds, but there are many pain points. No automatic hole call-outs. I can call out a diameter. But if I have an counterbored, or tapped hole I need to manually edit the call out.
  • Better interplay/communication between script based and graphical CAD. For really complex stuff like the main body of the OpenFlexure microscope scripting is ideal. But it would be great if those scripted parameters were available for people that want to build an accessory but want to use graphical CAD. Graphical and scripting working on the same files I think is a step to far, but the two sharing parameters would be really powerful.

I don’t really know CadQuery, I use OpenSCAD and FreeCAD. If we want to convince the majority of CAD users over we need good strong, constraint based graphical CAD which is robust and more feature complete. FreeCAD I think is in the best place to provide that, but I also find their forum a very very hostile place to many people suggesting ways to move forward. There is a shocking attitude of anyone who wants to contribute non-code experience is ridiculed until they leave. I think this culture is slowly shifting, and they are starting to get to the point where some developers are paid part-time.

We really need huge investment in open source CAD for open hardware to be sustainable. Very happy to be part of discussions for how we get there.

5 Likes

Great thread,

And some very keen observations @julianstirling.

1 Like

Somewhat embarrassingly I’ll post my honest response.

I initially learned solid works many years ago, and found OnShape which is a free web-based version which is good enough to design real, complex products (has assemblies, movement, variables… lots of stuff). Now that got bought and of course is no longer free, though apparently I’m grandfathered in.

I’ve been tracking freecad for years, but it just wasn’t good enough to use for the projects I had, which are quite complex and require a lot of assembly word and lining things up precisely and cross-communication between parts.

That said, freecad seems like it’s there enough to use, and I’m going to try to use it for my next design.

In terms of OpenSCAD, it would be a major mental rewire for me to design in a coding-oriented way, so I probably wouldn’t go that route at this point.

3 Likes

Totally agree. I learned OpenSCAD when I joined the OpenFlexure project. You have to think about parts in a totally different way. For some things I find it is better, for others it is worse, but a total mental rewire it is for sure. The thought process has almost no similarities. If you try to do graphical CAD how you would OpenSCAD the result will be atrocious, and vice versa.

2 Likes

Couldn’t there be a way to keep those alternatives open and make them competitive with proprietary CAD software? I was thinking a lot about motivating universities to switch their budgets for software licenses to financing open-source. Maybe we could create a “coalition of the willing” or set up an open letter here in the GOSH community? If multiple organizations would move in that direction, this could be an opportunity to get the required sums together.

4 Likes

Having something like a coalition, or even one major player similar to what CERN did with KiCAD, would be amazing. I would argue that there’s a broader need for advocating to those groups for open source software as well, that’s something I know that @jcm80 and others think about on the institution side.

3 Likes

To give some context I build open source CAD tools for microfluidics as a part of my research. Check out (https://3DuF.org)

Some of the big things I’ve noticed (wrt your questions):

  1. Open source CAD can work but it’s hard to get engineers to use it because the existing commercial offerings like fusion360 blow tool like FreeCAD out of the park.
  2. The project I look at for microfluidics can definitely need open source cad tools because tools like fusion or any other mechanical design cad tool makes it miserably hard to create, share and tweak the designs of the devices.

The problems I’ve been facing:

  1. Building/Managing a community of open source contributors . Currently I have around 4-5 undergrads from Berkeley and BU contributing to the codebase but since they’re beginners, there’s a mentorship cost.
  2. Funding, tbh there isn’t any we have found. We tried CZI but our project isn’t big enough as per their metrics.
  3. (This might be more microfluidics specific) Running projects that will use both diy bio hackers and software devs to showcase what the tools can do for a given problem space. I haven’t found too many people who do microfluidics to actually code or be able to contribute much.
  4. User preferences and hate (oh boy !) - this has been a really jarring issue, most users we’ve been talking to pile on the hate if they find one small bug that annoys them. This is further made worse when the design interfaces and keyboard shortcuts are different from what they’re used to.
  5. Proprietary design formats and lack of libraries, this has been a real pain because it limits my ability to import fusion360 archives and solideorks parts. FreeCAD has been the only one so far that has a sensible-ish api for pulling the parametric design info from the files.
3 Likes

Mental rewiring is needed for definite in terms of switching between programmed cad and drawing based. I would love a cad program that merged both. In my experience (cad for robotics, automation, and general design work) sketching is much faster for initial prototyping than programming. However, I find duplication of objects or other more monotonous or versioning based tasks annoying without programmatic features (e.g. openscad).

One idea could be a program where graphical features that are drawn are shadowed by code thats editable allowing interoperability between the two approaches. Just a thought, this may be unrealistic in development terms as the two approaches are their own niches at this stage.

2 Likes

I’m also curious about merging of these approaches: direct manipulation and programmatic declarations. There is some interesting work on this by Ravi Chugh, though it focuses on drawing SVGs rather than CAD. I’ve also not found the prototype they develop to be very usable; very interesting but not that usable. For programmatic CAD there is Libfive which has some capability for direct manipulation.

2 Likes

Thank you to everyone for their replies. I started to reply to specific comments, but then thought it would be best if I just summarize what we have so far and then add some comments at the end. Please correct me if I’m missed any relevant comments or incorrectly transcribed what was written.

Community

  • There is friction in teaching a non-scientist CAD person what needs to be designed, so it is best if the tools are readily usable by the end user (a scientist).
  • FreeCAD adoption is challenging due to hostility from the community to newcomers with new ideas.
  • Moving between FreeCAD and OpenSCAD requires a large shift in mindset.
  • Building and managing a community of just 4-5 contributors can be a time drain, especially if the contributors need to be mentored.
  • Finding contributors at the intersection of the science and the CAD/code is difficult.
  • Users of open source software can be harsh and demanding. Small bugs, keyboard binding preferences, etc can all cause users to complain.
  • We should have a roadmap that creates a large enough “commons” codebase that we can reuse. Code debt is real problem if we want to keep these project alive long term.
  • A platform cooperative might be a useful organizational structure here.
  • It is also very important to allow the creation of a commons: I can share my model (make publicly available), search and import models. If I know that the tool connects me to an ecosystem of designers and allows me to easily build on their work I’d be more inclined to adopt it, even if not so sleek.
  • Another value dimension is accounting, use some type of a NRP (network resource planning) to record contributions to models, which allows you to build economic and social metrics on top.
  • If your tool doesn’t facilitate collaboration, remix it is not suitable for the open source mode of innovation.
  • The philosophy around the development of open source scientific instruments also applies here.

FOSS CAD Features

  • Topological naming stability is required so models do not break as they’re being altered.
  • Good assembly features (strong constraint system).
  • Mechanical drawing support with callouts for tolerances, parallelism, etc, and automated callouts for things like holes.
  • Leverage strengths of programmatic CAD and graphical CAD, possibly by sharing parameters between the two.
  • Sketching (graphical CAD) is much faster for initial prototyping than programming.
  • Duplication of objects, other more monotonous tasks, or versioning based tasks, is annoying without programmatic features (e.g. openscad).
  • Needs to allow synchronous or real time collaboration.
  • You can also use the machinery of Github for versioning and forking / merging and see how models interact with each others.

Funding

  • Funding has been hard to come by.
  • We really need huge investment in open source CAD for open hardware to be sustainable.
  • What about motivating universities to switch their budgets for software licenses to financing open-source? If multiple organizations would move in that direction, this could be an opportunity to get the required sums together.
  • Maybe we could create a “coalition of the willing” or set up an open letter here in the GOSH community?
  • Maybe a sponsorship for mechanical CAD like what CERN did with KiCAD.

Proprietary vs Open Source CAD

  • Proprietary alternatives like OnShape and Fusion360 are often favored, especially when very complex things are being designed.
  • Proprietary CAD always carries the risk of a change of license, buyout, lack of universal access to the tool, etc.
  • FreeCAD has improved, but has not been good enough for complex projects with a lot of precise assembly work.
  • Commercial offerings like Fusion360 blow FreeCAD out of the park.
  • FreeCAD seems to be improving in multiple areas, and has some developers who are being paid now.
  • Proprietary CAD file format lock-in and lack of the ability to share between software packages is a problem.
  • Proprietary software often has a lack of libraries.
  • FreeCAD has a sensible-ish api for pulling the parametric design info from the files.
  • If your open source CAD just allows individuals to work in a silo you’re very far from what the proprietary online CAD platforms offer, you’re playing a loosing game.

My Own Reponses

  • It seems like the discussion around creating a “coalition of the willing” or setting up an open letter here deserves its own thread.
  • It would be interesting to know the reasons why KiCAD attracted the support of CERN, whereas nothing similar has happened with any of the existing mechanical CAD projects. Is it lack of feature parity with closed source counterparts? Off-putting community? Just bad luck?
  • Is crowdfunding a thing in open science? I haven’t noticed Patreon, KickStarter or CrowdSupply being used for open science (and open science hardware), but I could have just missed it.
  • Lack of support for mechanical drawings is something I have come up against before. With the focus on digital desktop manufacturing makers seem less concerned than ever with drawings in my experience. In the past I’ve ended up exporting things to SVG or DXF and then finishing the drawings in external tools. Automatic callouts would be fantastic, even if they’re not perfect. As long as they give a good starting point I think they would be useful.
  • It would be interesting to see some sort of community hackathons, competitions, etc that pairs CAD and software developers with open science practitioners. But then you run into the challenge of the time required to teach people the skills they need to contribute.

One idea could be a program where graphical features that are drawn are shadowed by code that’s editable allowing interoperability between the two approaches.

That is essentially what Semblage does, and the goal with that project is to help address several of the technical issues raised in this discussion. Within the next alpha release or two I’m hoping to start doing videos and/or livestreams showing how to develop mechanical designs with Semblage. I’d like to share some of those here to get early feedback from this group.

4 Likes

Just to add something here. I think if we have a coalition. We should have a roadmap that creates a large enough “commons” codebase that we can reuse. Code debt is real problem if we want to keep these project alive long term. For instance, I’d be happy to contribute to library projects that solve some the issues I have with reading formats, etc.

Let me drop another keyword as suggesstion for funding and organization here: Platform cooperative - Wikipedia

My high level requirement for a CAD designed for open source development is to allow synchronous or real time collaboration. See Onshape for example. Wonder if such an application can be built on top of p2p or federated infrastructures to avoid centralization of resources.
It is also very important to allow the creation of a commons: I can share my model (make publicly available), search and import models.
From there, you have extra value dimensions that will incentivize people to use the CAD. If it is only for me to build a design I’ll go for the sleekest one, and proprietary software is notorious for intuitive UI. But if I know that the tool connects me to an ecosystem of designers and allows me to easily build on their work I’d be more inclined to adopt it, even if not so sleek.
Once you have things connected you can design other features that add value. For example, you can provide comparative metrics for models, or you can add the ability to form projects (clusters of models). You can also use the machinery of Github for versioning and forking / merging and see how models interact with each others. Another value dimension is accounting, use some type of a NRP (network resource planning) to record contributions to models, which allows you to build economic and social metrics on top.

In short, we need to understand that open source is about collaboration. If your open source CAD just allows individuals to work in a silo you’re very far from what the proprietary online CAD platforms offer, you’re playing a loosing game. A successful open source CAD software is an ecosystem service. In other words, it allows agents to form relations, share / aggregate, search and use, on top of its main function. That is because a tool is not just about what we do, but also about how we do. Since open source is all about collaboration, if your tool doesn’t facilitate collaboration, remix it is not suitable for the open source mode of innovation.

We apply the same philosophy to the development of open source scientific instruments

Main characteristics of hardware deliverables

  • Open source - share design and permission for economic exploitation, build communities
  • Shareable - easy to find, use, transport, facilitates transactions among users, safety and security
  • Modular (perpetual and customizable) - see this link about a specific effort to define a standard for scientific parts.
  • Interoperable - use shared standards, allow combinations
  • Socializable - allow sharing of actions made through the intermediary of these deliverables
  • Ecological - sustainable
  • Ethical
  • Accessible - low cost, low assembly skills, local materials

Note the two dimensions of Shareable and Socializable. This speaks directly to the open science mode, which relies on collaboration and mutualization of processes and resources.

More here.

I have updated my summary above to include the latest comments.

First time here. It’s some time since I’ve last done any real science/research work but I still have friends working on that, and from my part I’m always interacting with a handful of universities FabLabs in my region. Some thoughts:

KiCAD x Generic CAD

My experience with KiCAD is very limited (I basically know whats it is and worked on projects where someone else used it), but one thing that I noticed is that most people are happy to just have a PCB that works. Some folks may be very particular about layout and aesthetics but functional tends to win, and that’s something that can be left for the computer to do. Generic purpose CAD on the other hand is a much more open pursuit.

About FreeCAD:

Most people are still under the impression that FreeCAD is way too inferior as compared to Fusion 360. That’s not true for the most part anymore. FreeCAD should get a major version renumber to reflect the accelerated maturity and help position itself as a much more mature project.

I’m often overwhelmed by the “multiple competing workbenches”. Options are good but too many options may be a problem. A better UI to navigate and select workbenches would be nice. Merging and deprecating should also be considered.

Topological naming is a problem, but the main problem for me as a newcomer was to understand how exactly I need to structure my work to avoid the worst cases. I believe this will still be useful even after RealThunder work is merged in the main branch.

Assemblies are very complex to do correctly. I’m thinking about it a lot. I started my career as a programmer and it seems to me that assemblies are a bit backward in the way they are put together. I mean: as a programmer we learn to think “top down”, but assemblies require some “bottom up” thinking to get right.

About OpenSCAD, CadQuery, CadHub, Semblage and the entire CodeCAD movement:

We saw over the years how the frontend Web development evolved. Today we have an interesting situation: prototyping is often done in a interactive design tool (Illustrator for standalone work, Figma for team-oriented work), but the final version is usually written as code, using programmer’s IDEs and stuff. Maybe we should follow the same path: do the sketching in a interactive environment, and later write the code to implement the parts.

3 Likes

First time here as well.

I know that I really like working in Fusion360 and Onshape and that I already find Solidworks outdated in terms of UI even though I started and was trained with Solidworks.

I think that Code based CAD are not the same as graphical CAD and never will be because as Julian mentionned in code based CAD you have to make your calculations in advance and really think about how to design your part where in graphical CAD in my experience I unfold my thoughts into the CAD software (after having made a sketch on paper off course) and rework them once I figured out the constraints that will limit me.

The biggest problem that I have with FreeCAD is that you cannot make any modifications in the creations while keeping your progress.
I have also experienced that the FreeCAD community is not very friendly regarding welcoming non coding (or people who do not want to code while 3D designing).

FreeCAD has indeed advanced a lot recently but it still remains really backwards in terms of user-friendliness, and I think functionalities.

Despite those disadvantages, I know that OpenSourceEcology is working exclusively with FreeCAD and that it’s quite a big undertaking, however, I am not sure they are on this forum.

1 Like