solvespace icon indicating copy to clipboard operation
solvespace copied to clipboard

Potential solver improvements from Dune 3D

Open carrotIndustries opened this issue 2 years ago • 1 comments

Dune 3D uses the solver from solvespace with some patches to make it faster for the use case in Dune 3D. Since there seems to be interest in what I did, here's a brief explanation:

In contrast to Solvespace, Dune 3D doesn't use use transformed points such as POINT_N_TRANS and its friends for extrusions for example. In solvespace, an extrude group only adds (the length of?) the extrude vector to the group's equations and expresses the positions of the the generated entities by means of transformed points.

In Dune 3D instead, all of the generated entities add parameters for their points. These degrees of freedom then get eliminated by adding corresponding equations.

It's these equations that bog down the solver performance dramatically. Since these parameters and equations don't add or remove any degrees of freedom, my implementation finds them and solves them symbolically after the rest of the system has been solved.

As solvespace doesn't generate that many parameters/equations that don't change the DOFs in the first place, I don't think that this optimization brings much benefit to solvespace.

carrotIndustries avatar May 05 '24 22:05 carrotIndustries

For contrast, in NoteCAD there nothing created. Only virtual entities which really not existed in memory. They can be created on-the-fly by request (by id or selection request). I've tried to implement this conception for arrays.

Evil-Spirit avatar May 21 '24 04:05 Evil-Spirit