5 ms·
I've been using this software quite extensively to design a small 25m2 house I'm building earlier this year. It can be a bit rough around the edges, but it's al
by tgirod 10y ago
I've been using this software quite extensively to design a small 25m2 house I'm building earlier this year. It can be a bit rough around the edges, but it's already quite usable and powerful!
IMO the main issue is that the constraint solver recomputes everything whenever you add/move something, even though past additions are already properly constrained. As a result, the software gets less and less responsive as your design gets more complicated. I don't know if the devs adressed that issue (it's a tough one), but I know it was already on the radar a few months ago.
- buserror 10y agoDoes it get as bad as OpenSCAD? I found that anything even remotely complex using OpenSCAD brings the machine down to a crawl. And I'm on an overclocked 5930K with 64GB ram ;-) I'd be very curious to see a couple screenshot of your project! I used Google Sketchup to do landscaping last year around my house; I wonder how this would compare... sketchup plan: https://goo.gl/photos/Qc5mEnFiFm9UWBvv8 https://goo.gl/photos/Qc5mEnFiFm9UWBvv8 reality: https://goo.gl/photos/Gn66MSc8UPshR3CC8 https://goo.gl/photos/Gn66MSc8UPshR3CC8
- pawadu 10y agoHave you tried freecad? I think it uses openscad as backend but has a slightly better (and faster) UI.
- grp 10y agoIt uses Open Cascade: https://www.opencascade.com/ https://www.opencascade.com/
- ggoss 10y agoTry throwing render() around heavy blocks of code. That should speed up successive renders quite a bit.
- tgirod 10y agoHere you go! http://imgur.com/a/LOBge http://imgur.com/a/LOBge The design is a bit crude, but the goal was to get the structure's dimensions right. And it worked! http://imgur.com/a/rCZfk http://imgur.com/a/rCZfk
- n00b101 10y agoI don't know if the devs adressed that issue (it's a tough one) If these are linear constraints, maybe they can use the "Cassowary" incremental solver. [1] http://overconstrained.io/ http://overconstrained.io/
- nialo 10y agoI don't work on Solvespace and therefore don't know for sure, but I suspect they're not linear. In particular, a significant fraction of all constraints in a CAD system like that are of the form "the distance between these two points must equal x", which is a not linear in any of the positions I'd love to be wrong about this, because this general problem is one I'd be very interested in being able to solve more efficiently.
- istvan_csanady 10y ago2d geometric constraints solvers are usually based on BFGS algorithm (https://en.wikipedia.org/wiki/Broyden–Fletcher–Goldfarb–Shanno_algorithm https://en.wikipedia.org/wiki/Broyden–Fletcher–Goldfarb–Shan...). This is what we use in Shapr3D for example (http://www.shapr3d.com http://www.shapr3d.com)
- whitequark_ 10y agoIn the current solver, the constraints are linearized. It's not especially complex (just 500 LOC, not counting the symbolic algebra system that feeds it) or clever, but it does the job: https://github.com/solvespace/solvespace/blob/master/src/system.cpp https://github.com/solvespace/solvespace/blob/master/src/sys... We've been planning to evaluate Eigen for a while, but I will also look at Cassowary, thanks! That being said, depending on the sketch, often the vast majority of the time SolveSpace is calculating after dragging something is spent not in solver, but rather regenerating geometry, and that's harder to optimize.
- jwesthues 10y ago"Constraint" means something different to Cassowary than it does to us here, and isn't obviously useful. An optimized matrix library (Eigen, BLAS, LAPACK, etc.) would provide a modest speedup without too much work. So yeah, the constraints in SolveSpace are nonlinear. They're solved by a Newton-ish method, which for underconstrained sketches also minimizes at each step the sum of the squares of the distances that any un-dragged points move (plus some other stuff). The Jacobian matrix is computed by an internal symbolic algebra system, allowing considerable flexibility in the range of user-facing constraints without a combinatorial explosion of hand-coded special cases. As whitequark notes, the final solution of the constraint equations is a relatively small part of the overall work. The difficulty is mostly in writing them, to handle many useful cases in relatively few lines of code, and to converge reasonably in the Newton's method. For a dramatic speedup, we could partition the constraint equations into roughly-triangular form, and then solve sub-systems in dependency order. Practical sketches seem to have a lot of such structure, and a visualization of that graph would be an interesting expression of the design intent. (To be clear, this isn't a spreadsheet; you still have to numerically solve systems of multiple equations, just not all of your equations at once.) I wrote an earlier solver that did this in some cases, but SolveSpace doesn't at all.