Another approach to assembly solver (A2plus)

Discussion about the development of the Assembly workbench.
unit1
Posts: 6
Joined: Sun Jan 19, 2020 9:55 am

Re: Another approach to assembly solver (A2plus)

Postby unit1 » Mon Jan 20, 2020 8:59 pm

dan-miel wrote:
Mon Jan 20, 2020 5:26 am
Hi unit1 I have been trying to create a way to deal with these constraints. If you want to put you file up here I could use a real case problem to see if my idea works. If you want to try the program out I may have it working again in a day or two. but I can try it before then/
Dan Miel
Hi, Dan,

I woul love to experiment :) Hmm I can share my model, but is it not finished yet completely. And it's made like in pseudo "explosion" view and some parts are left with 1 DOF to move them arround. See 7zip file with freecad files and assembly which is named "Cavity_assembly". The files: https://drive.google.com/open?id=1OelZj ... 79ygJ6_2uX
kbwbe
Posts: 977
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Mon Jan 20, 2020 9:46 pm

unit1 wrote:
Mon Jan 20, 2020 8:59 pm
Hmm I can share my model, but is it not finished yet completely. And it's made like in pseudo "explosion" view and some parts are left with 1 DOF to move them arround.
Hey @unit1,
your project looks really cool. Isn't that somehow worth to be presented in users showcase forum ?
pic.png
pic.png (131.74 KiB) Viewed 664 times
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.47f, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
dan-miel
Posts: 166
Joined: Thu Sep 13, 2018 12:29 am
Location: Spokane WA. USA

Re: Another approach to assembly solver (A2plus)

Postby dan-miel » Tue Jan 21, 2020 3:18 am

unit1 wrote:
Mon Jan 20, 2020 8:59 pm
I could use a real case problem to see if my idea works.
I failed. You know the model better that I do so I'm sending the program and some very skimpy directions on how it might be used. I need to break the conflicting constraints from the main program. I'm not sure it will help but here it is.
Dan Miel
Attachments
Conflicting Constraints.zip
(278.4 KiB) Downloaded 16 times
unit1
Posts: 6
Joined: Sun Jan 19, 2020 9:55 am

Re: Another approach to assembly solver (A2plus)

Postby unit1 » Tue Jan 21, 2020 7:14 pm

kbwbe wrote:
Mon Jan 20, 2020 9:46 pm
Hey @unit1,
your project looks really cool. Isn't that somehow worth to be presented in users showcase forum ?
Hi, @kbwbe

thank you for suggestion, but this isn't my project from zero. Some background: that I've bought this item from Ebay, but this came AS-IS from pulsed unknown laser, and several parts are missing, actually most important ones which was shattered and removed by seller, so I didn't know what exact dimensions was used, and how cooling channels were made(active cooling by distiled water flow, because of lots of heat).

So I thought I could build model and do some calculations easier with FreeCad and do some modeling in the future for science porpuses. This is so called a laser cavity, that uses eliptical gold reflector to reflect light from xenon flashlamp to pump ND:YAG laser rod. So the model is missing ND:YAG(neodymium ytrium garnet) rod, and flashlamp physical models and some glass flowtubes and some special external mirrors.

So in short, I've dissambled these parts and measured each one with caliper. And I tested my measurements with A2+ by assembling them virtually. So for now there's left in model some errors, which I'll fix later. And I'll put later the real photos. And when this will be finished mostly, I'll try to post in user showcase :) Thank you for developing this great A2+ tool!
unit1
Posts: 6
Joined: Sun Jan 19, 2020 9:55 am

Re: Another approach to assembly solver (A2plus)

Postby unit1 » Tue Jan 21, 2020 7:34 pm

dan-miel wrote:
Tue Jan 21, 2020 3:18 am
I failed. You know the model better that I do so I'm sending the program and some very skimpy directions on how it might be used. I need to break the conflicting constraints from the main program. I'm not sure it will help but here it is.
Dan Miel
Thank you again, Dan, I do not promise that I quickly try this, but at this weekend will definitely I will give the results, how I was successful. Looked quickly in the directions you gave, they are very clear! Wish I know more python.

P. S. I didn't quite understand why you fail? The model has some steel parts and aluminium ones, and gold plated eliptical reflectors, with bunch bolts. As I zipped the files, I'll left the assembly with no errors. Maybe I'll try to make some video showing, what I've encountered.
dan-miel
Posts: 166
Joined: Thu Sep 13, 2018 12:29 am
Location: Spokane WA. USA

