Assembly3 - position multiple instance of the same part and other issues/best Practice

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
nemesis
Posts: 372
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

Assembly3 - position multiple instance of the same part and other issues/best Practice

Post by nemesis »

Hello,
realthunder wrote:ping
jpg87 wrote:ping, as it looks like you handle A3 quite well :D
As I don't want to hijack this 88 page topic I create one about some issue I face.

first :
OS: Debian GNU/Linux testing (buster)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.5235 (Git shallow) AppImage
Build type: None
Branch: LinkStage3
Hash: ccaa87e12aaadbd3106607fc503542a863b742da
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
So, for testing purpose a try to make some assembly, file are available here
I can easily locate the first part (FixTriAvG) , but when I make a second link (FixTriAvD=> drag and drop from "FixTriAv" file) to locate the same part on the other side, I am unable to get it ok.
By symmetrical I mean using the same principle of constraint, not using the symmetrical constraint.
Kcross1.png
Kcross1.png (69.55 KiB) Viewed 3111 times

So, am I missing something in the general approach of A3?
Last edited by nemesis on Fri Aug 31, 2018 1:01 pm, edited 1 time in total.
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 - position multiple instance of the same part

Post by realthunder »

The exact cause of solver failure is hard to pinpoint, but it usually means that you need to try some alternative constraints.

First, I would suggest you to lock some origin plane of the chassis, or else you risk unwanted movement of the chassis depending on the order you constraints your parts.

You have added two Axial Alignment for FixTriAvG. Is this by mistake or intentional? This is definitely a redundant constraint. You should avoid redundancy as much as you can.

I think the actual culprit is the angle constraint. If you lock the chassis first, then this angle constraint should be fine (Edit: although to really avoid redundancy, you should use projected line angle), but I haven't tried it. Anyway, the Axial Alignment constraint has a LockAngle property. This is the preferred way to lock the angle. Set this to True, and set one of the angle properties. I just discovered a bug in asm3. By right, you should set the Angle property, as the orientation should always be relative to the constraining normal axis. But now you'll find that you need to set AnglePitch. This is a serious bug. I'll release a new version to fix this very soon.

Once you do the aboves, you'll be able to fix the other part easily.
Try Assembly3 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
nemesis
Posts: 372
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

Re: Assembly3 - position multiple instance of the same part

Post by nemesis »

First of all thanks for your answer.
realthunder wrote: Wed Aug 29, 2018 11:18 pm First, I would suggest you to lock some origin plane of the chassis, or else you risk unwanted movement of the chassis depending on the order you constraints your parts.
For the plane, unfortunately I have no access to the lock constraint when I select a plane from the chassis.
that's why I locked the chassis itself.
NoAccessToPlaneLock.png
NoAccessToPlaneLock.png (156.64 KiB) Viewed 3047 times
realthunder wrote: Wed Aug 29, 2018 11:18 pm You have added two Axial Alignment for FixTriAvG. Is this by mistake or intentional? This is definitely a redundant constraint. You should avoid redundancy as much as you can.
I ended here because Axial alignment between the tube and the "fixTriAv" didn't worked, or at least no always... so I assumed that using axial constraint with half circle and a cylinder ends with a point on a line (center of the half circle and axis of the cylinder), at least that was my expectation...
realthunder wrote: Wed Aug 29, 2018 11:18 pm Once you do the aboves, you'll be able to fix the other part easily.
that's the point.
once the first instance of "fixtriav" is in position, whatever the constraint I put on the second instance, it fail to solve the assy. Even with a pre-localisation as clos as possible to the desired one.
secondinstance.png
secondinstance.png (140.75 KiB) Viewed 3047 times
example of what I tried, some works like point coincident,but axial constraint work just on one side of the part and can gice strange results (linked to the bug you talked previously before)
phpBB [video]
Last edited by nemesis on Thu Aug 30, 2018 12:43 pm, edited 1 time in total.
User avatar
nemesis
Posts: 372
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

Re: Assembly3 - position multiple instance of the same part

Post by nemesis »

nemesis wrote: Thu Aug 30, 2018 10:08 am For the plane, unfortunately I have no access to the lock constraint when I select a plane from the chassis.
that's why I locked the chassis itself.
NoAccessToPlaneLock.png
so, it looks like I'm facing again this issue. After restarting FreeCAD it works.
I think it happen after some the solver as failed solved the assy, but not sure..
Never get this probleme on 0.17 or 0.18 "official versions"
freecad-heini-1
Veteran
Posts: 7788
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Assembly3 - position multiple instance of the same part

Post by freecad-heini-1 »

@Realthunder,
today I tried a new topo naming stresstest on Xubuntu 16.04 with your appimage:

Code: Select all

