From FreeCAD Documentation
- Creates and return a RebarBillOfMaterial_SVG
BOMContent
object for given rebar_objects
.
- If
rebar_objects
list is empty, then BOMContent
object will be created for all rebars in a model.
column_headers
is a dictionary with keys: "Host", "Mark", "RebarsCount", "Diameter", "RebarLength", "RebarsTotalLength" and values are tuple of column_header and their sequence number.
Example: {
"Host": ("Member", 1),
"Mark": ("Mark", 2),
"RebarsCount": ("No. of Rebars", 3),
"Diameter": ("Diameter in mm", 4),
"RebarLength": ("Length in m/piece", 5),
"RebarsTotalLength": ("Total Length in m", 6),
}
set column sequence number to 0 to hide column.
column_units
is a dictionary with keys: "Diameter", "RebarLength", "RebarsTotalLength" and their corresponding units as value.
Example: {
"Diameter": "mm",
"RebarLength": "m",
"RebarsTotalLength": "m",
}
dia_weight_map
is a dictionary with diameter as key and corresponding weight as value.
Syntax: {
6: FreeCAD.Units.Quantity("0.222 kg/m"),
8: FreeCAD.Units.Quantity("0.395 kg/m"),
10: FreeCAD.Units.Quantity("0.617 kg/m"),
12: FreeCAD.Units.Quantity("0.888 kg/m"),
...,
}
rebar_length_type
specifies the type of rebar length used for the bill of material calculations; it can be "RealLength" or "LengthWithSharpEdges".
font_family
specifies the font family of data text.
font_filename
specifies font filename or full path of the font file corresponding to font_family. This is required if you are working in pure console mode, without any GUI.
font_size
specifies the font size of the data text.
column_width
specifies the width of each column in the bill of material table SVG.
row_height
specifies the height of each row in the bill of material table SVG.
bom_left_offset
specifies the left offset of the bill of material SVG on template_file
.
bom_top_offset
specifies the top offset of the bill of material SVG on template_file
.
bom_min_right_offset
specifies the minimum right offset of the bill of material SVG on template_file
.
bom_min_bottom_offset
specifies the minimum bottom offset of the bill of material SVG on template_file
bom_table_svg_max_width
specifies the maximum width of the bill of material table in SVG.
bom_table_svg_max_height
specifies the maximum height of the bill of material table in SVG.
template_file
specifies the template file used to place the generated bill of material table on it. It must be a valid TechDraw template file as here.
output_file
specifies the output file to write generated bill of material SVG.
rebar_objects
is a list of ArchRebar and/or rebar2 and/or structures (to select ArchRebar in that structure) objects.
reinforcement_group_by
specifies how reinforcement objects should be grouped; it can be "Mark" or "Host".
return_svg_only
specifies if the BOMContent
object is to be created or not. If return_svg_only
is True, then neither BOMContent
object is created nor SVG is written to output_file
. And it returns the SVG element.