DMST1990 wrote: ↑Tue Dec 11, 2018 1:42 pm
I created a macro for FreeCAD, so you can define a model in FreeCAD
Many thanks. However, I cannot find your addon on the Addon Manager of FreeCAD. Can you please add your macro there?
I tried ToOptix via
https://github.com/VoxelBeaver/ToOptixFreeCADAddon
But the instructions there are outdated. At least the development version of FreeCAD 0.19 uses by default Python 3 (despite Python 2 is still supported). So I have Python 3 with FreeCAD, but when executing ToOptix, I get:
Code: Select all
<class 'SyntaxError'>: ('invalid syntax', ('C:/Users/stoehr/AppData/Roaming/FreeCAD/Macro/FreeCADMacro.py', 9, 35, 'python3_path = # Enter python path\n'))
Therefore It would be cool, if this path is automatically detected.
However, I tried to add the path by myself, but get
Code: Select all
<class 'SyntaxError'>: ("(unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \\UXXXXXXXX escape", ('C:/Users/stoehr/AppData/Roaming/FreeCAD/Macro/FreeCADMacro.py', 10, 20, "installation_path = 'C:\\Users\\stoehr\\AppData\\Roaming\\FreeCAD\\Macro'\n"))
In the macro I have this:
Code: Select all
python3_path = 'D:\FreeCAD-build\FreeCADLibs_12.3.2_x64_VC15\bin'
installation_path = 'C:\Users\stoehr\AppData\Roaming\FreeCAD\Macro'
So one first have to learn Python to understand that '\' has to be input as '\\'.
OK, I managed to specify the path to Python 3, but then I get this error:
Code: Select all
File "C:/Users/stoehr/AppData/Roaming/FreeCAD/Macro/FreeCADMacro.py", line 14, in <module>
import commands
<class 'ModuleNotFoundError'>: No module named 'commands'
I am now stuck. What do I have to do?
my system:
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22440 (Git)
Build type: Release
Branch: master
Hash: 42d643c8f70df94944cf87848574b79ab536f888
Python version: 3.6.8
Qt version: 5.12.6
Coin version: 4.0.0a
OCC version: 7.4.0.beta
Locale: German/Germany (de_DE)