Skip to content

Web tool to search for 3D models of mechanisms by describing their features

License

Notifications You must be signed in to change notification settings

janetzki/Mechanism-Browser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mechanism Browser

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.



Requirements

Make sure that you have the following software with the corresponding versions installed:

The Mechanism Browser works best with Mozilla Firefox.



Setup

Add server to hosts file

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.

Setup the Django server

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

Setup the Node.js server

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



Usage

Browse mechanisms

In your browser, open http://mechanism-browser/.

List mechanisms in the backend

In your browser, open http://mechanism-browser:8000/api/mechanisms.

Edit mechanism in the backend

In your browser, open http://mechainsm-browser:8000/admin. At "Mechanisms", click "Add", fill in the form, and confirm.



Frontend documentation

The documentation of the frontend can be found at frontend/docs/index.html. To re-generate it, run:

cd frontend
npm run docs:build



Web crawler

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