Automate Reinforcement GSoC proposal

Contributions from the participants, questions and answers to their projects.
Discussions of proposals for upcoming events.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Automate Reinforcement GSoC proposal

Post by bernd »

This FEM code style is a bit outdated. I really need to update this. Mainly I gone do the following

FEM:
- pep8 whenever possible. There are rare cases which do not work ATM.
- to check I use the following code:

Code: Select all

find src/Mod/Fem/ -name "*\.py" | grep -v InitGui.py | grep -v TestFem.py | xargs -I [] flake8 --ignore=E266,E402,E722,W503 --max-line-length=200 []
 
- in Python FEM code I only use snake_case where as the C++ exposed Pythonmethods like all C++ uses camelCase
- typos in FEM are found with:

Code: Select all

codespell -q 3 -L aci,aline,alledges,als,ang,beginn,behaviour,bloaded,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,currenty,doubleclick,dum,eiter,elemente,feld,freez,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,ot,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,vertexes,uint,unter,whitespaces -S *.ts,*.po src/Mod/Fem

Material:
- it is pep8 compliant too, there I do not need any flake8 ignores :D :

Code: Select all

find src/Mod/Material/ -name "*\.py" | grep -v InitGui.py | xargs -I [] flake8 --max-line-length=100 []
typos in Material are found with:

Code: Select all

codespell -q 3 -L aci,aline,alledges,als,ang,beginn,behaviour,bloaded,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,currenty,doubleclick,dum,eiter,elemente,feld,freez,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,ot,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,vertexes,uint,unter,whitespaces -S *.ts,*.po src/Mod/Material
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Automate Reinforcement GSoC proposal

Post by Kunda1 »

bernd wrote: Tue May 07, 2019 9:58 am typos in FEM are found with: codespell
Awesome, please make sure you are using the dev version of codespell with the most up to date dictionary.
https://github.com/codespell-project/co ... /#updating
You can also keep the dictionary up to date this way: https://github.com/codespell-project/co ... dictionary
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Suraj Dadral
Posts: 307
Joined: Fri Sep 07, 2018 5:32 pm
Contact:

Re: Automate Reinforcement GSoC proposal

Post by Suraj Dadral »

Hi @all

I would like to thank you all for your support and guidance. This will going to be a huge learning experience for me.
I will keep sharing my progress and goals here.

My current goal is:
- Create UI for recently created function of column reinforcement.

Regards,
User avatar
amrit3701
Posts: 343
Joined: Mon Jun 13, 2016 5:37 pm

Re: Automate Reinforcement GSoC proposal

Post by amrit3701 »

Suraj Dadral wrote: Tue May 07, 2019 5:21 pm Hi @all

I would like to thank you all for your support and guidance. This will going to be a huge learning experience for me.
I will keep sharing my progress and goals here.

My current goal is:
- Create UI for recently created function of column reinforcement.

Hi @Suraj,

Congratulations! :D I hope this will be a great summer.

I suggest to do the following tasks at main priority:
  • Publish your final project proposal either on BRL-CAD or FreeCAD wiki.
  • Share a link of your blog where we can see your daily progress.
We will schedule a meeting every week where we will discuss your progress and doubts.

If you have any queries feel free to ask here or on IRC (amritpal).

Thanks,
Amritpal Singh
Github, Like my work, sponsor me!
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Automate Reinforcement GSoC proposal

Post by Kunda1 »

Suraj Dadral wrote: Tue May 07, 2019 5:21 pm Hi @all

I would like to thank you all for your support and guidance. This will going to be a huge learning experience for me.
I will keep sharing my progress and goals here.
Congrats Suraj!
How exciting for all of us.
Thank you in advance for all you've contributed so far and for all that you will contribute. :clap: :clap: :clap:
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Automate Reinforcement GSoC proposal

Post by vocx »

bernd wrote: Tue May 07, 2019 9:58 am FEM:
- pep8 whenever possible. There are rare cases which do not work ATM.
- to check I use the following code:

Code: Select all

find src/Mod/Fem/ -name "*\.py" | grep -v InitGui.py | grep -v TestFem.py | xargs -I [] flake8 --ignore=E266,E402,E722,W503 --max-line-length=200 []
This code is too convoluted because you are calling twice grep and then using xargs. This can be done by find alone.

Code: Select all

find /usr/share/freecad/Mod/Fem/ -name '*.py' ! -name InitGui.py ! -name TestFem.py -exec flake8 {} '+'
Use 'single quotes' to prevent expansion by the shell, Bash, in this case. The exclamation mark ! is used to negate the expression and omit those files from the search. What follows after -exec is a program to call. A file is represented by the braces {}. The final plus sign '+' indicates that all the files are put in a single line. It basically does the same as xargs.

Code: Select all

