GithubHelp home page GithubHelp logo

cadquery / cq-editor Goto Github PK

View Code? Open in Web Editor NEW
683.0 683.0 108.0 2.58 MB

CadQuery GUI editor based on PyQT

License: Apache License 2.0

Python 99.98% Shell 0.01% Batchfile 0.01%
3d b-rep cad cadquery occt ocp opencascade parametric pyqt pyqt5 python step stl

cq-editor's Introduction

CadQuery logo

CadQuery

Appveyor Build status Build Status codecov Documentation Status DOI


Quick Links

Documentation | Cheatsheet | Discord | Google Group | GUI Editor


What is CadQuery

CadQuery is an intuitive, easy-to-use Python module for building parametric 3D CAD models. Using CadQuery, you can write short, simple scripts that produce high quality CAD models. It is easy to make many different objects using a single script that can be customized.

CadQuery is often compared to OpenSCAD. Like OpenSCAD, CadQuery is an open-source, script based, parametric model generator. However, CadQuery stands out in many ways and has several key advantages:

  1. The scripts use a standard programming language, Python, and thus can benefit from the associated infrastructure. This includes many standard libraries and IDEs.
  2. CadQuery's CAD kernel Open CASCADE Technology (OCCT) is much more powerful than the CGAL used by OpenSCAD. Features supported natively by OCCT include NURBS, splines, surface sewing, STL repair, STEP import/export, and other complex operations, in addition to the standard CSG operations supported by CGAL
  3. Ability to import/export STEP and the ability to begin with a STEP model, created in a CAD package, and then add parametric features. This is possible in OpenSCAD using STL, but STL is a lossy format.
  4. CadQuery scripts require less code to create most objects, because it is possible to locate features based on the position of other features, workplanes, vertices, etc.
  5. CadQuery scripts can build STL, STEP, AMF and 3MF faster than OpenSCAD.

CadQuery was built to be used as a Python library without any GUI. This makes it great for use cases such as integration into servers, or creating scientific and engineering scripts. Options for visualization are also available including CQ-Editor and JupyterLab.

For those who are interested, the OCP repository contains the current OCCT wrapper used by CQ.

Key features

  • Build 3D models with scripts that are as close as possible to how you would describe the object to a human.
  • Create parametric models that can be very easily customized by end users.
  • Output high quality (loss-less) CAD formats like STEP and DXF in addition to STL, VRML, AMF and 3MF.
  • Provide a non-proprietary, plain text model format that can be edited and executed with only a web browser.
  • Offer advanced modeling capabilities such as fillets, curvilinear extrudes, parametric curves and lofts.
  • Build nested assemblies out of individual parts and other assemblies.

Why this fork

The original version of CadQuery was built on the FreeCAD API. This was great because it allowed for fast development and easy cross-platform capability. However, we eventually started reaching the limits of the API for some advanced operations and selectors. This 2.0 version of CadQuery is based directly on a Python wrapper of the OCCT kernel. This gives us a great deal more control and flexibility, at the expense of some simplicity and having to handle the cross-platform aspects of deployment ourselves. We believe this is a worthwhile trade-off to allow CadQuery to continue to grow and expand in the future.

Getting started

To learn more about designing with CadQuery, visit the documentation, examples, and cheatsheet.

To get started playing around with CadQuery and see its capabilities, take a look at the CQ-editor GUI. This easy-to-use IDE is a great way to get started desiging with CadQuery. The CQ-editor installer bundles both CQ-editor and CadQuery (recommended). See the CQ-editor installation instructions.

The CadQuery library (with or without CQ-editor) and its dependencies may be installed using conda, or pip. Note that conda (or the CQ-editor installer) is the better supported option.

See the documentation for detailed CadQuery installation instructions.

There are also videos covering installation:

CadQuery Installation Via Conda

To first install the Conda package manager see Install the Conda Package Manager, and Mambaforge for a minimal installer.

mamba install is recommended over conda install for faster and less memory intensive cadquery installation.

# Set up a new environment
conda create -n cadquery

# Activate the new environment
conda activate cadquery

# Install the latest released version
mamba install -c conda-forge cadquery

# Or install the dev version to get the latest changes
mamba install -c conda-forge -c cadquery cadquery=master

CadQuery Installation Via Pip

CadQuery has a complex set of dependencies including OCP, which is our set of bindings to the OpenCASCADE CAD kernel. OCP is distributed as binary wheels for Linux, MacOS and Windows. However, there are some limitations. Only Python 3.9 through 3.12 are currently supported, and some older Linux distributions such as Ubuntu 18.04 are not supported. If the pip installation method does not work for your system, you can try the conda installation method.

It is highly recommended that a virtual environment is used when installing CadQuery, although it is not strictly required. Installing CadQuery via pip requires a up-to-date version of pip, which can be obtained with the following command line (or a slight variation thereof).

python3 -m pip install --upgrade pip

Once a current version of pip is installed, CadQuery can be installed using the following command line.

pip install cadquery

It is also possible to install the very latest changes directly from CadQuery's GitHub repository, with the understanding that sometimes breaking changes can occur. To install from the git repository, run the following command line.

pip install git+https://github.com/CadQuery/cadquery.git

CQ-editor GUI

CQ-editor is an IDE that allows users to edit CadQuery model scripts in a GUI environment. It includes features such as:

  • A graphical debugger that allows you to step through your scripts.
  • A CadQuery stack inspector.
  • Export to various formats, including STEP and STL, directly from the menu.

More on CQ-editor:

CQ editor screenshot

Jupyter

CadQuery supports Jupyter out-of-the-box. Run your CadQuery code in the notebook and visualize the model by calling display(<CadQuery object>).

Getting help

You can find the full CadQuery documentation at cadquery.readthedocs.io.

We also have a Google Group to make it easy to get help from other CadQuery users. We want you to feel welcome and encourage you to join the group and introduce yourself. We would also love to hear what you are doing with CadQuery.

There is a Discord server as well. You can ask for help in the general channel.

Projects using CadQuery

Here are just a few examples of how CadQuery is being used.

FxBricks Lego Train System

FxBricks uses CadQuery in the product development pipeline for their Lego train system. FxBricks has also given back to the community by creating documentation for their CAD pipeline. They have also assembled cq-kit, a library containing utility classes and functions to extend the capabilities of CadQuery. Thanks to @michaelgale and @fx-bricks for this example.

FxBricks Pipeline Diagram

Hexidor Board Game Development

Hexidor is an expanded take on the Quoridor board game, and the development process has been chronicled here. CadQuery was used to generate the game board. Thanks to Bruce for this example.

Hexidor Board Game

Spindle assembly

Thanks to @marcus7070 for this example from here.

3D Printed Resin Mold

Thanks to @eddieliberato for sharing this example of an anti-kink resin mold for a cable.

3D printed resin mold

License

CadQuery is licensed under the terms of the Apache Public License, version 2.0.

Contributing

Contributions from the community are welcome and appreciated.

You do not need to be a software developer to have a big impact on this project. Contributions can take many forms including, but not limited to, the following:

  • Writing and improving documentation
  • Triaging bugs
  • Submitting bugs and feature requests
  • Creating tutorial videos and blog posts
  • Helping other users get started and solve problems
  • Telling others about this project
  • Helping with translations and internationalization
  • Helping with accessibility
  • Contributing bug fixes and new features

It is asked that all contributions to this project be made in a respectful and considerate way. Please use the Python Community Code of Conduct's guidelines as a reference.

Contributing code

If you are going to contribute code, make sure to follow this steps:

  • Consider opening an issue first to discuss what you have in mind
  • Try to keep it as short and simple as possible (if you want to change several things, start with just one!)
  • Fork the CadQuery repository, clone your fork and create a new branch to start working on your changes
  • Create a conda development environment with something like:
    • mamba env create -n cq-dev -f environment.yml
  • Activate the new conda environment:
    • conda activate cq-dev
  • If desired, install the master branch of cq-editor (Note; a release version may not be compatible with the master branch of cadquery):
    • mamba install -c cadquery -c conda-forge cq-editor=master Installing cq-editor adds another instance of cadquery which overrides the clone just added. Fix this by reinstalling cadquery using pip:
    • pip install -e .
  • Before making any changes verify that the current tests pass. Run pytest from the root of your cadquery clone, there should be no failures and the output will look similar to this:
    • ======= 215 passed, 57 warnings in 13.95s =======
  • Start with the tests! How should CadQuery behave after your changes? Make sure to add some tests to the test suite to ensure proper behavior
  • Make sure your tests have assertions checking all the expected results
  • Add a nice docstring to the test indicating what the test is doing; if there is too much to explain, consider splitting the test in two!
  • Go ahead and implement the changes
  • Add a nice docstring to the functions/methods/classes you implement describing what they do, what the expected parameters are and what it returns (if anything)
  • Update the documentation if there is any change to the public API
  • Consider adding an example to the documentation showing your cool new feature!
  • Make sure nothing is broken (run the complete test suite with pytest)
  • Run black from our fork to autoformat your code and make sure your code style complies with CadQuery's
  • Push the changes to your fork and open a pull-request upstream
  • Keep an eye on the automated feedback you will receive from the CI pipelines; if there is a test failing or some code is not properly formatted, you will be notified without human intervention
  • Be prepared for constructive feedback and criticism!
  • Be patient and respectful, remember that those reviewing your code are also working hard (sometimes reviewing changes is harder than implementing them!)

How to Report a Bug

When filing a bug report issue, please be sure to answer these questions:

  1. What version of the software are you running?
  2. What operating system are you running the software on?
  3. What are the steps to reproduce the bug?

How to Suggest a Feature or Enhancement

If you find yourself wishing for a feature that does not exist, you are probably not alone. There are bound to be others out there with similar needs. Open an issue which describes the feature you would like to see, why you need it, and how it should work.

cq-editor's People

Contributors

adam-trhon avatar adam-urbanczyk avatar elliotwaite avatar gebner avatar jdegenstein avatar jmwright avatar justbuchanan avatar lorenzncode avatar marcus7070 avatar mbway avatar nealie avatar possibilities avatar roel-v avatar snoyer avatar voneiden avatar winksaville avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cq-editor's Issues

Abort on startup (BAD LEXICON descriptor)

I get a crash when I start up on the current master (4e13229) on Arch:

python run.py 
INFO:OCC.Display.backend:backend loaded: qt-pyqt5
 ###### 3D rendering pipe initialisation #####
Display3d class initialization starting ...
Aspect_DisplayConnection created.
Graphic_Driver created.
V3d_Viewer created.
AIS_InteractiveContext created.
V3d_View created
Xw_Window created.
Display3d class successfully initialized.
 ########################################
Layer manager created
Layer dimensions: 100, 30
TKOpenGl | Type: Error | ID: 0 | Severity: High | Message:
  Failed to compile shader object. Compilation log:
