User:Suraj Dadral/GSoC20/logs: Difference between revisions

From FreeCAD Documentation
No edit summary
No edit summary
Line 28: Line 28:
'''22 May:''' Fix text overflow in pure console mode. And modify some code to generate SVG in pure console mode. [https://github.com/SurajDadral/FreeCAD-Reinforcement/commit/b48a52e14bd23f48041e72beddcf99754bfaf03d commit]<br>
'''22 May:''' Fix text overflow in pure console mode. And modify some code to generate SVG in pure console mode. [https://github.com/SurajDadral/FreeCAD-Reinforcement/commit/b48a52e14bd23f48041e72beddcf99754bfaf03d commit]<br>
Use round(FreeCAD.Units.Quantity("10 mm").Value) instead of round(FreeCAD.Units.Quantity("10 mm")). [https://github.com/SurajDadral/FreeCAD-Reinforcement/commit/a386c44148a56d1e8a142f0e0d985bc471e97518 commit]<br>
Use round(FreeCAD.Units.Quantity("10 mm").Value) instead of round(FreeCAD.Units.Quantity("10 mm")). [https://github.com/SurajDadral/FreeCAD-Reinforcement/commit/a386c44148a56d1e8a142f0e0d985bc471e97518 commit]<br>
For exception handling, don't use base exception, instead use appropriate exception. For checking properties of BOM_content object in function setProperties() [https://github.com/SurajDadral/FreeCAD-Reinforcement/blob/BOM-rebar2/BillOfMaterial/BillOfMaterialContent.py#L20 here], use ```if not hasattr(obj, "Font")``` instead of "if "Font" not in pl" from performance point of view. [https://github.com/SurajDadral/FreeCAD-Reinforcement/commit/0d45b6429cf3e1af2e2663624490783db393f9e7 commit]<br>
For exception handling, don't use base exception, instead use appropriate exception. For checking properties of BOM_content object in function setProperties() [https://github.com/SurajDadral/FreeCAD-Reinforcement/blob/BOM-rebar2/BillOfMaterial/BillOfMaterialContent.py#L20 here], use ``if not hasattr(obj, "Font")`` instead of ``if "Font" not in pl`` from performance point of view. [https://github.com/SurajDadral/FreeCAD-Reinforcement/commit/0d45b6429cf3e1af2e2663624490783db393f9e7 commit]<br>
Tested BOM generation in FreeCAD console and in pure console mode and fixed some code and is now working fine in pure console mode and in FreeCAD console, in pure console and in Gui.
Tested BOM generation in FreeCAD console and in pure console mode and fixed some code and is now working fine in pure console mode and in FreeCAD console, in pure console and in Gui.



Revision as of 18:45, 22 May 2020

Community Bonding Period (May 4 - June 1, 2020)


7 May: Explore how to use TechDraw objects as python scripted objects. https://forum.freecadweb.org/viewtopic.php?f=23&t=44580&p=396233#p396233
Start converting bill of material svg code to use "xml" python library.

8 May: Implement using xml python library for BOM svg generation. commit

9 May: Add font-family input field to svg config ui. commit
And start implementing specifying user template for Bill of Material svg.

10 May: Implement specifying user template for Bill of Material svg and Save it in TechDraw object. And remove adding header/footer to svg as same can be achieved using user template. commit
Add right & bottom offset constraint to BOM svg. commit
Add FontSize parameter to BOMContent object commit

11-12 May: Implement ui for BOM user template. And add Width and Height attributes to bom_content object. Remove xml declaration from output file above BOM table, automatically added by xml minidom, as xml declaration is allowed only at start of document. commit
Add parameters in BOMContentObj to control position and scale of bom svg. commit

15 May: Add GSoC proposal to FreeCAD wiki. proposal

16 May: Learn more about rebar drawings and bar bending schedule. bbs1, bbs2, bbs3, bbs4

17 May: Implement BillOfMaterial svg and spreadsheet to work for both ArchRebar and rebar2 objects. commit
Project discussion with @amrit3701. report

19-21 May: Modify column width to fix text overflow in gui mode as discussed here. commit

22 May: Fix text overflow in pure console mode. And modify some code to generate SVG in pure console mode. commit
Use round(FreeCAD.Units.Quantity("10 mm").Value) instead of round(FreeCAD.Units.Quantity("10 mm")). commit
For exception handling, don't use base exception, instead use appropriate exception. For checking properties of BOM_content object in function setProperties() here, use ``if not hasattr(obj, "Font")`` instead of ``if "Font" not in pl`` from performance point of view. commit
Tested BOM generation in FreeCAD console and in pure console mode and fixed some code and is now working fine in pure console mode and in FreeCAD console, in pure console and in Gui.

Todo


✓ Update code to use xml tree for generating Bill of Material svg. [08/05/2020]
✓ Implement specifying user template for Bill of Material svg. [10/05/2020]
✓ Implement word-wrap for svg column headers. [Alternate solution is commit1, commit2 22/05/2020]

  • Implement passing structure as input for BOM generation.