I'm trying to make some lightguides for directing led-light to a different spot.
the Optics workbench works great for this.
I found an error though, When i create a model with a 2d or 3d beam, it initially works great.
But when I perform the following steps the resimulation fails:
save newly created file
close FreeCAD
reopen FreeCAD
open the previously created file.
open the optics workbench
press restart simulation
error occurs:
File "C:\Users\310038536\AppData\Roaming\FreeCAD\Mod\OpticsWorkbench\Ray.py", line 55, in execute
self.redrawRay(fp)
File "C:\Users\310038536\AppData\Roaming\FreeCAD\Mod\OpticsWorkbench\Ray.py", line 70, in redrawRay
if isOpticalObject(optobj):
<class 'NameError'>: name 'isOpticalObject' is not defined
It appears that the optics workbench is not loaded properly first time.
A workaround for this:
Create a new beam object in the same or new file.
this wil load the Optics workbench properly and now the beam created by the previous session also works again.
the system I'm using
OS: Windows 10 Version 1909
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24272 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: 27b568e4e474f8b020203a7190b4db2afe5c8cc5
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: Western Frisian/Netherlands (fy_NL)
This also occurs when using the 0.20 development version.
Dear Developers,
I'm trying to make some lightguides for directing led-light to a different spot. the Optics workbench works great for this.
I found an error though, When i create a model with a 2d or 3d beam, it initially works great. But when I perform the following steps the resimulation fails:
error occurs:
File "C:\Users\310038536\AppData\Roaming\FreeCAD\Mod\OpticsWorkbench\Ray.py", line 55, in execute self.redrawRay(fp) File "C:\Users\310038536\AppData\Roaming\FreeCAD\Mod\OpticsWorkbench\Ray.py", line 70, in redrawRay if isOpticalObject(optobj): <class 'NameError'>: name 'isOpticalObject' is not defined
It appears that the optics workbench is not loaded properly first time.
A workaround for this:
the system I'm using OS: Windows 10 Version 1909 Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.19.24272 (Git) Build type: Release Branch: releases/FreeCAD-0-19 Hash: 27b568e4e474f8b020203a7190b4db2afe5c8cc5 Python version: 3.8.6+ Qt version: 5.15.1 Coin version: 4.0.1 OCC version: 7.5.0 Locale: Western Frisian/Netherlands (fy_NL)
This also occurs when using the 0.20 development version.