Assembly3 preview

Discussion about the development of the Assembly workbench.
fcaduser
Posts: 314
Joined: Wed Feb 19, 2014 6:53 pm
Location: Near Paris, France

Re: Assembly3 preview

Postby fcaduser » Tue Jul 28, 2020 2:03 pm

@realthunder

As I suggested, I isolated the issue of flexible assembly to prevent bloating this general thread.

https://forum.freecadweb.org/viewtopic.php?f=20&t=49045
catman
Posts: 247
Joined: Fri Jan 11, 2019 10:42 pm

Re: Assembly3 preview

Postby catman » Tue Jul 28, 2020 2:10 pm

realthunder wrote:
Tue Jul 28, 2020 1:49 pm
catman wrote:
Tue Jul 28, 2020 1:40 pm
Attachment is technically the equality of both element's coordinate frames, correct?
Yes, that's right. You can apply additional offset to the element(link) to attach two parts in any relation. For the multiplication fix, you can test it now if you want, by cloning my asm3 github repository to your [user directory]/FreeCAD/Mod. Or, just want for my next release, probably tomorrow.
Thanks
User avatar
czinehuba
Posts: 74
Joined: Mon Oct 15, 2018 4:59 am
Location: UK
Contact:

Re: Assembly3 preview

Postby czinehuba » Sat Aug 01, 2020 9:52 pm

realthunder wrote:
Fri Jul 17, 2020 4:13 am
...
BTW, in your particular case, 1 and 2 are aligned in axial direction. There is really no need to use two hole fixing, which is kind of expensive. Just fix it with an attachment constraint, and apply a rotation offset to the constraining element if required. Two hole fixing is only really necessary if the offset between the two parts are hard to calculate manually.
Thanks for the thorough explanation. I've managed to get most of the assembly done. The only thing I'm still unsure is Attachment should fix two object.
But in my case it allow rotation, I think it leave 1 DOF. Hence I still used two PlaneCoincident for the two holes for 1 & 2. And I'm also struggling to fix two object to rotate together. (in this case crank shaft and wheel or crack shaft and flywheel) I've tried Attachment but it allow for rotation.

Is this a bug or I'm still doing something wrong.

https://mypreciouscloud.co.uk/index.php ... tXjS9C4WX7


OS: Arch Linux (GNOME/gnome)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21911 +2495 (Git) AppImage
Build type: Release
Branch: LinkStage3
Hash: bfcfc613d4a03d664c124d1895a3e19e69237ff8
Python version: 3.7.8
Qt version: 5.12.1
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United Kingdom (en_GB)
realthunder
Posts: 1732
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Tue Aug 04, 2020 1:09 am

czinehuba wrote:
Sat Aug 01, 2020 9:52 pm
But in my case it allow rotation, I think it leave 1 DOF. Hence I still used two PlaneCoincident for the two holes for 1 & 2. And I'm also struggling to fix two object to rotate together. (in this case crank shaft and wheel or crack shaft and flywheel) I've tried Attachment but it allow for rotation.

Is this a bug or I'm still doing something wrong.
I did find a bug about Attachment. The attachment constraint allows a cheaper way to solve without requiring the expensive algebra solver. However, that only works if one of the Part is 'Locked', or attached to another 'Locked' Part. Since the flywheel is supposed to move, the Attachment constraint will be internally converted to a PlaneCoincident constraint to let the solver find the solution. The bug is that I forgot to lock the angle. Since you've already using the PlaneCoincident constraint, you can manually lock its angle with the 'Lock Angle' property.
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
User avatar
czinehuba
Posts: 74
Joined: Mon Oct 15, 2018 4:59 am
Location: UK
Contact:

Re: Assembly3 preview

Postby czinehuba » Tue Aug 04, 2020 9:41 am

realthunder wrote:
Tue Aug 04, 2020 1:09 am
..., you can manually lock its angle with the 'Lock Angle' property.
Thanks for the tip. It worked like a treat. :D :D :D :D :D
output.gif
output.gif (806.95 KiB) Viewed 1002 times
User avatar
jpg87
Posts: 411
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly3 preview

Postby jpg87 » Tue Aug 04, 2020 1:56 pm

czinehuba wrote:
Tue Aug 04, 2020 9:41 am
It worked like a treat.
Hello and congratulations on your success.
I just worked on your example this morning. Here is my approach to the problem, method suitable for complex assemblies (at several levels):
1- I create a sub-assembly for each kinematic equivalence class (set of parts united or animated by the same final movement).
  • Each time I insert a part in this sub-assembly, I add an element for each functional geometric entity (surface, edge, vertex, ...) that I will need for the constraints.
  • I add to the identifier of these elements the name of the owner part.
  • I create the constraints between the parts of the same sub-assembly.