flake8 one.py two.py three.py four.py ...
You will probably see online examples that have a semicolon at the end ';'. This is slower because it calls the program each time for each file.

Code: Select all

flake8 one.py
flake8 two.py
flake8 three.py
flake8 ...
So I'd suggest this

Code: Select all

find /usr/share/freecad/Mod/Fem/ -name '*.py' ! -name InitGui.py ! -name TestFem.py -exec flake8 --ignore=E266,E402,E722,W503 --max-line-length=100 {} '+'
Damn, man. Why do you even have lines longer than 100 characters? You know you can break lines, especially comments, which seem to be a lot.

Code: Select all

        # Algorithm3D
        # known_mesh_algorithm_3D = ['Automatic', 'Delaunay', 'New Delaunay', 'Frontal', 'Frontal Delaunay', 'Frontal Hex', 'MMG3D', 'R-tree']

Code: Select all

        # Algorithm3D 
        # known_mesh_algorithm_3D = ['Automatic', 'Delaunay', 
        #                            'New Delaunay', 'Frontal', 
        #                            'Frontal Delaunay', 'Frontal Hex', 
        #                            'MMG3D', 'R-tree'] 
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
Suraj Dadral
Posts: 307
Joined: Fri Sep 07, 2018 5:32 pm
Contact:

Re: Automate Reinforcement GSoC proposal

Post by Suraj Dadral »

amrit3701 wrote: Tue May 07, 2019 5:46 pm
Hi @Suraj,

Congratulations! :D I hope this will be a great summer.
Thanks @amrit3701

I suggest to do the following tasks at main priority:
  • Publish your final project proposal either on BRL-CAD or FreeCAD wiki.
I published my project proposal on BRL-CAD and FreeCAD wiki and here are related links:
Wiki pages on BRL-CAD wiki:
User Page: https://brlcad.org/wiki/User:Suraj
Project Page: https://brlcad.org/wiki/User:Suraj/gsoc_proposal

Wiki pages on FreeCAD wiki:
User Page: https://www.freecadweb.org/wiki/User:Suraj_Dadral
Project Page: https://www.freecadweb.org/wiki/User:Su ... c_proposal

  • Share a link of your blog where we can see your daily progress.
Here is the blog link, where @all can see my daily progress:
https://hacksj4u.wordpress.com/category/gsoc2019/

We will schedule a meeting every week where we will discuss your progress and doubts.

If you have any queries feel free to ask here or on IRC (amritpal).
OK, I will ask if I have any difficulties.

Thanks,
User avatar
hardeeprai
Posts: 177
Joined: Sun May 23, 2010 2:41 pm
Location: Ludhiana, Punjab, India
Contact:

Re: Automate Reinforcement GSoC proposal

Post by hardeeprai »

Kunda1 wrote: Tue May 07, 2019 6:06 pm
Suraj Dadral wrote: Tue May 07, 2019 5:21 pm I would like to thank you all for your support and guidance. This will going to be a huge learning experience for me.
I will keep sharing my progress and goals here.
Congrats Suraj!
How exciting for all of us.
Thank you in advance for all you've contributed so far and for all that you will contribute.
Congratulations to @Suraj and to FreeCAD community !

Let us resolve to make this ReBar addon more useful than any such product available in the market. For that we really need feedback and wish list of heavy users of such tools.
--
H.S.Rai
User avatar
amrit3701
Posts: 343
Joined: Mon Jun 13, 2016 5:37 pm

Re: Automate Reinforcement GSoC proposal

Post by amrit3701 »

Suraj Dadral wrote: Wed May 08, 2019 5:07 pm
I published my project proposal on BRL-CAD and FreeCAD wiki and here are related links:
Wiki pages on BRL-CAD wiki:
User Page: https://brlcad.org/wiki/User:Suraj
Project Page: https://brlcad.org/wiki/User:Suraj/gsoc_proposal

Wiki pages on FreeCAD wiki:
User Page: https://www.freecadweb.org/wiki/User:Suraj_Dadral
Project Page: https://www.freecadweb.org/wiki/User:Su ... c_proposal
Nice job.
Here is the blog link, where @all can see my daily progress:
https://hacksj4u.wordpress.com/category/gsoc2019/
I suggest to put daily progress on FreeCAD wiki rather than on personal site.
Amritpal Singh
Github, Like my work, sponsor me!
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Automate Reinforcement GSoC proposal

Post by Joel_graff »

hardeeprai wrote: Thu May 09, 2019 3:45 am Let us resolve to make this ReBar addon more useful than any such product available in the market. For that we really need feedback and wish list of heavy users of such tools.
For culverts, the primary needs would be:

1. Ability to specify primary face or ring of faces along which rebar is placed (maybe offset by a depth of cover)
2. Parametric rebar
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
Post Reply