More constraint types needed

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Roland
Posts: 333
Joined: Fri Aug 21, 2015 2:20 pm

More constraint types needed

Post by Roland »

Hello Assemblers,

Currently I am working with A2+, but I assume that this post might be relevant for other assemblers as well.

This regards the assembling of a piping part, looking as follows:
Pipe&Flange.png
Pipe&Flange.png (374.74 KiB) Viewed 1948 times
The question is: How can we use the assembler to turn the flange such that the mounting holes are placed in line with the pipe extension.

Could this be an option?:
Every FC pipe has a longitudinal seem. (in this case refer to the small pipe connected immediately to the flange). Together with the pipe axis, this seem defines a plane. A flange mounting hole could be selected to align its axis with that plane (coincide).

For this to work out properly, it is necessary that the orientation of the pipe seem can be constrained as well. That is currently not possible either with A2+ (so it seems to me).

What are your thoughts about this?

Best regards,

Roland
User avatar
fosselius
Posts: 381
Joined: Sat Apr 23, 2016 10:03 am
Contact:

Re: More constraint types needed

Post by fosselius »

The "holes are not placed correctly" gets me confused. What i your goal?
1. modify part A based on part B
2. place and constrain part A based on part B

1. is a case for the part or part-design workbench
2. is what assembly is used for.

is the pipe an assembly of 4 parts? tube + bend + tube + "attachment disc"?

if the latter, the i have had issues with angular offsets for circular constraints in asm3 as well. they resolve to different positions all the time.

one solution is to have:

pipePart (part container)
-tube (body)
-bend (body)
-tube2 (body)
-disc (body)

then position/rotate the bodies relative to eachother in the pipePart then use pipePart in asm2+ or asm3.
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: Wed May 01, 2019 8:01 am
Hi @Roland,
if your goal is orienting the holes of the flange to the seem of a tube, you could it do this way...
.
flange-tube-assy.png
flange-tube-assy.png (313.53 KiB) Viewed 1915 times
.
The flange has similar seem parallel to its axis as the tube.
You have to create the first flange hole (before doing a polar pattern) at a correct position relative to its seem, then do the polar pattern. If doing so, the flange drill holes have a defined position to its inner seem.

Within the assembly, you can now align the seems of tube and flange, to fix the rotational position.
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 »

Thanks kbwbe,

Note: the parts are not designed by myself, but are taken as standard parts from various sources: The tubes from Flamengo WB and the Flange from BoltsFC WB. As a result the seem lines do not exactly match in-line as soon as axial coincidence (Circular Edge) is constrained. However, there are plenty of common characteristics that remain for assembling (I indicated some in my first message).

Nevertheless, I tried your proposal using cylindrical parts designed by myself, and I get this error: Constraints are broken.

This happens already when just trying to align the seems. (even before I try to apply the Circular Edge constraint for the main axes.)
Attachments
error.png
error.png (19.65 KiB) Viewed 1908 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: Wed May 01, 2019 10:37 am
Can you upload your parts so that i can check them ?
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 »

Sure, the files are attached. The assembly tricks are to be done in Pipe&Flange.*
Attachments
Plate flange EN1092-1 PN6 T01 DN200.FCStd
(11.11 KiB) Downloaded 45 times
PijpStukje_DN200xextra2.FCStd
(7.65 KiB) Downloaded 38 times
Pipe&Flange.FCStd
(15.73 KiB) Downloaded 40 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: Wed May 01, 2019 1:56 pm
The outer diameter of "PijpStukje" is 219,7 mm, the inner diameter of the flange is 221,5 mm.
So my method with aligning the center axes and then the seems cannot work.
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 »

Indeed, that is what I meant when I wrote:
the parts are not designed by myself, but are taken as standard parts from various sources: The tubes from Flamengo WB and the Flange from BoltsFC WB. As a result the seem lines do not exactly match in-line as soon as axial coincidence (Circular Edge) is constrained.
But even with equal diameters, then still A2+ does not align the pipe seems as you suggested. In attached files, I made the diameters equal. I get the same error message: Constraints broken. In below picture, the two green lines (pipe seems) were selected for alignment.

