Giter VIP home page Giter VIP logo

cadquery-vscode's Introduction

VSCode CadQuery extension


Important note:

This extension is no longer compatible with the new version of CadQuery Server. Until this is resolved, please use the LivePreview extension instead:

  1. install LivePreview;
  2. ctrl+shift+P -> Simple Browser: Show
  3. update the url according to your running CadQuery server instance (ie. 127.0.0.1:5000).

VSCode extension that integrates CadQuery Server in VSCode.

CadQuery Server is a web server used to render 3d models from CadQuery code loaded dynamically.

Installation

Install the IDE

The extension works both on VSCodium or VSCode.

Install the extension

In VSCode, search for cadquery in Extensions tab in the sidebar.

The extension is available in:

Alternatively, you can manually install the extension in VSCode by downloading the vsix file from one on both registries.

Install CadQuery Server

Read installation instructions.

Usage

1. Run the CadQuery server

You can configure the server url in the VSCode extension settings (which is http://127.0.0.1:5000 by default).

source venv/bin/activate # required if you used a virtual environment
cq-server

Read usage instructions for advanced use.

2. Activate the extension

Hit f7 to enable the viewer. Alternatively you can use the VSCode command palette (Ctrl+Shift+P) and search for Open CadQuery viewer.

The preview should be updated each time your CadQuery Python script is saved.

3. Tips and tricks

You should use a language server to activate code completion, such as Pylance. Note that in order to make it work on VSCodium, you must set the nameLong value to Visual Studio Code in your product.json (located at /usr/share/codium/resources/app/product.json on Linux).

You can make the UI lighter by enabling VSCode Zen mode by hitting Ctrl+K then Z.

About

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.