Added toFreecad function and modified the examples to use it. Also clean...

...ed up minor PEP non-conformances.