Page 1 of 1

Assembly3: Consider enabling SolveSpace flag Group.allowRedundant

Posted: Mon May 30, 2022 9:59 am
by Saturn
Assembly3 uses SolveSpace as constraint solver. It does not allow redundant constraints, which sometimes complicates the assembly process.

SolveSpace seems to have a flag for allowing redundant constraints. They introduced it a long time ago, this change is also present in the realthunder fork of SolveSpace, included in the slvs_py Python package uses by Assebly3. However I highly suspect the flag is not enabled in Assembly3, as it does not allow any redundant constraints.

I have very little experience with using Assembly3, so it is possible I am overlooking something obvious.

See the explanation of the flag here:
https://github.com/solvespace/solvespac ... a4507bc63e

"This setting is generally useful, but it especially shines when
assembling,
since the "same orientation" and "parallel" constraints
remove three and two rotational degrees of freedom, which makes them
impossible to use with 3d "point on line" constraint that removes
two spatial and two rotational degrees of freedom.

The setting is not enabled for all imported groups by default
because it exhibits some edge case failures. For example:
* draw two line segments sharing a point,
* constrain lengths of line segments,
* constrain line segments perpendicular,
* constrain line segments to a 90° angle.

This is a truly degenerate case and so it is not considered very
important. However, we can fix this later by using Eigen::SparseQR."


I could test out how enabling this flag affects the assembly process, but before undertaking such an experiment, I would like to ask the opinion of experienced devs and users, as I am a FreeCAD noob. (enabling the flag would take some time since I am unfamiliar with with Assembly3 codebase, I could not find a quick way to enable this flag, hence the inquiry).

@realthunder

Re: Assembly3: Consider enabling SolveSpace flag Group.allowRedundant

Posted: Wed Jun 15, 2022 7:11 pm
by kwahoo
There is "Auto relax" option, but it seems to be a solution by realthunder himself https://forum.freecadweb.org/viewtopic. ... 01#p222801 not the Solvespace one.

Re: Assembly3: Consider enabling SolveSpace flag Group.allowRedundant

Posted: Thu Jun 16, 2022 10:36 am
by bambuko
Why would you want to allow redundant constraints?
After all they are "redundant" :
unnecessary, because it is more than is needed

never found the need for it :roll: (so far at least...)

and to quote the master himself (@realthunder ):
...It is better to be under constrained than over constrained...

Re: Assembly3: Consider enabling SolveSpace flag Group.allowRedundant

Posted: Thu Jul 07, 2022 3:02 am
by realthunder
I've checked that flag. It mostly seem to be used by the SolverSpace GUI to not report redundant constraint as error. The solver itself does not use that flag, and will report status as 'solve with redundancy', which is recognized by asm3 and will only report as warning. It's just that the solver does have a limit on how much redundancy it can handle.