Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/examples_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,22 @@ jobs:

- name: Stop BaSyx Query Language Example
run: docker compose -f examples/BaSyxQueryLanguage/docker-compose.yml down

test-basyx-cad:
runs-on: ubuntu-latest
name: Test BaSyx CAD file Example
steps:
- uses: actions/checkout@v5

- name: Set up JDK 17
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'adopt'
cache: maven

- name: Start BaSyx CAD file Example
run: docker compose -f examples/BaSyxCADFiles/docker-compose.yml up -d

- name: Stop BaSyx CAD file Example
run: docker compose -f examples/BaSyxCADFiles/docker-compose.yml down
28 changes: 28 additions & 0 deletions examples/BaSyxCADFiles/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# BaSyx Example for integrating CAD Files

This example provides a setup for integrating CAD files into the BaSyx middleware.
It includes a preconfigured AAS with a submodel containing CAD files as part of File Submodel Element.

The BaSyx AAS Web UI is able to display CAD files in the 3D viewer. The following formats are supported for now:

- glTF
- OBJ
- STL

> [!NOTE]
> Other formats like STEP files can still be uploaded and downloaded, but won't be displayed in the 3D viewer.

## How to run the BaSyx + CAD File Example

1. Open a terminal in this folder
2. Run the following command to start the BaSyx containers:

```bash
docker-compose up -d
```

> To run the example containers, you need to have Docker installed on your device.

## View the working Example

To see the working example, open the [BaSyx AAS Web UI](http://localhost:3000) and navigate to a File Submodel Element with a CAD file. You should see a 3D viewer displaying the CAD file under the `Visualization` tab on the right side of the UI.
Binary file added examples/BaSyxCADFiles/aas/CADAAS.aasx
Binary file not shown.
10 changes: 10 additions & 0 deletions examples/BaSyxCADFiles/basyx/aas-env.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
server.port=8081
basyx.backend=InMemory
basyx.environment=file:aas
basyx.cors.allowed-origins=*
basyx.cors.allowed-methods=GET,POST,PATCH,DELETE,PUT,OPTIONS,HEAD
basyx.aasrepository.feature.registryintegration=http://aas-registry:8080
basyx.submodelrepository.feature.registryintegration=http://sm-registry:8080
basyx.externalurl=http://localhost:8081
spring.servlet.multipart.max-file-size=500MB
spring.servlet.multipart.max-request-size=500MB
4 changes: 4 additions & 0 deletions examples/BaSyxCADFiles/basyx/aas-registry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
basyx:
cors:
allowed-origins: '*'
allowed-methods: GET,POST,PATCH,DELETE,PUT,OPTIONS,HEAD
4 changes: 4 additions & 0 deletions examples/BaSyxCADFiles/basyx/sm-registry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
basyx:
cors:
allowed-origins: '*'
allowed-methods: GET,POST,PATCH,DELETE,PUT,OPTIONS,HEAD
52 changes: 52 additions & 0 deletions examples/BaSyxCADFiles/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
services:
aas-env:
image: eclipsebasyx/aas-environment:2.0.0-SNAPSHOT
container_name: aas-env
environment:
- SERVER_PORT=8081
volumes:
- ./aas:/application/aas
- ./basyx/aas-env.properties:/application/application.properties
ports:
- '8081:8081'
restart: always
depends_on:
aas-registry:
condition: service_healthy
sm-registry:
condition: service_healthy
aas-registry:
image: eclipsebasyx/aas-registry-log-mem:2.0.0-SNAPSHOT
container_name: aas-registry
ports:
- '8082:8080'
environment:
- SERVER_PORT=8080
volumes:
- ./basyx/aas-registry.yml:/workspace/config/application.yml
restart: always
sm-registry:
image: eclipsebasyx/submodel-registry-log-mem:2.0.0-SNAPSHOT
container_name: sm-registry
ports:
- '8083:8080'
environment:
- SERVER_PORT=8080
volumes:
- ./basyx/sm-registry.yml:/workspace/config/application.yml
restart: always
aas-web-ui:
image: eclipsebasyx/aas-gui:SNAPSHOT
container_name: aas-ui
ports:
- '3000:3000'
environment:
AAS_REGISTRY_PATH: http://localhost:8082/shell-descriptors
SUBMODEL_REGISTRY_PATH: http://localhost:8083/submodel-descriptors
AAS_REPO_PATH: http://localhost:8081/shells
SUBMODEL_REPO_PATH: http://localhost:8081/submodels
CD_REPO_PATH: http://localhost:8081/concept-descriptions
restart: always
depends_on:
aas-env:
condition: service_healthy
4 changes: 4 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,7 @@ See the separate [Node-RED example](BaSyxNodeRED) for a comprehensive setup leve
## BaSyx AAS Query Language Example

See the separate [AAS Query Language Example](BaSyxQueryLanguage) for a comprehensive setup leveraging the AAS Query Language.

## BaSyx Example for integrating CAD Files

See the separate [CAD File Example](BaSyxCADFiles) for a comprehensive setup showcasing how to integrate CAD files into an AAS.