Nurbs and Silk errors

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
emills2
Posts: 577
Joined: Tue Apr 28, 2015 11:23 pm

Re: Nurbs and Silk errors

Postby emills2 » Wed Jan 30, 2019 5:36 pm

Stou wrote:
Mon Jan 28, 2019 2:10 pm
Silk errors:
Running the Python command 'ControlPoly4' failed:
Traceback (most recent call last):
File "C:\Users\stou9\AppData\Roaming\FreeCAD\Mod\Silk\ControlPoly4.py", line 42, in Activated
print mode

local variable 'mode' referenced before assignment
Do I need to set some variables somewhere?
if 'mode' wasn't assigned, that means your selection was not recognized. In Silk you always have to select your input before hitting the function.

here is an old tutorial for basics
https://github.com/edwardvmills/NURBSli ... cCurve4.md

just ignore the parts that tell you to change element colors. that is automatic now. EDIT: also ignore setup stuff. SIlk as a workbench takes care of that.

have to jet right now, but i'll come back to help if the tutorial above doesn't do the trick
Syres
Posts: 383
Joined: Thu Aug 09, 2018 11:14 am

Re: Nurbs and Silk errors

Postby Syres » Wed Jan 30, 2019 6:12 pm

emills2 wrote:
Wed Jan 30, 2019 5:36 pm
have to jet right now, but i'll come back to help if the tutorial above doesn't do the trick
As someone who's completed the tutorial series in the past without any issues (very good step-by-step documents), I might be able to narrow down what's going on. I don't believe the OP stated the full FreeCAD info so maybe that's why it might not have been clear that it was a Python 3 error (my incorrect assumption).

Using :

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15697 (Git)
Build type: Release
Branch: master
Hash: dedaa807629ab25cf32977d30bf7610f1346aff7
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedKingdom (en_GB)

all the first steps appear to work as expected therefore I would envisage all is well with Py2Qt4 builds but, using :

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15697 (Git)
Build type: Release
Branch: master
Hash: dedaa807629ab25cf32977d30bf7610f1346aff7
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)

just changing to the Silk workbench (not clicking any buttons) causes this error:
Attachments
Silk_Py3Qt5OCC73_Error.jpg
Silk_Py3Qt5OCC73_Error.jpg (146.68 KiB) Viewed 260 times
Last edited by Syres on Thu Jan 31, 2019 9:19 am, edited 1 time in total.
User avatar
Stou
Posts: 40
Joined: Mon Dec 31, 2018 12:24 pm
Location: Laval, Québec, Canada
Contact:

Re: Nurbs and Silk errors

Postby Stou » Thu Jan 31, 2019 2:54 am

emills2 wrote:
Wed Jan 30, 2019 5:36 pm
if 'mode' wasn't assigned, that means your selection was not recognized. In Silk you always have to select your input before hitting the function.

here is an old tutorial for basics
https://github.com/edwardvmills/NURBSli ... cCurve4.md

just ignore the parts that tell you to change element colors. that is automatic now. EDIT: also ignore setup stuff. SIlk as a workbench takes care of that.

have to jet right now, but i'll come back to help if the tutorial above doesn't do the trick
I'll have a look at the tutorial tomorrow, I will let you know after the tutorial, thanks!
emills2
Posts: 577
Joined: Tue Apr 28, 2015 11:23 pm

Re: Nurbs and Silk errors

Postby emills2 » Thu Jan 31, 2019 8:25 pm

just fyi, i checked Silk workbench on

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15748 (Git)
Build type: Release
Branch: master
Hash: 13622cd0b80103ea22969f53df42253038083e40
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)

And the existing test model load and updates correctly. in the past, i have had to play catch up with the dev branch. on FreeCAD 0.17 with python 2.7 should be pretty solid.
Silk_model_147_00.png
Silk_model_147_00.png (217.13 KiB) Viewed 222 times
User avatar
Stou
Posts: 40
Joined: Mon Dec 31, 2018 12:24 pm
Location: Laval, Québec, Canada
Contact:

Re: Nurbs and Silk errors

Postby Stou » Sat Feb 02, 2019 1:08 am

I did the first Nurbs tutorial and it work fine. After that, just to see if I have the same error as Syres, I switch to Silk WB. I didn't had any error.

Next, I'll do the tutorial 0.02!
Syres
Posts: 383
Joined: Thu Aug 09, 2018 11:14 am

Re: Nurbs and Silk errors

Postby Syres » Sat Feb 02, 2019 11:20 am

emills2 wrote:
Wed Jan 30, 2019 5:36 pm
Py3 Fixes
I've had a pretty successful attempt at making the Silk Wb both Py2 and Py3 compatible but having been in and out of different builds only on Windows 7, it would be wise if someone else was willing to extract the attached zip file and copy over the corresponding Wb files. For those who are unaware, these are held in DriveLetter:\Users\userid\AppData\Roaming\FreeCAD\Mod\Silk

If these changes cause any major problems then you just need to use the Install/Update button in AddOn Manager to put the workbench back to normal and restart FreeCAD.

My Py3 testing was done using:

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15697 (Git)
Build type: Release
Branch: master
Hash: dedaa807629ab25cf32977d30bf7610f1346aff7
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)

and my retro Py2 testing was done using:

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13509 (Git)
Build type: Release
Branch: releases/FreeCAD-0-17
Hash: 0258808ccb6ba3bd5ea9312f79cd023f1a8671b7
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedKingdom (en_GB)
Attachments
Silk_Py3.zip
(36.12 KiB) Downloaded 17 times