Assembly 3 Inconsistent Constraints

Discussion about the development of the Assembly workbench.
michaelquigley
Posts: 19
Joined: Thu Oct 15, 2020 4:27 am

Assembly 3 Inconsistent Constraints

Postby michaelquigley » Sun Nov 08, 2020 6:04 pm

Hi... I'm running the FreeCAD_0.19.22894-Win-Conda_vc14.x-x86_64 build from the releases page.

I've been getting on pretty well with the Assembly 3 workbench, but I'm running into an issue that I can't quite figure out. Here's a short capture of what I'm seeing:

Image

The base part is the 3-lobed, larger piece. There are 3 smaller pieces, each of which have holes with the same spacing as two of the holes (x3) in the base. I'm trying to use a pair of PlaneCoincident constraints to align each of the smaller pieces with the corresponding holes in the base. I almost always am able to get the first piece to align with the base properly... I add both PlaneCoincident constraints and when I click the solve button, the part snaps into the correct alignment. When I add the elements for the first hole in the second part, and click solve, I get the "inconsistent constraints" message. Even when I remove the two elements selected, and that last constraint, the model will never solve again until I remove all the constraints except for the "locked" constraint locking the base in place. I was able to get both the first and second pieces constrainted to the base 1 time, but I'm not sure what (if anything) I did differently in that case.

I've tried wrapping all of their parts in their own assemblies with named elements, and that made no difference.

This is driving me crazy. Hopefully it's just something silly that I'm doing?
Last edited by michaelquigley on Tue Nov 10, 2020 4:44 pm, edited 1 time in total.
michaelquigley
Posts: 19
Joined: Thu Oct 15, 2020 4:27 am

Re: Assembly 3 Inconsistent Constraints

Postby michaelquigley » Tue Nov 10, 2020 4:43 pm

Did I post this in the wrong spot?

Anyone have any insight here at all? Is there more information I can provide that would help in diagnosing this?
Cyclonit
Posts: 34
Joined: Sat Sep 26, 2020 11:19 am
Location: Germany

Re: Assembly 3 Inconsistent Constraints

Postby Cyclonit » Tue Nov 10, 2020 4:54 pm

I think realthunder doesn't check every new thread. But he is fine with being pinged most of the time.
realthunder wrote:
Mon Nov 09, 2020 11:19 am
ping
User avatar
M4x
Posts: 326
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: Assembly 3 Inconsistent Constraints

Postby M4x » Tue Nov 10, 2020 9:17 pm

michaelquigley wrote:
Tue Nov 10, 2020 4:43 pm
[...] Is there more information I can provide that would help in diagnosing this?
You could share your file(s). Thanks!
michaelquigley
Posts: 19
Joined: Thu Oct 15, 2020 4:27 am

Re: Assembly 3 Inconsistent Constraints

Postby michaelquigley » Wed Nov 11, 2020 5:20 am

The files are attached...

tri_mount and tri_mount_interface are the two parts. assembly is the assembly with the first interface constrained to the base. assembly_broken is an example of when I try to constrain the next interface to the base, and end up getting the "inconsistent constraints" error.

I'm sure I'm doing something wrong. I'm just lost as to what!

Thank you for any help you can offer!
Attachments
tri_mount_interface.FCStd
(75.86 KiB) Downloaded 13 times
tri_mount.FCStd
(207.29 KiB) Downloaded 14 times
assembly.FCStd
(16.07 KiB) Downloaded 14 times
assembly_broken.FCStd
(19.49 KiB) Downloaded 14 times
User avatar
jpg87
Posts: 446
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly 3 Inconsistent Constraints

Postby jpg87 » Wed Nov 11, 2020 10:38 am

michaelquigley wrote:
Wed Nov 11, 2020 5:20 am
I'm sure I'm doing something wrong. I'm just lost as to what!
Hi,
I added the X axis which is the support of the holes as an element in tri_mount_interface.
(the distance between the 2 centers of the holes gives an over stress)

