- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 166
 
Description
I really like this project, especially the degree of customization, grouping, and automatic functions. However, I encountered one rather unpleasant feature: If you create a well-structured hierarchy in the project, the build function is inconvenient.
Because it only sees one level below.
I'll give you an example:
Let's say we have a device (Level 0) that consists of several subprojects (Level 1) with their own BOM, and some parts are also subprojects of this (sub)project.
If I want to find out if there are enough components to build this project (Level 0) using the build function, I only see the missing subprojects (associated build parts), without checking further.
Device (Level 0)
      Module1 (Level 1)
            PCBA1 (Level 2)
                  PCB1 (Level 3)
                  IC1 
                  .... 
            PCBA2 (Level 2)
                  PCB2 (Level 3)
                  IC1 
                  .... 
            Part1 (Level 2)
            Part2 (Level 2)
      Module2 (Level 1)
            PCBA3 (Level 2)
      Module3 (Level 1)
The biggest problem arises when multiple submodules use the same parts.
PCBA-1 needs IC1 (Qty = 1), and PCBA-2 also needs IC1 (Qty = 1).
Let's say we want to build 3 Devices (Level 0), which means we need to build 3 PCBAs of each type, for a total of 6 IC1s.
Now let's simulate two situations:
(First) There are 2 IC1s in stock:
When attempting to build PCBA-1, we'll get an error indicating we have 2 of the 3 parts (one is missing).
We'll also get the same warning when attempting to build PCBA-2. This doesn't help us understand how many IC1s we actually need to purchase.
(Second) There are 4 IC1s in stock:
When checking using the same method described earlier, we won't even see a warning message, since we have enough to build 3 PCBA-1s or PCBA-2s. Therefore, it's highly likely that the shortage of parts will only be noticed at the assembly/soldering stage.
Describe the solution you'd like
To fix and improve this, simply add a recursive check for parts if there aren't enough in stock and the part is a subproject assembly.
(It's also important to add a check for the availability of already assembled submodules and only check for missing quantities.) For example, 3 devices require 3 submodules. There's already one completed submodule in stock, so you only need to check for the availability of assembly parts for 2 submodules.
Describe alternatives you've considered
So far, the only way I can see to do this in the current version 2.2.0 is by manually merging all the BOMs into one. But this loses structure and the ability to take into account already assembled submodules.
Additional Idea
Also a checkbox could be added to prevent parts from being removed from stock (if this project is created only for availability checking) or a separate tab only for availability checking, to prevent accidental removal of parts and generate a file listing what's missing. Although this is unlikely, since it requires selecting components in the build tab, the probability of a misclick is not zero.