Note 1:
the remaining mobilities between the parts of a sub-assembly (for example rotation in a "PlaneCoincident" constraint) are no longer perceptible from then the overall assembly: a sub-assembly behaves like a single block of material.
Note 2:
the attachment constraint, as specified by Realthunder, blocks all the degrees of freedom between the objects concerned while allowing an adjustment of the relative position of the elements on which the constraint is applied. In addition, it simplifies the work of the solver.

2- I create the overall assembly.

3- I insert the sub-assemblies in this global assembly.

4- I add the constraints between the sub-assemblies.

Here is the partially folded image and construction tree of my version with one color per sub-assembly:
00-30DegEngine.jpg
00-30DegEngine.jpg (70.8 KiB) Viewed 958 times

as well as the file:
https://www.dropbox.com/s/anlmx8lvc8c33 ... FCStd?dl=0



Messages to
realthunder wrote:
Tue Aug 04, 2020 1:09 am
...
I think it would be interesting if the name of the object owning a constraint element would automatically display: eg. in place of ElementXXX appears ElmtXXX_OwnerPieceName.
I also noticed that by creating a group of these items, I get the error message:

Code: Select all

SoFCUnifiedSelection.cpp(2409): Cyclic scene graph: 
Another note: if I create a constraint element from an XX, YY or ZZ work plane of PartDesign, the resulting element always has the same XX orientation. I can redirect it later, but is this normal?
My website : http://help-freecad-jpg87.fr updated 2020/09/21
User avatar
czinehuba
Posts: 74
Joined: Mon Oct 15, 2018 4:59 am
Location: UK
Contact:

Re: Assembly3 preview

Postby czinehuba » Tue Aug 04, 2020 2:29 pm

jpg87 wrote:
Tue Aug 04, 2020 1:56 pm
...
Yes. Thanks for the advice. It does work that way as well. And like you said it has less strain on the solver. It seems more fluid.

I deliberately didn't follow the sub assembly route which you suggested last time as well, mainly because:
I'm currently testing if I can adopt it in my workflow. And that entails doing sub-assemblies in a particular grouping order. I had to see if I can adopt "similar" workflow from other CAD systems with minimal effort. I know it's just a few parts could have done sub assemblies easily, but what if there are hundreds of them.

Next step is to try a big assembly with lots of parts and sub assemblies. (Unfortunately parts have to be in the body or part container) Only sub assemblies and assemblies can be in the assembly container.
User avatar
Gregory son of Carl
Posts: 99
Joined: Mon Apr 06, 2020 7:42 pm
Location: California

Re: Assembly3 preview

Postby Gregory son of Carl » Sat Aug 15, 2020 2:26 am

I noticed that links now reroute their file path when you do a 'Save As' on a linked part. I'm happy this behavior was added, it's very convenient most of the time, but Is there an option to turn it off? Sometimes I prefer the broken links to help keep track of things while working on more intricate assemblies.
drmacro
Posts: 1490
Joined: Sun Mar 02, 2014 4:35 pm

Re: Assembly3 preview

Postby drmacro » Sun Aug 16, 2020 5:29 pm

I'm just starting to look at the assembly features of A3 and I think I've missed some subtlety.

When I apply a constraint, my parts don't move into position as I've sen in all the demos and tutorials...

I'm betting I've skipped something, just don't see what. (and a recompute doesn't help) :oops:
A3_constraint.png
A3_constraint.png (129.53 KiB) Viewed 586 times


OS: Ubuntu 20.04.1 LTS (XFCE/ubuntustudio)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21911 +2533 (Git) AppImage
Build type: Release
Branch: LinkStage3
Hash: a1b42b8c71003289b4b2a9242545908eafa2f2d5
Python version: 3.7.8
Qt version: 5.12.1
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
Attachments
Lifter.FCStd
(54.78 KiB) Downloaded 14 times
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."

My beginners, written treatise: Learning FreeCAD
drmacro
Posts: 1490
Joined: Sun Mar 02, 2014 4:35 pm

Re: Assembly3 preview

Postby drmacro » Sun Aug 16, 2020 6:41 pm

drmacro wrote:
Sun Aug 16, 2020 5:29 pm
Ok, so I figured out I was using the Transform tool rather than the Axial move tool.

And I found I only needed Plane coincident rather than constraining the plane and the hole.

But, now I have this and I can't the LeverAngle to rotate. I want it at about 20 degrees above the horizontal (i.e. rotated CCW by about 130 degrees).
A3_constraint-1.png
A3_constraint-1.png (139.69 KiB) Viewed 572 times
Attachments
Lifter.FCStd
(68.24 KiB) Downloaded 15 times
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."

My beginners, written treatise: Learning FreeCAD