Re: Another approach to assembly solver (A2plus)

Postby dan-miel » Tue Jan 21, 2020 8:53 pm

unit1 wrote:
Tue Jan 21, 2020 7:34 pm
I didn't quite understand why you fail?
I was hoping the output of the program would give a better direction of where to look. I even added a couple functions after I saw the results. I have several ideas of how to get better information out of what was retrieved but I will need a few days, so if your not in a big rush I'll get back with more information in a few days.
Dan
kbwbe
Posts: 977
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Tue Jan 21, 2020 10:28 pm

unit1 wrote:
Sun Jan 19, 2020 6:26 pm
Thank you for developing this great A2+ tool!
It's my pleasure.
unit1 wrote:
Sun Jan 19, 2020 6:26 pm
Hello, is there possibility or workaround to know which constraints exactly are failing in A2+ assembly?
This is not a trivial topic. Dan has already some ideas, but these have to be worked out properly.
.
unit1 wrote:
Sun Jan 19, 2020 6:26 pm
Because when going back and forth when editing parts need do some changes. I recently updating parts with update function, but then when adding more parts solver complains about new constraints and it saying that "delete last created constraint", but is aware of that failing constraints are with the part, which was changed and updated. Thus not knowing which constraints are failing, it is needed to delete all already edited part's constraints and redo from beginning(it's very cumbersome). Maybe it's my problem which I've not figured out reading all A2+ WB manual.
You are completely right. If you edit a part and update this within an assembly, you are running into the "topological naming issue" of FC. You can search the forum, it is full with that. (vertex, edge, face-numbers are jumping to another values and are breaking many things).

If you want to reduce such problems, you can activate the preference option "use experimental topological naming" of A2plus. But this has to be active from the very first start of an assembly before importing the first part to the first subassembly. If this option is active, it is good practice to define constraints to the most early created geometry of the parts, which is likely not changed later.

Feel free to ask more.
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.47f, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
dan-miel
Posts: 166
Joined: Thu Sep 13, 2018 12:29 am
Location: Spokane WA. USA

Re: Another approach to assembly solver (A2plus)

Postby dan-miel » Tue Jan 21, 2020 11:19 pm

kbwbe wrote:
Tue Jan 21, 2020 10:28 pm
If you edit a part and update this within an assembly, you are running into the "topological naming issue" of FC.
I have noticed the changing of names and one of the ideas I have was to loop through the part and try to find a feature that came close to the original feature and suggest looking at it for fixing s constraint. Do you know if someone has tried that approach?

Dan
kbwbe
Posts: 977
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Tue Jan 21, 2020 11:47 pm

dan-miel wrote:
Tue Jan 21, 2020 11:19 pm
kbwbe wrote:
Tue Jan 21, 2020 10:28 pm
If you edit a part and update this within an assembly, you are running into the "topological naming issue" of FC.
I have noticed the changing of names and one of the ideas I have was to loop through the part and try to find a feature that came close to the original feature and suggest looking at it for fixing s constraint. Do you know if someone has tried that approach?

Dan
Yes, that's me! I think i am the only one /Edit: using the related option of A2plus "use experimental topological naming..."
I never got a real feed back./
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.47f, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
dan-miel
Posts: 166
Joined: Thu Sep 13, 2018 12:29 am
Location: Spokane WA. USA

Re: Another approach to assembly solver (A2plus)

Postby dan-miel » Wed Jan 22, 2020 1:28 am

dan-miel wrote:
Tue Jan 21, 2020 3:18 am
I'm sending the program and some very skimpy directions
Unit1, I found the problem I was having in this file. If you highlight a constraint in the combo view and turn View on it better highlight the constraint. Click on other constraints to see them. Be careful when moving parts because it will make a constraint when you select the second part.
kbwbe wrote:
Tue Jan 21, 2020 11:47 pm
Yes, that's me! I think i am the only one /Edit: using the related option of A2plus "use experimental topological naming..."
I never got a real feed back./
I will be looking at it.
I also found a website that stepped me through setting up VS for FreeCAD. It is nice to have an editor.
Attachments
a2p_constraintDialogauto.py
(70.02 KiB) Downloaded 14 times