I attached new files with equalized diameters.

My conclusion is that for an assembly WB to correctly perform for cylindrical objects (e.g. pipes, flanges):
  • Cylindrical objects need one extra property : a virtual plane (at least one) that is not a face (hence "virtual").
  • The constraint types need to be extended with the option to constraint virtual planes (not to be confused with faces)
Your suggestion (the ability to align on vertexes - if it actually would work) is not sufficient, since seem lines do not necessarily match in-line as soon as axial coincidence (Circular Edge) is constrained.
Attachments
Plate flange EN1092-1 PN6 T01 DN200.FCStd
(11.11 KiB) Downloaded 35 times
PijpStukje_DN200xextra2.FCStd
(7.65 KiB) Downloaded 36 times
Pipe&Flange2.FCStd
(14.6 KiB) Downloaded 34 times
Pipe&Flange2.png
Pipe&Flange2.png (58.87 KiB) Viewed 1860 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: Wed May 01, 2019 3:01 pm But even with equal diameters, then still A2+ does not align the pipe seems as you suggested. In attached files, I made the diameters equal. I get the same error message: Constraints broken. In below picture, the two green lines (pipe seems) were selected for alignment.

I attached new files with equalized diameters.
As your flange and piece of a pipe have now same diameters, i could assemble now assemble your parts using my method.
There was only one small problem. Aligning the seems of flange and pipe lead to a bad start position for the next working step which was setting the circular constraint. I had to rotate the pipe a little bit. After that, the cirular constraint could be applied.

Please see the attached screenshot.
.
rolands-assembly.png
rolands-assembly.png (214.61 KiB) Viewed 1821 times
.
After applying the circular constraint and solving the bad prepositioned parts, i only got the message, that the constraints can not be solved. So i am wondering why you got the message that constraints are broken. I did not get this message. There seems to be a big difference between your and my workflow. But i do not recognize what it is...
.
Roland wrote: Wed May 01, 2019 3:01 pm My conclusion is that for an assembly WB to correctly perform for cylindrical objects (e.g. pipes, flanges):
  • Cylindrical objects need one extra property : a virtual plane (at least one) that is not a face (hence "virtual").
  • The constraint types need to be extended with the option to constraint virtual planes (not to be confused with faces)
Sure, but this is not easy and will take a lot of time to implement it.

I attach my assemblies
Attachments
Solved-after-good-prepositioning.FCStd
(10.75 KiB) Downloaded 37 times
Better-prepositioning-before-circular-constraint.FCStd
(10.42 KiB) Downloaded 38 times
Bad-prepositioning-before-circular-constraint.FCStd
(10.31 KiB) Downloaded 34 times
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 »

Thanks for your efforts!
I tried to work your files. I translated one of the parts and called a recalculation. In all cases A2+ returned: Constraints are broken.

This is my system:
OS: Linux Mint 19.1
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.1.
Build type: Release
Python version: 2.7.15rc1
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)

Upon start-up, the report view says:

Code: Select all

