Another approach to assembly solver (A2plus)

Discussion about the development of the Assembly workbench.
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Postby manuelkrause » Tue Nov 27, 2018 8:14 pm

kbwbe wrote:
Wed Nov 21, 2018 3:53 pm
...
Yesterday, i had a look around again in sourcefiles of recent Assembly2. Perhaps there is something interesting for you regarding transparency. In file "/FreeCAD_assembly2/assembly2/importPart/__init__.py" are code sections commented with "Transparency workaround". Perhaps you can find hints there.
...
Hi guys and girls,
mmmh. I've now made some tests and code changes based on that assembly2 code. But I'm not any step ahead with that.
Please have a close look at it, maybe I simply don't put the needed algorithms in the right place / order.
I've taken the changes only into my github for now, to not disturb your (@kbwbe) version.
The patch in question is: https://github.com/ManuelKrause/A2plus/ ... ef590747ca
only useful to patch with the actual A2plus improve-colors branch.

I'm appreciating any hint on how to improve this (https://forum.freecadweb.org/viewtopic. ... 4&start=30)

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

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Tue Nov 27, 2018 9:49 pm

manuelkrause wrote:
Tue Nov 27, 2018 8:14 pm
I've now made some tests and code changes based on that assembly2 code. But I'm not any step ahead with that.
Please have a close look at it, maybe I simply don't put the needed algorithms in the right place / order.
I've taken the changes only into my github for now, to not disturb your (@kbwbe) version.
Hi Manuel,
i will come back to the color import issues within not too long time. Things regarding color/transparency import seem for me got worse last time. I am doing some work with A2plus at moment and i register some color/transparency problems on newer FC versions. I just want to finish some of my work before changing topic.

Best regards,
Klaus

/Edit: typos
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.29, installable via FreeCAD's addon manager
Tutorials:
Paul Randall: https://youtu.be/mnkecA9S7kc
anisim (deutsch): https://www.youtube.com/watch?v=vDcaFq6IEJM
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Postby manuelkrause » Wed Nov 28, 2018 3:26 pm

kbwbe wrote:
Tue Nov 27, 2018 9:49 pm
manuelkrause wrote:
Tue Nov 27, 2018 8:14 pm
I've now made some tests and code changes based on that assembly2 code. But I'm not any step ahead with that.
Please have a close look at it, maybe I simply don't put the needed algorithms in the right place / order.
I've taken the changes only into my github for now, to not disturb your (@kbwbe) version.
Hi Manuel,
i will come back to the color import issues within not too long time. Things regarding color/transparency import seem for me got worse last time. I am doing some work with A2plus at moment and i register some color/transparency problems on newer FC versions. I just want to finish some of my work before changing topic.

Best regards,
Klaus

