11 ms·
Code CAD – Use code to create CAD models
- wilsonjholmes 5y agoLove this site! Keep up the great work.
- ravenstine 5y agoI'm not sure I understand the thing about the models not being live previews. Is OpenSCAD effectively being run on the server and the code needs to be sent to it every time you modify code or change the camera?
- hobofan 5y agoSee the link to the explanation just above it: https://learn.cadhub.xyz/docs/general-cadhub/openscad-previews/ https://learn.cadhub.xyz/docs/general-cadhub/openscad-previe...
- ravenstine 5y agoHonestly, 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 into an image to save resources or prevent potential freezes? I'm not criticizing it but am just curious about the reasoning.
- MH15 5y agoFor real this is almost unusable. Would be curious to see what's going on here, the rest of this tool looks well-designed.
- meetups323 5y agoQuick 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.
- imtringued 5y agoThat sounds unbelievably stupid. Why render 3D graphics on a server that has no hardware acceleration?
- ajuc 5y agothat way you can use open source and don't share your code :)
- billconan 5y agothere is a web version openscad http://openjscad.azurewebsites.net/ http://openjscad.azurewebsites.net/
- randomsilence 5y agoCould this be an older version? The current version should be: https://www.openjscad.xyz/ https://www.openjscad.xyz/
- cassianoleal 5y agoOpenJSCAD [0] does live camera and the performance is great. [0] https://openjscad.xyz/ https://openjscad.xyz/
- rowanG077 5y agoHonestly 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 language. This essentially makes it superior in almost every way to openSCAD. [1] https://github.com/CadQuery/cadquery https://github.com/CadQuery/cadquery
- ravenstine 5y agoOh wow, I've never heard of this and might have to check it out. I love OpenSCAD in contrast to other free CAD programs I've tried, but not being able to directly work with STEP has been a limitation.
- deleted 5y ago[deleted]
- meetups323 5y agoWorth noting that this product is able to operate on CadQuery and JSCAD in addition to OpenSCAD.
- aaaaaaaaaaab 5y agoActually, 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.
- jetrink 5y agoThe 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.
- traverseda 5y agohttps://libfive.com/studio/ https://libfive.com/studio/
- peatmoss 5y agoThis looks incredible! Scheme syntax, ability to manipulate graphically, Scheme code updates dynamically? Very cool. I’ll have to try this for my next woodworking project.
- tjoff 5y agoThere is a small clojure project that transpiles clojure to openscad, (if I remember correctly...) https://github.com/farrellm/scad-clj https://github.com/farrellm/scad-clj Demonstrated and talked about in this clip: https://www.youtube.com/watch?v=uk3A41U0iO4 https://www.youtube.com/watch?v=uk3A41U0iO4 edit: it is a fantastic talk but the part related to this starts at 17:35
- eurasiantiger 5y agoLanguage-wise, OpenSCAD is very functional-ish indeed. Try writing code to distribute a vector of length multipliers evenly along some arbitrary length, e.g. [1,2,1] times 20 over 100 coordinate units. It is only possible by recursively calculating a vector of coordinate positions, in our example [0,5,25,30,70,75,95,100]. Not the easiest task for the uninitiated.
- sk2020 5y agoProgrammatically 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.
- criddell 5y agoAutoDesk has supported this kind of automation from almost the very beginning (originally you had to use their Lisp variant AutoLisp but now there's more flexibility). I agree with you about the web-based criticism though. Working in a browser feels pretty limiting and it's so slow.
- jpgleeson 5y agoGrasshopper, which Dynamo is really trying to compete against, is in wide use in the architecture world.
- xor99 5y agoYeah these are mostly used for architecture. Seemingly exclusively to produce the same generative style
- somewhereoutth 5y agoStyles are going to be strongly influenced by the tools used to communicate them, so possibly no surprise
- deleted 5y ago[deleted]
- 5y ago
- ChrisArchitect 5y agoFurther discussion 4 months ago: https://news.ycombinator.com/item?id=27649270 https://news.ycombinator.com/item?id=27649270
- marcodiego 5y agoSince the links doesn't indicates, its license is GPLV3: https://github.com/Irev-Dev/cadhub https://github.com/Irev-Dev/cadhub
- irevdev 5y agoHey, 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 unifying the community with a website dedicated to this paradigm, and if we're lucky we play a small role in promoting more development and better tools in the future. Some of the reasons it's got potential: - 3d-diffs on pull requests [1] - Automated FEM, CFD etc simulations akin to CI/CD [2] - PLM managed through git - plus git in general is such a good way for teams to work together [1] https://learn.cadhub.xyz/blog/3d-diffs/ https://learn.cadhub.xyz/blog/3d-diffs/ [2] https://learn.cadhub.xyz/blog/testing-code-cad/ https://learn.cadhub.xyz/blog/testing-code-cad/
- deleted 5y ago[deleted]
- TaylorAlexander 5y agoHowdy! 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 more investment in that kind of parametric visual CAD. EDIT: An example of one of my recent projects: https://twitter.com/TLAlexander/status/1450001567088713730 https://twitter.com/TLAlexander/status/1450001567088713730
- irevdev 5y ago"why not both" Direct manipulation/GUI will always be faster at producing content. It worth exploring how much the two can we wedded with code synthesis. I get that code synthesis attempts normally produce poor quality code, but maybe a hybrid work flow could work between using the GUI and fixing up code. It's a shame that the current CodeCAD tools have very little interaction with he part viewer. https://www.youtube.com/watch?t=290&v=jC2_O5Jh_Rg&feature=youtu.be https://www.youtube.com/watch?t=290&v=jC2_O5Jh_Rg&feature=yo... https://www.youtube.com/watch?v=xF8arSFKI1k https://www.youtube.com/watch?v=xF8arSFKI1k
- empressplay 5y agoI think this stuff is really awesome, I make turtleSpaces which lets you create and export STL models using the Logo programming language https://turtlespaces.org https://turtlespaces.org -- creating a shape using an algorithm and then 3D printing it is really cool!
- xor99 5y agohttps://www.libfive.com/ https://www.libfive.com/ Libfive is quite good to check out too but yes openscad and cadquery are the most used.
- ur-whale 5y ago> Libfive is quite good to check out too Lots of potential, but IMO not really usable for real world work. For example, there isn't any (or I haven't found any) simple way to create a clean fillet between two complex surfaces other than blending them and hoping for the best. Documentation of the API is lacking, except for a bunch of examples in scheme (not exactly the most popular language for CAD folks). Python API exists, but documentation is ... reading the source code. Finally, the implicit surface tessellation algos used in libfive are IMO somewhat unpredictable and getting them to produce precise shapes (which is something fairly desirable in mechanical engineering) is hard.
- app4soft 5y ago> Lots of potential, but IMO not really usable for real world work. What about Antimony and VisualScriptCAD?[0,1] [0] https://github.com/mkeeter/antimony https://github.com/mkeeter/antimony [1] https://github.com/kovacsv/VisualScriptCAD https://github.com/kovacsv/VisualScriptCAD
- dividedbyzero 5y agoI'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 really ugly real quick. Organic shapes are very hard to construct, and simply generating polylines or the like either fails because OpenSCAD takes literal hours to render or because CadQuery throws some weird error halfway through and I just can't get it to work. I'd love to see a free or at least affordable (for hobbyists) CAD solution that isn't code-only, cloud-only, totally crippled in terms of functionality, or extremely arcane. I believe Fusion 360 went cloud-only (or almost) last year or so, and between Fusion 360 and FreeCAD (which I tried to learn, but couldn't figure out) there seems to be a big opportunity for an affordable, user-friendly, open CAD tool for the 3D printer owning masses (there are dozens of us!) 1: https://github.com/CadQuery/cadquery https://github.com/CadQuery/cadquery
- benhurmarcel 5y agoI 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.
- dividedbyzero 5y agoI'm not dogmatic either, but if I need to revisit a design a few years from now, will I be able to? That's what I feel uneasy about with Fusion 360.
- majormajor 5y agoComplete 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.
- jml7c5 5y agoIt's worth noting that SketchUp is a simple, non-parametric CAD package. What you want is available in most other, more advanced CAD software.
- jessaustin 5y agoIME, positioning in SketchUp requires fiddly d'n'd. Sizing, however, can be done by typing in numbers as soon as you start drawing a line or rectangle, start pulling a face into a volume, or any action that involves one or more offsets.
- cjdaly 5y agoSketchup has a Ruby API. This book is good if you can find a copy: https://www.amazon.com/Automatic-SketchUp-Creating-Models-Ruby/dp/0984059202 https://www.amazon.com/Automatic-SketchUp-Creating-Models-Ru...
- benhurmarcel 5y agoTry a decent parametric CAD package like Fusion360 or Onshape.
- platypii 5y agoShout out to JSCAD -- Javascript solid object CAD software. I really like it. Some things I've been able to do with JSCAD that would be hard to imagine with any other CAD software: - From the same source files, I can generate either an "assembled" model or a "print version" arranged for 3D printing. - Integrated into github CI/CD so that I know immediately if I broke my designs. Easy to write tests for things like bounding box size. - Use eslint to enforce style rules. Mocha for tests. Typescript if you want. - Browserify to bundle the design into a website. Directly from the source CAD files, without rendering to a huge mesh file format. It's cool because you get access to the whole javascript ecosystem, and it's native to the browser. https://openjscad.xyz/ https://openjscad.xyz/
- theHIDninja 5y agoI 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 last week and it is an absolute joy to use. It is like night and day compared to any scripting based CAD system out there. CAD and code absolutely do not, and should not mix.
- Animats 5y agoCAD and code absolutely do not, and should not mix. I tend to agree, having done both programming and mechanical design. Drawing by writing code is pounding a screw. The major CAD systems have some scripting capability, for when you need to generate a gear or a geodesic dome or something that needs procedural generation. They also have constraint solvers, so you can specify constraints and let the system find a solution that satisfies them. Try the demo version of Fusion 360 for that.
- sgtnoodle 5y agoI'm an embedded software engineer and into 3D printing useful/functional things. I've made a lot of cool complicated stuff with OpenSCAD. There's a lot of problems that are solved nicely in code. For example, I made a two stage 80:1 gear box for a force feedback steering wheel project, and I fully parameterized the gearbox geometry based on the tooth count, gear metric, and extrinsic mounting constraints. As a result, I could very easily try out different ratios and metrics across the whole assembly. It's sometimes more painful to use code for quick "all I need is a funny shaped..." projects. Some projects really benefit from having a for loop, though.
- jjk166 5y agoParametric CAD like solidworks does that too, but all you need is the relations between features, no boilerplate.
- andy_threos_io 5y agoI found this [1] from MS very useful when I designed some PCB inductor coil for a project. It was only 2D, but some 100 lines of code made the development so much easier. [1] https://maker.js.org/ https://maker.js.org/