PythonOCC

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!
Post Reply
User avatar
jdurston
Posts: 86
Joined: Sun Oct 16, 2011 8:12 pm
Location: Bristol, UK
Contact:

PythonOCC

Post by jdurston »

Hi everyone,

Just been looking at http://www.pythonocc.org/, looks interesting.
Wondering if anyone could help me understand a bit better though:

What exactly is PythonOCC and how exactly does it differ from FreeCAD :?:
Could the FreeCAD community have any use for PythonOCC?
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: PythonOCC

Post by jmaustpc »

Hi

From the FreeCAd web site

https://sourceforge.net/apps/mediawiki/ ... =PythonOCC

Pyocc is basically the "bits" required to "talk to occ" with the Python computer language from within a python interpreter.

You can use pyocc from the python interpreter within FreeCAd to do things with Open Cascade, from Python, with in FreeCAD, that you can't already do anyway from the FreeCAD code. So largely I think it is reasonable to say that a lot of it is duplication for many things, from a FreeCAD perspective, however it does, I believe, allow you to extend some FreeCAD functionality by doing some things that you can not otherwise do with OCC from Python within FreeCAD, so can be very useful in some circumstances.

I think I am being reasonable in saying that I doubt you need to worry about pyocc, unless you are a programmer or very advanced user. Its also quite possible that you could end up using pyocc, or parts of it, without being aware of it due to some programmer finding a need to utilise bits of it at some point in time.

There has been talk of producing some particular new functionality in common with PyOCC, rather than just within FreeCAD, basically to save the duplication of effort that would happen if FreeCAD and OCC were to writing different implementations to do the same thing, where this is efficient and appropriate I believe all the parties involved would happily agree to it.

I might be wrong here, but I think you will find that FreeCAD started before PyOCC and that if PyOCC had been around and suitably advanced in the early days of FreeCAD, that the guys may well have just used pyocc. But my understanding is that it was not, they have since written all their own code to do pretty much most of what pyocc does that would be appropriate to FreeCAD.

Confused yet? :)

Jim
Post Reply