OpenGL version is: 3.0 (3.0 Mesa 18.2.8)
Run Gui init script
Init: Running FreeCADGuiInit.py start script...
Init:   Searching modules...
Init:      Initializing /usr/share/freecad/Mod/Sketcher... done
Init:      Initializing /usr/share/freecad/Mod/ReverseEngineering... done
Init:      Initializing /usr/share/freecad/Mod/Show(InitGui.py not found)... ignore
Init:      Initializing /usr/share/freecad/Mod/Image... done
Init:      Initializing /usr/share/freecad/Mod/Surface... done
Init:      Initializing /usr/share/freecad/Mod/PartDesign... done
Init:      Initializing /home/rsiemons/.FreeCAD/Mod/fasteners... done
Init:      Initializing /home/rsiemons/.FreeCAD/Mod/BOLTSFC(InitGui.py not found)... ignore
Init:      Initializing /usr/share/freecad/Mod/Measure(InitGui.py not found)... ignore
Init:      Initializing /usr/share/freecad/Mod/Ship... done
Init:      Initializing /usr/share/freecad/Mod/Web... done
Module: Part
Loading Part module... done
Init:      Initializing /home/rsiemons/.FreeCAD/Mod/Manipulator... done
Init:      Initializing /usr/share/freecad/Mod/MeshPart... done
Init:      Initializing /usr/share/freecad/Mod/OpenSCAD... done
Init:      Initializing /usr/share/freecad/Mod/Fem... done
Init:      Initializing /usr/share/freecad/Mod/Spreadsheet... done
Init:      Initializing /usr/share/freecad/Mod/Start... done
Init:      Initializing /usr/share/freecad/Mod/Points... done
Init:      Initializing /usr/share/freecad/Mod/Draft... done
Init:      Initializing /usr/share/freecad/Mod/Test... done
Init:      Initializing /usr/share/freecad/Mod/Import... done
Init:      Initializing /home/rsiemons/.FreeCAD/Mod/A2plus... done
Init:      Initializing /home/rsiemons/.FreeCAD/Mod/frame(InitGui.py not found)... ignore
Init:      Initializing /usr/share/freecad/Mod/TechDraw... done
Init:      Initializing /usr/share/freecad/Mod/Tux... done
Init:      Initializing /home/rsiemons/.FreeCAD/Mod/BIM... done
Init:      Initializing /usr/share/freecad/Mod/Complete... done
Init:      Initializing /usr/share/freecad/Mod/Plot... done
Init:      Initializing /usr/share/freecad/Mod/Material... done
Init:      Initializing /usr/share/freecad/Mod/Raytracing... done
Init:      Initializing /usr/share/freecad/Mod/Mesh... done
Init:      Initializing /home/rsiemons/.FreeCAD/Mod/sheetmetal... done
Init:      Initializing /usr/share/freecad/Mod/Path... done
Init:      Initializing /usr/share/freecad/Mod/Part... done
Init:      Initializing /usr/share/freecad/Mod/Arch... done
Init:      Initializing /home/rsiemons/.FreeCAD/Mod/flamingo... done
Init:      Initializing /usr/share/freecad/Mod/Robot... done
Init:      Initializing /usr/share/freecad/Mod/AddonManager... done
Init:      Initializing /usr/share/freecad/Mod/Idf(InitGui.py not found)... ignore
Init:      Initializing /usr/share/freecad/Mod/Inspection... done
Init:      Initializing /usr/share/freecad/Mod/Drawing... done
Init: Loading FreeCAD GUI
Init: Running FreeCADGuiInit.py start script... done
Init: Activating default workbench StartWorkbench
Loading GUI of Web module... done
Loading GUI of Start module... done
Loading Start module... done
[b]libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
QImage::QImage(), XPM is not supported[/b]
Init: Showing main window
Main window restored
Show main window
Toolbars restored
Couldn't connect to spacenav daemon
Init: Entering event loop
Init: Processing command line files
Loading GUI of Part module... done
Loading MeshPart module... done
Loading Mesh module... done
Loading Drawing module... done
Loading Spreadsheet module... done
Results of these A2+ actions attached.

Do we need an IT expert to get an understanding of what is going on? Suggestions very welcome.

Greetz

Roland
Attachments
Bad-prepositioning-before-circular-constraint.png
Bad-prepositioning-before-circular-constraint.png (196.93 KiB) Viewed 1783 times
Better-prepositioning-before-circular-constraint.png
Better-prepositioning-before-circular-constraint.png (195.6 KiB) Viewed 1783 times
Solved-after-good-prepositioning.png
Solved-after-good-prepositioning.png (211.7 KiB) Viewed 1783 times
Last edited by Roland on Thu May 02, 2019 3:10 pm, edited 1 time in total.
Post Reply