[solved] Assembly 3 problem with axial alignment 2 step parts

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
thomas-neemann
Veteran
Posts: 11729
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

[solved] Assembly 3 problem with axial alignment 2 step parts

Post by thomas-neemann »

I have a problem with axial alignment in 2 step parts. I assume it's because I can't select a circle or cylinder, but only a semi-circle or semi-cylinder in the step file. is there a workaround?


Code: Select all

Traceback (most recent call last):
  File "<string>", line 639, in report
  File "/tmp/.mount_27078-lnidOT/usr/lib/python3.9/site-packages/freecad/asm3/solver.py", line 408, in solve
    return _solve(*args,**kargs)
  File "/tmp/.mount_27078-lnidOT/usr/lib/python3.9/site-packages/freecad/asm3/solver.py", line 378, in _solve
    Solver(assembly,reportFailed,dragPart,recompute,rollback)
  File "/tmp/.mount_27078-lnidOT/usr/lib/python3.9/site-packages/freecad/asm3/solver.py", line 109, in __init__
    raise RuntimeError('Failed to solve {}: {}'.format(
RuntimeError: Failed to solve Unnamed#Assembly: inconsistent constraints
as3-test2.FCStd
(368.68 KiB) Downloaded 31 times
2.png
2.png (29.19 KiB) Viewed 2093 times


OS: Ubuntu 20.04.1 LTS (XFCE/xubuntu)
Word size of FreeCAD: 64-bit
Version: 0.20.27078 (Git) AppImage
Build type: Release
Branch: (HEAD detached at bcdd926)
Hash: bcdd926686f2245fe60baface1cce1ab3dff7a5b
Python version: 3.9.9
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: German/Germany (de_DE)


edit

this worked
4.png
4.png (2.25 KiB) Viewed 2078 times
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
bambuko
Veteran
Posts: 2114
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: [solved] Assembly 3 problem with axial alignment 2 step parts

Post by bambuko »

thomas-neemann wrote: Thu Jan 20, 2022 6:46 pm ...
another mystery from Thomas :mrgreen:
you are saying that "Axial alignment" failed
but, in the attached FreeCAD file you are using "Plane coincident" constraint.
but your edit says that "Attachment" worked.

and then you changed title to "solved" without telling us what has solved it....
I think I need strong coffee to recover :lol:
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
User avatar
thomas-neemann
Veteran
Posts: 11729
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: [solved] Assembly 3 problem with axial alignment 2 step parts

Post by thomas-neemann »

bambuko wrote: Fri Jan 21, 2022 7:43 am ..
you are saying that "Axial alignment" failed
but, in the attached FreeCAD file you are using "Plane coincident" constraint.
....
I expressed myself misleadingly. I wanted to position the part in 3 steps.

it can be seen in this video. step 1 from min 0:54 to 1:04 worked and can be seen in the file. Step 2 from 1:14 to 1:23 didn't work and that was my question


https://www.youtube.com/watch?v=FT-CeNRj_Nc

phpBB [video]
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
ToniTen
Posts: 239
Joined: Fri Sep 04, 2020 10:11 am

Re: [solved] Assembly 3 problem with axial alignment 2 step parts

Post by ToniTen »

First, let me bring something from RealThunder's wiki on his github repository
Assembly3 is very flexible about the interpretation of a constraining geometry element. When a constraint is named as PointOnLine, it does not mean the constraint only accepts vertex and linear edge. Here is a list of alternative interpretations of an element,
  • Point
    • Coordinate of a vertex;
    • Middle point of a linear edge;
    • Center of a circular edge;
    • Center of bounding box of any other edge;
    • Center of bounding box of a planar face;
    • Center of a circular face;
    • Center of the first edge (i.e. Edge1) of a cylindrical face.
  • Line, (of which only the direction is relevant for constraining, not the end points)
    • Linear edge;
    • The normal vector of the surface of a circular edge;
    • The normal vector of the surface of a planar face;
    • The revolving axis of a cylindrical face.
  • Plane, defined by an origin point interpreted the same way as the above Point, and a normal vector
    • The surface of a circular edge;
    • The surface of the first edge (i.e. Edge1) of a cylindrical face;
    • The surface of a planar face.
As you can see, an arc of a circle defines a plane, and so can be used for plane coincident and axial alignement. I deal with step files a lot, and well, the fact that circular holes are defined in two segments is something I'm very familiar with. Select both arcs and use plane coincident and it shall work.
User avatar
thomas-neemann
Veteran
Posts: 11729
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: [solved] Assembly 3 problem with axial alignment 2 step parts

Post by thomas-neemann »

ToniTen wrote: Tue Jan 25, 2022 10:29 am ... Select both arcs and use plane coincident and it shall work.
thanks for the info. I have tested it but it hasn't worked so far, I haven't had enough experience with assembly3 so far, but will continue to train
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
ToniTen
Posts: 239
Joined: Fri Sep 04, 2020 10:11 am

Re: [solved] Assembly 3 problem with axial alignment 2 step parts

Post by ToniTen »

thomas-neemann wrote: Tue Jan 25, 2022 10:57 am thanks for the info. I have tested it but it hasn't worked so far, I haven't had enough experience with assembly3 so far, but will continue to train
Strange. Are you selecting the edges, not the faces?

Plane Coincident will match the centers of the two planes, so if you select faces, and not the circular edges, you will get the parts positioned in "strange" locations. Select the circular edges and use those to create the constraint
User avatar
thomas-neemann
Veteran
Posts: 11729
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: [solved] Assembly 3 problem with axial alignment 2 step parts

Post by thomas-neemann »

ToniTen wrote: Tue Jan 25, 2022 11:01 am
Strange. Are you selecting the edges, not the faces?
thanks for the cooperation. Even if I select the edges, it doesn't work for me
1.png
1.png (76.65 KiB) Viewed 1904 times
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
ToniTen
Posts: 239
Joined: Fri Sep 04, 2020 10:11 am

Re: [solved] Assembly 3 problem with axial alignment 2 step parts

Post by ToniTen »

thomas-neemann wrote: Tue Jan 25, 2022 11:08 am thanks for the cooperation. Even if I select the edges, it doesn't work for me
Do not select the whole edge, just one circular segment on each side. Also, select segments that will end up in the same place once the constraint is in place

EDIT: Also, I assume there's no other constraint in play here right?1
User avatar
thomas-neemann
Veteran
Posts: 11729
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: [solved] Assembly 3 problem with axial alignment 2 step parts

Post by thomas-neemann »

ToniTen wrote: Tue Jan 25, 2022 11:09 am
Do not select the whole edge,

yes, now it worked, with 1 edge and attachement. Many thanks
1.png
1.png (30.03 KiB) Viewed 1878 times
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
Post Reply