GSoC Proposal: Extended functionality of Rebar Addon

A forum dedicated to the Draft, Arch and BIM workbenches development.
User avatar
bernd
Posts: 10806
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: GSoC Proposal: Extended functionality of Rebar Addon

Postby bernd » Wed Apr 29, 2020 8:56 am

great process. I am almost ready to take the next step in the merging of rebar and rebar2. Stay tuned. After this I will be back in testing the BOM.

It should be possible to use a user template. The user should make his BOM template (company logo, country standard fields, etc.) once. Later he should just change attributes and press the button BOM button. This should not involfe any further interaction with tech draw. IMHO.

On the contrary, a rebar drawing will surely involfe interaction with TechDraw but thats another story.
User avatar
Suraj Dadral
Posts: 292
Joined: Fri Sep 07, 2018 5:32 pm
Contact:

Re: GSoC Proposal: Extended functionality of Rebar Addon

Postby Suraj Dadral » Wed Apr 29, 2020 7:05 pm

amrit3701 wrote:
Tue Apr 28, 2020 5:53 pm
Waiting for testing. :)
Its done and you can test it. For now, the following variables needs to be adjusted in config.py file. I am modifying ui to accommodate these changes.

Code: Select all

# Project info will be shown as "Key: value" pairs.
SVG_HEADER_PROJECT_INFO = {
    "Project": "Project Name",
    "Created By": "Author Name",
    "Date": str(date.today()),
}

# This will be shown next to company logo
SVG_HEADER_COMPANY_INFO = (
    "Company Name\nAddress Line1\nAddress Line2\nTel. 99999-88888\nEmail: "
    "foo@foo.com\nwebsite"
)

# Logo path must be absolute path of logo file.
# Supported logo file formats are: "png", "jpeg", "jpg", "ico" and "bmp"
SVG_HEADER_COMPANY_LOGO = Path(__file__).parent.absolute() / "company_logo.png"

# Maximum width of logo to be used in BOM
SVG_HEADER_COMPANY_LOGO_WIDTH = 30
Sample output:
bom_with_header_footer.svg
(21.79 KiB) Downloaded 12 times
Thanks,
User avatar
amrit3701
Posts: 306
Joined: Mon Jun 13, 2016 5:37 pm

Re: GSoC Proposal: Extended functionality of Rebar Addon

Postby amrit3701 » Wed Apr 29, 2020 7:59 pm

Suraj Dadral wrote:
Wed Apr 29, 2020 7:05 pm
Its done and you can test it. For now, the following variables needs to be adjusted in config.py file. I am modifying ui to accommodate these changes.

Code: Select all

# Project info will be shown as "Key: value" pairs.
SVG_HEADER_PROJECT_INFO = {
    "Project": "Project Name",
    "Created By": "Author Name",
    "Date": str(date.today()),
}

# This will be shown next to company logo
SVG_HEADER_COMPANY_INFO = (
    "Company Name\nAddress Line1\nAddress Line2\nTel. 99999-88888\nEmail: "
    "foo@foo.com\nwebsite"
)

# Logo path must be absolute path of logo file.
# Supported logo file formats are: "png", "jpeg", "jpg", "ico" and "bmp"
SVG_HEADER_COMPANY_LOGO = Path(__file__).parent.absolute() / "company_logo.png"

# Maximum width of logo to be used in BOM
SVG_HEADER_COMPANY_LOGO_WIDTH = 30
Hi @Suraj,

Please let me know who test your code. BOM produces empty SVG (with default content). I pulled BOM-rebar2, create a column reinforcement, select rebars and click on BOM from rebar dropdown list.

Some UI improvement but not at high priority:
  • On selecting a row of Column data and Column header, row Column data is hard to visible (because of black color). I suggest when user select row, the colour should be changed to white.
    Screenshot 2020-04-30 at 1.20.45 AM.png
    Screenshot 2020-04-30 at 1.20.45 AM.png (28.77 KiB) Viewed 415 times
  • Custom radio button is not properly aligned.
    Screenshot 2020-04-30 at 1.21.09 AM.png
    Screenshot 2020-04-30 at 1.21.09 AM.png (39.87 KiB) Viewed 415 times
Attachments
test_BOM.svg
(16.17 KiB) Downloaded 10 times
User avatar
bernd
Posts: 10806
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: GSoC Proposal: Extended functionality of Rebar Addon

Postby bernd » Wed Apr 29, 2020 8:11 pm

User avatar
Suraj Dadral
Posts: 292
Joined: Fri Sep 07, 2018 5:32 pm
Contact:

Re: GSoC Proposal: Extended functionality of Rebar Addon

Postby Suraj Dadral » Thu Apr 30, 2020 10:08 am

