More constraint types needed

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
chrisb
Veteran
Posts: 54168
Joined: Tue Mar 17, 2015 9:14 am

Re: More constraint types needed

Post by chrisb »

Please edit your post and use code tags </> for log output. It improves readability.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
kbwbe
Veteran
Posts: 1052
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: More constraint types needed

Post by kbwbe »

Roland wrote: Thu May 02, 2019 6:54 am I tried to work your files. I translated one of the parts and called a recalculation. In all cases A2+ returned: Constraints are broken.
Aaah, i think we are getting closer to what is happening !
I translated one of the parts and called a recalculation.
Did you use the button with the green recycling symbol for recalculation ? This would reimport updated parts. If a part has been modified, you can run into the "topological naming" issue of FC. A small change in a part, and it's index of faces, edges,vertexes get completely mixed up. The result is the message "broken constraints".

Solving of the assembly (repositioning of moved parts) is done by the button with the rubic-cube. This does no reimport of the parts and the constraints do not break.

Am i completely wrong ?
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
User avatar
Roland
Posts: 333
Joined: Fri Aug 21, 2015 2:20 pm

Re: More constraint types needed

Post by Roland »

Yes, you are completely wrong (sorry, :? )

(Incidentally, kbwbe, are you the/a developer of A2+ ?)

The command used for recalculation was:
(The python panel does not show it happen)
Attachments
Solved-after-good-prepositioning.png
Solved-after-good-prepositioning.png (530.7 KiB) Viewed 1215 times
kbwbe
Veteran
Posts: 1052
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: More constraint types needed

Post by kbwbe »

Roland wrote: Thu May 02, 2019 3:09 pm (Incidentally, kbwbe, are you the/a developer of A2+ ?)
Yes, it is my workbench.

From your screenshot i see, that your A2plus WB is not up to date. You are using V0.4.13, the recent version is V0.4.19.
Please update you A2plus WB, as V0.4.14 fixed a bug with broken constraints for FreeCAD 0.18.1. From your parts i see you are using it.

I think, this will fix the problem.
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
User avatar
Roland
Posts: 333
Joined: Fri Aug 21, 2015 2:20 pm

Re: More constraint types needed

Post by Roland »

That fixed the problem indeed!
Super.

Now give me some time to contemplate assembling of cylindrical stuff further ...

Thanks so far for your efforts.

Roland
User avatar
Roland
Posts: 333
Joined: Fri Aug 21, 2015 2:20 pm

Re: More constraint types needed

Post by Roland »

I made the assembly challenge more clear, and also more complicated.
See attached file.

The task for the assembler is to align the mounting holes of the flanges into defined planes. In this case at least two mounting holes of the different flanges aligned to coincide in the XZ-plane.

I think this challenge should be brought to more assembling attempts than only A2+.

Curious to hear suggestions!
Attachments
DoubleFlanged_ISO.png
DoubleFlanged_ISO.png (33.48 KiB) Viewed 1167 times
DoubleFlanged_TopView.png
DoubleFlanged_TopView.png (11.18 KiB) Viewed 1167 times
DoubleFlanged.FCStd
(19.32 KiB) Downloaded 29 times
User avatar
Roland
Posts: 333
Joined: Fri Aug 21, 2015 2:20 pm

Re: More constraint types needed

Post by Roland »

Here is a cheat to solve some related issues:

https://forum.freecadweb.org/viewtopic. ... 05#p305589

The message remains: more constraint types needed
(I only dare to suggest this because you are doing a great job with developing FreeCAD)

best regards

Roland
User avatar
Roland
Posts: 333
Joined: Fri Aug 21, 2015 2:20 pm

Re: More constraint types needed

Post by Roland »

What do you think of this cheat to solve my challenge with A2+?

It is actually not good enough yet, because it needs nearly precise pre-positioning. Otherwise it pretends that constraints are inconsistent (which they are not)

Greetz

Roland
Attachments
DoubleFlanged_cheat.FCStd
(29.1 KiB) Downloaded 32 times
kbwbe
Veteran
Posts: 1052
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: More constraint types needed

Post by kbwbe »

Roland wrote: Fri May 03, 2019 3:14 pm What do you think of this cheat to solve my challenge with A2+?
Hi Roland,
your "cheat" method is valid and you can do this this way (with helper solids), but you could get the same result with less work.

For example: If you always do your flange designs within XY-Plane and extrude along Z, you could assure that one hole is centered on X-Axis (or Y). Then import two flanges and the reduction cone. Simply rotate the flanges by the transform tool to your desired angle if necessary. Then apply a circularEdge constraint from each flange to the cone. This is very exact because a singular circularEdge constraint only moves the center point and the axis has been already correct before.

The resulting file you can use without problems as sub assembly in a main assembly.

P.S.: Or, if parts list is not so important, why not doing such simple reduction piece completely within PartDesign or Part WB and import it as complete unit to A2plus for further use.
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
User avatar
Roland
Posts: 333
Joined: Fri Aug 21, 2015 2:20 pm

Re: More constraint types needed

Post by Roland »

Hi KBWBE,

For me an assembly WB should have the capability as discussed here. Without needs of placing things manually on the right spot.

Your proposal seems a capitulation. Although, admittedly, I would not know how to code my proposals in a python language. My capabilities are limited to the mathematical / topological understanding.

Remember in one of my first mails of this thread I proposed to have a virtual plane defined for a cylinder. Adding the helper solids was just one way of doing so. In the cheat for Toralf (https://forum.freecadweb.org/viewtopic. ... 05#p305589) I basically proposed a bounding box around a cylinder. And I made one, for one instance only, which does not automatically adapt to its "mother" shape. But it should, for an assembly WB to become really helpful.

In my experience, the Sketcher WB has all the needs for the 2D space. An assembly WB in 3D should be an upgrade of those principles.

Conclusion: we need to be able to extract such information from the components that are to be aligned, and the alignment constraints should be able to address those values.

Well, let us hope that some people can join this exchange of ideas.

I appreciate the discussion with you. And up to here many thanks for A2+ !

best regards,

Roland
Post Reply