0:264(2): error: `occFragColor' undeclared
0:264(2): error: value of type vec4 cannot be assigned to variable of type error

TKOpenGl | Type: Error | ID: 0 | Severity: High | Message:
  Error! FBO blitting has failed
DEBUG:asyncio:Using selector: EpollSelector
DEBUG:ipykernel.inprocess.ipkernel:
*** MESSAGE TYPE:kernel_info_request***
DEBUG:ipykernel.inprocess.ipkernel:   Content: {}
   --->
   
DEBUG:ipykernel.inprocess.ipkernel:kernel_info_request: {'header': {'version': '5.3', 'date': datetime.datetime(2018, 9, 5, 15, 14, 35, 655936, tzinfo=tzutc()), 'session': '17e1a50c-2ef784919e81f837a8330272', 'username': 'john', 'msg_type': 'kernel_info_request', 'msg_id': '3b1d660f-f7ab6b08bc6b55f4c1b21595'}, 'msg_id': '3b1d660f-f7ab6b08bc6b55f4c1b21595', 'msg_type': 'kernel_info_request', 'parent_header': {}, 'metadata': {}, 'content': {}, 'buffers': []}
DEBUG:ipykernel.inprocess.ipkernel:{'header': {'version': '5.3', 'date': datetime.datetime(2018, 9, 5, 15, 14, 35, 661540, tzinfo=datetime.timezone.utc), 'session': '17e1a50c-2ef784919e81f837a8330272', 'username': 'john', 'msg_type': 'kernel_info_reply', 'msg_id': '56430d19-c1135ee1952d0cf2c0c92052'}, 'msg_id': '56430d19-c1135ee1952d0cf2c0c92052', 'msg_type': 'kernel_info_reply', 'parent_header': {'version': '5.3', 'date': datetime.datetime(2018, 9, 5, 15, 14, 35, 655936, tzinfo=tzutc()), 'session': '17e1a50c-2ef784919e81f837a8330272', 'username': 'john', 'msg_type': 'kernel_info_request', 'msg_id': '3b1d660f-f7ab6b08bc6b55f4c1b21595'}, 'content': {'status': 'ok', 'protocol_version': '5.1', 'implementation': 'ipython', 'implementation_version': '6.5.0', 'language_info': {'name': 'python', 'version': '3.6.6', 'mimetype': 'text/x-python', 'codemirror_mode': {'name': 'ipython', 'version': 3}, 'pygments_lexer': 'ipython3', 'nbconvert_exporter': 'python', 'file_extension': '.py'}, 'banner': '', 'help_links': [{'text': 'Python Reference', 'url': 'https://docs.python.org/3.6'}, {'text': 'IPython Reference', 'url': 'https://ipython.org/documentation.html'}, {'text': 'NumPy Reference', 'url': 'https://docs.scipy.org/doc/numpy/reference/'}, {'text': 'SciPy Reference', 'url': 'https://docs.scipy.org/doc/scipy/reference/'}, {'text': 'Matplotlib Reference', 'url': 'https://matplotlib.org/contents.html'}, {'text': 'SymPy Reference', 'url': 'http://docs.sympy.org/latest/index.html'}, {'text': 'pandas Reference', 'url': 'https://pandas.pydata.org/pandas-docs/stable/'}]}, 'metadata': {}, 'tracker': <zmq.sugar.tracker.MessageTracker object at 0x7efd3f490c18>}
DEBUG:ipykernel.inprocess.ipkernel:
*** MESSAGE TYPE:kernel_info_request***
DEBUG:ipykernel.inprocess.ipkernel:   Content: {}
   --->
   
DEBUG:ipykernel.inprocess.ipkernel:kernel_info_request: {'header': {'version': '5.3', 'date': datetime.datetime(2018, 9, 5, 15, 14, 35, 664904, tzinfo=tzutc()), 'session': '17e1a50c-2ef784919e81f837a8330272', 'username': 'john', 'msg_type': 'kernel_info_request', 'msg_id': 'd8aded3b-5a6b66b1eef6c7e6e54b1995'}, 'msg_id': 'd8aded3b-5a6b66b1eef6c7e6e54b1995', 'msg_type': 'kernel_info_request', 'parent_header': {}, 'metadata': {}, 'content': {}, 'buffers': []}
DEBUG:ipykernel.inprocess.ipkernel:{'header': {'version': '5.3', 'date': datetime.datetime(2018, 9, 5, 15, 14, 35, 667502, tzinfo=datetime.timezone.utc), 'session': '17e1a50c-2ef784919e81f837a8330272', 'username': 'john', 'msg_type': 'kernel_info_reply', 'msg_id': '675f2227-f9bb28ae6315b6524ef285a6'}, 'msg_id': '675f2227-f9bb28ae6315b6524ef285a6', 'msg_type': 'kernel_info_reply', 'parent_header': {'version': '5.3', 'date': datetime.datetime(2018, 9, 5, 15, 14, 35, 664904, tzinfo=tzutc()), 'session': '17e1a50c-2ef784919e81f837a8330272', 'username': 'john', 'msg_type': 'kernel_info_request', 'msg_id': 'd8aded3b-5a6b66b1eef6c7e6e54b1995'}, 'content': {'status': 'ok', 'protocol_version': '5.1', 'implementation': 'ipython', 'implementation_version': '6.5.0', 'language_info': {'name': 'python', 'version': '3.6.6', 'mimetype': 'text/x-python', 'codemirror_mode': {'name': 'ipython', 'version': 3}, 'pygments_lexer': 'ipython3', 'nbconvert_exporter': 'python', 'file_extension': '.py'}, 'banner': '', 'help_links': [{'text': 'Python Reference', 'url': 'https://docs.python.org/3.6'}, {'text': 'IPython Reference', 'url': 'https://ipython.org/documentation.html'}, {'text': 'NumPy Reference', 'url': 'https://docs.scipy.org/doc/numpy/reference/'}, {'text': 'SciPy Reference', 'url': 'https://docs.scipy.org/doc/scipy/reference/'}, {'text': 'Matplotlib Reference', 'url': 'https://matplotlib.org/contents.html'}, {'text': 'SymPy Reference', 'url': 'http://docs.sympy.org/latest/index.html'}, {'text': 'pandas Reference', 'url': 'https://pandas.pydata.org/pandas-docs/stable/'}]}, 'metadata': {}, 'tracker': <zmq.sugar.tracker.MessageTracker object at 0x7efd3f490c18>}
DEBUG:ipykernel.inprocess.ipkernel:
*** MESSAGE TYPE:history_request***
DEBUG:ipykernel.inprocess.ipkernel:   Content: {'raw': True, 'output': False, 'hist_access_type': 'tail', 'n': 1000}
   --->
   
DEBUG:ipykernel.inprocess.ipkernel:history_request: {'header': {'version': '5.3', 'date': datetime.datetime(2018, 9, 5, 15, 14, 35, 668707, tzinfo=tzutc()), 'session': '17e1a50c-2ef784919e81f837a8330272', 'username': 'john', 'msg_type': 'history_request', 'msg_id': 'f60beaae-cb8207b52d14bb6745a4febf'}, 'msg_id': 'f60beaae-cb8207b52d14bb6745a4febf', 'msg_type': 'history_request', 'parent_header': {}, 'metadata': {}, 'content': {'raw': True, 'output': False, 'hist_access_type': 'tail', 'n': 1000}, 'buffers': []}
DEBUG:ipykernel.inprocess.ipkernel:{'header': {'version': '5.3', 'date': datetime.datetime(2018, 9, 5, 15, 14, 35, 672181, tzinfo=datetime.timezone.utc), 'session': '17e1a50c-2ef784919e81f837a8330272', 'username': 'john', 'msg_type': 'history_reply', 'msg_id': '0562323a-08fc4f03869dda3fd38231b1'}, 'msg_id': '0562323a-08fc4f03869dda3fd38231b1', 'msg_type': 'history_reply', 'parent_header': {'version': '5.3', 'date': datetime.datetime(2018, 9, 5, 15, 14, 35, 668707, tzinfo=tzutc()), 'session': '17e1a50c-2ef784919e81f837a8330272', 'username': 'john', 'msg_type': 'history_request', 'msg_id': 'f60beaae-cb8207b52d14bb6745a4febf'}, 'content': {'status': 'ok', 'history': []}, 'metadata': {}, 'tracker': <zmq.sugar.tracker.MessageTracker object at 0x7efd3f490c18>}
Traceback (most recent call last):
  File "/home/john/src/CQ-editor/src/widgets/viewer.py", line 175, in display_many
    context.Display(ais.GetHandle())
RuntimeError: Units_NoSuchType
BAD LEXICON descriptor
Aborted (core dumped)

GDB backtrace:

Thread 1 "python" received signal SIGABRT, Aborted.
0x00007ffff76e5d7f in raise () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff76e5d7f in raise () from /usr/lib/libc.so.6
#1  0x00007ffff76d0672 in abort () from /usr/lib/libc.so.6
#2  0x00007ffff662bc3e in QMessageLogger::fatal(char const*, ...) const () from /home/john/.conda/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Core.so.5
#3  0x00007ffff6cb69e0 in pyqt5_err_print() () from /home/john/.conda/envs/cqgui/lib/python3.6/site-packages/PyQt5/QtCore.so
#4  0x00007ffff6cb51c1 in qt_metacall_worker(_sipSimpleWrapper*, _typeobject*, _sipTypeDef*, QMetaObject::Call, int, void**) () from /home/john/.conda/envs/cqgui/lib/python3.6/site-packages/PyQt5/QtCore.so
#5  0x00007ffff6cb54d2 in qpycore_qobject_qt_metacall(_sipSimpleWrapper*, _sipTypeDef*, QMetaObject::Call, int, void**) () from /home/john/.conda/envs/cqgui/lib/python3.6/site-packages/PyQt5/QtCore.so
#6  0x00007ffff6833d59 in QMetaObject::activate(QObject*, int, int, void**) () from /home/john/.conda/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Core.so.5
#7  0x00007ffff6cb18b9 in pyqtBoundSignal_emit () from /home/john/.conda/envs/cqgui/lib/python3.6/site-packages/PyQt5/QtCore.so
#8  0x00007ffff7b5afee in _PyCFunction_FastCallDict (func_obj=func_obj@entry=0x7fffa93e8e10, args=args@entry=0x3176018, nargs=<optimized out>, kwargs=kwargs@entry=0x0) at Objects/methodobject.c:234
#9  0x00007ffff7b5b315 in _PyCFunction_FastCallKeywords (func=func@entry=0x7fffa93e8e10, stack=stack@entry=0x3176018, nargs=<optimized out>, kwnames=kwnames@entry=0x0) at Objects/methodobject.c:294
#10 0x00007ffff7bf449a in call_function (pp_stack=pp_stack@entry=0x7fffffffd1d0, oparg=oparg@entry=1, kwnames=kwnames@entry=0x0) at Python/ceval.c:4830
#11 0x00007ffff7bf871c in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3328
#12 0x00007ffff7bf3730 in _PyFunction_FastCall (co=<optimized out>, args=<optimized out>, nargs=1, globals=<optimized out>) at Python/ceval.c:4912
#13 0x00007ffff7bf4654 in fast_function (kwnames=0x0, nargs=<optimized out>, stack=<optimized out>, func=0x7fffb5812400) at Python/ceval.c:4947
#14 call_function (pp_stack=pp_stack@entry=0x7fffffffd410, oparg=oparg@entry=0, kwnames=kwnames@entry=0x0) at Python/ceval.c:4851
#15 0x00007ffff7bf871c in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3328
#16 0x00007ffff7bf409e in _PyEval_EvalCodeWithName (_co=_co@entry=0x7ffff7226d20, globals=globals@entry=0x7ffff733e7e0, locals=locals@entry=0x0, args=args@entry=0x7fffffffd6a0, argcount=argcount@entry=1, 
    kwnames=kwnames@entry=0x0, kwargs=kwargs@entry=0x0, kwcount=kwcount@entry=0, kwstep=kwstep@entry=2, defs=0x7ffff6fb6db8, defcount=1, kwdefs=0x0, closure=0x7ffff72b8978, name=0x7ffff7a52270, 
    qualname=0x7ffff6fb4300) at Python/ceval.c:4159
#17 0x00007ffff7bfcd55 in _PyFunction_FastCallDict (func=func@entry=0x7fffb5773268, args=args@entry=0x7fffffffd6a0, nargs=1, kwargs=kwargs@entry=0x0) at Python/ceval.c:5063
#18 0x00007ffff7b01abe in _PyObject_FastCallDict (func=func@entry=0x7fffb5773268, args=args@entry=0x7fffffffd6a0, nargs=nargs@entry=1, kwargs=kwargs@entry=0x0) at Objects/abstract.c:2310
#19 0x00007ffff7b01bae in _PyObject_Call_Prepend (func=0x7fffb5773268, obj=0x7ffff6fb80d8, args=0x7ffff7a4f048, kwargs=0x0) at Objects/abstract.c:2373
#20 0x00007ffff7b0186a in PyObject_Call (func=0x7ffff73b9988, args=<optimized out>, kwargs=<optimized out>) at Objects/abstract.c:2261
#21 0x00007ffff7b7a659 in slot_tp_init (self=0x7ffff6fb80d8, args=0x7ffff7a4f048, kwds=0x0) at Objects/typeobject.c:6407
#22 0x00007ffff7b72ed3 in type_call (type=<optimized out>, type@entry=0x254fca8, args=args@entry=0x7ffff7a4f048, kwds=kwds@entry=0x0) at Objects/typeobject.c:915
#23 0x00007ffff7b019cb in _PyObject_FastCallDict (func=0x254fca8, args=<optimized out>, nargs=<optimized out>, kwargs=0x0) at Objects/abstract.c:2331
#24 0x00007ffff7bf4208 in call_function (pp_stack=pp_stack@entry=0x7fffffffd970, oparg=oparg@entry=0, kwnames=kwnames@entry=0x0) at Python/ceval.c:4854
#25 0x00007ffff7bf871c in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3328
#26 0x00007ffff7bf3730 in _PyFunction_FastCall (co=<optimized out>, args=<optimized out>, nargs=0, globals=<optimized out>) at Python/ceval.c:4912
#27 0x00007ffff7bf4654 in fast_function (kwnames=0x0, nargs=<optimized out>, stack=<optimized out>, func=0x7ffff6fad9d8) at Python/ceval.c:4947
#28 call_function (pp_stack=pp_stack@entry=0x7fffffffdbb0, oparg=oparg@entry=0, kwnames=kwnames@entry=0x0) at Python/ceval.c:4851
#29 0x00007ffff7bf871c in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3328
#30 0x00007ffff7bf409e in _PyEval_EvalCodeWithName (_co=_co@entry=0x7ffff733c8a0, globals=globals@entry=0x7ffff737e1f8, locals=locals@entry=0x7ffff737e1f8, args=args@entry=0x0, argcount=argcount@entry=0, 
    kwnames=kwnames@entry=0x0, kwargs=kwargs@entry=0x0, kwcount=kwcount@entry=0, kwstep=kwstep@entry=2, defs=defs@entry=0x0, defcount=defcount@entry=0, kwdefs=kwdefs@entry=0x0, closure=closure@entry=0x0, 
    name=name@entry=0x0, qualname=qualname@entry=0x0) at Python/ceval.c:4159
#31 0x00007ffff7bf46cd in PyEval_EvalCodeEx (_co=_co@entry=0x7ffff733c8a0, globals=globals@entry=0x7ffff737e1f8, locals=locals@entry=0x7ffff737e1f8, args=args@entry=0x0, argcount=argcount@entry=0, 
    kws=kws@entry=0x0, kwcount=kwcount@entry=0, defs=defs@entry=0x0, defcount=defcount@entry=0, kwdefs=kwdefs@entry=0x0, closure=closure@entry=0x0) at Python/ceval.c:4180
#32 0x00007ffff7bf471b in PyEval_EvalCode (co=co@entry=0x7ffff733c8a0, globals=globals@entry=0x7ffff737e1f8, locals=locals@entry=0x7ffff737e1f8) at Python/ceval.c:731
#33 0x00007ffff7c300a2 in run_mod (arena=0x7ffff7399078, flags=0x7fffffffdec0, locals=0x7ffff737e1f8, globals=0x7ffff737e1f8, filename=0x7ffff72b88f0, mod=0x661f48) at Python/pythonrun.c:1025
#34 PyRun_FileExFlags (fp=fp@entry=0x6bcb70, filename_str=filename_str@entry=0x7ffff7221050 "run.py", start=start@entry=257, globals=globals@entry=0x7ffff737e1f8, locals=locals@entry=0x7ffff737e1f8, 
    closeit=closeit@entry=1, flags=flags@entry=0x7fffffffdec0) at Python/pythonrun.c:978
#35 0x00007ffff7c30207 in PyRun_SimpleFileExFlags (fp=fp@entry=0x6bcb70, filename=<optimized out>, closeit=closeit@entry=1, flags=flags@entry=0x7fffffffdec0) at Python/pythonrun.c:420
#36 0x00007ffff7c306a3 in PyRun_AnyFileExFlags (fp=fp@entry=0x6bcb70, filename=<optimized out>, closeit=closeit@entry=1, flags=flags@entry=0x7fffffffdec0) at Python/pythonrun.c:81
#37 0x00007ffff7c4c6fd in run_file (p_cf=0x7fffffffdec0, filename=0x604710 L"run.py", fp=0x6bcb70) at Modules/main.c:340
#38 Py_Main (argc=argc@entry=2, argv=argv@entry=0x602260) at Modules/main.c:810
#39 0x0000000000400bbc in main (argc=2, argv=<optimized out>) at ./Programs/python.c:69

Conda setup:

conda env list
# conda environments:
#
cqgui                 *  /home/john/.conda/envs/cqgui
base                     /usr
# packages in environment at /home/john/.conda/envs/cqgui:
#
# Name                    Version                   Build  Channel
alabaster                 0.7.11                     py_3    conda-forge
asn1crypto                0.24.0                   py36_3    conda-forge
astroid                   2.0.2                    py36_0    conda-forge
babel                     2.6.0                      py_1    conda-forge
backcall                  0.1.0                      py_0    conda-forge
bleach                    2.1.4                      py_1    conda-forge
bzip2                     1.0.6                h470a237_2    conda-forge
ca-certificates           2018.8.24            ha4d7672_0    conda-forge
cadquery-occ              0.1.5             py3.6180e50c0    cadquery
certifi                   2018.8.24                py36_1    conda-forge
cffi                      1.11.5           py36h5e8e0c9_1    conda-forge
chardet                   3.0.4                    py36_3    conda-forge
cloudpickle               0.5.5                      py_0    conda-forge
cryptography              2.3.1            py36hdffb7b8_0    conda-forge
cryptography-vectors      2.3.1                    py36_0    conda-forge
dbus                      1.13.0               h3a4f0e9_0    conda-forge
decorator                 4.3.0                      py_0    conda-forge
docutils                  0.14                     py36_1    conda-forge
entrypoints               0.2.3                    py36_2    conda-forge
expat                     2.2.5                hfc679d8_2    conda-forge
fontconfig                2.12.1                        4    conda-forge
freeimageplus             3.17.0                        0    dlr-sc
freetype                  2.7                           1    conda-forge
gettext                   0.19.8.1             h5e8e0c9_1    conda-forge
gl2ps                     1.3.8                         1    dlr-sc
glib                      2.55.0               h464dc38_2    conda-forge
gmp                       6.1.2                hfc679d8_0    conda-forge
gst-plugins-base          1.12.5               hde13a9d_0    conda-forge
gstreamer                 1.12.5               h61a6719_0    conda-forge
html5lib                  1.0.1                      py_0    conda-forge
icu                       58.2                 hfc679d8_0    conda-forge
idna                      2.7                      py36_2    conda-forge
imagesize                 1.1.0                      py_0    conda-forge
ipykernel                 4.9.0                    py36_0    conda-forge
ipython                   6.5.0                    py36_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
isort                     4.3.4                    py36_0    conda-forge
jedi                      0.12.1                   py36_0    conda-forge
jinja2                    2.10                       py_1    conda-forge
jpeg                      9c                   h470a237_1    conda-forge
jsonschema                2.6.0                    py36_2    conda-forge
jupyter_client            5.2.3                      py_1    conda-forge
jupyter_core              4.4.0                      py_0    conda-forge
lazy-object-proxy         1.3.1            py36h470a237_0    conda-forge
libffi                    3.2.1                hfc679d8_5    conda-forge
libgcc-ng                 7.2.0                hdf63c60_3    conda-forge
libgfortran-ng            7.2.0                hdf63c60_3    conda-forge
libiconv                  1.15                 h470a237_3    conda-forge
libopenblas               0.2.20               h9ac9557_7  
libpng                    1.6.35               ha92aebf_1    conda-forge
libsodium                 1.0.16                        0    conda-forge
libstdcxx-ng              7.2.0                hdf63c60_3    conda-forge
libxcb                    1.13                 h470a237_2    conda-forge
libxml2                   2.9.3                         1    dlr-sc
Logbook                   1.4.0                     <pip>
markupsafe                1.0              py36h470a237_1    conda-forge
mccabe                    0.6.1                      py_1    conda-forge
mistune                   0.8.3            py36h470a237_2    conda-forge
nbconvert                 5.3.1                      py_1    conda-forge
nbformat                  4.4.0                      py_1    conda-forge
ncurses                   6.1                  hfc679d8_1    conda-forge
numpy                     1.14.3           py36h28100ab_1  
numpy-base                1.14.3           py36h0ea5e3f_1  
numpydoc                  0.8.0                      py_1    conda-forge
oce                       0.18.2               h49dc8cd_2    oce
openssl                   1.0.2p               h470a237_0    conda-forge
packaging                 17.1                       py_0    conda-forge
pandoc                    2.2.2                         1    conda-forge
pandocfilters             1.4.2                      py_1    conda-forge
parso                     0.3.1                      py_0    conda-forge
pcre                      8.41                 hfc679d8_3    conda-forge
pexpect                   4.6.0                    py36_0    conda-forge
pickleshare               0.7.4                    py36_0    conda-forge
pip                       18.0                     py36_1    conda-forge
prompt_toolkit            1.0.15                     py_1    conda-forge
psutil                    5.4.7            py36h470a237_1    conda-forge
pthread-stubs             0.4                  h470a237_1    conda-forge
ptyprocess                0.6.0                    py36_0    conda-forge
pycodestyle               2.4.0                      py_1    conda-forge
pycparser                 2.18                       py_1    conda-forge
pyflakes                  2.0.0                      py_0    conda-forge
pygments                  2.2.0                      py_1    conda-forge
pylint                    2.1.1                    py36_0    conda-forge
pyopenssl                 18.0.0                   py36_0    conda-forge
pyparsing                 2.2.0                      py_1    conda-forge
pyqt                      5.6.0            py36h8210e8a_7    conda-forge
pyqtgraph                 0.10.0                     py_3    conda-forge
pysocks                   1.6.8                    py36_2    conda-forge
python                    3.6.6                h5001a0f_0    conda-forge
python-dateutil           2.7.3                      py_0    conda-forge
pythonocc-core            0.18.1          py36hdfe9f0f_110    pythonocc
pytz                      2018.5                     py_0    conda-forge
pyzmq                     17.1.2           py36hae99301_0    conda-forge
qt                        5.6.2                         3    conda-forge
qtawesome                 0.4.4              pyh8a2030e_1    conda-forge
qtconsole                 4.4.1                    py36_1    conda-forge
qtpy                      1.5.0              pyh8a2030e_0    conda-forge
readline                  7.0                  haf1bffa_1    conda-forge
requests                  2.19.1                   py36_1    conda-forge
rope                      0.10.7                     py_1    conda-forge
setuptools                40.2.0                   py36_0    conda-forge
simplegeneric             0.8.1                      py_1    conda-forge
sip                       4.18.1           py36hfc679d8_0    conda-forge
six                       1.11.0                   py36_1    conda-forge
smesh                     6.7.5                         0    pythonocc
snowballstemmer           1.2.1                      py_1    conda-forge
sphinx                    1.7.8                    py36_0    conda-forge
sphinxcontrib-websupport  1.1.0                      py_1    conda-forge
spyder                    3.2.8                    py36_0    conda-forge
sqlite                    3.24.0               h2f33b56_1    conda-forge
tbb                       2017_20170226                 0    conda-forge
testpath                  0.3.1                    py36_1    conda-forge
tk                        8.6.8                         0    conda-forge
tornado                   5.1              py36h470a237_1    conda-forge
traitlets                 4.3.2                    py36_0    conda-forge
typed-ast                 1.1.0                    py36_0    conda-forge
urllib3                   1.23                     py36_1    conda-forge
wcwidth                   0.1.7                      py_1    conda-forge
webencodings              0.5.1                      py_1    conda-forge
wheel                     0.31.1                   py36_1    conda-forge
wrapt                     1.10.11                  py36_0    conda-forge
xorg-libxau               1.0.8                h470a237_6    conda-forge
xorg-libxdmcp             1.1.2                h470a237_7    conda-forge
xz                        5.2.4                h470a237_1    conda-forge
zeromq                    4.2.5                hfc679d8_5    conda-forge
zlib                      1.2.11               h470a237_3    conda-forge

Let me know if I can provide more details!

MacOS support

At least one user got the application running on macos, but the 3d display does not work at all.

Use a monospace font for the editor

Usually a monospace font is use on IDEs, it allows doing pretty indentations.

It's notably useful in Python, in order to respect the pep8 standard:

# Aligned with opening delimiter.
foo = long_function_name(var_one, var_two,
                         var_three, var_four)

We can't do this in QC-editor, because spaces are rendered smaller than other letters.

Add option to autoreload file when it's changed by an external editor

Hi,
I'm a longtime user of OpenSCAD that's recently discovered cadquery and I'm pretty impressed! I've been interested in making use of cq-editor and although the builtin spyder editor is nice, I'd prefer to use my normal text editor setup. I'd like to have a workflow similar to OpenSCAD where I can have my text editor open next to cq-editor and have my changes reflected in the display whenever I save the file.

Is this something you'd be interested in incorporating into the project? If so, I'd be happy to put some work into adding this feature.

In OpenSCAD, there's a checkbox for "Automatic reload and preview" that turns this on and off. I'm thinking the option in cq-editor could look roughly the same. Are there any caveats that you can think of?

Render ANSI escape codes in the log viewer

Sometimes I get this kind of errors in the log viewer:

[2019-08-12 21:06:27.455384] INFO: ipykernel.inprocess.ipkernel: Exception in execute request:
๏ฟฝ[0;31m---------------------------------------------------------------------------๏ฟฝ[0m
๏ฟฝ[0;31mNameError๏ฟฝ[0m                                 Traceback (most recent call last)
๏ฟฝ[0;32m<ipython-input-6-890ba7f62585>๏ฟฝ[0m in ๏ฟฝ[0;36m<module>๏ฟฝ[0;34m๏ฟฝ[0m
๏ฟฝ[0;32m----> 1๏ฟฝ[0;31m ๏ฟฝ[0mpart๏ฟฝ[0m๏ฟฝ[0;34m๏ฟฝ[0m๏ฟฝ[0;34m๏ฟฝ[0m๏ฟฝ[0m
๏ฟฝ[0m
๏ฟฝ[0;31mNameError๏ฟฝ[0m: name 'part' is not defined

[0;31m, [0;32m and similar are ANSI escape code, that should be rendered correctly in the window (ie. with colors).

Highlight object in view when selected in CQ models panel

Currently when there are multiple objects there are just some numbers in the CQ models panels without a way to find out what numbers corresponds to what model easily. A highlight of the model in the view when the model is selected either in the view or in the panel would fix this problem.

Missing InitDriver call in viewer.py

I get CQ-editor working with Nix. I had to patch the code though and I think this is a bug in CQ-editor. Once I had installed all dependencies and I ran CQ-editor I got the following error:

nix-shell:~/cadquery-nix]$ /nix/store/wcsmqla0193mkfvavsxpvjxpi90456hb-CQ-editor/bin/CQ-editor.sh
INFO:OCC.Display.backend:backend loaded: qt-pyqt5
/nix/store/zq1vrmls3sl2sj32502gj85vmjbr42fp-pythonocc-core-cadquery-version/lib/python3.7/site-packages/OCC/AIS.py:3: Depre
  warnings.warn("OCC.AIS is deprecated since pythonocc-0.18.2. Use OCC.Core.AIS", DeprecationWarning)
/nix/store/zq1vrmls3sl2sj32502gj85vmjbr42fp-pythonocc-core-cadquery-version/lib/python3.7/site-packages/OCC/Quantity.py:3:
  warnings.warn("OCC.Quantity is deprecated since pythonocc-0.18.2. Use OCC.Core.Quantity", DeprecationWarning)
/nix/store/zq1vrmls3sl2sj32502gj85vmjbr42fp-pythonocc-core-cadquery-version/lib/python3.7/site-packages/OCC/Geom.py:3: Depr
  warnings.warn("OCC.Geom is deprecated since pythonocc-0.18.2. Use OCC.Core.Geom", DeprecationWarning)
/nix/store/zq1vrmls3sl2sj32502gj85vmjbr42fp-pythonocc-core-cadquery-version/lib/python3.7/site-packages/OCC/gp.py:3: Deprec
  warnings.warn("OCC.gp is deprecated since pythonocc-0.18.2. Use OCC.Core.gp", DeprecationWarning)
/nix/store/zq1vrmls3sl2sj32502gj85vmjbr42fp-pythonocc-core-cadquery-version/lib/python3.7/site-packages/OCC/BRepBuilderAPI.
  warnings.warn("OCC.BRepBuilderAPI is deprecated since pythonocc-0.18.2. Use OCC.Core.BRepBuilderAPI", DeprecationWarning)
Traceback (most recent call last):
  File "/nix/store/wcsmqla0193mkfvavsxpvjxpi90456hb-CQ-editor/repo/run.py", line 7, in <module>
    main()
  File "/nix/store/wcsmqla0193mkfvavsxpvjxpi90456hb-CQ-editor/repo/src/main.py", line 16, in main
    win = MainWindow()
  File "/nix/store/wcsmqla0193mkfvavsxpvjxpi90456hb-CQ-editor/repo/src/main_window.py", line 39, in __init__
    self.viewer = OCCViewer(self)
  File "/nix/store/wcsmqla0193mkfvavsxpvjxpi90456hb-CQ-editor/repo/src/widgets/viewer.py", line 62, in __init__
    self.updatePreferences()
  File "/nix/store/wcsmqla0193mkfvavsxpvjxpi90456hb-CQ-editor/repo/src/widgets/viewer.py", line 71, in updatePreferences
    self.canvas._display.View.SetBgGradientColors(color1,color2,True)
AttributeError: 'NoneType' object has no attribute 'View'

I looked into the sources of pythonocc and indeed as fast as I can tell there is an InitDriver() call missing in CQ-editor. See https://github.com/tpaviot/pythonocc-core/blob/0.18.1/src/Display/qtDisplay.py#L134. Once I added self.canvas.InitDriver() in the constructor of the OCCViewer class the problem was fixed and I can run CQ-editor.

I'm hesitant on making a pull request because I'm not sure if this is correct since I don't have further experience with pythonocc. Please advice.

Problem when executing CQ-editor when installed from sources: OCCViewer.canvas._display is None

I try to install CQ-editor from sources, because Conda doesn't work on my environment. I also hope that this installation procedure will help other people.

I successfully installed CadQuery, with the following commands:

INSTALLATION_DIR=$(pwd)

# Installing oce from sources

cd $INSTALLATION_DIR
git clone git://github.com/tpaviot/oce.git
mkdir oce/build
cd oce/build
cmake ..
make -j9
sudo make install/strip
make test

# Installing pythonocc-core from sources

cd $INSTALLATION_DIR
git clone https://github.com/tpaviot/pythonocc-core.git
mkdir pythonocc-core/cmake-build
cd pythonocc-core/cmake-build
cmake -DOCE_INCLUDE_PATH=/usr/local/include/oce -DOCE_LIB_PATH=/usr/local/lib ..
make -j9
sudo make install
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/' > ~/.zshrc
source ~/.zshrc
cd ../test
python run_tests.py

# Installing CadQuery from sources

cd $INSTALLATION_DIR
git clone https://github.com/CadQuery/cadquery.git
sudo python setup.py install --single-version-externally-managed --record=record.txt
python runtests.py
# python
# > import cadquery
# > cadquery.Workplane('XY').box(1,2,3).toSvg() # --> success!! \o/

Now for CQ-editor, based on the Conda file and some commands outputs, I ran:

cd $INSTALLATION_DIR
# getting sources:
git clone https://github.com/CadQuery/CQ-editor.git
# installing python dependencies:
sudo pip install Logbook PyQt5 pyparsing pyqtgraph spyder path.py qtconsole requests2
# installing CQ-editor:
sudo python setup.py install --single-version-externally-managed --record=record.txt
# installing python dependencies required for tests:
sudo pip install pytest pytest-qt pytest-mock pytest-xvfb
# allowing test script execution:
chmod u+x ./runtests_locally.sh
# executing test script:
./runtests_locally.sh

But I get this error which suggests that a variable self.canvas._display is null, in cq_editor/widgets/viewer.py, line 71.

Do you have any advice to give? Did I missed to install some dependency?

Segmentation fault on run

This is my first try running the editor. I followed the debug steps from issue #1. This is a clean install. In my case it looks like SIP is the expected version 4.18.1.

$conda env list
# conda environments:
#
base                  *  /home/lorenzn/tools/miniconda3
cqgui                    /home/lorenzn/tools/miniconda3/envs/cqgui
$ conda list
# packages in environment at /home/lorenzn/tools/miniconda3/envs/cqgui:
#
# Name                    Version                   Build  Channel
alabaster                 0.7.11                     py_3    conda-forge
asn1crypto                0.24.0                   py36_3    conda-forge
astroid                   2.0.2                    py36_0    conda-forge
babel                     2.6.0                      py_1    conda-forge
backcall                  0.1.0                      py_0    conda-forge
bleach                    2.1.4                      py_1    conda-forge
bzip2                     1.0.6                h470a237_2    conda-forge
ca-certificates           2018.8.24            ha4d7672_0    conda-forge
cadquery-occ              0.1.5             py3.6180e50c0    cadquery
certifi                   2018.8.24                py36_1    conda-forge
cffi                      1.11.5           py36h5e8e0c9_1    conda-forge
chardet                   3.0.4                    py36_3    conda-forge
cloudpickle               0.5.5                      py_0    conda-forge
cryptography              2.3.1            py36hdffb7b8_0    conda-forge
cryptography-vectors      2.3.1                    py36_0    conda-forge
dbus                      1.13.0               h3a4f0e9_0    conda-forge
decorator                 4.3.0                      py_0    conda-forge
docutils                  0.14                     py36_1    conda-forge
entrypoints               0.2.3                    py36_2    conda-forge
expat                     2.2.5                hfc679d8_1    conda-forge
fontconfig                2.12.1                        4    conda-forge
freeimageplus             3.17.0                        0    dlr-sc
freetype                  2.7                           1    conda-forge
gettext                   0.19.8.1                      0    conda-forge
gl2ps                     1.3.8                         1    dlr-sc
glib                      2.55.0               h464dc38_2    conda-forge
gmp                       6.1.2                hfc679d8_0    conda-forge
gst-plugins-base          1.12.5               hde13a9d_0    conda-forge
gstreamer                 1.12.5               h61a6719_0    conda-forge
html5lib                  1.0.1                      py_0    conda-forge
icu                       58.2                 hfc679d8_0    conda-forge
idna                      2.7                      py36_2    conda-forge
imagesize                 1.0.0                      py_1    conda-forge
ipykernel                 4.8.2                    py36_0    conda-forge
ipython                   6.5.0                    py36_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
isort                     4.3.4                    py36_0    conda-forge
jedi                      0.12.1                   py36_0    conda-forge
jinja2                    2.10                       py_1    conda-forge
jpeg                      9c                   h470a237_0    conda-forge
jsonschema                2.6.0                    py36_2    conda-forge
jupyter_client            5.2.3                      py_1    conda-forge
jupyter_core              4.4.0                      py_0    conda-forge
lazy-object-proxy         1.3.1            py36h470a237_0    conda-forge
libffi                    3.2.1                hfc679d8_4    conda-forge
libgcc-ng                 7.2.0                hdf63c60_3    conda-forge
libgfortran-ng            7.2.0                hdf63c60_3    conda-forge
libiconv                  1.15                 h470a237_2    conda-forge
libopenblas               0.2.20               h9ac9557_7  
libpng                    1.6.35               ha92aebf_0    conda-forge
libsodium                 1.0.16                        0    conda-forge
libstdcxx-ng              7.2.0                hdf63c60_3    conda-forge
libxcb                    1.13                 h470a237_2    conda-forge
libxml2                   2.9.3                         1    dlr-sc
Logbook                   1.4.0                     <pip>
markupsafe                1.0              py36h470a237_1    conda-forge
mccabe                    0.6.1                      py_1    conda-forge
mistune                   0.8.3            py36h470a237_2    conda-forge
nbconvert                 5.3.1                      py_1    conda-forge
nbformat                  4.4.0                      py_1    conda-forge
ncurses                   6.1                  hfc679d8_1    conda-forge
numpy                     1.14.3           py36h28100ab_1  
numpy-base                1.14.3           py36h0ea5e3f_1  
numpydoc                  0.8.0                      py_1    conda-forge
oce                       0.18.2               h49dc8cd_2    oce
openssl                   1.0.2o               h470a237_1    conda-forge
packaging                 17.1                       py_0    conda-forge
pandoc                    2.2.2                         1    conda-forge
pandocfilters             1.4.2                      py_1    conda-forge
parso                     0.3.1                      py_0    conda-forge
pcre                      8.41                 h470a237_2    conda-forge
pexpect                   4.6.0                    py36_0    conda-forge
pickleshare               0.7.4                    py36_0    conda-forge
pip                       18.0                     py36_1    conda-forge
prompt_toolkit            1.0.15                     py_1    conda-forge
psutil                    5.4.7            py36h470a237_1    conda-forge
pthread-stubs             0.4                  h470a237_1    conda-forge
ptyprocess                0.6.0                    py36_0    conda-forge
pycodestyle               2.4.0                      py_1    conda-forge
pycparser                 2.18                       py_1    conda-forge
pyflakes                  2.0.0                      py_0    conda-forge
pygments                  2.2.0                      py_1    conda-forge
pylint                    2.1.1                    py36_0    conda-forge
pyopenssl                 18.0.0                   py36_0    conda-forge
pyparsing                 2.2.0                      py_1    conda-forge
pyqt                      5.6.0            py36h8210e8a_7    conda-forge
pyqtgraph                 0.10.0                     py_3    conda-forge
pysocks                   1.6.8                    py36_2    conda-forge
python                    3.6.6                h5001a0f_0    conda-forge
python-dateutil           2.7.3                      py_0    conda-forge
pythonocc-core            0.18.1          py36hdfe9f0f_110    pythonocc
pytz                      2018.5                     py_0    conda-forge
pyzmq                     17.1.2           py36hae99301_0    conda-forge
qt                        5.6.2                         3    conda-forge
qtawesome                 0.4.4              pyh8a2030e_1    conda-forge
qtconsole                 4.4.1                    py36_1    conda-forge
qtpy                      1.5.0              pyh8a2030e_0    conda-forge
readline                  7.0                  haf1bffa_1    conda-forge
requests                  2.19.1                   py36_1    conda-forge
rope                      0.10.7                     py_1    conda-forge
setuptools                40.2.0                   py36_0    conda-forge
simplegeneric             0.8.1                      py_1    conda-forge
sip                       4.18.1           py36hfc679d8_0    conda-forge
six                       1.11.0                   py36_1    conda-forge
smesh                     6.7.5                         0    pythonocc
snowballstemmer           1.2.1                      py_1    conda-forge
sphinx                    1.7.5                    py36_0    conda-forge
sphinxcontrib-websupport  1.0.1                    py36_0    conda-forge
spyder                    3.2.8                    py36_0    conda-forge
sqlite                    3.24.0               h2f33b56_0    conda-forge
tbb                       2017_20170226                 0    conda-forge
testpath                  0.3.1                    py36_1    conda-forge
tk                        8.6.8                         0    conda-forge
tornado                   5.1              py36h470a237_1    conda-forge
traitlets                 4.3.2                    py36_0    conda-forge
typed-ast                 1.1.0                    py36_0    conda-forge
urllib3                   1.23                     py36_1    conda-forge
wcwidth                   0.1.7                      py_1    conda-forge
webencodings              0.5.1                      py_1    conda-forge
wheel                     0.31.1                   py36_1    conda-forge
wrapt                     1.10.11                  py36_0    conda-forge
xorg-libxau               1.0.8                h470a237_6    conda-forge
xorg-libxdmcp             1.1.2                h470a237_7    conda-forge
xz                        5.2.4                h470a237_1    conda-forge
zeromq                    4.2.5                hfc679d8_5    conda-forge
zlib                      1.2.11               h470a237_3    conda-forge
$ gdb -args python run.py
GNU gdb (GDB) Fedora 8.1.1-3.fc28
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python...done.
(gdb) run
Starting program: /home/lorenzn/tools/miniconda3/envs/cqgui/bin/python run.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffbecd2700 (LWP 22285)]
[New Thread 0x7fffbc4d1700 (LWP 22286)]
[New Thread 0x7fffb9cd0700 (LWP 22287)]
[Thread 0x7fffb9cd0700 (LWP 22287) exited]
[Thread 0x7fffbc4d1700 (LWP 22286) exited]
[Thread 0x7fffbecd2700 (LWP 22285) exited]
Detaching after fork from child process 22288.
Detaching after fork from child process 22289.
INFO:OCC.Display.backend:backend loaded: qt-pyqt5
Detaching after fork from child process 22290.
[New Thread 0x7fffb9cd0700 (LWP 22292)]
[New Thread 0x7fffbc4d1700 (LWP 22293)]

Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x0000000000001300 in ?? ()
(gdb) bt
#0  0x0000000000001300 in ?? ()
#1  0x00007ffff7de551a in call_init (l=<optimized out>, argc=argc@entry=2, argv=argv@entry=0x7fffffffd338, 
    env=env@entry=0x1693b00) at dl-init.c:72
#2  0x00007ffff7de5616 in call_init (env=0x1693b00, argv=0x7fffffffd338, argc=2, l=<optimized out>) at dl-init.c:30
#3  _dl_init (main_map=main_map@entry=0x25744d0, argc=2, argv=0x7fffffffd338, env=0x1693b00) at dl-init.c:119
#4  0x00007ffff7de97bf in dl_open_worker (a=a@entry=0x7fffffffc290) at dl-open.c:511
#5  0x00007ffff6a4dc4f in __GI__dl_catch_exception (exception=<optimized out>, operate=<optimized out>, 
    args=<optimized out>) at dl-error-skeleton.c:196
#6  0x00007ffff7de9037 in _dl_open (file=0x25702a8 "libgnomevfs-2.so.0", mode=-2147483647, 
    caller_dlopen=0x7fffe96eb750, nsid=<optimized out>, argc=2, argv=0x7fffffffd338, env=0x1693b00) at dl-open.c:594
#7  0x00007ffff7477006 in dlopen_doit (a=a@entry=0x7fffffffc4c0) at dlopen.c:66
#8  0x00007ffff6a4dc4f in __GI__dl_catch_exception (exception=exception@entry=0x7fffffffc460, 
    operate=<optimized out>, args=<optimized out>) at dl-error-skeleton.c:196
#9  0x00007ffff6a4dcdf in __GI__dl_catch_error (objname=0x64ac10, errstring=0x64ac18, mallocedp=0x64ac08, 
    operate=<optimized out>, args=<optimized out>) at dl-error-skeleton.c:215
#10 0x00007ffff7477725 in _dlerror_run (operate=operate@entry=0x7ffff7476fb0 <dlopen_doit>, 
    args=args@entry=0x7fffffffc4c0) at dlerror.c:162
#11 0x00007ffff7477096 in __dlopen (file=<optimized out>, mode=<optimized out>) at dlopen.c:87
#12 0x00007fffe96eb750 in ?? ()
   from /home/lorenzn/tools/miniconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Core.so.5
#13 0x00007fffe96e38eb in QLibrary::load() ()
   from /home/lorenzn/tools/miniconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Core.so.5
#14 0x00007fffe96e3db8 in QLibrary::resolve(char const*) ()
   from /home/lorenzn/tools/miniconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Core.so.5
#15 0x00007fffe96e6858 in QLibrary::resolve(QString const&, int, char const*) ()
   from /home/lorenzn/tools/miniconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Core.so.5
#16 0x00007fffe2fbba3f in ?? ()
   from /home/lorenzn/tools/miniconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Widgets.so.5
#17 0x00007fffe2fb85ba in ?? ()
   from /home/lorenzn/tools/miniconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Widgets.so.5
#18 0x00007fffe2f4159d in QStyleFactory::create(QString const&) ()
   from /home/lorenzn/tools/miniconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Widgets.so.5
#19 0x00007fffe2ed96f4 in QApplication::style() ()
   from /home/lorenzn/tools/miniconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Widgets.so.5
#20 0x00007fffe2ed9955 in QApplicationPrivate::initialize() ()
   from /home/lorenzn/tools/miniconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Widgets.so.5
#21 0x00007fffe2ed99a4 in QApplicationPrivate::init() ()
   from /home/lorenzn/tools/miniconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Widgets.so.5
#22 0x00007fffe35d87f9 in sipQApplication::sipQApplication(int&, char**, int) ()
   from /home/lorenzn/tools/miniconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/QtWidgets.so
#23 0x00007fffe35d88c9 in init_type_QApplication ()
   from /home/lorenzn/tools/miniconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/QtWidgets.so
#24 0x00007fffe5c8ef5b in ?? () from /home/lorenzn/tools/miniconda3/envs/cqgui/lib/python3.6/site-packages/sip.so
#25 0x00007ffff797ced3 in type_call (type=<optimized out>, type@entry=0x7489e8, args=args@entry=0x7ffff7e74390, 
    kwds=kwds@entry=0x7ffff7f09510) at Objects/typeobject.c:915
#26 0x00007ffff790b9cb in _PyObject_FastCallDict (func=func@entry=0x7489e8, args=args@entry=0x6b2138, 
    nargs=nargs@entry=1, kwargs=kwargs@entry=0x7ffff7f09510) at Objects/abstract.c:2331
#27 0x00007ffff790be2e in _PyObject_FastCallKeywords (func=0x7489e8, stack=0x6b2138, nargs=1, 
    kwnames=<optimized out>) at Objects/abstract.c:2496
#28 0x00007ffff79fe208 in call_function (pp_stack=pp_stack@entry=0x7fffffffcbe0, oparg=oparg@entry=2, 
    kwnames=kwnames@entry=0x7fffe9e991d0) at Python/ceval.c:4854
#29 0x00007ffff7a03184 in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>)
    at Python/ceval.c:3344
#30 0x00007ffff79fd730 in _PyFunction_FastCall (co=<optimized out>, args=<optimized out>, nargs=0, 
    globals=<optimized out>) at Python/ceval.c:4912
#31 0x00007ffff79fe654 in fast_function (kwnames=0x0, nargs=<optimized out>, stack=<optimized out>, 
    func=0x7fffe9e8cea0) at Python/ceval.c:4947
---Type <return> to continue, or q <return> to quit---
#32 call_function (pp_stack=pp_stack@entry=0x7fffffffce10, oparg=oparg@entry=0, kwnames=kwnames@entry=0x0)
    at Python/ceval.c:4851
#33 0x00007ffff7a0271c in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>)
    at Python/ceval.c:3328
#34 0x00007ffff79fe09e in _PyEval_EvalCodeWithName (_co=_co@entry=0x7ffff7f049c0, 
    globals=globals@entry=0x7ffff7f451b0, locals=locals@entry=0x7ffff7f451b0, args=args@entry=0x0, 
    argcount=argcount@entry=0, kwnames=kwnames@entry=0x0, kwargs=kwargs@entry=0x0, kwcount=kwcount@entry=0, 
    kwstep=kwstep@entry=2, defs=defs@entry=0x0, defcount=defcount@entry=0, kwdefs=kwdefs@entry=0x0, 
    closure=closure@entry=0x0, name=name@entry=0x0, qualname=qualname@entry=0x0) at Python/ceval.c:4159
#35 0x00007ffff79fe6cd in PyEval_EvalCodeEx (_co=_co@entry=0x7ffff7f049c0, globals=globals@entry=0x7ffff7f451b0, 
    locals=locals@entry=0x7ffff7f451b0, args=args@entry=0x0, argcount=argcount@entry=0, kws=kws@entry=0x0, 
    kwcount=kwcount@entry=0, defs=defs@entry=0x0, defcount=defcount@entry=0, kwdefs=kwdefs@entry=0x0, 
    closure=closure@entry=0x0) at Python/ceval.c:4180
#36 0x00007ffff79fe71b in PyEval_EvalCode (co=co@entry=0x7ffff7f049c0, globals=globals@entry=0x7ffff7f451b0, 
    locals=locals@entry=0x7ffff7f451b0) at Python/ceval.c:731
#37 0x00007ffff7a3a0a2 in run_mod (arena=0x7ffff7f61078, flags=0x7fffffffd120, locals=0x7ffff7f451b0, 
    globals=0x7ffff7f451b0, filename=0x7ffff7e83260, mod=0x640628) at Python/pythonrun.c:1025
#38 PyRun_FileExFlags (fp=fp@entry=0x69b370, filename_str=filename_str@entry=0x7ffff7f60078 "run.py", 
    start=start@entry=257, globals=globals@entry=0x7ffff7f451b0, locals=locals@entry=0x7ffff7f451b0, 
    closeit=closeit@entry=1, flags=flags@entry=0x7fffffffd120) at Python/pythonrun.c:978
#39 0x00007ffff7a3a207 in PyRun_SimpleFileExFlags (fp=fp@entry=0x69b370, filename=<optimized out>, 
    closeit=closeit@entry=1, flags=flags@entry=0x7fffffffd120) at Python/pythonrun.c:420
#40 0x00007ffff7a3a6a3 in PyRun_AnyFileExFlags (fp=fp@entry=0x69b370, filename=<optimized out>, 
    closeit=closeit@entry=1, flags=flags@entry=0x7fffffffd120) at Python/pythonrun.c:81
#41 0x00007ffff7a566fd in run_file (p_cf=0x7fffffffd120, filename=0x6036e0 L"run.py", fp=0x69b370)
    at Modules/main.c:340
#42 Py_Main (argc=argc@entry=2, argv=argv@entry=0x602260) at Modules/main.c:810
#43 0x0000000000400bbc in main (argc=2, argv=<optimized out>) at ./Programs/python.c:69

Crash at start

After downloaded the last release, extracted the archive and ran ./CQ-editor, I get the following error:

[11718] mod is NULL - structTraceback (most recent call last):
  File "/home/adam/anaconda2/envs/cgqui4/lib/python3.6/struct.py", line 14, in <module>
ImportError: cannot import name '_clearcache'
[11718] mod is NULL - pyimod02_archiveTraceback (most recent call last):
  File "/home/adam/anaconda2/envs/cgqui4/lib/python3.6/site-packages/PyInstaller/loader/pyimod02_archive.py", line 28, in <module>
ModuleNotFoundError: No module named 'struct'
[11718] mod is NULL - pyimod03_importersTraceback (most recent call last):
  File "/home/adam/anaconda2/envs/cgqui4/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 24, in <module>
ModuleNotFoundError: No module named 'pyimod02_archive'
Traceback (most recent call last):
  File "site-packages/PyInstaller/loader/pyiboot01_bootstrap.py", line 15, in <module>
ModuleNotFoundError: No module named 'pyimod03_importers'
[11718] Failed to execute script pyiboot01_bootstrap

CadQuery syntax highlighting

syntax highlighting is a very handy feature on many IDEs and is partially supported in CQ-editor (well done!).

It could be even better if CadQuery's builtin functions (Workplane, box, center, hole, etc. - basically all what is listed in the CadQuery Class reference) were rendered with a different color, or maybe with several colors (but not too many), in order to distinguish Core classes, Selector Classes, etc.

Segmentation Fault on First Run

I followed the instructions to set the conda environment up, verified that it was the active one, and tried to run CQ-editor. I immediately get a seg fault.

Segmentation fault (core dumped)

There's no way to know where it comes from based on that message, but I've gotten a lot of seg faults with FreeCAD over the years.

I'm running Ubuntu 17.10 64-bit

Keystrokes Ignored in Editor

I can open the script and highlight a line with the mouse, but no keystrokes seem to make it into the editor, not even arrow key presses. I haven't had this issue before with CQ-editor.

Ubuntu 18.04 64-bit, latest master of CQ-editor, CadQuery master installed via pip.

Make CQ models in Objects panel multi selectable

Currently when having multiple objects in a single cadquery script you have to export them one after the other. This is where a multi select could really help. Users could very easily export all or any subset of the models easily. Also export STEP is misspelled as export SETP.

How to animate object?

When I try animate this - CQ-editor(or CQ) give too many objects. Although I assumed there would be an animation of box.
import cadquery as cq
t =3
while t<=10:
result = cq.Workplane("XY" ).box(t, t, t).edges("|Z").fillet((t**(1/2))/2)
show_object(result)
t = t + 0.1
How can i implement this?
Is it possible to animate the kinematic slice operation? I want to write programs for CNC for multi-axis processing.

Keep current scaling of the view the same when rendering part

When rendering a script the window will automatically scale so the part fits in the window. This is very annoying when working on a specific detail of the part and want to observe the changes closely when re rendering. The viewing angle is preserved.

CQGI debug() colors

As a beginner, I would like to understand what is in the object stack and what I select. As far as I understand, the debug() is here for that purpose.

When executing the CQGI script example, provided in the documentation:

base_cube = cq.Workplane('XY').rect(1.0,1.0).extrude(1.0)
top_of_cube_plane = base_cube.faces(">Z").workplane()
debug(top_of_cube_plane, { 'color': 'yellow', } )
debug(top_of_cube_plane.center, { 'color' : 'blue' } )

circle=top_of_cube_plane.circle(0.5)
debug(circle, { 'color': 'red' } )

show_object( circle.extrude(1.0) )

I get this error:

TypeError: () takes one positional argument but 2 were given

Is CQGI not yet fully implemented in CadQuery Editor, or I missed something?

Mac installation problem

Someone I know introduced me to CadQuery, so I am trying to install it for myself on my Mac.
I installed Miniconda and installed CadQuery with this command:
conda install -c conda-forge -c cadquery cadquery=2
Installation was fine, but when I try to install CQ-editor, I get this error...

Command: conda install -c cadquery cq-editor

Collecting package metadata (current_repodata.json): done
Solving environment: failed with current_repodata.json, will retry with next repodata source.
Initial quick solve with frozen env failed. Unfreezing env and trying again.
Solving environment: failed with current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed
Initial quick solve with frozen env failed. Unfreezing env and trying again.
Solving environment: failed`

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Package pyqtgraph conflicts for:
cq-editor -> pyqtgraph=0.10.0
Package logbook conflicts for:
cq-editor -> logbook
Package pyparsing conflicts for:
cq-editor -> pyparsing
Package pip conflicts for:
python=3.6 -> pip
Package xz conflicts for:
python=3.6 -> xz[version='>=5.2.3,<6.0a0|>=5.2.4,<6.0a0']
Package libcxx conflicts for:
python=3.6 -> libcxx[version='>=4.0.1']
Package libffi conflicts for:
python=3.6 -> libffi[version='3.2.|>=3.2.1,<4.0a0']
Package cadquery conflicts for:
cq-editor -> cadquery=2
Package openssl conflicts for:
python=3.6 -> openssl[version='1.0.
|1.0.,>=1.0.2l,<1.0.3a|>=1.0.2m,<1.0.3a|>=1.0.2n,<1.0.3a|>=1.0.2o,<1.0.3a|>=1.1.1a,<1.1.2a']
Package spyder conflicts for:
cq-editor -> spyder=3.3.4
Package qtconsole conflicts for:
cq-editor -> qtconsole=4.4.4
Package pyqt conflicts for:
cq-editor -> pyqt=5.9.2
Package requests conflicts for:
cq-editor -> requests
Package tk conflicts for:
python=3.6 -> tk[version='8.6.
|>=8.6.7,<8.7.0a0|>=8.6.8,<8.7.0a0']
Package readline conflicts for:
python=3.6 -> readline[version='7.*|>=7.0,<8.0a0']
Package sqlite conflicts for:
python=3.6 -> sqlite[version='>=3.20.1,<4.0a0|>=3.22.0,<4.0a0|>=3.23.1,<4.0a0|>=3.24.0,<4.0a0|>=3.25.2,<4.0a0|>=3.26.0,<4.0a0']
Package zlib conflicts for:
python=3.6 -> zlib[version='>=1.2.11,<1.3.0a0']
Package path.py conflicts for:
cq-editor -> path.py
Package ncurses conflicts for:
python=3.6 -> ncurses[version='>=6.0,<7.0a0|>=6.1,<7.0a0']

Not sure how to go about dealing with this problem

Workplane can not be stored for later use

I finally got CQ-editor to work after completely reinstalling anaconda. I have been testing out parts i have allready made and almost none of them work. One of the main culprits is that I store workplanes for later use, in FreeCAD with cadquery this allowed me to modify the part using that stored workplane. However cadquery with CQ-editor creates a new part and doesn't modify the original. Which means this technique doesn't work.

See this example:

import cadquery as cq
result = cq.Workplane("XY" )\
    .box(10, 10, 1)

top_workplane = result.faces(">Z").workplane()

top_workplane.transformed(
        rotate = (0, 0, 0)
    )\
    .transformed(
        offset = (0, 3, 0),
    )\
    .rect(1, 1)\
    .cutThruAll()
    
top_workplane.transformed(
        rotate = (0, 0, 120)
    )\
    .transformed(
        offset = (0, 3, 0),
    )\
    .rect(1, 1)\
    .cutThruAll()
    
top_workplane.transformed(
        rotate = (0, 0, 240)
    )\
    .transformed(
        offset = (0, 3, 0),
    )\
    .rect(1, 1)\
    .cutThruAll()

show_object(result)

In this part I store the top workplane and use that workplane to go to three different locations and cut a rectangle out of the box. In FreeCAD this works and I get the expected part. in CQ-editor the result part is not modified and thus the created holes are not shown.

see the attached image of FreeCAD and CQ-editor for the difference.

CQ-editor

FreeCAD

Pyinstaller bundle cleanup for 0.1

So far the following issues were discovered

  • get rid of the QCursor: Cannot create bitmap cursor; invalid bitmap(s) warning (NB: this is a pythonocc component).
  • bundle spyder/locale

On linux:

General

  • deprecation warnings due to using OCC i.s.o. OCC.core imports
  • wrong msg formatting in the check CQ updates dialog

Segfault when resizing

CQ-editor seg faults for me when resizing the window. I'm using Ubuntu 18.04.

Output from conda info:

     active environment : cqgui
    active env location : /home/rowangoemans/anaconda3/envs/cqgui
            shell level : 2
       user config file : /home/rowangoemans/.condarc
 populated config files : 
          conda version : 4.6.11
    conda-build version : 3.17.8
         python version : 3.7.3.final.0
       base environment : /home/rowangoemans/anaconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/linux-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/rowangoemans/anaconda3/pkgs
                          /home/rowangoemans/.conda/pkgs
       envs directories : /home/rowangoemans/anaconda3/envs
                          /home/rowangoemans/.conda/envs
               platform : linux-64
             user-agent : conda/4.6.11 requests/2.21.0 CPython/3.7.3 Linux/4.18.0-21-generic ubuntu/18.04.2 glibc/2.27
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False

Output from conda list:

WARNING: The conda.compat module is deprecated and will be removed in a future release.
# packages in environment at /home/rowangoemans/anaconda3/envs/cqgui:
#
# Name                    Version                   Build  Channel
alabaster                 0.7.12                   py36_0  
asn1crypto                0.24.0                   py36_0  
astroid                   2.2.5                    py36_0  
attrs                     19.1.0                   py36_1  
babel                     2.7.0                      py_0  
backcall                  0.1.0                    py36_0  
backports                 1.0                        py_2  
backports.os              0.1.1                    py36_0  
blas                      1.0                         mkl  
bleach                    3.1.0                    py36_0  
ca-certificates           2019.5.15                     0  
cadquery                  0.5-SNAPSHOT             pypi_0    pypi
certifi                   2019.3.9                 py36_0  
cffi                      1.12.3           py36h2e261b9_0  
chardet                   3.0.4                    py36_1  
cloudpickle               1.1.1                      py_0  
cryptography              2.7              py36h1ba5d50_0  
dbus                      1.13.6               h746ee38_0  
decorator                 4.4.0                    py36_1  
defusedxml                0.6.0                      py_0  
docutils                  0.14                     py36_0  
entrypoints               0.3                      py36_0  
expat                     2.2.6                he6710b0_0  
fontconfig                2.13.0               h9420a91_0  
freeimageplus             3.17.0                        0    CadQuery
freetype                  2.9.1                h8a8886c_1  
glib                      2.56.2               hd408876_0  
gmp                       6.1.2                h6c8ec71_1  
gst-plugins-base          1.14.0               hbbd80ab_1  
gstreamer                 1.14.0               hb453b48_1  
icu                       58.2                 h9c2bf20_1  
idna                      2.8                      py36_0  
imagesize                 1.1.0                    py36_0  
importlib_metadata        0.17                     py36_1  
intel-openmp              2019.4                      243  
ipykernel                 5.1.1            py36h39e3cac_0  
ipython                   7.5.0            py36h39e3cac_0  
ipython_genutils          0.2.0                    py36_0  
isort                     4.3.20                   py36_0  
jedi                      0.13.3                   py36_0  
jeepney                   0.4                      py36_0  
jinja2                    2.10.1                   py36_0  
jpeg                      9b                   h024ee3a_2  
jsonschema                3.0.1                    py36_0  
jupyter_client            5.2.4                    py36_0  
jupyter_core              4.4.0                    py36_0  
keyring                   18.0.0                   py36_0  
lazy-object-proxy         1.4.1            py36h7b6447c_0  
libedit                   3.1.20181209         hc058e9b_0  
libffi                    3.2.1                hd88cf55_4  
libgcc-ng                 9.1.0                hdf63c60_0  
libgfortran-ng            7.3.0                hdf63c60_0  
libpng                    1.6.37               hbc83047_0  
libsodium                 1.0.16               h1bed415_0  
libstdcxx-ng              9.1.0                hdf63c60_0  
libuuid                   1.0.3                h1bed415_2  
libxcb                    1.13                 h1bed415_1  
libxml2                   2.9.9                he19cac6_0  
logbook                   1.4.3            py36h516909a_0    conda-forge
markupsafe                1.1.1            py36h7b6447c_0  
mccabe                    0.6.1                    py36_1  
mistune                   0.8.4            py36h7b6447c_0  
mkl                       2019.4                      243  
mkl_fft                   1.0.12           py36ha843d7b_0  
mkl_random                1.0.2            py36hd81dba3_0  
nbconvert                 5.5.0                      py_0  
nbformat                  4.4.0                    py36_0  
ncurses                   6.1                  he6710b0_1  
numpy                     1.16.4           py36h7e9f1db_0  
numpy-base                1.16.4           py36hde5b4d6_0  
numpydoc                  0.9.1                      py_0  
oce                       0.18.2                        0    CadQuery
openssl                   1.1.1c               h7b6447c_1  
packaging                 19.0                     py36_0  
pandoc                    2.2.3.2                       0  
pandocfilters             1.4.2                    py36_1  
parso                     0.4.0                      py_0  
path.py                   12.0.1                     py_0  
pcre                      8.43                 he6710b0_0  
pexpect                   4.7.0                    py36_0  
pickleshare               0.7.5                    py36_0  
pip                       19.1.1                   py36_0  
prompt_toolkit            2.0.9                    py36_0  
psutil                    5.6.2            py36h7b6447c_0  
ptyprocess                0.6.0                    py36_0  
pycodestyle               2.5.0                    py36_0  
pycparser                 2.19                     py36_0  
pyflakes                  2.1.1                    py36_0  
pygments                  2.4.2                      py_0  
pylint                    2.3.1                    py36_0  
pyopenssl                 19.0.0                   py36_0  
pyparsing                 2.4.0                      py_0  
pyqt                      5.9.2            py36h05f1152_2  
pyqtgraph                 0.10.0           py36h28b3542_3  
pyrsistent                0.14.11          py36h7b6447c_0  
pysocks                   1.7.0                    py36_0  
python                    3.6.8                h0371630_0  
python-dateutil           2.8.0                    py36_0  
pythonocc-core            0.18.2           py36h39e3cac_0    CadQuery
pytz                      2019.1                     py_0  
pyzmq                     18.0.0           py36he6710b0_0  
qt                        5.9.7                h5867ecd_1  
qtawesome                 0.5.7                    py36_1  
qtconsole                 4.4.4                      py_0  
qtpy                      1.7.1                      py_0  
readline                  7.0                  h7b6447c_5  
requests                  2.22.0                   py36_0  
rope                      0.14.0                     py_0  
secretstorage             3.1.1                    py36_0  
setuptools                41.0.1                   py36_0  
sip                       4.19.8           py36hf484d3e_0  
six                       1.12.0                   py36_0  
snowballstemmer           1.2.1                    py36_0  
sphinx                    2.1.0                      py_0  
sphinxcontrib-applehelp   1.0.1                      py_0  
sphinxcontrib-devhelp     1.0.1                      py_0  
sphinxcontrib-htmlhelp    1.0.2                      py_0  
sphinxcontrib-jsmath      1.0.1                      py_0  
sphinxcontrib-qthelp      1.0.2                      py_0  
sphinxcontrib-serializinghtml 1.1.3                      py_0  
spyder                    3.3.4                    py36_0  
spyder-kernels            0.4.4                    py36_0  
sqlite                    3.28.0               h7b6447c_0  
tbb                       2019.4               hfd86e86_0  
testpath                  0.4.2                    py36_0  
tk                        8.6.8                hbc83047_0  
tornado                   6.0.2            py36h7b6447c_0  
traitlets                 4.3.2                    py36_0  
typed-ast                 1.3.4            py36h7b6447c_0  
urllib3                   1.24.2                   py36_0  
wcwidth                   0.1.7                    py36_0  
webencodings              0.5.1                    py36_1  
wheel                     0.33.4                   py36_0  
wrapt                     1.11.1           py36h7b6447c_0  
wurlitzer                 1.0.2                    py36_0  
xz                        5.2.4                h14c3975_4  
zeromq                    4.3.1                he6710b0_3  
zipp                      0.5.1                      py_0  
zlib                      1.2.11               h7b6447c_3  

GDB backtrace:

$ gdb --args python run.py
GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python...done.
(gdb) run
Starting program: /home/rowangoemans/anaconda3/envs/cqgui/bin/python run.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff01b7700 (LWP 2806)]
[New Thread 0x7fffef180700 (LWP 2807)]
/home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/OCC/AIS.py:3: DeprecationWarning: OCC.AIS is deprecated since pythonocc-0.18.2. Use OCC.Core.AIS
  warnings.warn("OCC.AIS is deprecated since pythonocc-0.18.2. Use OCC.Core.AIS", DeprecationWarning)
/home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/OCC/Quantity.py:3: DeprecationWarning: OCC.Quantity is deprecated since pythonocc-0.18.2. Use OCC.Core.Quantity
  warnings.warn("OCC.Quantity is deprecated since pythonocc-0.18.2. Use OCC.Core.Quantity", DeprecationWarning)
/home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/OCC/Geom.py:3: DeprecationWarning: OCC.Geom is deprecated since pythonocc-0.18.2. Use OCC.Core.Geom
  warnings.warn("OCC.Geom is deprecated since pythonocc-0.18.2. Use OCC.Core.Geom", DeprecationWarning)
/home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/OCC/gp.py:3: DeprecationWarning: OCC.gp is deprecated since pythonocc-0.18.2. Use OCC.Core.gp
  warnings.warn("OCC.gp is deprecated since pythonocc-0.18.2. Use OCC.Core.gp", DeprecationWarning)
/home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/OCC/BRepBuilderAPI.py:3: DeprecationWarning: OCC.BRepBuilderAPI is deprecated since pythonocc-0.18.2. Use OCC.Core.BRepBuilderAPI
  warnings.warn("OCC.BRepBuilderAPI is deprecated since pythonocc-0.18.2. Use OCC.Core.BRepBuilderAPI", DeprecationWarning)
/home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/qtconsole/jupyter_widget.py:561: DeprecationWarning: ConsoleWidget._style_sheet_changed is deprecated in traitlets 4.1: use @observe and @unobserve instead.
  def _style_sheet_changed(self):
/home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/jupyter_client/session.py:371: DeprecationWarning: Session._key_changed is deprecated in traitlets 4.1: use @observe and @unobserve instead.
  def _key_changed(self):
/home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/ipykernel/datapub.py:5: DeprecationWarning: ipykernel.datapub is deprecated. It has moved to ipyparallel.datapub
  warnings.warn("ipykernel.datapub is deprecated. It has moved to ipyparallel.datapub", DeprecationWarning)
/home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/ipykernel/serialize.py:7: DeprecationWarning: ipykernel.serialize is deprecated. It has moved to ipyparallel.serialize
  warnings.warn("ipykernel.serialize is deprecated. It has moved to ipyparallel.serialize", DeprecationWarning)
/home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/ipykernel/pickleutil.py:8: DeprecationWarning: ipykernel.pickleutil is deprecated. It has moved to ipyparallel.
  warnings.warn("ipykernel.pickleutil is deprecated. It has moved to ipyparallel.", DeprecationWarning)
/home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/ipykernel/codeutil.py:17: DeprecationWarning: ipykernel.codeutil is deprecated since IPykernel 4.3.1. It has moved to ipyparallel.serialize
  warnings.warn("ipykernel.codeutil is deprecated since IPykernel 4.3.1. It has moved to ipyparallel.serialize", DeprecationWarning)
[New Thread 0x7fffad74e700 (LWP 2813)]
/home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/ipykernel/iostream.py:66: DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops.
  self.io_loop = IOLoop(make_current=False)
[New Thread 0x7fffacf0d700 (LWP 2814)]
[New Thread 0x7fffa7fff700 (LWP 2815)]
[New Thread 0x7fffa77fe700 (LWP 2816)]
/home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/jupyter_client/session.py:803: DeprecationWarning: Accessing zmq Socket attribute recv_multipart on BackgroundSocket
  msg_list = socket.recv_multipart(mode, copy=copy)
Namespace(filename=None)
Layer manager created
Layer dimensions: 640, 480

Thread 1 "ZMQbg/1" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) backtrace
#0  0x0000000000000000 in ?? ()
#1  0x00007ffff55cca19 in QOpenGLContext::makeCurrent(QSurface*) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Gui.so.5
#2  0x00007fffba2931c3 in QGLContext::makeCurrent() () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5OpenGL.so.5
#3  0x00007fffba299666 in QGLWidget::resizeEvent(QResizeEvent*) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5OpenGL.so.5
#4  0x00007fffba2d879f in meth_QGLWidget_resizeEvent () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/QtOpenGL.so
#5  0x0000555555665681 in _PyCFunction_FastCallDict () at /tmp/build/80754af9/python_1546130271559/work/Objects/methodobject.c:234
#6  0x00005555556ec42c in call_function () at /tmp/build/80754af9/python_1546130271559/work/Python/ceval.c:4851
#7  0x000055555571138a in _PyEval_EvalFrameDefault () at /tmp/build/80754af9/python_1546130271559/work/Python/ceval.c:3335
#8  0x00005555556e5a76 in _PyEval_EvalCodeWithName () at /tmp/build/80754af9/python_1546130271559/work/Python/ceval.c:4166
#9  0x00005555556e6c4c in _PyFunction_FastCallDict () at /tmp/build/80754af9/python_1546130271559/work/Python/ceval.c:5084
#10 0x0000555555665b0f in _PyObject_FastCallDict () at /tmp/build/80754af9/python_1546130271559/work/Objects/abstract.c:2310
#11 0x000055555566a6a3 in _PyObject_Call_Prepend () at /tmp/build/80754af9/python_1546130271559/work/Objects/abstract.c:2373
#12 0x000055555566554e in PyObject_Call () at /tmp/build/80754af9/python_1546130271559/work/Objects/abstract.c:2261
#13 0x00007ffff197d6ab in ?? () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/sip.so
#14 0x00007ffff197d772 in ?? () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/sip.so
#15 0x00007fffba2d9b5d in sipVH_QtOpenGL_20(PyGILState_STATE, void (*)(_sipSimpleWrapper*, PyGILState_STATE), _sipSimpleWrapper*, _object*, QResizeEvent*) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/QtOpenGL.so
#16 0x00007fffba2d864b in sipQGLWidget::resizeEvent(QResizeEvent*) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/QtOpenGL.so
#17 0x00007ffff5a1b7ba in QWidget::event(QEvent*) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Widgets.so.5
#18 0x00007fffba2d7853 in sipQGLWidget::event(QEvent*) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/QtOpenGL.so
#19 0x00007ffff59f0ca0 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Widgets.so.5
#20 0x00007ffff59f6b19 in QApplication::notify(QObject*, QEvent*) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Widgets.so.5
#21 0x00007ffff5f1da7e in sipQApplication::notify(QObject*, QEvent*) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/QtWidgets.so
#22 0x00007ffff524e28a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Core.so.5
#23 0x00007ffff5a15811 in QWidgetPrivate::setGeometry_sys(int, int, int, int, bool) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Widgets.so.5
#24 0x00007ffff5a160bf in QWidget::setGeometry(QRect const&) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Widgets.so.5
#25 0x00007ffff5a1ac86 in ?? () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Widgets.so.5
#26 0x00007ffff5a1c9ea in QWidget::qt_metacall(QMetaObject::Call, int, void**) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Widgets.so.5
#27 0x00007fffba2ae51f in QGLWidget::qt_metacall(QMetaObject::Call, int, void**) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5OpenGL.so.5
#28 0x00007fffba2d6511 in sipQGLWidget::qt_metacall(QMetaObject::Call, int, void**) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/QtOpenGL.so
#29 0x00007ffff5130bf8 in ?? () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Core.so.5
#30 0x00007ffff512ea48 in ?? () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Core.so.5
#31 0x00007ffff512ed4c in ?? () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Core.so.5
#32 0x00007ffff51312c4 in QPropertyAnimation::updateState(QAbstractAnimation::State, QAbstractAnimation::State) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Core.so.5
#33 0x00007ffff512d2d1 in ?? () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Core.so.5
#34 0x00007ffff5a8ba2f in ?? () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Widgets.so.5
#35 0x00007ffff5ab4ed1 in ?? () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Widgets.so.5
#36 0x00007ffff5ad1f4b in ?? () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Widgets.so.5
#37 0x00007ffff5ad32c6 in ?? () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Widgets.so.5
#38 0x00007ffff5a03931 in QLayoutPrivate::doResize(QSize const&) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Widgets.so.5
#39 0x00007ffff59f0c85 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Widgets.so.5
#40 0x00007ffff59f6b19 in QApplication::notify(QObject*, QEvent*) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Widgets.so.5
#41 0x00007ffff5f1da7e in sipQApplication::notify(QObject*, QEvent*) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/QtWidgets.so
#42 0x00007ffff524e28a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Core.so.5
#43 0x00007ffff5a29b4f in ?? () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Widgets.so.5
#44 0x00007ffff5a2bc2e in ?? () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Widgets.so.5
#45 0x00007ffff59f0ca0 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Widgets.so.5
#46 0x00007ffff59f6b19 in QApplication::notify(QObject*, QEvent*) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Widgets.so.5
#47 0x00007ffff5f1da7e in sipQApplication::notify(QObject*, QEvent*) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/QtWidgets.so
#48 0x00007ffff524e28a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Core.so.5
#49 0x00007ffff55ac369 in QGuiApplicationPrivate::processGeometryChangeEvent(QWindowSystemInterfacePrivate::GeometryChangeEvent*) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Gui.so.5
#50 0x00007ffff55aef85 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Gui.so.5
#51 0x00007ffff559b4ae in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Gui.so.5
#52 0x00007ffff11a9da0 in ?? () from /home/rowangoemans/anaconda3/envs/cqgui/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#53 0x00007ffff2879af8 in g_main_context_dispatch () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../.././libglib-2.0.so.0
#54 0x00007ffff2879d41 in g_main_context_iterate.isra () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../.././libglib-2.0.so.0
#55 0x00007ffff2879dce in g_main_context_iteration () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../.././libglib-2.0.so.0
#56 0x00007ffff527a8df in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Core.so.5
#57 0x00007ffff524aeb7 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Core.so.5
#58 0x00007ffff524eaab in QCoreApplication::exec() () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/../../../libQt5Core.so.5
#59 0x00007ffff5f1c970 in meth_QApplication_exec_ () from /home/rowangoemans/anaconda3/envs/cqgui/lib/python3.6/site-packages/PyQt5/QtWidgets.so
#60 0x0000555555665681 in _PyCFunction_FastCallDict () at /tmp/build/80754af9/python_1546130271559/work/Objects/methodobject.c:234
#61 0x00005555556ec42c in call_function () at /tmp/build/80754af9/python_1546130271559/work/Python/ceval.c:4851
#62 0x000055555571138a in _PyEval_EvalFrameDefault () at /tmp/build/80754af9/python_1546130271559/work/Python/ceval.c:3335
#63 0x00005555556e653b in _PyFunction_FastCall (globals=<optimized out>, nargs=0, args=<optimized out>, co=<optimized out>) at /tmp/build/80754af9/python_1546130271559/work/Python/ceval.c:4933
#64 fast_function () at /tmp/build/80754af9/python_1546130271559/work/Python/ceval.c:4968
#65 0x00005555556ec505 in call_function () at /tmp/build/80754af9/python_1546130271559/work/Python/ceval.c:4872
#66 0x000055555571138a in _PyEval_EvalFrameDefault () at /tmp/build/80754af9/python_1546130271559/work/Python/ceval.c:3335
#67 0x00005555556e7289 in _PyEval_EvalCodeWithName (qualname=0x0, name=<optimized out>, closure=0x0, kwdefs=0x0, defcount=0, defs=0x0, kwstep=2, kwcount=<optimized out>, kwargs=0x0, kwnames=0x0, argcount=0, args=0x0, locals=0x7ffff7f50168, globals=0x7ffff7f50168, _co=0x7ffff7f0c930)
    at /tmp/build/80754af9/python_1546130271559/work/Python/ceval.c:4166
