Live data from Hacker News

µcad: New open source programming language that can generate 2D sketches and 3D

microcad.xyz

121–130 of 139 posts

Re: µcad: New open source programming language that can generate 2D sketches and 3D

#121
post #116

Looking at examples I see: ``` c = Sector(radius, start = 180°, end = 270°).translate(y = radius); ``` Programming language that requires (maybe it does not require, but then example is not good) to type degrees. Or maybe it is not designed to be typed and rather ai generated?

I saw another example where they had 'mm' as well so I'm guessing that's all part of the type system as postfix attributes?

Poked around in the docs a bit but didn't see a grammar so, dunno... I can only guess it does automatic type conversion if you only type the numbers without the qualifier.

Re: µcad: New open source programming language that can generate 2D sketches and 3D

#123

I've been using zoo and its KCL language with some success for boundary-representation CAD writing. If I understood correctly, µcad serves the same purpose. Comparing code samples between both of them, I personally enjoy KCL's pipelined approach more. My main beef with zoo is the fact that they are promoting vendor lock-in by forcing users to use their cloud-hosted geometry kernel with absolutely no local alternative…

When I see these examples I miss Autolisp…

These are your father’s parentheses. An elegant weapon for a more civilized age.

Re: µcad: New open source programming language that can generate 2D sketches and 3D

#124
post #52

Earlier quoted context omitted.

Hm, at least build123d (which I had never heard of, thanks!) can export STEP, which I believe is becoming a necessity if one wants to assemble real-world models with FreeCAD (and nicely also slicers are picking up support to it). I'm on the edge though if I'd really like a proper DSL instead of building it on top of Python, although I can see that too has its benefits (e.g. library access). Does anyone have idea abou…

Converting from STL to STEP is essentially always a case-by-case thing. If you import, sew, check geometry, refine, etc., you can eliminate unnecessary triangles in planar faces. But you can't magically make a 120-sided-polygon that should be a circle a circle; you're going to have to do that yourself. Though Mark Ganson's MeshRemodel workbench looks interesting: https://github.com/mwganson/MeshRemodel And FreeCAD is…

Yeah I hate messing with STLs for that reason. It's an output format. Similar to when you make an image in Photoshop with a load of layers and then export to jpeg where it's flattened and all the layer info is lost.

Obj is a bit better but for real design modification you kinda need the original file and the program it was designed in. At least in my experience.

I've never come across STEP though, is that a real design parameter preserving file format?

Re: µcad: New open source programming language that can generate 2D sketches and 3D

#125

Earlier quoted context omitted.

Converting from STL to STEP is essentially always a case-by-case thing. If you import, sew, check geometry, refine, etc., you can eliminate unnecessary triangles in planar faces. But you can't magically make a 120-sided-polygon that should be a circle a circle; you're going to have to do that yourself. Though Mark Ganson's MeshRemodel workbench looks interesting: https://github.com/mwganson/MeshRemodel And FreeCAD is…

Yeah I hate messing with STLs for that reason. It's an output format. Similar to when you make an image in Photoshop with a load of layers and then export to jpeg where it's flattened and all the layer info is lost. Obj is a bit better but for real design modification you kinda need the original file and the program it was designed in. At least in my experience. I've never come across STEP though, is that a real desi…

STEP doesn't preserve all of your design intent (sketches etc.) but it does preserve the geometry (edges, vertexes, faces). So it is a lot easier to work with it because it is lossless and precise. Curves are curves, not quantised/faceted.

So in our image processing analogy, it is still in a sense a "flattened" representation of the layers, but it's a vector format. The best way to think of it is broadly like a 3D SVG, I guess.

https://en.wikipedia.org/wiki/ISO_10303-21

3D printer slicers (except maybe Cura without a paid add-on) can usually load STEP now, but they are still internally meshing before slicing. I think Orca/Bambu/PrusaSlicer all give you some control over that meshing (they all use OpenCascade to do it, in fact).

In FreeCAD you can do things like defeaturing, so if you have a hole in a rounded plate, you can delete the hole, you can delete corner-rounding. You can also break STEP files down to faces and use the surface/curves tool to work on them, or use them as a BaseFeature for a Part Design Body, etc.

This is a pretty useful video for showing the differences:

https://www.youtube.com/watch?v=5l6GOfshigQ

Re: µcad: New open source programming language that can generate 2D sketches and 3D

#126

You should remove any reference to LEGO from the website and the examples. LEGO is extremely protective of its brand (similar to / worse than Nintendo) and does not want third parties using its name, because it is concerned that LEGO could become a generic term which could put its trademark at risk. See: "Lego sues Dutch firm over anti-terror blocks using name and shape" https://www.thetimes.com/world/europe/article/…

I'm willing to die on the hill that lego already is a commonplace word, but I can't argue that they've held on to the LEGO trademark for pretty long. Though, I'd say Nintendo is a lot worse than LEGO, and I've never heard LEGO do the frankly insane crap that Nintendo has.

Re: µcad: New open source programming language that can generate 2D sketches and 3D

#127
post #97

Earlier quoted context omitted.

I have a lot of experience with openscad. I design a lot of small, simple-to-moderate parts. I want to use something like fusion instead, but the GUI learning curve is a huge blocker for me. I'm not a CAD professional, I can't seem to find the time to watch hours of video to get the basics down. With code based CAD, the way to start is usually obvious. When I run into a blocker, I search online, find examples, and tr…

I'm hitting the same problem, getting stuck on simple things in FreeCAD mostly because I'm a novice and don't have hours and hours to watch videos and learn. What ended up working for you?

I'm generally very much for open-source software, but after my brief experience with FreeCAD and Fusion, I think if I'm going to sink 10+ hours into learning one of them, it will be Fusion. I bookmarked this recently and plan to try it out but have not yet started: https://www.youtube.com/playlist?app=desktop&list=PLrZ2zKOtC...

Re: µcad: New open source programming language that can generate 2D sketches and 3D

#128

Tried openscad and then cadquery for some geometry iteration projects and found them clunky. It wasn't just that I was missing a UI; the functions, constraints and geometry kernel weren't as powerful as onshape, which I've used a bit, and presumably light years behind fusion 360, which I haven't used. Even freecad, a UI-based oss cad, is not quite ergonomic for a beginner-to-intermediate user, though it has come a lo…

You can try out AstoCAD, a reskin of FreeCAD. The author also fixes a lot of FreeCAD bugs.

Re: µcad: New open source programming language that can generate 2D sketches and 3D

#130
Yesterday, these people pulled their microcad-based Spirograph code. No explanation given... now it's just a 404 page.

What's up with that, Microcad? This kind of reflects poorly on your overall ability to do things like host the actual code for microcad itself.

Post reply on HN