[API Documentation] Volunteers to improve descriptions for several attributes

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

[API Documentation] Volunteers to improve descriptions for several attributes

Post by Kunda1 »

  • FreeCADGui.Command.(All attributes)
  • FreeCADGui.Control.(All attributes)
  • FreeCADGui.Document.(All attributes)
  • FreeCADGui.Selection.(All attributes)
  • FreeCADGui.ViewProvider.(All attributes)
Edit: drawing inspiration from flachyjoe in git commit f94b3c3f583a6
flachyjoe wrote: pinged by pinger macro
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
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [API Documentation] Volunteers to improve descriptions for several attributes

Post by Kunda1 »

bump
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
flachyjoe
Veteran
Posts: 1869
Joined: Sat Mar 31, 2012 12:00 pm
Location: Limoges, France

Re: [API Documentation] Volunteers to improve descriptions for several attributes

Post by flachyjoe »

- Flachy Joe -
Image
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [API Documentation] Volunteers to improve descriptions for several attributes

Post by Kunda1 »

:+1:
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
flachyjoe
Veteran
Posts: 1869
Joined: Sat Mar 31, 2012 12:00 pm
Location: Limoges, France

Re: [API Documentation] Volunteers to improve descriptions for several attributes

Post by flachyjoe »

Hi,
  • Can you tell me where FreeCADGui.Control. API is defined ?
  • Is FreeCADGui.Selection. only in SelectionObjectPy.xml ?
It might be possible to parse *PyImp.cpp for PyArg_ParseTuple and auto-find methods args and inject them in xml.
Are regexp experts here ?
- Flachy Joe -
Image
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [API Documentation] Volunteers to improve descriptions for several attributes

Post by Kunda1 »

wmayer wrote: pinged by pinger macro
wmayer, do you mind weighing in?
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
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: [API Documentation] Volunteers to improve descriptions for several attributes

Post by wmayer »

Can you tell me where FreeCADGui.Control. API is defined ?
https://github.com/FreeCAD/FreeCAD/blob ... thon.h#L34
Is FreeCADGui.Selection. only in SelectionObjectPy.xml ?
No, it's here: https://github.com/FreeCAD/FreeCAD/blob ... ion.h#L639 and here https://github.com/FreeCAD/FreeCAD/blob ... .cpp#L1819
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [API Documentation] Volunteers to improve descriptions for several attributes

Post by Kunda1 »

flachyjoe wrote: Sun Apr 18, 2021 12:22 pm It might be possible to parse *PyImp.cpp for PyArg_ParseTuple and auto-find methods args and inject them in xml.
Are regexp experts here ?
We can use regex101.com to help figure this out.

Edit: what are the patterns we're searching for exactly ?
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
flachyjoe
Veteran
Posts: 1869
Joined: Sat Mar 31, 2012 12:00 pm
Location: Limoges, France

Re: [API Documentation] Volunteers to improve descriptions for several attributes

Post by flachyjoe »

Hi !
Can somebody check this :?: : https://github.com/FlachyJoe/FreeCAD/co ... ae10a88adb



Kunda1 wrote: Mon Apr 19, 2021 2:24 pm what are the patterns we're searching for exactly ?
the call of PyArg_ParseTuple is

Code: Select all

PyArg_ParseTuple(args, "arg_def", &arg1, &arg2, ...)
or

Code: Select all

PyArg_ParseTuple(args, "arg_def", ..., &typeN, &argN, ...)
where "args_def" defines arguments types :
s for string
i for integer
b for boolean
O for object
O! for object preceded by type
and | precedes the first optional argument
sometimes we can also find ";an error message" at the end.
- Flachy Joe -
Image
Post Reply