BOM (Bill Of Materials) function

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: BOM (Bill Of Materials) function

Post by Kunda1 »

Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
ToniTen
Posts: 240
Joined: Fri Sep 04, 2020 10:11 am

Re: BOM (Bill Of Materials) function

Post by ToniTen »

realthunder wrote: Mon Dec 03, 2018 4:46 am I was about to release my new version of asm3, then I was summoned here. So it looks like BOM list may be a popular demand. So I made some last minute commits to show what my branch is now capable of.

And if you wonder how such spreadsheet is made, here is a glimpse of its inside. The scripts uses Python syntax, but is not interpreted by Python. Instead it is fully interpreted by FC expression module. Except for defining object, you can pretty much do anything, even raise and catch exceptions. It gives user the ultimate freedom to do whatever he can image, or at least that's the goal.
Wow very nice

Since this was made a long time ago, I assume this was integrated already in the version of Assembly3 that is available in the Appimage. Is is possible to find your scripts so they can be used without having to retype them by hand? Even if the goal is to give as much freedom to the user, having a working version that one can tweak can be a great learning tool
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: BOM (Bill Of Materials) function

Post by Zolko »

kbwbe wrote: Sun Dec 02, 2018 10:38 pm A2plus is already now able to extract a partlist from all used components and subassemblies.
realthunder wrote: Mon Dec 03, 2018 4:46 am So it looks like BOM list may be a popular demand.
yes, indeed, BoM is a very popular demand. What a BoM function does is:

  • parse the model tree
  • follow or not into containers (App::Link, App::Part, others...) to a level that can be specified by the user
  • find parts of certain types, also specified by the user (Fasteners are of type App::FeaturePython for example, the BoM needs to recognise them, but datums should not be listed)
  • check whether it's a new entry into the BoM or increment the count if there are already identical parts
  • find information about these parts, like material, size, supplier ... provided by the part itself
  • write it all out into a spreadsheet, ideally using customisable templates
Here I'd say that instead of every (assembly) workbench implementing its own (incompatible) solution, a generic BoM function (WB ?) that does it for all FreeCAD files would be very useful. Only the "following into containers" part is specific to each assembly workbench, all the rest could (and should) be generic.
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
Evgeniy
Posts: 477
Joined: Thu Jul 15, 2021 6:10 pm

Re: BOM (Bill Of Materials) function

Post by Evgeniy »

My thinks about BOM (The true term is "Specification").


Zolko wrote: Mon Nov 16, 2020 12:50 pm [*]parse the model tree
Each self-made part (not standard like ISO 4762 Hexagon socket head screw or GOST 5915-70 Hexagon Nut ) be have its own individual drawing number, something like: "PART 123.562333". As far as I know, the given moment "Parts" does not have such a property inside itself. It have name field and comment field. Without this, I think it's too early to make a BOM.


Zolko wrote: Mon Nov 16, 2020 12:50 pm Here I'd say that instead of every (assembly) workbench implementing its own (incompatible) solution, a generic BoM function (WB ?) that does it for all FreeCAD files would be very useful.
To do this, there should be use a system method of grouping that should not be associated with assembly workbenchs, which are now many.
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: BOM (Bill Of Materials) function

Post by adrianinsaval »

Evgeniy wrote: Mon Jul 26, 2021 2:41 pm As far as I know, the given moment "Parts" does not have such a property inside itself. It have name field and comment field. Without this, I think it's too early to make a BOM.
Adding new properties is trivial
Paul Ebbers
Posts: 12
Joined: Tue Dec 19, 2023 6:56 pm
Contact:

Re: BOM (Bill Of Materials) function

Post by Paul Ebbers »

Hi,

I noticed this thread and thought it is a good place to mention that I started working on a new workbench for creating a BoM for the several different assembly WB, imported assemblies (App:LinkGroup and App::Part).
I'm using this workbench development to learn coding in python and QT and also to learn FreeCAD itself.
If you want to check it out. You can find my workbench here: https://github.com/APEbbers/BillOfMaterials-WB

Short explanation:
The BoM will be based on the items in the item tree. So with the labels of the items and descriptions if available.
When you create a BoM, the BoM will be created in a new spreadsheet named "BoM".

It is still in the early phases but so far I've created the basic functions for:
- Assembly 4
- A2Plus
- App::LinkGroups
- App::Part
- The internal assembly WB (this WB is still in development)

To be done:
- Assembly 3
- the Arch WB
- Multibody parts
- Proper UI. (preference page, a panel, toolbars, etc.)
- export functionalities
- extra columns for custom information
- Maybe an implementation for the TechDraw drawings to create a BoM on a drawing automatically
- Possibility for a total mass calculation?

Kind regards,

Paul Ebbers
Post Reply