Closed yorikvanhavre closed 4 years ago
Hi York
Well the structure is the same as GDML so should already be installable as is.
Just needs details icon etc adding to the FreeCAD website. I have not done so as it still needs a lot of development. Maybe add it with some under construction info.
Keith
Also not sure about required python module opennurbs.
It is installable, but the repo will simply be unpacked as is in the FreeCAD Mods folder, so it won't work, unless you add an Init.py file to the root, I'll make you a PR with that. About the 3dm module, at the moment I think the best way is simply to warn the user if the module is not present... I'll include that in my PR as well.
Don't understand GDML works without Init.py. I cloned it to /Users/keithsloan/Library/Preferences/FreeCAD/Mod Started FreeCAD ( which is .18 on Mac) Allowed me to select a 3DM file for opening on which FreeCAD just exited. Mmm
Was working on my Ubuntu, but machine is away because of hardware problem.
Seems to be a problem on Mac with
try: import rhino3dm
except: FreeCAD.Console.PrintError("You must install rhino3dm first !") exit()
Just exits FreeCAD
import rhino3dm
Gives error, but not nice error
Oh you're right, it works without Init.py. Never really got used to looo's new structure...
About the mac error, I would simply change the exit()
statement with return
I think
"Never really got used to looo's new structure..."
Your speaking to the wrong guy - Tell me about it.
Took me ages to get things working the first time
changing exit() to return - Gives
Traceback (most recent call last):
File "
Okay I merged your FreeCAD PR and this repo is added to the FreeCAD addons!
Hi Keith, I think this would be great to add to the addons repo... Would you agree to turn this into a valid FreeCAD module? I think you'd only need to move the contents of freecad/importNURBS into the root folder, and the InitGui.py could be renamed Init.py so it works also in no-GUI mode... Cheers Yorik