Git Product home page Git Product logo

configurator-example's Introduction

Configurator Example Application

This is an example application using the Onshape external APIs to provide a CAD configurator.

A running version of this can be found at: http://configurator.cae.tech

The application comprises a Java server and an Angular client. The server uses the Onshape Java client (https://github.com/onshape-public/java-client) to access assembly, part, and configuration data from Onshape. The client includes components for viewing 3D models with WebGL (via three.js), and for interaction with the server component to fetch or change configuration data.

As well as configurators, this could be used as the basis of a range of applications that use Onshape as a platform for engineering data - such as fetching geometry of a given configuration for CAE analyses, or providing 3D views of products in an online catalog.

Before anything

Prerequisites:

  • node + npm (v10)
  • jdk (1.8)
  • mvn (3)
  • docker
cd client
npm install
cd ..

Environment variables

You will need the following environment variables defined with the access key and secret key from dev-portal.onshape.com:

ONSHAPE_API_ACCESSKEY ONSHAPE_API_SECRETKEY

How to run: development

Run the server:

cd configurator
mvn jetty:stop jetty:run
cd ..

Run the client, the following will build and run the client and launch the browser:

cd client
npm run start
cd ..

Docker

First build a Docker image called "configurator":

cd configurator
mvn package -DskipTests=true

The following will run the configurator at http://localhost:8080:

docker run -d -p 8080:8080 configurator -e ONSHAPE_API_ACCESSKEY -e ONSHAPE_API_SECRETKEY

configurator-example's People

Contributors

awk avatar eak24 avatar harmanpa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.