Assembly3: Pre-Alignment before Attachment constraint

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
project4
Posts: 237
Joined: Fri Jul 12, 2013 12:53 pm

Assembly3: Pre-Alignment before Attachment constraint

Post by project4 »

Hi,

The attachment constraint will probably be the most used function for my assemblies, but I find it hard to align the parts to the proper place with that constraint.
Try attaching a part on a grid panel like the following in the proper place:
1.jpg
1.jpg (152.05 KiB) Viewed 1235 times
I had thoughts that it will be great to use the solver to have a proper alignment of 2 parts before applying the attachment constraint.
Is it possible with current tools?

Actually there is no need to solve the whole assembly, only the 2 attached parts and after the alignment is properly done with other constraints (generally align holes on the grid plate and another part), remove/disable the alignment constraints and apply the AttachmentGroup instead.
Similar logic to the construction geometry in the sketch, you can use the existing tools as something that helps, but you won't see them in the final assembly.
User avatar
nemesis
Posts: 372
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

Re: Assembly3: Pre-Alignment before Attachment constraint

Post by nemesis »

hello,
from what I understand, you don't care about solving assembly once your part are in place.
so my workflow would be the following, aka "the one you have define" :
1 - Lock the base-plate
2 - use Plane coincident constraint between circle of base-plate and part1
3 - solve the assy
4 - delete plane coincident constraint
5 - add offset attachment

on the other hand, if this assembly is part of a bigger one, that make more sense to keep plane coincident constraint, and freeze this assembly once its done, so it is no longer solved.

an alternative less-time-consuming-solution (not sure) is maybe asssembly4, for this case. once all the Lcs are in position, the part is in position and can be edited. no move as long as you don't touch the Lcs.
project4
Posts: 237
Joined: Fri Jul 12, 2013 12:53 pm

Re: Assembly3: Pre-Alignment before Attachment constraint

Post by project4 »

nemesis wrote: Sun Oct 23, 2022 12:31 pm 5 - add offset attachment
When do you add the attachment constraint? Before or after the coincident?
Adding it after deleting the coincident moves the part...
nemesis wrote: Sun Oct 23, 2022 12:31 pm an alternative less-time-consuming-solution (not sure) is maybe asssembly4, for this case. once all the Lcs are in position, the part is in position and can be edited. no move as long as you don't touch the Lcs.
I worked with Asm4 before tried to go back to Asm3. Asm4 does everything correctly, but it's also very time consuming to offset every LCS.
You don't really want to add LCS to every hole in the parts like in the picture, so you add few on both sides and start offseting from them...

And when you have to replace a part in a large assembly it creates a big mess since the offsets will be completely different.
Hmmm... If I think about it more, using attachment in Asm3 will have the same problem :(
Should probably stick with dynamic constraints and do more sub-assemblies that can be frozen to save computation time.
User avatar
nemesis
Posts: 372
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

Re: Assembly3: Pre-Alignment before Attachment constraint

Post by nemesis »

project4 wrote: Sun Oct 23, 2022 2:20 pm When do you add the attachment constraint? Before or after the coincident?
Adding it after deleting the coincident moves the part...
my idea was after the deleting the constraint, but maybe you need to untoggle the automatic solving, so the part should'nt move, and just stay where it is
however, even with automatic on, I don't get why it moves, do you have one fixed part? and no other constraint on the one you want to stay in place?

You don't really want to add LCS to every hole in the parts like in the picture, so you add few on both sides and start offseting from them...
Sure if all holes are used that sounds complicated manually.
maybe some tricks with a python script
select the face, then add a LCS on each circle of the face.
User avatar
FBXL5
Posts: 981
Joined: Sat Aug 03, 2019 8:45 pm

Re: Assembly3: Pre-Alignment before Attachment constraint

Post by FBXL5 »

project4 wrote: Sun Oct 23, 2022 2:20 pm When do you add the attachment constraint?
I think you just mixed up attachment and (the new) offset attachment...
project4
Posts: 237
Joined: Fri Jul 12, 2013 12:53 pm

Re: Assembly3: Pre-Alignment before Attachment constraint

Post by project4 »

nemesis wrote: Sun Oct 23, 2022 3:34 pm [Sure if all holes are used that sounds complicated manually.
maybe some tricks with a python script
select the face, then add a LCS on each circle of the face.
It will create hundreds of LCSs, which is not sane as well.
Adding few major LCSs and offsetting is the only sane workflow I found usefull.
FBXL5 wrote: Sun Oct 23, 2022 4:44 pm [I think you just mixed up attachment and (the new) offset attachment...
No, I meant the AttachmentGroup constraint, complete fix between the 2 parts.
Attachment offset looks the same, but with an offset.
I believe I can play with element placement in the AttachmentGroup to have the same effect...
Post Reply