balrobs wrote: ↑Mon Sep 07, 2020 9:53 am
One question ... wouldn't it make sense to add the <Reinforcement Drawing>, <Reinforcement Dimensioning> and <Reinforcement Drawing Dimensioning> icons to the reinforcement toolbar?
I think this isn't much work and even if there is not yet a dialog for the user to select all possible options, it would be sufficient to run the standard script for now. I think that otherwise many inexperienced Freecad users, for whom the Python console is a hurdle, will not use this great functionality.
Hi @balrobs
The above suggestion is implemented as per commits:
commit1,
commit2
Now, Reinforcement icons list looks like (last icon for Reinforcement Drawing Dimensioning):
Clicking on this icon will execute and log command in FreeCAD Python console:
Code: Select all
ReinforcementDrawing.make_reinforcement_drawing.makeStructuresReinforcementDrawing(structure_list=None, rebars_list=None, view="Front", rebars_stroke_width=0.35, rebars_color_style="Automatic", rebars_color=(0.67, 0.0, 0.0), structure_stroke_width=0.5, structure_color_style="Automatic", structure_color=(0.3, 0.9, 0.91), drawing_left_offset=20, drawing_top_offset=20, drawing_min_right_offset=20, drawing_min_bottom_offset=20, drawing_max_width=297, drawing_max_height=210, template_file=r"/home/blank/.FreeCAD/Mod/Reinforcement/ReinforcementDrawing/Templates/A4_Landscape_blank.svg", perform_dimensioning=True, dimension_rebars_filter_list=None, dimension_label_format="%M %C⌀%D,span=%S", dimension_font_family="DejaVu Sans", dimension_font_size=3, dimension_stroke_width=0.25, dimension_line_style="Continuous", dimension_line_color=(0.0, 0.0, 0.5), dimension_text_color=(0.0, 0.33, 0.0), dimension_single_rebar_line_start_symbol="None", dimension_single_rebar_line_end_symbol="FilledArrow", dimension_multi_rebar_line_start_symbol="FilledArrow", dimension_multi_rebar_line_end_symbol="FilledArrow", dimension_line_mid_point_symbol="Dot", dimension_left_offset=10, dimension_right_offset=10, dimension_top_offset=10, dimension_bottom_offset=10, dimension_left_offset_increment=6, dimension_right_offset_increment=6, dimension_top_offset_increment=6, dimension_bottom_offset_increment=6, dimension_single_rebar_outer_dim=False, dimension_multi_rebar_outer_dim=True, dimension_single_rebar_text_position_type="StartOfLine", dimension_multi_rebar_text_position_type="MidOfLine")
All default values in above command will be read from config.py file in Reinforcement directory.
This will generate Front view of structures. After that, user can also tweak with command logged into FreeCAD Python console to generate different views and can modify other parameters as required.
Thanks,