Live data from Hacker News

Code CAD – Use code to create CAD models

cadhub.xyz

11–20 of 97 posts

Re: Code CAD – Use code to create CAD models

#11
post #4

Earlier quoted context omitted.

See the link to the explanation just above it: https://learn.cadhub.xyz/docs/general-cadhub/openscad-previe...

Honestly, that still doesn't really answer my question. I can run OpenSCAD locally and there's never a lag like that when I pan/tilt/zoom the camera. I could understand if that lag occurs in this web app if OpenSCAD wasn't actually running in the browser but instead as an instance on a server, but the page you linked to doesn't state whether that's what's happening. Or maybe it's just an approach to "bake" the model…

there is a web version openscad http://openjscad.azurewebsites.net/

Re: Code CAD – Use code to create CAD models

#12
The tool looks very nice, but the syntax, which looks pretty close to OpenSCAD, is pretty ungainly. It makes me wish lisp-style syntax were more widely accepted.

    difference() {
      hull() {
        ...
      }
      translate([1, 0])
        circle(r)
    }
I mean, those are just s-expressions in disguise.

    (difference
      (hull ...)
      (translate
        (circle r)
        [1, 0]))
The distinction between modules and functions also seems unnecessary.

Re: Code CAD – Use code to create CAD models

#13
post #12

The tool looks very nice, but the syntax, which looks pretty close to OpenSCAD, is pretty ungainly. It makes me wish lisp-style syntax were more widely accepted. difference() { hull() { ... } translate([1, 0]) circle(r) } I mean, those are just s-expressions in disguise. (difference (hull ...) (translate (circle r) [1, 0])) The distinction between modules and functions also seems unnecessary.

https://libfive.com/studio/

Re: Code CAD – Use code to create CAD models

#14

Honestly openSCAD is pretty cool but you quickly run into limitations because of it's DSL. One major reason I don't like it is that it uses mesh-based modeling and not boundary representation. With the former you can never get a "perfectly" smooth sphere for example. Most CNC shops require the latter. So a few years back I moved to CadQuery[1]. CadQuery uses boundary representation and uses Python as it's host langua…

Actually, you can get a perfectly smooth sphere both with constructive solid geometry and boundary representation. Where you cannot get a perfect sphere is mesh-based modelers.

Re: Code CAD – Use code to create CAD models

#15

Honestly openSCAD is pretty cool but you quickly run into limitations because of it's DSL. One major reason I don't like it is that it uses mesh-based modeling and not boundary representation. With the former you can never get a "perfectly" smooth sphere for example. Most CNC shops require the latter. So a few years back I moved to CadQuery[1]. CadQuery uses boundary representation and uses Python as it's host langua…

Actually, you can get a perfectly smooth sphere both with constructive solid geometry and boundary representation. Where you cannot get a perfect sphere is mesh-based modelers.

You are right. I was confusing the two. I have edited my comment.

Re: Code CAD – Use code to create CAD models

#16

Honestly openSCAD is pretty cool but you quickly run into limitations because of it's DSL. One major reason I don't like it is that it uses mesh-based modeling and not boundary representation. With the former you can never get a "perfectly" smooth sphere for example. Most CNC shops require the latter. So a few years back I moved to CadQuery[1]. CadQuery uses boundary representation and uses Python as it's host langua…

Unfortunately CadQuery (primarily its GUI) seems like its development has fizzled out, without getting it to the point of functionality on macOS. OpenSCAD, on the other hand, works quite reliably on Mac.

Also, it's clunky, but I've had success by using Python to generate OpenSCAD code. The best application of this was an SVG to OpenSCAD path converter.

Re: Code CAD – Use code to create CAD models

#17
Programmatically generating geometry is very cool, but I don’t know of anyone doing real work with it. OpenSCAD is probably the best power-hobbyist software I know of for this purpose. AutoDesk seems to be trying this approach with DyanamoBIM, which I’m excited to experiment with (I just don’t get visual programming though).

Personally, I would never consider a web-based software for professional use. An opaque profit model makes me think you’re looting my intellectual property to resell, mining crypto with obfuscated JS or WASM, or you’re snatching up market share to get bought by Google who will just kill the service and leave me hanging.

There’s a lot of room for better software in AEC but CAD is pretty robust and very affordable at this point.

Re: Code CAD – Use code to create CAD models

#18
post #16

Honestly openSCAD is pretty cool but you quickly run into limitations because of it's DSL. One major reason I don't like it is that it uses mesh-based modeling and not boundary representation. With the former you can never get a "perfectly" smooth sphere for example. Most CNC shops require the latter. So a few years back I moved to CadQuery[1]. CadQuery uses boundary representation and uses Python as it's host langua…

Unfortunately CadQuery (primarily its GUI) seems like its development has fizzled out, without getting it to the point of functionality on macOS. OpenSCAD, on the other hand, works quite reliably on Mac. Also, it's clunky, but I've had success by using Python to generate OpenSCAD code. The best application of this was an SVG to OpenSCAD path converter.

Doesn't https://github.com/CadQuery/CQ-editor work on MacOS? I don't really see how development has fizzed out. There have been quite a few commits the last couple of months.

Re: Code CAD – Use code to create CAD models

#19

Honestly openSCAD is pretty cool but you quickly run into limitations because of it's DSL. One major reason I don't like it is that it uses mesh-based modeling and not boundary representation. With the former you can never get a "perfectly" smooth sphere for example. Most CNC shops require the latter. So a few years back I moved to CadQuery[1]. CadQuery uses boundary representation and uses Python as it's host langua…

cadquery is great! I had been a Fusion 360 user for 3D printing, but then Autodesk started getting weird with hobbyist licensing. And Fusion's insistence on being cloud-based was frustrating. Anyway, I went hunting for something else and found cadquery and haven't looked back.

Modelling via code in cadquery is definitely a different approach in a lot of ways, but it is extremely powerful too: you get all the goodies like parameter-based, non-destructive history but also things that might not be obvious up front, like being able to "comment out" sections of your model (not just hide them - but skip generating them) temporarily, building up reusable helper routines, easily swapping out rough prototype vs thoroughly designed parts that are depended upon downstream in the model, and being able to organize complex models into separate modules.

I don't think I'd necessarily recommend this approach to modelling to a non-developer, but if you're already a developer, it is tough to beat (for 3D printing at least).

Re: Code CAD – Use code to create CAD models

#20
post #8

Earlier quoted context omitted.

For real this is almost unusable. Would be curious to see what's going on here, the rest of this tool looks well-designed.

Quick check in the network tab shows that each camera move sends the full buffer and camera coords to some aws server where it spends a second rendering then comes back with an image. The JSCAD integration is however all in-browser and is far smoother. They should lead with it, IMO.

That sounds unbelievably stupid. Why render 3D graphics on a server that has no hardware acceleration?
Post reply on HN