4 Commits

Author SHA1 Message Date
Alan Rynne 28aae5339e Merge remote-tracking branch 'origin/main' into main 2022-02-10 16:34:13 +01:00
Alan Rynne df0428c71c hotfix: Backend crash 2022-02-10 16:34:07 +01:00
Claire Kuang d16ac2ceae Update README.md 2021-11-04 20:13:41 +00:00
Claire Kuang 66f5f5c000 Update mesh_diff.py 2021-11-04 17:29:19 +00:00
2 changed files with 18 additions and 5 deletions
+14 -1
View File
@@ -55,7 +55,7 @@ The app was built using `Vue.js`, and communicates with Speckle through our `Gra
The `server/` folder contains all code related to the app's backend.
We're using a [FastAPI](https://link) server, written in Python, as well as our Python SDK to communicate with the [public Speckle server](https://speckle.xyz). The server contains two basic routes:
We're using a [FastAPI](https://link) API framework with a Uvicorn server implementation, written in Python, as well as our Python SDK to communicate with the [public Speckle server](https://speckle.xyz). The server contains two basic routes:
- **`diff-check/STREAM_ID/CURRENT_COMMIT_ID/PREV_COMMIT_ID`**
@@ -94,6 +94,12 @@ Some basic familiarity with python, POST requests, and API routing is recommende
```
*If you're experiencing pip install issues, check that you are running these commands as an administrator!*
To deploy the server, open a command window in VSCode and navigate to your server folder. Run:
```shell
uvicorn main:app --reload
```
## Frontend walkthrough requirements
Some basic familiarity with JS and the Vue framework is recommended.
@@ -102,6 +108,13 @@ Some basic familiarity with JS and the Vue framework is recommended.
- Install `vue CLI` - [Instructions here](https://cli.vuejs.org/guide/installation.html)
- Install `vue dev tools` for Chrome [here](https://chrome.google.com/webstore/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd)
To deploy the server, open a command window in VSCode and navigate to your frontend folder. Run:
```shell
npm install
npm run serve
```
## App testing requirements
We're using [Rhino 7](https://www.rhino3d.com/download/), Grasshopper for Rhino, and Revit 2021 for our 3D model comparisons. You can
+4 -4
View File
@@ -10,8 +10,7 @@ from specklepy.objects.geometry import Brep, Point, Mesh
from specklepy.objects import Base
from specklepy.objects.other import RenderMaterial
COLORS = [-6426, -13108, -19790, -26215, -
32640, -39322, -45747, -52429, -59111, -65536]
COLORS = [-6426, -13108, -19790, -26215, -32640, -39322, -45747, -52429, -59111, -65536]
WHITE = -1
@@ -70,7 +69,8 @@ class SpeckleMeshDiff:
"""Checks if a specific diff commit already exists in the diff_branch"""
branch_commits: Branch = self.client.branch.get(
self.stream_id, self.diff_branch, 50)
if(branch_commits is None):
return None
for commit in branch_commits.commits.items:
if commit.message == f"{self.commit_current}-{self.commit_prev}":
return commit
@@ -234,7 +234,7 @@ class SpeckleMeshDiff:
@staticmethod
def receive_data(client: SpeckleClient, stream_id: str, commit_id: str) -> Base:
"""Get the data from a commit on the Speckle server"""
transport = ServerTransport(client, stream_id)
transport = ServerTransport(stream_id, client)
commit = client.commit.get(stream_id, commit_id)
res = operations.receive(commit.referencedObject, transport)