/Edit: typos
Hi Klaus,
it looks like good news to me, that you plan to invest some time into that. Doesn't matter when you join that "party", only that you'd do. (Gives hope!)
@wandererfan recently notified me of a FC forum thread that may indicate a longtime bug in FC. Btw. thanks for those notifications from you! (In this case it was: https://forum.freecadweb.org/viewtopic. ... 50#p270650) But I'm not quite sure that this covers the whole scope of the problems. And I tried to follow most of those possible origins, including committed patches to FC base code. At some point I gave up, as I haven't seen any trace (backwards) within this research, why our A2plus MUXed parts' DiffuseColor of existing (sub-)assemblies is handled differently than a freshly composed first assembly, for the displaying of it in 3D view.
There had been one patch from @abdullah, that included the population of Transparency (https://github.com/FreeCAD/FreeCAD/pull ... 6f92bd7351) -- maybe DiffuseColor should get the same treatment? I'm no programmer. Please evaluate this idea.
I'm also not convinced of my work, meaning my coding, or e.g. the way that I (we) refresh the display correctly.
What I'm willing to test is some code from the Arch WB (I was too anxious to test so far), they're also handling parts with transparency. I'm not used to it, so I don't know if it works with "re-imports" of shell objects with DiffuseColor, at this moment.

Kind regards,
Manuel
User avatar
dcapeletti
Posts: 388
Joined: Wed Jul 23, 2014 2:27 pm

Re: Another approach to assembly solver (A2plus)

Postby dcapeletti » Sat Dec 01, 2018 12:51 pm

Hi, I'm trying to attach a cap to the tube. The first cap worked perfectly, but I have a problem with the second cap. Attached is a sample video.

https://peertube.video/videos/watch/0ac ... be01f30825

The assembly file here and the accessories in the Partes folder.
https://git.rlab.be/dcapeletti/huertecn ... onia.fcstd
https://git.rlab.be/dcapeletti/huertecn ... Hidroponia

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

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Sat Dec 01, 2018 1:54 pm

dcapeletti wrote:
Sat Dec 01, 2018 12:51 pm
Hi, I'm trying to attach a cap to the tube. The first cap worked perfectly, but I have a problem with the second cap. Attached is a sample video.
Hi Diego,
i had a look at your assembly. Whether the second tube nor the second cap has the property "fixedPosition = True". If there is no fixed part in a combination, the solver will ignore these constraints.

I fixed the second tube, then i could constraint the second cap to it.

regards,
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.29, installable via FreeCAD's addon manager
Tutorials:
Paul Randall: https://youtu.be/mnkecA9S7kc
anisim (deutsch): https://www.youtube.com/watch?v=vDcaFq6IEJM
User avatar
dcapeletti
Posts: 388
Joined: Wed Jul 23, 2014 2:27 pm

Re: Another approach to assembly solver (A2plus)

Postby dcapeletti » Sat Dec 01, 2018 5:57 pm

Hi, a million of thanks . I've already solved the problem. Greetings :)
dh9ts
Posts: 6
Joined: Sat Dec 01, 2018 4:59 pm

Re: Another approach to assembly solver (A2plus)

Postby dh9ts » Sun Dec 02, 2018 8:30 pm

Hello,

I just installed the workspace and I'm very happy with this.

I am relative new to freecad and have a question regarding the workflow for the part construction:

I assembled the structure in the attached image. How do you proceed when you have to change parts?
For example drill holes to connect the beams or add further connections between single parts?

Like for the following connections.

https://www.google.de/url?sa=i&rct=j&q= ... 8206516814

https://www.google.de/url?sa=i&rct=j&q= ... 8208399887

The example is very simple, at the moment I could plan ahead. But if the machine gets complex, it is very possible that there have parts added
which I don't know beforehand.


Best regards
Thorsten
Attachments
profile_example.png
profile_example.png (73.02 KiB) Viewed 339 times
kbwbe
Posts: 881
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Sun Dec 02, 2018 10:13 pm

dh9ts wrote:
Sun Dec 02, 2018 8:30 pm
I assembled the structure in the attached image. How do you proceed when you have to change parts?
For example drill holes to connect the beams or add further connections between single parts?
Hi Thorsten,
welcome to the forum.

If you intend to do changes to your imported parts after assembling, at first you should activate "use experimental toponaming" on preferences page of A2plus. With that, constraints will be more robust against editing of parts and you will get better warnings if a constraint breaks. As your assembly seems to be very small at moment, just redo it with the setting mentioned above.

If you later want to edit a part, been imported to your assembly, please select this part and hit the "edit part" button. (button with a pencil)
This way you can open the parts fcstd file directly from the assembly. Do your changes and store the part. Go back to the assembly and hit the button "update imported parts" (button with the recycling symbol). Your old part will be replaced by the edited one.

Save your assembly before doing this. If something goes wrong, you can just reload the old state. Replacing of parts in an assembly is a very critical operation.
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.29, installable via FreeCAD's addon manager
Tutorials:
Paul Randall: https://youtu.be/mnkecA9S7kc
anisim (deutsch): https://www.youtube.com/watch?v=vDcaFq6IEJM
jbe
Posts: 276
Joined: Sun Nov 10, 2013 4:18 pm
Location: France, Châteauroux

Re: Another approach to assembly solver (A2plus)

Postby jbe » Sun Dec 02, 2018 10:44 pm

And it is very usefull ....!
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Postby manuelkrause » Mon Dec 03, 2018 5:47 pm

kbwbe wrote: ping
Hi Klaus,
Thank you for your continued hard work!
I was just testing to assemble the known-to-you "Pleuel" newly with the current devel-branch (last commit date: Nov 29, 2018) and noticed an issue:
Last constraint added, is 'axialConstraint_002__Pleuel.6_001'. "Flipping last constraint", as well as changing 'aligned' to 'opposed' in the properties, only rotates by 90°, a not-desired angle, and around a not desired axis. (The assembly is not fully constrained at this point.) I attach the last good state assembly file and a failing state screenshot.
Screenshot_20181203_184016.png
Screenshot_20181203_184016.png (136.71 KiB) Viewed 272 times

Am I doing something wrong or does it point to a bug?

Best regards and TIA,
Manuel
Attachments
ASSY-Pleuel+Lager+Bolzen.6.fcstd
(17.08 KiB) Downloaded 10 times