@utrad-ical/create-circus-cad-plugin
v1.1.0
Published
The base template for create circus CAD plugin.
Downloads
1
Maintainers
Readme
Create CIRCUS CAD Plug-in
⚠ WARNING: Perhaps this plugin may not be necessary!
You don't need this plug-in if you want to present CAD results by the default displays.
Please check here how to use default displays.
Create CIRCUS CAD plug-in and custom viewer.
Creating an CAD Plug-in
npx @utrad-ical/create-circus-cad-plugin -i
Inside the current directory, it will generate the CAD template and install the dependencies:
current directory
├── README.md
├── node_modules
├── package.json
├── package-lock.json
├── postbuild.sh
├── server.js
├── tsconfig.json
├── webpack.config.js
├── data
│ ├── results.json
│ └── sample.png
├── docker
│ ├── Dockerfile
│ ├── plugin.json
│ └── src
│ ├── cad.js
│ └── sample.png
├── public
│ └── index.html
└── src
├── App.tsx
├── bootstrap.tsx
├── index.ts
├── sampleJob.json
└── components
└── SampleViewer.tsx
Register the Default Template in CIRCUS
- Build the template viewer
npm run build
- Build the docker image
cd docker
docker build -t [REPOSITORY]:[TAG] .
- Check the image ID
docker images --no-trunc
- Register the docker image in CIRCUS
cd [directory of circus project]/packages/circus-api
node circus register-cad-plugin [image ID]
Register your CAD in CIRCUS
- save executable file:
./docker/apps
- save infomation of your CAD plugin:
./docker/plugin.json
- modify Dockerfile to run your executable file:
./docker/Dockerfile
- modify viewer component:
.webpack.config.js
,src/components/SampleViewer.tsx
- add sample result files to check your viewer in local:
./data
,src/sampleJob.json