Code Monkey home page Code Monkey logo

cq-editor's Introduction

CadQuery editor

Build status codecov Build Status DOI

CadQuery GUI editor based on PyQT supports Linux, Windows and Mac.

Screenshot

Screenshot

Screenshot

Notable features

  • OCCT based
  • Graphical debugger for CadQuery scripts
    • Step through script and watch how your model changes
  • CadQuery object stack inspector
    • Visual inspection of current workplane and selected items
    • Insight into evolution of the model
  • Export to various formats
    • STL
    • STEP

Installation

Use conda to install:

conda install -c cadquery -c conda-forge cq-editor=master

and then simply type cq-editor to run it. This installs the latest version built directly from the HEAD of this repository.

Alternatively clone this git repository and set up the following conda environment:

conda env create -f cqgui_env.yml -n cqgui
conda activate cqgui
python run.py

On some linux distributions (e.g. Ubuntu 18.04) it might be necessary to install additonal packages:

sudo apt install libglu1-mesa libgl1-mesa-dri mesa-common-dev libglu1-mesa-dev

On Fedora 29 the packages can be installed as follows:

dnf install -y mesa-libGLU mesa-libGL mesa-libGLU-devel

Usage

Showing Objects

By default, CQ-editor will display a 3D representation of all Workplane objects in a script with a default color and alpha (transparency). To have more control over what is shown, and what the color and alpha settings are, the show_object method can be used. show_object tells CQ-editor to explicity display an object, and accepts the options parameter. The options parameter is a dictionary of rendering options named alpha and color. alpha is scaled between 0.0 and 1.0, with 0.0 being completely opaque and 1.0 being completely transparent. The color is set using R (red), G (green) and B (blue) values, and each one is scaled from 0 to 255. Either option or both can be omitted.

show_object(result, options={"alpha":0.5, "color": (64, 164, 223)})

Note that show_object works for Shape and TopoDS_Shape objects too. In order to display objects from the embedded Python console use show.

cq-editor's People

Contributors

adam-urbanczyk avatar jmwright avatar gebner avatar justbuchanan avatar marcus7070 avatar winksaville avatar nealie avatar

Stargazers

flyinger avatar

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.