Basic usage

match3d is essentially a collection of blender scripts for generating views of 3D models, and Python scripts for turning those into something searchable by image-match.

API operations

The most important functionality is provided in api_operations.py.

from match3d.api_operations import APIOperations
api = APIOperations(index_name='3d_test')

index_name is the name of the elasticsearch index to use. Defaults to match3d if none is specified.

ADD

You can add a model from URL or local file. You must specify some kind of label either way. Label uniqueness isn´t enforced (yet), but duplicate labels will be ignored in searches:

api.add('human', stl_url='http://people.sc.fsu.edu/~jburkardt/data/stla/humanoid_tri.stl')
api.add('human_other', stl_url='http://people.sc.fsu.edu/~jburkardt/data/stla/humanoid.stl')

Some more example STL files. For example, download and unzip the Porsche, then:

api.add('porsche', stl_file='/home/ryan/Downloads/porsche.stl')

LIST

api.list_designs()

returns

[u'porsche', u'human_other', u'human']