- I'll throw my hat in on the feedback... looks great!
https://github.com/openscad/openscad/pull/4478#issuecomment-...
My pet use case is: "My naive approach as a programmer would be: `pen := new Pen(q,r,s,t); box := new Box( pen.L, pen.W, pen.H )`" along with being able to sometimes work with the whole pen, and sometimes touch the pen vs. the cap separately.
Since it's all javascript, it seems like there's a chance that this use case would work (ie: `p = Pen(...).render().getWidth()`)? Additionally, your intermediate step screenshots really makes it seem like a SketchUp-ish GUI would be perfect! Obviously a ton of work, but SketchUp's "grab face + extrude / push", but if it were "sticky" to the underlying parametric components seems like it'd be an awesome combo... something like group/components, but backed by code instead of GUI-only (or GUI-centric) editing.
- These code base cad systems are pretty great. But all of them are imperative languages and as such can only solve imperative constraints. Including declarative constraints would be very welcome. I mean, sure, Theoretically we could enter the turing tarpit and build our own constraint solver, but it would be nice to see one included as a standard library.
I am trying to think of an example, declarative constraints are usually the domain of a graphical cad system(like solvespace). but I suspect it would look like a set of relationships you can enter in any order and it solves for the missing one. so... prolog? has there ever been a cad system in prolog?
- This looks incredible, great job!
I've been revisiting OpenSCAD recently but find it very frustrating. I just got started with build123d which is great but I'll definitely be trying this. The workflow is exactly what I'm looking for.
I'll drop an issue if I have feedback. Are you open to PRs?
by flowerthoughts
1 subcomments
- This is nice, though I think the use of indices instead of stable identifiers might bite in complex models that undergo changes. I've been toying with the idea that you could specify a point (2D or 3D in some coordinate system, depending on context) and pick the face/edge/point closest to that as the identifier. The only other alternative I see is diffing old and new, and trying to match the outputs of each operation geometrically, but that would produce extra output that needs to be persisted...
E.g. when splitting a face in OnShape, I might have to redo a whole bunch of operations later because the identifiers change, but I'm often surprised how good it is at matching up faces after a single operation. Like modifying a sketch, then having to add the new face to an extrusion, but then it magically does the right thing for chamfers and drafts.
- The thing that made Flash magical was that it had the approachability of a design tool (and it really did have some of the best design tools ever), with the extensibility of a scripting language. You could start by drawing on a canvas and grow into programmatically generating designs.
This looks like it could do the same thing for constraint modeling. That's awesome!
by upcoming-sesame
1 subcomments
- I don't know much about CAD but it is surprising to me this hasn't existed before seems so natural. great work
by unforbiddenYet
0 subcomment
- Nice work and kudos for programming it by hand! Starred the project and plan to try it out soonish.
by kabir_daki
0 subcomment
- Impressive to see parametric CAD running in the browser.
Curious how you handle precision with floating point —
that's usually the first wall you hit with geometry in JS.
Does it support STEP or DXF export?
by WillAdams
1 subcomments
- Why use this rather than Maker.js?
https://www.microsoft.com/en-us/garage/profiles/maker-js/
- This looks great. I just started trying to generate some models using golang and the ecosystem doesn't seem great. Will check this out, might work out better.
by interstice
1 subcomments
- I've been working on this exact idea! But it's late, will remember to come back and check this out to compare notes.
- Really interesting! Is there a list of all supported CAD operations? Can I “revolve” 2D sketches? Can I make assemblies?
- i feel like cad is really the next frontier, whoever figure out vibe-CADing will make millions
by AmmarSaleh50
0 subcomment
- That looks amazing
- This looks awesome.
- What geometry kernel is it using?
Which operations are supported? (Booleans? ...)
Where's the API link?
...finally, was this vibe-coded?
Inquiring minds want to know!
- [dead]
- [dead]
by c_chenfeng
1 subcomments
- [flagged]