Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing typo: OpticalElement(lc0, label=lenssystem) ... label -> name. #133

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

martin357
Copy link

It was causing error:
Change property: numrays
Running the Python command 'CreateSystemCommand' failed:
Traceback (most recent call last):
File "/home/martin/.FreeCAD/Mod/pyrate/freecad/PyrateWorkbench/Commands_OpticalSystem.py", line 76, in Activated
osobs.initFromGivenOpticalSystem(osobs.initDemoSystem())
File "/home/martin/.FreeCAD/Mod/pyrate/freecad/PyrateWorkbench/Observer_OpticalSystem.py", line 249, in initDemoSystem
elem = OpticalElement(lc0, label="lenssystem")

It was causing error:
Change property: numrays
Running the Python command 'CreateSystemCommand' failed:
Traceback (most recent call last):
  File "/home/martin/.FreeCAD/Mod/pyrate/freecad/PyrateWorkbench/Commands_OpticalSystem.py", line 76, in Activated
    osobs.initFromGivenOpticalSystem(osobs.initDemoSystem())
  File "/home/martin/.FreeCAD/Mod/pyrate/freecad/PyrateWorkbench/Observer_OpticalSystem.py", line 249, in initDemoSystem
    elem = OpticalElement(lc0, label="lenssystem")
@joha2
Copy link
Collaborator

joha2 commented Sep 1, 2019

Hi @martin357 Thanks for your PR. Your contribution is very appreciated. I would suggest to postpone it, until we refactored our interface. This has the following reasons:

  • First, at the moment we are rewriting all constructors to accept only certain dicts and therefore the direct initialization of OpticalSystem via the constructor is considered as deprecated.
  • Second, the FreeCAD interface is broken since our last large refactoring and is to be done after refactoring the constructors.

For the refactoring see the branch unification_constructors in the @joha2 fork. Therefore, it may take a little time to accept your PR.

Best wishes
Johannes

@martin357
Copy link
Author

Hi @joha2 Thanks for your reply. I did notice that this seem to be only the first problem to jump at me.
I'm looking forward to see it working again with to latest FreeCAD version.

Best regards,
Martin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants