a2plus (v442) constraints inconsistent

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
chrtech1
Posts: 16
Joined: Fri Nov 09, 2018 3:22 am

a2plus (v442) constraints inconsistent

Post by chrtech1 »

I am a relative newcomer to FreeCad, and I certainly appreciate all the work that has been put into it. I plan to be a long term user and hope to be able to contribute in some small way when I become fully proficient (I've been using various CAD products for thirty plus years, mostly Solidworks for the past ten).

But until then...

I saw another post about this issue from November 2019 but it had no resolution so I'm posting this with more details.

With an A2plus assembly, every time I edit one of the components and update the assembly, the "Constraints inconsistent. Cannot solve System. Please delete your last created constraint!" error comes up.

It happens when...
  • adding a new feature to a part (as in add a pocket with it's own sketch)
  • adding something to an existing feature (as in adding adding a circle to an existing sketch to create a hole in a pad)
It does not happen when...
  • changing a property of an existing sketch entity (as in changing diameter or location of a hole by editing the circle in the sketch)
  • changing the length of a pad or pocket
Correcting the situation requires deleting all the constraints associated with the part and then re-doing them. Really time consuming if you edit the fixed part and it has a dozen other parts constrained to it in various ways.

I've tried to find and fix the offending constraint by using the constraint highlight tool. Usually I can identify the constraints that are broken. But fixing them is pretty near impossible if a part has a dozen constraints associated with it and eight of them are broken.

Is there a workaround or technique for this that I am missing? There must be, because having to basically start over on an assembly after a fairly minor edit to a component is a major issue. I must be doing something wrong.

Thanks in advance.


OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.19635 (Git)
Build type: Release
Branch: master
Hash: 757cfce10b87ca087d31ce38eb30f612bf55fcad
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
User avatar
Roland
Posts: 333
Joined: Fri Aug 21, 2015 2:20 pm

Re: a2plus (v442) constraints inconsistent

Post by Roland »

I have the same problem.

Since I am not a coder, I can only give some hints:
Perhaps it would help if specific constraints could be selected and made "asleep", to enable testing of the assembly.

A2+ has the option to produce a html table, and to highlight constraints, however these features are not always sufficient to improve/repair an assembly.

Best regards,

Roland
chrtech1
Posts: 16
Joined: Fri Nov 09, 2018 3:22 am

Re: a2plus (v442) constraints inconsistent

Post by chrtech1 »

Interesting. There is a post with the header "A2plus Broken Constraints and suppression" by by dan-miel » Mon Jan 13, 2020 1:58 am. It has a video which , while it didn't answer the question, gave another technique.

The assembly I am working with right now has eight components. The fixed or base component is the one I am editing. It has eight constraints in the tree. By turning the "Suppressed" property for all eight constraints to "true", the "constraints inconsistent" error is cleared. Then it is possible to go back through and turn the "Suppressed" property back to "false" one by one to find the constraint(s) that are causing the error. I found that two out of eight constraints were wrong.

Not perfect but it's an improvement over deleting all the constraints in the component and re-doing them like I was. Still confusing and tedious.
chrtech1
Posts: 16
Joined: Fri Nov 09, 2018 3:22 am

Re: a2plus (v442) constraints inconsistent

Post by chrtech1 »

I saw (in another post that I can't find anymore) where it was mentioned that FreeCad has an internal naming issue in the code that scrambles constraints. If that's the case, I'd ship a case of beer to the dev who corrected it. i sure can't, just trying to find workarounds.
User avatar
Roland
Posts: 333
Joined: Fri Aug 21, 2015 2:20 pm

Re: a2plus (v442) constraints inconsistent

Post by Roland »

By turning the "Suppressed" property for all eight constraints to "true", the "constraints inconsistent" error is cleared. Then it is possible to go back through and turn the "Suppressed" property back to "false" one by one to find the constraint(s) that are causing the error.
There you are! I did not know of this possibility. In fact this is what I was looking for. THX chrtech1, (but actually developer kbwbe).

Roland
dan-miel
Posts: 391
Joined: Thu Sep 13, 2018 12:29 am
Location: Spokane WA. USA

Re: a2plus (v442) constraints inconsistent

Post by dan-miel »

chrtech1 wrote: Mon Apr 13, 2020 6:51 pm I saw (in another post that I can't find anymore) where it was mentioned that FreeCad has an internal naming issue
The issue as far as I can tell using a cube as an example: When a part is made the cube has six faces and they are named Face1, Face2 to Face6. When two parts is linked with a constraint the link is made using the name of the face. In SolidWorks if a hole is created thru the part the face of the hole becomes Face7 and the names of the existing faces never change. In FreeCAD the face of the hole might become Face3 and Faces 4, 5, 6 will be changed to faces 5, 6, 7 so the constraint that was linked to Face6 is still there but Face6 has moved so the constraint is broken. If you're adding radius's to the corner Face6 may have been a flat surface may now be a radius.
chrtech1 wrote: Mon Apr 13, 2020 6:45 pm Not perfect but it's an improvement over deleting all the constraints
It is not perfect and finding broken mates in A2plus is hard to do. Here are a couple ideas I was looking at but I have been busy finishing our new house and my other computer has not been connected for a while. You can view these and let me know if you have comments or ideas.
https://www.youtube.com/watch?v=GRtySM_Vpk4
https://www.youtube.com/watch?v=cocVnp14UZo
Post Reply