From 9113219e3d544d030492cf7f10bca5624b85a344 Mon Sep 17 00:00:00 2001 From: Barnaby Walters Date: Wed, 15 Mar 2023 23:25:13 +0100 Subject: [PATCH 1/2] Added python3.9 requirement, example command for creating it --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2fbd2982..e6b1cbbf 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,8 @@ _OCP CAD Viewer for VS Code_ is an extension to show [CadQuery](https://github.c - A fairly recent version of VS Code, e.g. 1.76.0 or newer - [Python extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python) installed in VS Code -- `pip` available in the Python enviroment that will be used for CAD development +- a Python 3.9 environment with `pip` available (3.9 is currently the highest version that casadi can be installed under) + - This can be created by installing python 3.9, then running `python3.9 -m venv venv`, then activating the virtual enviroment and ensuring that VS Code detects it before continuing with the installation **Steps**: From 1a6adb44a22e4286f52cd6b53f644d74a033aadc Mon Sep 17 00:00:00 2001 From: Barnaby Walters Date: Thu, 16 Mar 2023 20:22:27 +0100 Subject: [PATCH 2/2] Improved phrasing, recommended use with iPython extension --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e6b1cbbf..f2b0411f 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ _OCP CAD Viewer for VS Code_ is an extension to show [CadQuery](https://github.c - A fairly recent version of VS Code, e.g. 1.76.0 or newer - [Python extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python) installed in VS Code - a Python 3.9 environment with `pip` available (3.9 is currently the highest version that casadi can be installed under) - - This can be created by installing python 3.9, then running `python3.9 -m venv venv`, then activating the virtual enviroment and ensuring that VS Code detects it before continuing with the installation + - This can be created by installing python 3.9, running `python3.9 -m venv venv`, then activating the virtual enviroment and ensuring that VS Code detects it before continuing with the installation **Steps**: @@ -29,6 +29,8 @@ _OCP CAD Viewer for VS Code_ is an extension to show [CadQuery](https://github.c - Paste the import code by using the paste button behing the library names in the "Viewer Manager" section - Use the usual Run menu to run the code +Please note that using this method runs your entire script every time you want to refresh the model, which has a ~2s delay due to having to import the `cadquery` or `build123d` libraries. Using the iPython method below takes a couple of extra steps to set up, but **vastly** reduces this delay by only loading the libraries once per session. + ![Use with run](screenshots/ocp_vscode-work.gif) ### Using with IPython extension