Page 5 of 9

Re: Python coding standard

Posted: Tue Feb 07, 2017 2:14 pm
by bernd
Kunda1 wrote:I listed FEM files that could use a peak at their documentation (list created from a regex) to meet the standards mentioned in the thread.
could you explain a bit more what do mean?

Re: Python coding standard

Posted: Tue Feb 07, 2017 6:20 pm
by Kunda1
bernd wrote:
Kunda1 wrote:I listed FEM files that could use a peak at their documentation (list created from a regex) to meet the standards mentioned in the thread.
could you explain a bit more what do mean?
Not all the files in the src/Mod/FEM/ are listed in my post. There are some files that start with an underscore that I didn't include.

My intention was to illustrate that python variables mentioned previously:

Code: Select all

__Comment__ = 'Imports and scales an Airfoil in the form of a Draft Wire (DWire) or Basic Spline (BSpline)'
__Web__ = 'http://forum.freecadweb.org/viewtopic.php?f=22&t=5554'
__Wiki__ = "http://www.freecadweb.org/wiki/index.php?title=Macro_Airfoil_Import_%26_Scale'
__Icon__  = '/usr/lib/freecad/Mod/plugins/icons/airfoil.png'
__Help__ = 'Start the macro and follow the instructions'
__Author__ = 'quick61'
__Version__ = '2.1'
__Status__ = 'stable'
__Requires__ = 'freecad 0.14.3706'
__Communication__ = 'your email adress or yourgit or something else'
could be implemented. I'd be happy to help with that. And in the process it would be great if we could add some doxygen comments that would show up in the yet to be created FEM API doc: https://www.freecadweb.org/api/dc/de2/group__FEM.html

Re: Python coding standard

Posted: Tue Feb 07, 2017 9:26 pm
by PrzemoF
That applies to macros only, unless I'm missing something? :? There is no need to add it to all python files.

Re: Python coding standard

Posted: Tue Feb 07, 2017 9:38 pm
by Kunda1
PrzemoF wrote:That applies to macros only, unless I'm missing something? :? There is no need to add it to all python files.
Pardon, I misunderstood. nevertheless there are still doxygen comments that could be added in order to generate doxygen docs for FEM

Re: Python coding standard

Posted: Tue Feb 07, 2017 9:45 pm
by bernd
PrzemoF wrote:That applies to macros only ... :? There is no need to add it to all python files.
exactly !

Re: Python coding standard

Posted: Tue Feb 07, 2017 9:46 pm
by bernd
Kunda1 wrote:...nevertheless there are still doxygen comments that could be added in order to generate doxygen docs for FEM
Could you give more informations?

Re: Python coding standard

Posted: Tue Feb 07, 2017 9:57 pm
by PrzemoF
More of that stuff (from FemTools.py):

Code: Select all

S>    ## Sets mesh color using selected type of results (Sabs by default)
      #  @param self The python object self
      #  @param result_type Type of FEM result, allowed are:
      #  - U1, U2, U3 - deformation
      #  - Uabs - absolute deformation
      #  - Sabs - Von Mises stress
      #  @param limit cutoff value. All values over the limit are treated as equal to the limit. Useful for filtering out hot spots.
      def show_result(self, result_type="Sabs", limit=None):
It should land here [1], but the link is broken...

[1] http://www.freecadweb.org/api/dd/db6/cl ... Tools.html

Edit: link is OK now, thanks kkremitzki!
http://www.freecadweb.org/api/dc/de2/gr ... 54b64ecdd9

Re: Python coding standard

Posted: Tue Feb 07, 2017 10:29 pm
by kkremitzki
I think that may be an issue from my recent rebuild of the API docs; I checked my build folder and that file is there, but it isn't present on the server. I'm investigating now.

Re: Python coding standard

Posted: Tue Feb 07, 2017 11:48 pm
by kkremitzki
Okay, so there were several missing folders for some reason, but I've compared my build dir and the server and everything seems to match up now. If there are any other issues with the API docs on the site feel free to PM me.

Re: Python coding standard

Posted: Fri Feb 10, 2017 12:50 am
by Kunda1
bernd wrote:
Kunda1 wrote:...nevertheless there are still doxygen comments that could be added in order to generate doxygen docs for FEM
Could you give more informations?
Please check the doxygen tweeks i've made in https://github.com/luzpaz/FreeCAD/tree/ ... gen-tweeks