From e3e77a4ba075f6d090e2c2939133e8f57d52bb4c Mon Sep 17 00:00:00 2001 From: Constantin Chaumet Date: Fri, 10 Nov 2023 22:40:36 +0100 Subject: [PATCH] Update README with fully animated guide, link YouTube overview video --- .gitattributes | 1 + .github/workflows/generate-latest-release.yml | 2 +- .github/workflows/run-tests.yml | 2 +- README.md | 140 +++++++++++++++--- .../jstree/themes/default-dark/throbber.gif | Bin 1464 -> 129 bytes .../static/jstree/themes/default/throbber.gif | Bin 1464 -> 129 bytes .../cls-cad-backend/tests/conftest.py | 12 ++ .../tests/test_retrieve_results.py | 6 +- .../commands/assembleresult/entry.py | 5 +- docs/images/assemble-result.gif | 3 + docs/images/crawl-project.gif | 3 + docs/images/demo.gif | 3 + docs/images/download-dataset.gif | 3 + docs/images/install-addin.gif | 3 + docs/images/install-docker.gif | 3 + docs/images/request-synthesis.gif | 3 + docs/images/upload-dataset.gif | 3 + 17 files changed, 163 insertions(+), 29 deletions(-) create mode 100644 .gitattributes create mode 100644 docs/images/assemble-result.gif create mode 100644 docs/images/crawl-project.gif create mode 100644 docs/images/demo.gif create mode 100644 docs/images/download-dataset.gif create mode 100644 docs/images/install-addin.gif create mode 100644 docs/images/install-docker.gif create mode 100644 docs/images/request-synthesis.gif create mode 100644 docs/images/upload-dataset.gif diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..d41a940 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.gif filter=lfs diff=lfs merge=lfs -text diff --git a/.github/workflows/generate-latest-release.yml b/.github/workflows/generate-latest-release.yml index ea40b25..8550318 100644 --- a/.github/workflows/generate-latest-release.yml +++ b/.github/workflows/generate-latest-release.yml @@ -37,7 +37,7 @@ jobs: build-msi: name: Installer - needs: [changes, run-tests] + needs: [changes] if: ${{ needs.changes.outputs.plugin == 'true' }} uses: tudo-seal/CLS-CAD/.github/workflows/build-publish-installer.yml@main secrets: inherit diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index d54ec77..2486668 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,4 +1,4 @@ -name: Build and Publish Installer +name: Run Tests on: workflow_call: workflow_dispatch: diff --git a/README.md b/README.md index babaeaf..9c8dab7 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ --- -[![Generic badge](https://img.shields.io/badge/python-fusion360%20|%203.10%20|%203.11-informational.svg)](https://shields.io/) -[![Supported systems](https://img.shields.io/badge/os-windows-informational.svg)](https://shields.io/) -[![GitHub license](https://img.shields.io/github/license/tudo-seal/CLS-CAD)](https://github.com/tudo-seal/CLS-CAD/blob/main/LICENSE) -![Generate Latest Release](https://github.com/tudo-seal/CLS-CAD/actions/workflows/generate-latest-release.yml/badge.svg) -[![CodeCov](https://codecov.io/gh/tudo-seal/CLS-CAD/graph/badge.svg)](https://codecov.io/gh/tudo-seal/CLS-CAD) +[![Generic badge](https://img.shields.io/badge/python-fusion360%20|%203.10%20|%203.11-informational.svg?style=for-the-badge)](https://shields.io/) +[![Supported systems](https://img.shields.io/badge/os-windows-informational.svg?style=for-the-badge)](https://shields.io/) +[![GitHub license](https://img.shields.io/github/license/tudo-seal/CLS-CAD?style=for-the-badge)](https://github.com/tudo-seal/CLS-CAD/blob/main/LICENSE) +[![CodeCov](https://img.shields.io/codecov/c/gh/tudo-seal/CLS-CAD/badge.svg?style=for-the-badge)](https://codecov.io/gh/tudo-seal/CLS-CAD) +![Generate Latest Release](https://img.shields.io/github/actions/workflow/status/tudo-seal/CLS-CAD/generate-latest-release.yml?style=for-the-badge&label=Release) @@ -14,12 +14,28 @@ An add-in and matching backend that allows adding types to Joint Origins and Parts in Fusion 360, and allows requesting and assembling results by means of combinatory logic. +When exploring a design space this is roughly two orders of magnitude faster than manual design, and a lot less tiring. + +
+Your assembly creation could look like this! + +![](docs/images/demo.gif) + +
+ +To get started with the add-in, follow the instructions in the [getting started section](#getting-started). + +There is an overview video available at: https://youtu.be/gNqHxLpqiFw
+(_Slightly outdated, newest features and performance improvements missing_) + # Installation +--- + To install the add-in in Fusion 360, download the [latest installer](https://github.com/tudo-seal/CLS-CAD/releases/download/latest/cls-cad-fusion-plugin.msi) and execute it. To use the plugin, you need a running backend. This requires [docker](https://docs.docker.com/desktop/install/windows-install/) to be installed. - +
After installing and starting docker, in a terminal, run: - `docker run -d -p 8000:80 --name cls-cad-backend --pull=always ghcr.io/tudo-seal/cls-cad-backend:latest` @@ -28,24 +44,106 @@ For subsequent usage, simply start the `cls-cad-backend` container from the cont # Getting Started -Create an [Autodesk account](https://www.autodesk.com/education/edu-software). An education license is recommended if applicable. Then, install [Fusion 360](https://manage.autodesk.com/products). -Launch Fusion 360, Sign in, and then close Fusion 360. +--- + +## Install Add-In + +--- + +Install the add-in using the [latest installer](https://github.com/tudo-seal/CLS-CAD/releases/download/latest/cls-cad-fusion-plugin.msi). +
+Please make sure to have started Fusion 360 at least once before installation. The add-in is available as of the next time launching Fusion 360. + +
+GIF + +![](docs/images/install-addin.gif) + +
+ +## Install Docker and Run Backend + +--- + +Run the backend (using docker, as detailed in the [Installation](#installation) section) +
+On subsequent runs after rebooting the PC, the created container shown at the end of the GIF can just be started again. + +
+GIF + +![](docs/images/install-docker.gif) + +
+ +## Download and Extract Dataset + +--- + +Download the [modular components for synthesizing robotic arms](https://doi.org/10.5281/zenodo.10051244) dataset. + +
+GIF + +![](docs/images/download-dataset.gif) + +
+ +## Upload Dataset to Fusion + +--- + +Launch Fusion 360 and create a new empty project. Open that project and upload the dataset. + +
+GIF + +![](docs/images/upload-dataset.gif) + +
+ +## Prepare Project for Synthesis + +--- + +Switch to the CLS-CAD tab in Fusion 360, and press the `Upload Taxonomy` button. Select the .taxonomy in the [modular components for synthesizing robotic arms](https://doi.org/10.5281/zenodo.10051244). +
+Press the `Crawl Project` button in the CLS-CAD tab and wait for the process to complete. + +
+GIF + +![](docs/images/crawl-project.gif) + +
+ +## Request Synthesis + +--- + +At the far right of the CLS-CAD tab, press the `Request Synthesis` button. +
+Select the part type `Base` in the upper taxonomy, optionally add constraints, and hit Ok. + +
+GIF + +![](docs/images/request-synthesis.gif) + +
+ +## Explore Results + +--- -- Install the add-in using the [latest installer](https://github.com/tudo-seal/CLS-CAD/releases/download/latest/cls-cad-fusion-plugin.msi). -- Run the backend (using docker, as detailed in the Installation section) -- Download the [modular components for synthesizing robotic arms](https://doi.org/10.5281/zenodo.10051244) dataset. -- Launch Fusion 360 and create a new empty project. Open that project. -- Upload all .f3d files from the [modular components for synthesizing robotic arms](https://doi.org/10.5281/zenodo.10051244) to that project. -- Switch to the CLS-CAD tab in Fusion 360, and press the `Upload Taxonomy` button. Select the .taxonomy in the [modular components for synthesizing robotic arms](https://doi.org/10.5281/zenodo.10051244). -- Press the `Crawl Project` button in the CLS-CAD tab and wait for the process to complete. +Press the `Assemble Results` button to explore and assemble any results -That's it! You can now start requesting results. +
+GIF -- At the far right of the CLS-CAD tab, press the `Request Synthesis` button. -- Select the part type `Base` in the upper taxonomy. -- Hit Ok, then press the `Assemble Results` button to explore and assemble any results. +![](docs/images/assemble-result.gif) -You can switch to the `Counted Types` when requesting designs to add numerical constraints and narrow down the results. +
# Basic Usage @@ -57,4 +155,4 @@ You can switch to the `Counted Types` when requesting designs to add numerical c - Request synthesis. - Explore and assemble the results. -For a short video illustrating the process, see: https://www.youtube.com/watch?v=gK00StSAxuk +For a short video illustrating the process, see: https://youtu.be/gNqHxLpqiFw diff --git a/applications/cls-cad-backend/cls_cad_backend/static/unrolledTaxonomyDisplay/static/jstree/themes/default-dark/throbber.gif b/applications/cls-cad-backend/cls_cad_backend/static/unrolledTaxonomyDisplay/static/jstree/themes/default-dark/throbber.gif index 169062cda53296196d81c1e47816e40358d2523d..41d684ca81e1c41c9ee6f44b88ba872d5a36a771 100644 GIT binary patch literal 129 zcmWN?K@!3s3;@78uiyig0tsM$lLRWvsC0z(;OliSdzH^<{jKYq$JmT{w0V2(WBFfC zUZlUwIEt9ds@}35l^lkR*|USV5=NJcMeCiH0w4%Z?i6W-Bp`su8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53vbMj7F6%rH6u#lLFP(4SVUU_nzw0O(G0%gHpQ*I+>3=mufOJE zafP$lxzy$Pke=Qav-?=?9H^LqhV&8ls=DoW(1KO5zW?mAaDb{Y(>Koc49sZgb+^uF qc@C8(Mp%rgx+mJC3dQo~8dbUO?Q85zP5Hs^+UpbJR`hQGVEx}cw(Vm8 diff --git a/applications/cls-cad-backend/cls_cad_backend/static/unrolledTaxonomyDisplay/static/jstree/themes/default/throbber.gif b/applications/cls-cad-backend/cls_cad_backend/static/unrolledTaxonomyDisplay/static/jstree/themes/default/throbber.gif index cf06c1ad0f00be54b10f73e03c11d182d411fad1..e85afaadd94b4f1635eb1491033cb4bc8f1bba87 100644 GIT binary patch literal 129 zcmWN?K@!3s3;@78uiyg~2!uj^6Vf2esC1$!u$DOG!y_yWJ*}DKj&Z!{KyycdONE2;suQ z0>0oY%h;NiE|O;?tl@hho}Kt#A?am%R7ds{W5+Z{)R=0oO1J-@s(6j&K*>RXzl3BT zzyL9xm7Yix2%*;PtW~c(I@)n*B9Lt|nX$@5x^P+w+`!wx60-9`uo!Bs<$^EHs)-UfnV9p;}KqjClm$MVbM$&>WbPV&ij*ka|M=U@X9sGyLDa1jBO)0C&2bFU5^USyT%ow`Y6z3+!yPy*Q>C*G{34S5-7|bGDZQ z;p6Czucr+YRHzuORgJ5K?Gb~I)~a}v9rie@5~I_JSG?&Y0H19O93PH4T#q0ADD;!P zk^f0VJ^TO`dJ=PNij?y~;w)~e*CcK*ZY52{2MQ$)2O(_;C7G%3Zo-!*0`gZhYhSL< znt;k5!N~ERdLnRmTxxns-8=KZykgLf4(wIkTqMjv3H^P0 z0}wE)29!5I&o+~aFX!~k)T{bi(Dhe zIH87(qxAGc0w`-lB2B++2#J?l`gGWV+B}h2SM(t^bWT#g9>Fcs52mlk>PRPILR$oj*LlzNEnI}n!K<3 z)aPyCTC2f!DRM}V09yub^?|M=!+Y@mELj`_)TX%OO>kCHio!~( znD>rK?x{ZA<6qyz3f`ZjI~5!kK{oSzRuM%1ivpD2V-;hMHZiNKhH-%|h?1H9lphlk zFgW#r;6}N_Nt!r84^6u^hv5%Xq^WPf0T0|iW8f(hZ6Nk)qHY$>y?>U{G)$G{h>Nyn zpO@v$E*p6=g#Y1VcDTfCbn@Au-m=SFxmH%8-f*3fsjN8kedp=8= 0 # Tests for caching response = client.get( f"/results/a.YnVzaW5lc3M6Y2hhdW1ldCMyMDIzMTEwOTY5NjQ4MjUwMQ/{result}" ) assert response.status_code == 200 - assert len(response.json()) == 1 + assert len(response.json()) > 0 @pytest.mark.dependency( @@ -71,7 +71,7 @@ def test_for_project_results_are_sane(): def test_for_project_results_are_batchable(): response = client.get("/results/a.YnVzaW5lc3M6Y2hhdW1ldCMyMDIzMTEwOTY5NjQ4MjUwMQ") response = client.get( - f"/results/a.YnVzaW5lc3M6Y2hhdW1ldCMyMDIzMTEwOTY5NjQ4MjUwMQ/{response.json()[len(response.json())-1]['id']}/maxcounts" + f"/results/a.YnVzaW5lc3M6Y2hhdW1ldCMyMDIzMTEwOTY5NjQ4MjUwMQ/{response.json()[0]['id']}/maxcounts" ) assert response.status_code == 200 assert response.json() diff --git a/applications/cls-cad-fusion-plugin/commands/assembleresult/entry.py b/applications/cls-cad-fusion-plugin/commands/assembleresult/entry.py index da94935..79e12e7 100644 --- a/applications/cls-cad-fusion-plugin/commands/assembleresult/entry.py +++ b/applications/cls-cad-fusion-plugin/commands/assembleresult/entry.py @@ -28,9 +28,8 @@ PANEL_ID = "SYNTH_ASSEMBLY" COMMAND_BESIDE_ID = "ScriptsManagerCommand" ICON_FOLDER = os.path.join(os.path.dirname(__file__), "resources", "") -DISPLAY_TIME = True +DISPLAY_TIME = False NO_GRAPHICS = False -remaining_assemblies = 0 design: adsk.fusion.Design = adsk.fusion.Design.cast(None) bucket_primed = False bucket_attributes = defaultdict(list) @@ -425,8 +424,8 @@ def create_assembly_document(data, name): progress_dialog.maximumValue = data["count"] create_joints_from_instructions(data["instructions"]) progress_dialog.hide() - total_time = timer() - total_time if DISPLAY_TIME: + total_time = timer() - total_time ui.messageBox( f""" Total time elapsed: {total_time} diff --git a/docs/images/assemble-result.gif b/docs/images/assemble-result.gif new file mode 100644 index 0000000..971fdb4 --- /dev/null +++ b/docs/images/assemble-result.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a79fe64dfcb26e41376edeeb032a8b60fbdebddac8aa817200f0f4a0954b3eae +size 8969583 diff --git a/docs/images/crawl-project.gif b/docs/images/crawl-project.gif new file mode 100644 index 0000000..c8c26ff --- /dev/null +++ b/docs/images/crawl-project.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:103f22eb8d453b445b99d0777074cffecb7e22346655077a817f5c3ef19ec5cf +size 7801714 diff --git a/docs/images/demo.gif b/docs/images/demo.gif new file mode 100644 index 0000000..2223c7e --- /dev/null +++ b/docs/images/demo.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0f0cfb78235aeb2cd676297a4c60241732b71d0eafea7646cdfa617da297b996 +size 6988011 diff --git a/docs/images/download-dataset.gif b/docs/images/download-dataset.gif new file mode 100644 index 0000000..c43881c --- /dev/null +++ b/docs/images/download-dataset.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d1d816a0275be05dd522091f60648a94fd3355e98153f54f253583b505f2a53 +size 5959705 diff --git a/docs/images/install-addin.gif b/docs/images/install-addin.gif new file mode 100644 index 0000000..3121510 --- /dev/null +++ b/docs/images/install-addin.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ad1a4a3946eaa9543929dab70ed5fd59227c8df3ae2e889332d36630f6259b9 +size 11996178 diff --git a/docs/images/install-docker.gif b/docs/images/install-docker.gif new file mode 100644 index 0000000..e3c22a3 --- /dev/null +++ b/docs/images/install-docker.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9bfca901e59e6dda369783550584e74cbc56eed0921235d1ac36632275c29199 +size 18945594 diff --git a/docs/images/request-synthesis.gif b/docs/images/request-synthesis.gif new file mode 100644 index 0000000..48cf0dd --- /dev/null +++ b/docs/images/request-synthesis.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ab47099520de813d8ad931e771ed44fb04e9482b1851c63054a5e4034f845e4 +size 18060239 diff --git a/docs/images/upload-dataset.gif b/docs/images/upload-dataset.gif new file mode 100644 index 0000000..6cdc9f9 --- /dev/null +++ b/docs/images/upload-dataset.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09c3f30096b721302384c80d1f8daf01c644b6bd80c074dc63b6fb13a7feebe8 +size 17986011