We’re thrilled to announce the initial release of the Matter and Form THREE Python library! This library allows any developer the ability to control and interact with the Matter and Form THREE scanner. This lets you build custom integrations, automate 3D scanning tasks, or even create new front-end systems for 3D scanning workflows. Imagine hooking up the three to a robot arm, or creating new and amazing computer vision projects by just using the hardware on board (it's more than just a scanner!)
Here are some key features:
- Easy to use: The library is a websocket wrapper that handles all the communication and parsing to and from the scanner.
- Open Source: The library is open source (as well as the schema). See below for links
-
Project Management: List and manage 3D scanning projects programmatically.
- More flexibility: Because the scanner was built on this api, this library offers the raw interface with the scanner, allowing for more flexibility than what the official UI allows.
Quick Start Guide
Installation
To install the library from PyPI, run:
pip install mfthree
Example Usage
Here’s a simple example to connect to the scanner and list available projects:
from three.scanner import Scanner
# Create and connect to the scanner
scanner = Scanner(OnTask=None, OnMessage=None, OnBuffer=None)
scanner.Connect("ws://matterandform.local:8081")
# Simple request to list all projects
projectTask = scanner.list_projects()
# Check for errors and process the output
if projectTask.Error:
print('Error:', projectTask.Error)
else:
for project_obj in projectTask.Output:
project = Project.Brief(**project_obj)
print('Project index:', project.index, ' - Name:', project.name)
Available Examples
We’ve included several pre-made examples to help you get started. These can be found in the examples directory of the repository.
Documentation
Documentation is available here.
We’d love to hear your feedback, suggestions, and ideas for future updates. Try out the library and let us know what you think!