The mechanism browser allows searching for mechanisms without knowing their name or a textual description. Instead, you specify mechanical features, like rotation and translation axes, to find what you seek. Along with the search functionality, you can also add new mechanisms and edit existing articles.
Make sure that you have the following software with the corresponding versions installed:
- OpenJSCAD CLI
- OpenSCAD >= 2015.03-2
- Python >= 3.5.3
- NPM >= 5.6.0
- Virtualenv >= 15.2.0 (optional)
The Mechanism Browser works best with Mozilla Firefox.
For any system that should have access to the Mechanism Browser, add the IP of the server and the hostname "mechanism-browser" to its hosts file.
Make sure that you are using Python 3. You might want to create a virtual environment to prevent interfering libraries.
Install the requirements:
sudo pip install -r Mechanism-Browser/backend/requirements.txt
Navigate to Mechanism-Browser/backend/mechanismbackend/
.
Migrate the schemas:
python manage.py migrate
Create a superuser and choose a username and a password:
python manage.py createsuperuser
Finally, start the Django server:
python manage.py runserver 0.0.0.0:8000
Navigate to Mechanism-Browser/frontend/
.
Install the dependencies:
sudo npm install
Setup OpenJSCAD:
git clone https://github.com/jscad/OpenJSCAD.org.git
cp OpenJSCAD.org/packages/web/imgs/busy.gif media/busy.gif
mkdir external
mv OpenJSCAD.org/ external/
Then, start the Node.js server:
sudo npm start
In your browser, open http://mechanism-browser/
.
In your browser, open http://mechanism-browser:8000/api/mechanisms
.
In your browser, open http://mechainsm-browser:8000/admin
.
At "Mechanisms", click "Add", fill in the form, and confirm.
The documentation of the frontend can be found at frontend/docs/index.html
. To re-generate it, run:
cd frontend
npm run docs:build
To fill the database with the web crawler, perform the following steps. You might want to create a virtual environment to prevent interfering libraries.
cd exploration/web_page_extractor
pip install -r requirements.txt
python web_page_extractor.py