Live data from Hacker News

Code CAD – Use code to create CAD models

cadhub.xyz

81–90 of 97 posts

Re: Code CAD – Use code to create CAD models

#81
post #35

Hey, I created CadHub. I'm really bullish on software driven CAD, myself and other CadHub volunteers talk regularly about a future in which Mechanical Engineering and design is very similar to software engineering. I'll be the first person it admit that some of the current CodeCAD tools aren't production ready, OpenSCAD for example I can't imagine being used by mechanical engineers. So the idea is mostly about unifyi…

> PLM managed through git

I'm sorry but this is probably not a good idea. A typical PDM/PLM implements many things that don't exist or are not in the spirit of git, including but not limited to:

- Per-object security, lifecycle-dependent security (e.g. an object that is Work in Progress may be editable, but it becomes read-only when Released), groups and roles (per-object groups), LDAP / Active Directory integration, ITAR compliance.

- Object lifecycle (Work in Progress / Released / Obsolete etc.), driven by workflow graph that can be adjusted for the specific customer. Ability for one or more engineers to vote to accept or reject a transition from one lifecycle state to another.

- Revisioning: automatic generation of initial revision in prescribed format, automatic increment which follows the lifecycle (e.g. when transitioning from Released back to Work in Progress).

- Part numbers: automatic generation in prescribed format, alternate part numbers (e.g. when a supplier uses a different number for the same part).

- BOMs, including support for family tables.

- Custom attributes, search, "copy structure", viewable (usually PDF) generation, integration/customization API and many many other "small" details...

Re: Code CAD – Use code to create CAD models

#82

Earlier quoted context omitted.

I wanted to kick the tires on CadQuery, but I had to install and understand Anaconda first. Any tool that requires me to understand a build system or a language package manager to correctly and safely build the software before I can use it is not ready for prime time. If this was important for my life, I might put in the effort. If it is for passing curiosity, I probably won't. Especially when it impacts not just thi…

Yes I agree. Anaconda is one of the worst pieces of software on earth. In fact I have never gotten it to work with anaconda. I use this nix-flake: https://github.com/marcus7070/cq-flake which is faaaaar easier to use and setup and includes the editor. But the README says it probably won't work on non-nixos systems so your mileage may vary.

Oh no. Somebody has already created flakes for CQ :( But also oh yeah, somebody has crated flakes for CQ! (and it seems I was only 1/2 ~ 2/3 way there anyway)

Re: Code CAD – Use code to create CAD models

#83
post #68
post #48

Earlier quoted context omitted.

My background is software, I do (mechanical) CAD just for hobby stuff, but I agree about the GUI being a convenient way of working on it. What I desparately want though is an on-disk format that's plaintext, makes sense, and results in reasonable diffs so that I can use git for version control. I just don't understand, being familiar with git, how people can work with 'save and mark new version' style 'version contro…

STEP exchange files are plaintext but there isn't any guarantee that the position of stuff is preserved after making a change.

STEP files are like compiled binaries. Fine for distribution if you don't want to make changes to the file. But for a parametric CAD package like Solidworks or Onshape, much more information is saved. A parametric CAD file stores each step done to the part in order. This allows you to go back in time, change one feature, and re-apply the subsequent changes to the updated file. That's like source code to the part.

Re: Code CAD – Use code to create CAD models

#84

Earlier quoted context omitted.

Howdy! Well we absolutely need more open source CAD tools. That said as a mechanical engineer for going on two decades now, I really get no value from this kind of mechanical design. I grew up on Solidworks and now use OnShape. That kind of physical modeling is very important. Being able to click on a face and sketch some geometry and then extrude it really feels like the right modality for me. I’d really love to see…

> I grew up on Solidworks and now use OnShape... I’d really love to see more investment in that kind of parametric visual CAD. Has You tried SolveSpace app? [0] https://solvespace.com [1] https://git.io/SolveSpace3x (latest nightly builds + various useful resources)

That looks handy! And the project appears relatively active. Actually its a bit odd to not have come across this before.

Re: Code CAD – Use code to create CAD models

#85

I've been using CadQuery [1] a lot of late to develop custom parts for 3D printing, and while it's nice to be able to write plain Python and the abstractions are somewhat more intuitive than OpenSCAD, it's still kind of brittle and complex parts are hard work. There are things CAD-as-code excels at, but once you leave the happy path of simple primitives with a few holes and a bit of chamfer, I found things can get re…

I completely agree, but Fusion360 is still very usable for hobbyists in practice. It does store your files on the cloud, the software only works when it can phone the server, and Autodesk can change its conditions at any time. But for the moment, most hobbyists are happy with it.

It's quality software, and free (as in beer). It's hard to compete with that. Most hobbyists care more about making their designs rather than software ideology, myself included.

Re: Code CAD – Use code to create CAD models

#86

I am an engineer. I do Arduino programming on the side. In my experience every attempt at a code-based CAD system has been totally useless. At every step of designing something, it feels like the scripting language is actively working against anything and everything I try to do with it. Everything feels as though it takes about ten times as long as it should. So far I've tried OpenSCAD and JSCAD. I pirated SolidWorks…

Honestly I feel like there are two types of project. The art type where you want a particular look or organic shapes and stuff like that and just hard mechanical parts that fit together. For the first code is a big no-no because you need to specify a lot of things you don't care about. But for mechanical parts that need to have specific sizes and tolerances code has been a godsend for me.

Re: Code CAD – Use code to create CAD models

#88

Complete newb to the space, but I’ve been playing with SketchUp lately for some hobbyist projects, and the inability to just TELL IT what to do instead of having to drag and drop constantly has been shocking to me. Like “attach this object to this other object at this offset” or “make a rectangle of these dimensions at these starting coordinates.” So this seems very exciting.

Try a decent parametric CAD package like Fusion360 or Onshape.

Re: Code CAD – Use code to create CAD models

#89
post #68

Earlier quoted context omitted.

STEP exchange files are plaintext but there isn't any guarantee that the position of stuff is preserved after making a change.

Can STEP files be parsed to order via e.g. (I know nothing about them) sorting some tree? Are there any e.g. hashes that change as content is modified? In software we solved this with code style guides and later code formatting tools. I would be surprised if e.g. a Python script could not format the STEP files to a "canonical" representation before committing the file to version control.

I don't think there is an easy way to process a file to make it conform to a certain style, take a look at an example [1] if you want.

[1] https://files.pine64.org/doc/datasheet/pinephone/PinePhone%2...

Re: Code CAD – Use code to create CAD models

#90
post #35

Hey, I created CadHub. I'm really bullish on software driven CAD, myself and other CadHub volunteers talk regularly about a future in which Mechanical Engineering and design is very similar to software engineering. I'll be the first person it admit that some of the current CodeCAD tools aren't production ready, OpenSCAD for example I can't imagine being used by mechanical engineers. So the idea is mostly about unifyi…

[deleted]
Post reply on HN