Another approach to assembly solver (A2plus)

Discussion about the development of the Assembly workbench.
kbwbe
Posts: 875
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Thu Oct 25, 2018 11:47 am

dcapeletti wrote:
Thu Oct 25, 2018 8:33 am
Hi, I'd like you to look at this comment https://forum.freecadweb.org/viewtopic. ... 00#p264527 to see if it's possible to implement such functionality in A2Plus.

Thanks
Hi,
i will have look for this problematic. I need similar thing too.
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: 383
Joined: Wed Jul 23, 2014 2:27 pm

Re: Another approach to assembly solver (A2plus)

Postby dcapeletti » Thu Oct 25, 2018 12:09 pm

I've changed the code to:

Code: Select all

SOLVER_CONTROLDATA = {
    #Index:(posAccuracy,spinAccuracy,completeSolvingRequired)
    1:(0.1,0.1,True),
    #2:(0.01,0.01,True),
    #3:(0.001,0.001,True),
    #4:(0.0001,0.0001,False),
    #5:(0.00001,0.00001,False)
    }
However, the results are very similar. I even measured the processor and practically no difference.
User avatar
dcapeletti
Posts: 383
Joined: Wed Jul 23, 2014 2:27 pm

Re: Another approach to assembly solver (A2plus)

Postby dcapeletti » Thu Oct 25, 2018 12:11 pm

kbwbe wrote:
Thu Oct 25, 2018 11:47 am
dcapeletti wrote:
Thu Oct 25, 2018 8:33 am
Hi, I'd like you to look at this comment https://forum.freecadweb.org/viewtopic. ... 00#p264527 to see if it's possible to implement such functionality in A2Plus.

Thanks
Hi,
i will have look for this problematic. I need similar thing too.
So we're all in the same boat, so I'll do some tests on my own and report results.
Look at this post I've made https://forum.freecadweb.org/viewtopic. ... 73#p264573

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

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Sat Oct 27, 2018 2:57 pm

Hi Guy's,

i started work on support for partslist/BOM.

If we want to do a meaningfull partlist, for every imported part/subassembly we need some additional information, as there would be:
- quantity
- Suppliers product name
- Suppliers partnumber
- internal product name
- internal partnumber
- etc...

At moment, we only know the sourceFile of the imported object.
Quantity we can get by counting of the sourcefiles, but the other information does not exist up to now.

I intend to work with an information spreadsheet, to be placed within the .fcstd file to be imported. It would be very ugly if each involved file would have to be opened by FreeCAD, only to access the spreadsheet and gathering partslist data. I took @dcapeletti 's idea to directly read out the compressed XML document file for this task. Devel branch has been updated and there is a new file "a2p_fcdocumentreader.py". With this we are able to read spreadsheets from files given py a path.

I think it will be possible even to identify a2p objects and do a partslist recursively over all imported parts in all subassemblies.

Any suggestions appreciated.

If you want to test:
- open "testfile-with-spreadsheet" with FreeCAD
- execute the "a2p_fcdocumentreader.py" file as macro.
- in console output, you see the results.
Attachments
testfile-with-spreadsheet.fcstd
(3.73 KiB) Downloaded 13 times
a2p_fcdocumentreader.py
(6.55 KiB) Downloaded 12 times
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
kbwbe
Posts: 875
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Sun Oct 28, 2018 3:47 pm

Hi all,
there is a new bugfix-release available, V0.1.4.1

What was fixed ?
- file importer did not import the base feature of a part/mirror operation. Fixed.
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
Jee-Bee
Posts: 1959
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Another approach to assembly solver (A2plus)

Postby Jee-Bee » Mon Oct 29, 2018 11:25 am

Freecad A2P reply

I have now tried for the first time the A2P. The result is that i have somen comments for making A2P better...
1 The point/ vertexes are quite hard to select. Maybe this is a FC issue
2 i had some repetive set of constraints. but for some reason it fails sometimes during build.
i had the workflow [axis, plane point] but sometimes i was unable to add the plane step at once... so i had to do [axis1, axis2] so it position was around good. than remove axis 2 and add plane, and final add point.
3 i was missing axis on plane
4 I started with a model with 2 part design bodies. It looks like A2P is unable to handle this without conversion...

Final: Thanks for all your work
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Postby manuelkrause » Mon Oct 29, 2018 12:10 pm

Jee-Bee wrote:
Mon Oct 29, 2018 11:25 am
Freecad A2P reply

I have now tried for the first time the A2P. The result is that i have somen comments for making A2P better...
1 The point/ vertexes are quite hard to select. Maybe this is a FC issue
2 i had some repetive set of constraints. but for some reason it fails sometimes during build.
i had the workflow [axis, plane point] but sometimes i was unable to add the plane step at once... so i had to do [axis1, axis2] so it position was around good. than remove axis 2 and add plane, and final add point.
3 i was missing axis on plane
4 I started with a model with 2 part design bodies. It looks like A2P is unable to handle this without conversion...

Final: Thanks for all your work
Hi @Jee-Bee
you can likely overcome your first issue (point selection) with the general FC Preferences -> Display -> Part colors: Default vertex size (increase the actual value). You can also change this per part in the Combo view -> View property settings (but I haven't tried this so far).
For the other issues: Would you be able to provide and attach your problematic assembly for us to test?

Thanks for testing!
Jee-Bee
Posts: 1959
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Another approach to assembly solver (A2plus)

Postby Jee-Bee » Mon Oct 29, 2018 12:43 pm

sorry i wanted to do that but forgotten :oops:
Attachments
point_source_assy_1-0_A2P.FCStd
(78.86 KiB) Downloaded 19 times
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Postby manuelkrause » Mon Oct 29, 2018 1:24 pm

Jee-Bee wrote:
Mon Oct 29, 2018 12:43 pm
sorry i wanted to do that but forgotten :oops:
Thank you for sharing the assembly. I'm testing it ATM. Cool object, BTW.
A short question inbetween: What FreeCAD version do you use?
You don't need to use v0.18pre, but a v0.17 can be more useful than the predecessors, also for using A2plus.
Jee-Bee
Posts: 1959
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Another approach to assembly solver (A2plus)

Postby Jee-Bee » Mon Oct 29, 2018 1:28 pm

Code: Select all

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15007 (Git)
Build type: Release
Branch: master
Hash: 70fef3934190aabc61f5e1346483359d5ad21403
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Dutch/Netherlands (nl_NL)