amrit3701 wrote:
Wed Apr 29, 2020 7:59 pm
Hi @Suraj,

Please let me know who test your code. BOM produces empty SVG (with default content). I pulled BOM-rebar2, create a column reinforcement, select rebars and click on BOM from rebar dropdown list.
As you mentioned "column reinforcement" above, I think you are testing this for ArchRebar object. But, branch "BOM-rebar2" is for rebar2 objects. And rebar2 objects should be created with code after this commit.

Here is sample file I am using for testing.
rebar2_example_updated.FCStd
(78.4 KiB) Downloaded 6 times
amrit3701 wrote:
Wed Apr 29, 2020 7:59 pm
Some UI improvement but not at high priority:
  • On selecting a row of Column data and Column header, row Column data is hard to visible (because of black color). I suggest when user select row, the colour should be changed to white.
    Screenshot 2020-04-30 at 1.20.45 AM.png
  • Custom radio button is not properly aligned.
    Screenshot 2020-04-30 at 1.21.09 AM.png
Will do soon.

Thanks,
User avatar
bernd
Posts: 10806
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: GSoC Proposal: Extended functionality of Rebar Addon

Postby bernd » Sun May 03, 2020 10:00 pm

User avatar
Suraj Dadral
Posts: 292
Joined: Fri Sep 07, 2018 5:32 pm
Contact:

Re: GSoC Proposal: Extended functionality of Rebar Addon

Postby Suraj Dadral » Mon May 04, 2020 2:16 pm

Suraj Dadral wrote:
Wed Apr 29, 2020 7:05 pm
I am modifying ui to accommodate these changes.
Its done.
Now ui looks:
mod_svg_edit_ui.png
mod_svg_edit_ui.png (88.84 KiB) Viewed 317 times

Suggestions are always welcome. :)

Thanks,
User avatar
amrit3701
Posts: 306
Joined: Mon Jun 13, 2016 5:37 pm

Re: GSoC Proposal: Extended functionality of Rebar Addon

Postby amrit3701 » Mon May 04, 2020 5:15 pm

Hi @Suraj and @bernd,

As @bernd already said, I would also like to allow the user to use his own stylesheet. So tree structure look like below:

Code: Select all

BOM_object
|__ BOM_content
The BOM_object has Template property. Default value of Template (App::PropertyLink) value default_bom_template.svg. The type of BOM_object.BOMContent is App::PropertyLinkList, with this user can also add n number of tables in same stylesheet.

The BOM_content is the data you produced and this BOM_content object has below properties:
  • Placement: Control the position of data in BOM_object.Template. By default, you should calculate but if user want then he can override it.
  • Font Style
  • Font Size
  • Table Lines
  • Table Line Style


When the user clicks on BOM_object or BOM_content, the SVG file object inside the FreeCAD window.
User avatar
Suraj Dadral
Posts: 292
Joined: Fri Sep 07, 2018 5:32 pm
Contact:

Re: GSoC Proposal: Extended functionality of Rebar Addon

Postby Suraj Dadral » Mon May 04, 2020 7:05 pm

amrit3701 wrote:
Mon May 04, 2020 5:15 pm

As @bernd already said, I would also like to allow the user to use his own stylesheet. So tree structure look like below:

Code: Select all

BOM_object
|__ BOM_content
The BOM_object has Template property. Default value of Template (App::PropertyLink) value default_bom_template.svg. The type of BOM_object.BOMContent is App::PropertyLinkList, with this user can also add n number of tables in same stylesheet.

The BOM_content is the data you produced and this BOM_content object has below properties:
  • Placement: Control the position of data in BOM_object.Template. By default, you should calculate but if user want then he can override it.
  • Font Style
  • Font Size
  • Table Lines
  • Table Line Style


When the user clicks on BOM_object or BOM_content, the SVG file object inside the FreeCAD window.
Till now, I am not storing data related to svg. But, as you explained above, now I can proceed to store this info in model. Will implement it soon.

BTW, congrats @All and @bernd and @amrit3701 as our project got selected for GSOC2020.

Thanks,
User avatar
bernd
Posts: 10806
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: GSoC Proposal: Extended functionality of Rebar Addon

Postby bernd » Tue May 05, 2020 11:33 am

amrit3701 wrote:
Sat Apr 18, 2020 12:36 pm
... I think it's right time to shift rebar addon to the workbench as now the scope of rebar addon is big. Appending BOM, Drawing Sheet and more things to the rebar list is not look good to me.
shift it to an own workbench but keep it separated from FreeCAD master or move it into FreeCAD Arch master? What is you guys opinion about this in the future?

Are you both able to compile FreeCAD (Amrith and Suraj)