Skip to content

jfrohnhofen/metamaterial-mechanisms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metamaterial mechanisms editor

Online editor: https://jfrohnhofen.github.io/metamaterial-mechanisms/

For help with issues:

  1. Post here. Please post them in the issues tab here on github (e.g. installation issues), not via email. Someone else might have the same question and will appreciate finding the answer here.
  2. Be specific. Please describe the problem you have precisely. Add screenshots, console output and log files. Describe your system (Operating System, Browser, ...) and which steps you completed. Without knowing what does not work (as opposed to that it does not work), it is impossible to help.
  3. Please help each other out. If you know the answer, post it directly.

Status of this code

  1. Please note that this is not a product, but a research prototype. This means that support is limited.
  2. Only tested on Chrome. Use that browser, if something's strange. (I heard Firefox works too.)

This is the editor for the research paper Metamaterial Mechanisms. If you want to print the objects shown in the paper, find them in our thingiverse collection.

The editor consists of 2 main components:

  1. the voxel editor (in javascript, thus platform-independent) and
  2. the simulation (on windows only!)

The system implementation is described in our research paper: https://hpi.de/baudisch/projects/metamaterial-mechanisms.html

How to install

Editor

You can try the editor here https://jfrohnhofen.github.io/metamaterial-mechanisms/. However, the simulation won't work in the online version.

For the full experience, you can download the editor and install it as follows:

  1. install node.js (tutorial: http://blog.teamtreehouse.com/install-node-js-npm-windows)
  2. run npm install in the root folder of this editor (where package.json lies) in your command prompt.

This will create a folder called 'node_modules' for you. If you get an error that git is not found --> then install git (https://www.atlassian.com/git/tutorials/install-git#windows) and make sure it is added to your path variables.

  1. start the editor by running the command npm start in the same directory.

Simulation (on Windows only)

The simulation works only on Windows, since there is no Grasshopper for Mac. Note that the simulation is computationally expensive and therefore slow. For best results, move the force arrow slowly.

How to install:

  1. install Rhino 5
  2. install Grasshopper
  3. install karamba 1.1.0
    for licence choose "free" (NOT trial), use metric units
  4. copy the items from './simulation/bin/' to Grasshopper's Components folder. Find the folder by opening Grasshopper in the File menu 'Special Folders' - 'Components Folder'. (opening Grasshopper: start Rhino and type "grasshopper" into Rhino's command line)

To run the simulation, simply execute the batch script "1-START-SIMULATION.bat". As soon as the simulation is running, it can receive data from the editor.

If you don't use Windows, you can install the simulation on some remote Windows-machine:

You can install the simulation on a remote Windows machines and let the platform-independent editor connect to that machine. The communication works via web sockets. You need to set the IP of the machine that runs the simulation in ./config.json. Both computers have to be in the same network.

Troubleshooting:

If Grasshopper cannot load the InputComponent, then it's dependencies might be blocked. Right-click the two .dll files in your Components folder and tick the checkbox "Unblock". Start the simulation using the batch script again.

For developers:

The Grasshopper components are developed in Visual Studio 2012 and they target .NET 4.5. Pre- and post-build events copy the neccessary binaries to the ./simulation/bin/ folder. The C# projects also contain post-build events that additionally copy the 4 binaries directly into the Grasshopper Components folder. Note that these are absolut pahts and need to be ajusted to your system. Furthermore, you can also debug the components by pointing to Rhino.exe in the project settings - Debug - Start external program. (It's already set, but the path might differ on your machine.)