FreeCAD History

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

FreeCAD History

Post by sgrogan »

https://forum.freecadweb.org/viewtopic. ... 33#p403910
https://forum.freecadweb.org/viewtopic. ... 10#p342330
When was Python chosen as the scripting language?
Was it always intended to so closely expose the "core" and scripting?

I don't think that 20ish years ago, this was an obvious solution. And the license? Was it always an app and a library?
"fight the good fight"
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: FreeCAD History

Post by vocx »

sgrogan wrote: Tue Jun 16, 2020 10:18 pm When was Python chosen as the scripting language?
...
See this link from Bernd's branch that goes all the way to the beginning, src/Base/PyExport.h

The file was uploaded on Apr 27, 2002, but in the source code it is dated May 2001, before Jürgen made the project public. So it seems to me Python was used as a scripting language from the beginning.

Code: Select all

/** \file PyExport.h
 *  \brief the python object export base class
 *  \author Juergen Riegel
 *  \version 0.1
 *  \date    5.2001
 */

#ifndef __PYEXPORT_H__
#define __PYEXPORT_H__

// Std. configurations
#include "Export.h"

class FCInterpreter;

/** The FCPythonExport class, exports the class as a python type
 *  FCPythonExport is the base class for all C++ classes which
 *  need to get exported into the python name space. This class is 
 *  very importand because nearly all imported classes in FreeCAD
 *  are visible in python for Macro recording and Automation purpose.
 *  \par
 *  FCConsole is a singelton! That means you can access the only
 *  instance of the class from every where in c++ by simply using:
 *  \code
 *  #include <Base/Console.h>
 *  GetConsole().Log("Stage: %d",i);
 *  \endcode
 *  \par
 *  FCConsole is abel to switch between several modes to, e.g. switch
 *  the logging on or off, or treat Warnings as Errors, and so on...
 *  @see FCConsoleObserver
 */
As for the license, the explanation that I can find is from 2006; see licence. If you see the same commit as above, src/Base/Console.h, it seems the files from the beginning were using LGPL2. I think at some point some files contributed by different people had a different license like GPL2 or GPL3, but eventually this was rectified and now every single file that is included in the main repository should be LGPL2 or compatible (MIT).

Code: Select all

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *   for detail see the LICENCE text file.                                 *
 *   Jürgen Riegel 2002                                                    *
 *                                                                         *
 ***************************************************************************/
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
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: FreeCAD History

Post by sgrogan »

vocx wrote: Wed Jun 17, 2020 1:26 am See this link from Bernd's branch that goes all the way to the beginning, src/Base/PyExport.h
Thanks, it was Bernd's branch that has me thinking about this.
/** The FCPythonExport class, exports the class as a python type
* FCPythonExport is the base class for all C++ classes which
* need to get exported into the python name space. This class is
* very importand because nearly all imported classes in FreeCAD
* are visible in python for Macro recording and Automation purpose.
So it was intended to expose "nearly all" to the scripting language. This is contemporary with the release of Python2.
My experience is that commercial software I've used has "tacked on" a scripting language after the fact. Probably started about the same time.
"fight the good fight"
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: FreeCAD History

Post by vocx »

sgrogan wrote: Wed Jun 17, 2020 9:31 pm ...
My experience is that commercial software I've used has "tacked on" a scripting language after the fact. Probably started about the same time.
But popular commercial software was usually started many years before it became more mainstream. I'm sure we could trace the development of Catia and others to the 1980s before scripting languages became popular in the 1990s. FreeCAD is relatively new, despite having almost 20 years of development. I think it's natural to choose Python in the early 2000s as the time coincides with the explosion of modern Linux distributions like Suse, Fedora, and Ubuntu.
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
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: FreeCAD History

Post by sgrogan »

sgrogan wrote: Wed Jun 17, 2020 9:31 pm I think it's natural to choose Python in the early 2000s as the time coincides with the explosion of modern Linux distributions like Suse, Fedora, and Ubuntu.
This is what intrigues me. @jriegel was a Windows guy influenced by Catia. It seems Catia was ported to Win about the same time https://en.wikipedia.org/wiki/CATIA
"fight the good fight"
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: FreeCAD History

Post by yorik »

Jürgen has been VERY clever with the early design choices in FreeCAD I think. And indeed it was not so obvious at that time...
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FreeCAD History

Post by wmayer »

sgrogan wrote: Wed Jun 17, 2020 10:24 pm
sgrogan wrote: Wed Jun 17, 2020 9:31 pm I think it's natural to choose Python in the early 2000s as the time coincides with the explosion of modern Linux distributions like Suse, Fedora, and Ubuntu.
This is what intrigues me. @jriegel was a Windows guy influenced by Catia. It seems Catia was ported to Win about the same time https://en.wikipedia.org/wiki/CATIA
A fun fact is that he wanted to have an open-source CAD software mainly for Linux because at that time there existed actually nothing for this platform. However, from the beginning on we exclusively developed on Windows for the next 1.5 years. Then a Czech guy made a contribution to make the code of the core build on Linux: https://github.com/berndhahnebach/All_F ... 383dcdd705

Half a year later I continued the Linux build: https://github.com/berndhahnebach/All_F ... bc9a3da992
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: FreeCAD History

Post by Kunda1 »

love this thread 8-)
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
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: FreeCAD History

Post by sgrogan »

wmayer wrote: Fri Jun 26, 2020 3:01 pmA fun fact
Thanks, very interesting.
Could you share how that first 1.5 years went? Were you meeting in person or online? Did you divide the tasks or work on competing implementations.
I'm fascinated by the whole genesis of it all. At the time did you think FreeCAD would be where it is today?
"fight the good fight"
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FreeCAD History

Post by wmayer »

Could you share how that first 1.5 years went? Were you meeting in person or online?
Well, at that time we were colleagues (until 2005) so we could discuss things face to face. After that time we still had some personal meetings but discussed most things by email or phone.

As third core developer Yorik joined around end of 2007 but it took another 3 or 4 years until the community and number of contributors started to grow significantly.
Did you divide the tasks or work on competing implementations.
Yes. Jürgen was designing and implementing most of the application and document logic and I was doing the basics of the GUI.

However, this wasn't a gradual process but we have experimented with many things at the beginning. For example, in the initial version we used OCC's document framework OCAF and its viewer but after a year or two we got into a dead end because documentation about OCC was very poor and we couldn't get it to work to extend OCAF with our own feature types. So, we decided to only use OCC's modeling capacities but develop our own application/document framework.
At the time did you think FreeCAD would be where it is today?
We didn't know but we hoped. Of course we couldn't anticipate how exactly FreeCAD will look today.
The most important design decisions were to make it available on all major platforms and make the whole SW as accessible as possible, i.e. to impose all important functions to Python so that (power) users are able to extend FreeCAD with own functions. This way we hoped to get a broad audience.
Post Reply