#68 PyEval_EvalCodeEx () at /tmp/build/80754af9/python_1546130271559/work/Python/ceval.c:4187
#69 0x00005555556e801c in PyEval_EvalCode (co=co@entry=0x7ffff7f0c930, globals=globals@entry=0x7ffff7f50168, locals=locals@entry=0x7ffff7f50168) at /tmp/build/80754af9/python_1546130271559/work/Python/ceval.c:731
#70 0x000055555576a3c4 in run_mod () at /tmp/build/80754af9/python_1546130271559/work/Python/pythonrun.c:1025
#71 0x000055555576a7c1 in PyRun_FileExFlags () at /tmp/build/80754af9/python_1546130271559/work/Python/pythonrun.c:978
#72 0x000055555576a9c3 in PyRun_SimpleFileExFlags () at /tmp/build/80754af9/python_1546130271559/work/Python/pythonrun.c:419
#73 0x000055555576aacd in PyRun_AnyFileExFlags () at /tmp/build/80754af9/python_1546130271559/work/Python/pythonrun.c:81
#74 0x000055555576e4b3 in run_file (p_cf=0x7fffffffdb5c, filename=0x5555558aa7a0 L"run.py", fp=0x5555559568f0) at /tmp/build/80754af9/python_1546130271559/work/Modules/main.c:340
#75 Py_Main () at /tmp/build/80754af9/python_1546130271559/work/Modules/main.c:811
#76 0x000055555563702e in main () at /tmp/build/80754af9/python_1546130271559/work/Programs/python.c:69
#77 0x00007ffff77e6b97 in __libc_start_main (main=0x555555636f40 <main>, argc=2, argv=0x7fffffffdd68, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdd58) at ../csu/libc-start.c:310
#78 0x0000555555717e0e in _start () at ../sysdeps/x86_64/elf/start.S:103
(gdb) 