So a PlaneCoincident constraint plus a PointOnLine constraint suffice and are no longer superabundant.

Here are the files archived in 7z format.
Attachments
asm3Pb.7z
(275.8 KiB) Downloaded 9 times
My website : http://help-freecad-jpg87.fr updated 2020/12/05
realthunder
Posts: 1847
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly 3 Inconsistent Constraints

Postby realthunder » Wed Nov 11, 2020 12:43 pm

michaelquigley wrote:
Sun Nov 08, 2020 6:04 pm
I've tried wrapping all of their parts in their own assemblies with named elements, and that made no difference.

This is driving me crazy. Hopefully it's just something silly that I'm doing?
I took a quick look. It seems to be a bug. You can work around this by change the order of elements of the second plain coincident constraint. There is dedicated toolbar button for that.
Screenshot from 2020-11-11 20-38-56.png
Screenshot from 2020-11-11 20-38-56.png (21.92 KiB) Viewed 325 times
Some explanation. More than one plane coincident constraint on the same pair of parts will definitely cause redundant constraints. asm3 will normally detect that and reduce the second constraint to a 2D point horizontal/vertical constraint. I am not sure why it didn't work in your case. I'll fix that later.
Try Assembly3 (latest version 0.11) along 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
michaelquigley
Posts: 19
Joined: Thu Oct 15, 2020 4:27 am

Re: Assembly 3 Inconsistent Constraints

Postby michaelquigley » Wed Nov 11, 2020 3:25 pm

jpg87 wrote:
Wed Nov 11, 2020 10:38 am
I added the X axis which is the support of the holes as an element in tri_mount_interface.
(the distance between the 2 centers of the holes gives an over stress)

So a PlaneCoincident constraint plus a PointOnLine constraint suffice and are no longer superabundant.
Interesting! And that aligns with realthunder's analysis below, also.

I have questions. I can see the elements and such in your version of the assembly file, and I get the high-level idea of it, but I don't actually understand what you've done. The first PlaneCoincident obviously causes the part to only be able to rotate around the Z axis of that first hole, and makes sure the planes of both circles are coincident. And I get that the the X_Axis line is locking the rotation onto the line between the two holes.

But how did you create that line element?
michaelquigley
Posts: 19
Joined: Thu Oct 15, 2020 4:27 am

Re: Assembly 3 Inconsistent Constraints

Postby michaelquigley » Wed Nov 11, 2020 3:42 pm

realthunder wrote:
Wed Nov 11, 2020 12:43 pm
I took a quick look. It seems to be a bug. You can work around this by change the order of elements of the second plain coincident constraint. There is dedicated toolbar button for that.
Some explanation. More than one plane coincident constraint on the same pair of parts will definitely cause redundant constraints. asm3 will normally detect that and reduce the second constraint to a 2D point horizontal/vertical constraint. I am not sure why it didn't work in your case. I'll fix that later.
Ok! So, at least I'm not crazy and I'm not necessarily doing something that I shouldn't be doing. I get that there may be other (and even potentially better) ways to constrain the relationships between these parts, but this approach should be working.

Also, I'm running the "Conda" build for Windows off the releases page. Is this where your latest asm3 output ends up? Is there a better build that I should be running? (I just noticed the link in your signature to the nightly builds...)
User avatar
jpg87
Posts: 446
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly 3 Inconsistent Constraints

Postby jpg87 » Wed Nov 11, 2020 4:26 pm

michaelquigley wrote:
Wed Nov 11, 2020 3:25 pm
But how did you create that line element?
This is the X reference axis of the body of tri_mount_interface that I dragged into the elements group (I noticed in your 1st sketch that the centers of the two holes were on this axis) :
Axe ref X.png
Axe ref X.png (38.35 KiB) Viewed 243 times
My website : http://help-freecad-jpg87.fr updated 2020/12/05