creating a new extension

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
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

creating a new extension

Post by carlopav »

Hello ickby, happy easter!
ickby wrote: Sat Oct 08, 2016 3:22 pm ping
is it possible to create a new extesion entirely in python? Is there any guide on how to do that?
I'd like to experiment a bit with it to implement it into Draft Edit command, I guess it could be the right usecase...
Something like Draft::EditExtensionPython. If I got it correctly, i can be added to other workbenches objects to enable them to be edited by Draft_Edit
follow my experiments on BIM modelling for architecture design
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: creating a new extension

Post by ickby »

unfortunately this is not possible yet. At the moment only c++ extensions are supported.
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: creating a new extension

Post by carlopav »

Ok, thanks anyway for the reply :)
follow my experiments on BIM modelling for architecture design
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: creating a new extension

Post by carlopav »

ickby wrote: Mon Apr 05, 2021 1:22 pm unfortunately this is not possible yet. At the moment only c++ extensions are supported.
Aannd... Is there an example on how to setup a c++ extension? Or can you suggest a very basic one to get inspired by?
follow my experiments on BIM modelling for architecture design
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: creating a new extension

Post by ickby »

There is a detailed description in https://github.com/FreeCAD/FreeCAD/blob ... ion.h#L127

To have a look at a simple implementation I recommend the group extension
https://github.com/FreeCAD/FreeCAD/blob ... sion.h#L39
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: creating a new extension

Post by carlopav »

thanks!
follow my experiments on BIM modelling for architecture design
Post Reply