Assembly: Implement Bill Of Materials (#14198)
* Assembly: Implementation of BOM * Assembly: BOM: make it possible for BOM to be made without an assembly.
This commit is contained in:
@@ -607,6 +607,20 @@ def color_from_unsigned(c):
|
||||
]
|
||||
|
||||
|
||||
def getBomGroup(assembly):
|
||||
bom_group = None
|
||||
|
||||
for obj in assembly.OutList:
|
||||
if obj.TypeId == "Assembly::BomGroup":
|
||||
bom_group = obj
|
||||
break
|
||||
|
||||
if not bom_group:
|
||||
bom_group = assembly.newObject("Assembly::BomGroup", "Bills of Materials")
|
||||
|
||||
return bom_group
|
||||
|
||||
|
||||
def getJointGroup(assembly):
|
||||
joint_group = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user