Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 28aae5339e | |||
| df0428c71c | |||
| d16ac2ceae | |||
| 66f5f5c000 |
@@ -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.
|
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`**
|
- **`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!*
|
*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
|
## Frontend walkthrough requirements
|
||||||
|
|
||||||
Some basic familiarity with JS and the Vue framework is recommended.
|
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 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)
|
- 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
|
## 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
|
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
@@ -10,8 +10,7 @@ from specklepy.objects.geometry import Brep, Point, Mesh
|
|||||||
from specklepy.objects import Base
|
from specklepy.objects import Base
|
||||||
from specklepy.objects.other import RenderMaterial
|
from specklepy.objects.other import RenderMaterial
|
||||||
|
|
||||||
COLORS = [-6426, -13108, -19790, -26215, -
|
COLORS = [-6426, -13108, -19790, -26215, -32640, -39322, -45747, -52429, -59111, -65536]
|
||||||
32640, -39322, -45747, -52429, -59111, -65536]
|
|
||||||
WHITE = -1
|
WHITE = -1
|
||||||
|
|
||||||
|
|
||||||
@@ -70,7 +69,8 @@ class SpeckleMeshDiff:
|
|||||||
"""Checks if a specific diff commit already exists in the diff_branch"""
|
"""Checks if a specific diff commit already exists in the diff_branch"""
|
||||||
branch_commits: Branch = self.client.branch.get(
|
branch_commits: Branch = self.client.branch.get(
|
||||||
self.stream_id, self.diff_branch, 50)
|
self.stream_id, self.diff_branch, 50)
|
||||||
|
if(branch_commits is None):
|
||||||
|
return None
|
||||||
for commit in branch_commits.commits.items:
|
for commit in branch_commits.commits.items:
|
||||||
if commit.message == f"{self.commit_current}-{self.commit_prev}":
|
if commit.message == f"{self.commit_current}-{self.commit_prev}":
|
||||||
return commit
|
return commit
|
||||||
@@ -234,7 +234,7 @@ class SpeckleMeshDiff:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def receive_data(client: SpeckleClient, stream_id: str, commit_id: str) -> Base:
|
def receive_data(client: SpeckleClient, stream_id: str, commit_id: str) -> Base:
|
||||||
"""Get the data from a commit on the Speckle server"""
|
"""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)
|
commit = client.commit.get(stream_id, commit_id)
|
||||||
res = operations.receive(commit.referencedObject, transport)
|
res = operations.receive(commit.referencedObject, transport)
|
||||||
|
|||||||
Reference in New Issue
Block a user