Allow import of modules in the same directory as the current script

I have some helper scripts that I use for multiple parts and they are in the same directory as my actual part python file. In FreeCAD I can just import that helper script without issue however in the CQ-editor the helper script cannot be imported as it throws a ModuleNotFoundError. I would really like this feature in the CQ-editor

.

Front/Back and Right/Left Views Reversed

I want to make sure this is actually a problem before I put together a PR.

The top and bottom views seem to be reversed, compared to how FreeCAD sets the views. Same thing with the right and left views. Front and back seem to be set as they are in FreeCAD. I'm looking at the origin marker to determine this.

Is this intentional?

Make use of the statusbar

Especially for failed runs it would be useful to have some kind of error displayed on the statusbar

Windows support

Preliminary tests show application can run on windows. There are some glitches regarding icons.

In the end it would be nice to add Windows to Appveyor.

Missing libraries for GTK

I am running this on miniconda on Ubuntu Mate 18.04 and I get the following error together with that the styling of buttons in the application looks odd. Not at all like they do in the screenshot in the readme.

~/c/CQ-editor (master|โœ”) $ python run.py                                                                               (cqgui) 
INFO:OCC.Display.backend:backend loaded: qt-pyqt5
QGtkStyle could not resolve GTK. Make sure you have installed the proper libraries.