FreeCAD-asm3-20180822-32e1f81e-e9fe377.glibc2.17-x86_64.AppImage
I played a bit around with draft angle inbetween two features, and a inbetween pocket, early in design history.
I placed my sketches purposely on the faces from the solid, not on datum planes, it's a stresstest.
Freecad lost some edges for fillet and chamfer, but I was able to select them new. Very nice. 8-)

I remember early Pro-Engineer version 9 or 10.
There was a possibility to show a backup model in a small window to check the former referenced edges.
In this window the user could zoom and rotate and change to wireframe view, with highlighted edges.
What do you think about a backup model to check the former selected edges or faces, points, in an extra window?
If possible with user decision to switch on such a backup window, or not.

Best regards
Wilfried
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 - position multiple instance of the same part

Post by realthunder »

nemesis wrote: Thu Aug 30, 2018 10:08 am For the plane, unfortunately I have no access to the lock constraint when I select a plane from the chassis.
This is a bug that I cannot reproduce on my computer. You can clearly select the assembly's origin object, just not the body's?
realthunder wrote: Wed Aug 29, 2018 11:18 pm You have added two Axial Alignment for FixTriAvG. Is this by mistake or intentional? This is definitely a redundant constraint. You should avoid redundancy as much as you can.
I have identified problem. The bug is caused by incorrect tube cylinder surface orientation reported by the OCCT. If you change both element to circular edge, it will be fine. I'll fix it soon.
Try Assembly3 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
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 - position multiple instance of the same part

Post by realthunder »

freecad-heini-1 wrote: Thu Aug 30, 2018 4:26 pm I remember early Pro-Engineer version 9 or 10.
There was a possibility to show a backup model in a small window to check the former referenced edges.
In this window the user could zoom and rotate and change to wireframe view, with highlighted edges.
What do you think about a backup model to check the former selected edges or faces, points, in an extra window?
If possible with user decision to switch on such a backup window, or not.
Yeah, I also don't like to way PartDesign handle this. I'll put that on my todo list.
Try Assembly3 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
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 - position multiple instance of the same part

Post by realthunder »

nemesis wrote: Thu Aug 30, 2018 10:08 am that's the point.
once the first instance of "fixtriav" is in position, whatever the constraint I put on the second instance, it fail to solve the assy. Even with a pre-localisation as clos as possible to the desired one.
New version released. This problem should be fixed. Please try the other origin plane selection and see if it is still there.
Try Assembly3 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
jpg87
Posts: 809
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly3 - position multiple instance of the same part

Post by jpg87 »

Hello,
first, my configuration :

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14369 (Git)
Build type: Release
Branch: (HEAD detached at FETCH_HEAD)
Hash: 45b39e8ff6861d15f4277f9759d012b41aae071f
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: French/France (fr_FR)

2- I usually have several configuration files: one for FC 0.17 and FC 0.18 and one for FC asm3. Even if I'm not completely sure that this changes something, I have several times seen on the forum problems that were solved by starting new configuration files.
nemesis wrote: Thu Aug 30, 2018 10:08 am For the plane, unfortunately I have no access to the lock constraint when I select a plane from the chassis.
that's why I locked the chassis itself.
I already installed version 0.8.6 when I did the test with your file: for me it works.

nemesis wrote: Wed Aug 29, 2018 8:37 pm I can easily locate the first part (FixTriAvG) , but when I make a second link (FixTriAvD=> drag and drop from "FixTriAv" file) to locate the same part on the other side, I am unable to get it ok.
For those whom it concerns FixTriAvD, I deleted it and related items, and then I used the FixTriAvG ElementCount property, which I set to 2.
Then after selecting Link001_i1 thus created, I put it in position of approximate symmetry compared to Link001_i0.
Finally, I used the same constraints as you for FixTriAvG.

ElementCount.png
ElementCount.png (33.31 KiB) Viewed 2901 times

FixTriAvG.png
FixTriAvG.png (38.89 KiB) Viewed 2901 times

FixTriAvD.png
FixTriAvD.png (45.61 KiB) Viewed 2901 times
My website : http://help-freecad-jpg87.fr updated 2023/11/06
User avatar
nemesis
Posts: 372
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

Re: Assembly3 - position multiple instance of the same part

Post by nemesis »

realthunder wrote: Fri Aug 31, 2018 3:00 am New version released. This problem should be fixed. Please try the other origin plane selection and see if it is still there.
Man, you'r too fast.... I was writing an explanation about issue depending on the surface I use.... ;)
Thaks a lot I'll try this right now, but it looks ok according what jpg87 says

EDIT => Works like a charm !!
Last edited by nemesis on Fri Aug 31, 2018 9:37 am, edited 1 time in total.
Post Reply