Unclear runtime behaviour of Python code in CQ-Editor for subsequent runsSee original GitHub issue
I have just installed CQ-Editor master via
conda create -n cqgui -c cadquery -c conda-forge cq-editor=master python=3.7 conda activate cqgui
MAssembly on top:
pip install git+https://github.com/bernhard-42/cadquery-massembly
You might remember,
MAssembly is a subclass of
cq.assembly.Assembly, see here
I now run a little test program more than once:
import cadquery as cq from cadquery_massembly import MAssembly import logging import time a = MAssembly() logging.info("At %s, result %s", int(time.time()), isinstance(a, cq.Assembly))
Pressing the green “Run” button three times I get:
So from the Log Viewer, the first time CQ-Editor recognises
a as being an object of class
cq.Assembly. For all subsequent runs not.
What am I doing wrong here?
Btw., this prevents from using
MAssembly in CQ-Editor now, since
cq.assembly.Assembly.add() will now run into an infinite python recursion.
- Created 3 years ago
- Comments:9 (4 by maintainers)
Top GitHub Comments
MAssembly is now working perfectly in CQ-Editor
yep indeed, it works now. Thanks! Maybe it would be an idea to have the default for this preference changed? Because it is a little bit unexpected …