Automatic reload and preview Option Scrolls Code Editor Back to the Top on Each Save

When the Automatic reload and preview menu item is checked, clicking save will scroll the contents of the code editor back to the top, no matter how far down the user has scrolled. This causes the user to lose the spot where they were editing the script. I think that this feature really only needs to reload the 3D view, and can leave the code editor window as-is. I believe that when using an external editor would be the only time the code editor would need to reload.

Staying Up To Date

There were changes made recently in CadQuery/cadquery that I would like to have access to. What's the best/proper way to pull the latest changes from the lib into the Conda environment for this UI?

CQ-editor does not start in Windows anymore

Since 5df9a51 CQ-editor does not start in Windows anymore. There are a lot of warnings after starting the editor using python run.py but they do not differ between the previous commit 7ca1b92 except the last additional line Namespace(filename=None):

C:\ProgramData\Miniconda3\envs\cqgui\lib\site-packages\OCC\AIS.py:3: DeprecationWarning: OCC.AIS is deprecated since pythonocc-0.18.2. Use OCC.Core.AIS
  warnings.warn("OCC.AIS is deprecated since pythonocc-0.18.2. Use OCC.Core.AIS", DeprecationWarning)
C:\ProgramData\Miniconda3\envs\cqgui\lib\site-packages\OCC\Quantity.py:3: DeprecationWarning: OCC.Quantity is deprecated since pythonocc-0.18.2. Use OCC.Core.Quantity
  warnings.warn("OCC.Quantity is deprecated since pythonocc-0.18.2. Use OCC.Core.Quantity", DeprecationWarning)
