Assembly3: Consider enabling SolveSpace flag Group.allowRedundant

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
Saturn
Posts: 5
Joined: Fri Mar 12, 2021 5:19 pm

Assembly3: Consider enabling SolveSpace flag Group.allowRedundant

Post 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
User avatar
bambuko
Veteran
Posts: 2163
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: Assembly3: Consider enabling SolveSpace flag Group.allowRedundant

Post 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...
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3: Consider enabling SolveSpace flag Group.allowRedundant

Post 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.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
Post Reply