Skip to content

Commit

Permalink
Update README with fully animated guide, link YouTube overview video
Browse files Browse the repository at this point in the history
  • Loading branch information
Jekannadar committed Nov 10, 2023
1 parent c37c69e commit 3ebde0a
Show file tree
Hide file tree
Showing 17 changed files with 163 additions and 29 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.gif filter=lfs diff=lfs merge=lfs -text
2 changes: 1 addition & 1 deletion .github/workflows/generate-latest-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Publish Installer
name: Run Tests
on:
workflow_call:
workflow_dispatch:
Expand Down
140 changes: 119 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,40 @@

---

[![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)

<!---[![Issues](https://img.shields.io/github/issues/tudo-seal/CLS-CAD)](https://github.com/tudo-seal/CLS-CAD/issues)-->

---

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.

<details>
<summary><b>Your assembly creation could look like this!</b></summary>

![](docs/images/demo.gif)

</details>

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 <br>
(_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.

<br>
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`
Expand All @@ -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).
<br>
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.

<details>
<summary>GIF</summary>

![](docs/images/install-addin.gif)

</details>

## Install Docker and Run Backend

---

Run the backend (using docker, as detailed in the [Installation](#installation) section)
<br>
On subsequent runs after rebooting the PC, the created container shown at the end of the GIF can just be started again.

<details>
<summary>GIF</summary>

![](docs/images/install-docker.gif)

</details>

## Download and Extract Dataset

---

Download the [modular components for synthesizing robotic arms](https://doi.org/10.5281/zenodo.10051244) dataset.

<details>
<summary>GIF</summary>

![](docs/images/download-dataset.gif)

</details>

## Upload Dataset to Fusion

---

Launch Fusion 360 and create a new empty project. Open that project and upload the dataset.

<details>
<summary>GIF</summary>

![](docs/images/upload-dataset.gif)

</details>

## 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).
<br>
Press the `Crawl Project` button in the CLS-CAD tab and wait for the process to complete.

<details>
<summary>GIF</summary>

![](docs/images/crawl-project.gif)

</details>

## Request Synthesis

---

At the far right of the CLS-CAD tab, press the `Request Synthesis` button.
<br>
Select the part type `Base` in the upper taxonomy, optionally add constraints, and hit Ok.

<details>
<summary>GIF</summary>

![](docs/images/request-synthesis.gif)

</details>

## 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.
<details>
<summary>GIF</summary>

- 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.
</details>

# Basic Usage

Expand All @@ -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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions applications/cls-cad-backend/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@

@pytest.fixture(scope="session", autouse=True)
def prepare_everything(request):
try:
shutil.rmtree(
os.path.join(
os.path.dirname(__file__),
"..",
"cls_cad_backend",
"database",
"test_db",
)
)
except OSError:
pass
switch_to_test_database()
request.addfinalizer(cleanup)

Expand Down
6 changes: 3 additions & 3 deletions applications/cls-cad-backend/tests/test_retrieve_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ def test_for_project_results_are_sane():
f"/results/a.YnVzaW5lc3M6Y2hhdW1ldCMyMDIzMTEwOTY5NjQ4MjUwMQ/{result}"
)
assert response.status_code == 200
assert len(response.json()) == 1
assert len(response.json()) > 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(
Expand All @@ -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()
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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}
Expand Down
3 changes: 3 additions & 0 deletions docs/images/assemble-result.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/images/crawl-project.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/images/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/images/download-dataset.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/images/install-addin.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/images/install-docker.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/images/request-synthesis.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/images/upload-dataset.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3ebde0a

Please sign in to comment.