C:\ProgramData\Miniconda3\envs\cqgui\lib\site-packages\OCC\Aspect.py:3: DeprecationWarning: OCC.Aspect is deprecated since pythonocc-0.18.2. Use OCC.Core.Aspect
  warnings.warn("OCC.Aspect is deprecated since pythonocc-0.18.2. Use OCC.Core.Aspect", DeprecationWarning)
C:\ProgramData\Miniconda3\envs\cqgui\lib\site-packages\OCC\Geom.py:3: DeprecationWarning: OCC.Geom is deprecated since pythonocc-0.18.2. Use OCC.Core.Geom
  warnings.warn("OCC.Geom is deprecated since pythonocc-0.18.2. Use OCC.Core.Geom", DeprecationWarning)
C:\ProgramData\Miniconda3\envs\cqgui\lib\site-packages\OCC\gp.py:3: DeprecationWarning: OCC.gp is deprecated since pythonocc-0.18.2. Use OCC.Core.gp
  warnings.warn("OCC.gp is deprecated since pythonocc-0.18.2. Use OCC.Core.gp", DeprecationWarning)
C:\ProgramData\Miniconda3\envs\cqgui\lib\site-packages\OCC\BRepBuilderAPI.py:3: DeprecationWarning: OCC.BRepBuilderAPI is deprecated since pythonocc-0.18.2. Use OCC.Core.BRepBuilderAPI
  warnings.warn("OCC.BRepBuilderAPI is deprecated since pythonocc-0.18.2. Use OCC.Core.BRepBuilderAPI", DeprecationWarning)
Layer manager created
Layer dimensions: 100, 30
C:\ProgramData\Miniconda3\envs\cqgui\lib\site-packages\qtconsole\jupyter_widget.py:561: DeprecationWarning: ConsoleWidget._style_sheet_changed is deprecated in traitlets 4.1: use @observe and @unobserve instead.
  def _style_sheet_changed(self):
C:\ProgramData\Miniconda3\envs\cqgui\lib\site-packages\jupyter_client\session.py:371: DeprecationWarning: Session._key_changed is deprecated in traitlets 4.1: use @observe and @unobserve instead.
  def _key_changed(self):
C:\ProgramData\Miniconda3\envs\cqgui\lib\site-packages\ipykernel\datapub.py:5: DeprecationWarning: ipykernel.datapub is deprecated. It has moved to ipyparallel.datapub
  warnings.warn("ipykernel.datapub is deprecated. It has moved to ipyparallel.datapub", DeprecationWarning)
C:\ProgramData\Miniconda3\envs\cqgui\lib\site-packages\ipykernel\serialize.py:7: DeprecationWarning: ipykernel.serialize is deprecated. It has moved to ipyparallel.serialize
  warnings.warn("ipykernel.serialize is deprecated. It has moved to ipyparallel.serialize", DeprecationWarning)
C:\ProgramData\Miniconda3\envs\cqgui\lib\site-packages\ipykernel\pickleutil.py:8: DeprecationWarning: ipykernel.pickleutil is deprecated. It has moved to ipyparallel.
  warnings.warn("ipykernel.pickleutil is deprecated. It has moved to ipyparallel.", DeprecationWarning)
C:\ProgramData\Miniconda3\envs\cqgui\lib\site-packages\ipykernel\codeutil.py:17: DeprecationWarning: ipykernel.codeutil is deprecated since IPykernel 4.3.1. It has moved to ipyparallel.serialize
  warnings.warn("ipykernel.codeutil is deprecated since IPykernel 4.3.1. It has moved to ipyparallel.serialize", DeprecationWarning)
C:\ProgramData\Miniconda3\envs\cqgui\lib\site-packages\ipykernel\iostream.py:66: DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops.
  self.io_loop = IOLoop(make_current=False)
C:\ProgramData\Miniconda3\envs\cqgui\lib\site-packages\jupyter_client\session.py:803: DeprecationWarning: Accessing zmq Socket attribute recv_multipart on BackgroundSocket
  msg_list = socket.recv_multipart(mode, copy=copy)
Namespace(filename=None)

Installation was done as described in the README.md.

Write documentation

Focus first on the less obvious features

  • debugger
  • CQ stack inspector
  • embedded console usage

Logging noise

Extensive logging from Ipython needs to be turned off

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.