Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/search.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/three.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/three/MF/V3/Buffer.html

Large diffs are not rendered by default.

30 changes: 20 additions & 10 deletions docs/three/MF/V3/Descriptors.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/BoundingBox.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/Calibration.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/CaptureImage.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/Export.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/HeatMap.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/Image.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/Import.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/Merge.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/Network.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/Project.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/ProjectActions.html

Large diffs are not rendered by default.

376 changes: 376 additions & 0 deletions docs/three/MF/V3/Descriptors/ProtocolInfo.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/RemoveVertices.html

Large diffs are not rendered by default.

551 changes: 551 additions & 0 deletions docs/three/MF/V3/Descriptors/ScanCapture.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/ScanData.html

Large diffs are not rendered by default.

497 changes: 497 additions & 0 deletions docs/three/MF/V3/Descriptors/ScannerList.html

Large diffs are not rendered by default.

345 changes: 345 additions & 0 deletions docs/three/MF/V3/Descriptors/ScannerStatus.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/Settings.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/Settings/Advanced.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/Settings/Camera.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/Settings/Capture.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/Settings/I18n.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/Settings/Projector.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/Settings/Scanner.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/Settings/Software.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/Settings/Style.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/Settings/Turntable.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/Settings/Tutorials.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/Settings/Viewer.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/Software.html

Large diffs are not rendered by default.

448 changes: 448 additions & 0 deletions docs/three/MF/V3/Descriptors/StorageInfo.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/System.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/Transform.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/VideoFrame.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Descriptors/Wifi.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/Advanced.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/Align.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/AutoFocus.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/BoundingBox.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/Camera.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/Capture.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/CaptureImage.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/CopyGroups.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/CopyProject.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/Export.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/Group.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/HeatMap.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/I18n.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/Import.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/Merge.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/NewGroup.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/Project.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/Projector.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/Quality.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/Rectangle.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/RemoveVertices.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/Scan.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/ScanData.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/ScanSelection.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/Scanner.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/Smooth.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/Software.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/Style.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/Turntable.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/Tutorials.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/Video.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/Viewer.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Settings/Wifi.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/three/MF/V3/Task.html

Large diffs are not rendered by default.

138 changes: 81 additions & 57 deletions docs/three/MF/V3/Tasks.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/AddMergeToProject.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/Align.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/AutoFocus.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/BoundingBox.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/CalibrateCameras.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/CalibrateTurntable.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/CalibrationCaptureTargets.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/CameraCalibration.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/CaptureImage.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/ClearSettings.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/CloseProject.html

Large diffs are not rendered by default.

657 changes: 657 additions & 0 deletions docs/three/MF/V3/Tasks/ConnectScanner.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/ConnectWifi.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/CopyGroups.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/DepthMap.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/DetectCalibrationCard.html

Large diffs are not rendered by default.

620 changes: 620 additions & 0 deletions docs/three/MF/V3/Tasks/DisconnectScanner.html

Large diffs are not rendered by default.

651 changes: 651 additions & 0 deletions docs/three/MF/V3/Tasks/DiscoverScanners.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/DownloadProject.html

Large diffs are not rendered by default.

635 changes: 635 additions & 0 deletions docs/three/MF/V3/Tasks/DownloadScannerProject.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/Export.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/ExportFactoryCalibrationLogs.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/ExportHeatMap.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/ExportLogs.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/ExportMerge.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/FactoryReset.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/FlattenGroup.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/ForgetWifi.html

Large diffs are not rendered by default.

645 changes: 645 additions & 0 deletions docs/three/MF/V3/Tasks/GetProtocolInfo.html

Large diffs are not rendered by default.

636 changes: 636 additions & 0 deletions docs/three/MF/V3/Tasks/GetScannerStatus.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/HasCameras.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/HasProjector.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/HasTurntable.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/HeatMap.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/Import.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/ListExportFormats.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/ListGroups.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/ListNetworkInterfaces.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/ListProjects.html

Large diffs are not rendered by default.

643 changes: 643 additions & 0 deletions docs/three/MF/V3/Tasks/ListScannerProjects.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/ListScans.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/ListSettings.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/ListWifi.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/Merge.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/MergeData.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/MoveGroup.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/NewGroup.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/NewProject.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/NewScan.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/OpenProject.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/PopSettings.html

Large diffs are not rendered by default.

674 changes: 674 additions & 0 deletions docs/three/MF/V3/Tasks/PullProject.html

Large diffs are not rendered by default.

671 changes: 671 additions & 0 deletions docs/three/MF/V3/Tasks/PushProject.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/PushSettings.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/Reboot.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/RemoveGroups.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/RemoveProjects.html

Large diffs are not rendered by default.

665 changes: 665 additions & 0 deletions docs/three/MF/V3/Tasks/RemoveScannerProjects.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/RestoreFactoryCalibration.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/RotateTurntable.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/ScanData.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/SetCameras.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/SetGroup.html

Large diffs are not rendered by default.

636 changes: 636 additions & 0 deletions docs/three/MF/V3/Tasks/SetProcessingDevices.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/SetProject.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/SetProjector.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/Shutdown.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/Smooth.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/SplitGroup.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/StartVideo.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/StopVideo.html

Large diffs are not rendered by default.

651 changes: 651 additions & 0 deletions docs/three/MF/V3/Tasks/StorageInfo.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/SystemInfo.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/TransformGroup.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/TurntableCalibration.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/UpdateSettings.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/MF/V3/Tasks/UploadProject.html

Large diffs are not rendered by default.

6,332 changes: 3,514 additions & 2,818 deletions docs/three/MF/V3/Three.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/three/_scanner.html

Large diffs are not rendered by default.

1,376 changes: 886 additions & 490 deletions docs/three/scanner.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/three/serialization.html

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions three/MF/V3/Descriptors/ProtocolInfo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from typing import List


class ProtocolInfo:
"""
Desktop-processing protocol capability descriptor, returned by the
`GetProtocolInfo` task. Lets a desktop engine detect what a connected
scanner supports and degrade gracefully against older firmware.
"""
def __init__(self, version: int, capabilities: List[str] = None):
# Desktop-processing protocol version.
self.version = version
"""
Capability tokens supported by this server.

Known capabilities:
- "scanCaptureStreaming": the server can stream raw scan captures to a
client for desktop processing (see the `SetProcessingDevices` task
and the `ScanCapture` descriptor).
"""
self.capabilities = capabilities


36 changes: 36 additions & 0 deletions three/MF/V3/Descriptors/ScanCapture.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
class ScanCapture:
"""
Raw scan capture image descriptor streamed to clients that process scans
themselves (`SetProcessingDevices` client processing). Each stereo capture
is sent as two buffers, one per camera, described by this descriptor.

The buffer payload is the raw image data: `rows` rows of `step` bytes,
pixel format given by the OpenCV type code in `type`.
"""
def __init__(self, rows: int, cols: int, type: int, step: int, camera: int, focus: int, index: int, orientation: int, frequency: int, phase: int, angle: float, texture: bool):
# Image rows.
self.rows = rows
# Image columns.
self.cols = cols
# OpenCV Mat type code (e.g. CV_8UC1).
self.type = type
# Row step in bytes.
self.step = step
# Camera index (0 or 1).
self.camera = camera
# Camera focus.
self.focus = focus
# Capture (turntable angle) index.
self.index = index
# Pattern orientation, or -1 for texture captures.
self.orientation = orientation
# Pattern frequency, or -1 for texture captures.
self.frequency = frequency
# Pattern phase, or -1 for texture captures.
self.phase = phase
# Turntable angle in radians.
self.angle = angle
# True if this is a texture capture.
self.texture = texture


30 changes: 30 additions & 0 deletions three/MF/V3/Descriptors/ScannerList.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
from typing import List


class ScannerList:
"""
Scanners discovered on the local network, returned by the
`DiscoverScanners` task.
"""
class Scanner:

"""
A discovered scanner.
"""
def __init__(self, name: str, host: str, ip: str, port: int, version: str):
# The scanner's advertised name (e.g. "THREE").
self.name = name
# The scanner's mDNS host name (e.g. "matterandform.local").
self.host = host
# The scanner's IPv4 address.
self.ip = ip
# The scanner's server port.
self.port = port
# The scanner's advertised server version. Empty if not advertised.
self.version = version

def __init__(self, scanners: List['Scanner'] = None):
# The discovered scanners.
self.scanners = scanners


14 changes: 14 additions & 0 deletions three/MF/V3/Descriptors/ScannerStatus.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
class ScannerStatus:
"""
The desktop engine's scanner connection status.

Returned by the `GetScannerStatus` task and pushed to every client as a
`{"ScannerStatus": {...}}` message whenever the connection state changes.
"""
def __init__(self, connected: bool, host: str):
# True if the engine is connected to a scanner.
self.connected = connected
# The connected scanner's host name or IP address. Empty when not connected.
self.host = host


23 changes: 23 additions & 0 deletions three/MF/V3/Descriptors/StorageInfo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
class StorageInfo:
"""
Storage space of the desktop engine's local workspace and, when a scanner
is connected, of the scanner. Returned by the `StorageInfo` task.
"""
class Space:

"""
Storage space of one side.
"""
def __init__(self, available: int, capacity: int):
# Available bytes.
self.available = available
# Total capacity in bytes.
self.capacity = capacity

def __init__(self, local: 'Space', scanner: 'Space' = None):
# The engine's local workspace storage.
self.local = local
# The connected scanner's storage. Absent when no scanner is connected.
self.scanner = scanner


5 changes: 5 additions & 0 deletions three/MF/V3/Descriptors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@
from MF.V3.Descriptors.Merge import *
from MF.V3.Descriptors.Project import *
from MF.V3.Descriptors.ProjectActions import *
from MF.V3.Descriptors.ProtocolInfo import *
from MF.V3.Descriptors.RemoveVertices import *
from MF.V3.Descriptors.ScanCapture import *
from MF.V3.Descriptors.ScanData import *
from MF.V3.Descriptors.ScannerList import *
from MF.V3.Descriptors.ScannerStatus import *
from MF.V3.Descriptors.Software import *
from MF.V3.Descriptors.StorageInfo import *
from MF.V3.Descriptors.System import *
from MF.V3.Descriptors.Transform import *
from MF.V3.Descriptors.VideoFrame import *
Expand Down
61 changes: 61 additions & 0 deletions three/MF/V3/Tasks/ConnectScanner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
from MF.V3.Task import TaskState as MF_V3_Task_TaskState


class ConnectScanner:
"""*
Connect the desktop engine to a scanner (desktop engine only).

The engine negotiates capabilities with `GetProtocolInfo`, enables client
processing, and downloads the scanner's calibration into its local
workspace. A `ScannerStatus` message is pushed to every client when the
connection state changes.

> Request example:

```json
{
"Task":{ "Index":1, "Type":"ConnectScanner", "Input":"matterandform.local" }
}
```

> Response example:

```json
{
"Task":{ "Index":1, "Type":"ConnectScanner", "Output":true, "State":"Completed" }
}
```
"""
class Request:

"""
Client request for the `ConnectScanner` task.
"""
def __init__(self, Index: int, Type: str, Input: str):
# A unique identifier generated by the client.
self.Index = Index
# "ConnectScanner"
self.Type = Type
# The scanner host name or IPv4 address.
self.Input = Input

class Response:

"""
Server response for the `ConnectScanner` task.
"""
def __init__(self, Index: int, Type: str, Output: bool = None, State: MF_V3_Task_TaskState = None, Error: str = None):
# The unique identifier generated by the client.
self.Index = Index
# "ConnectScanner"
self.Type = Type
# True if the connection was established.
self.Output = Output
# The current state of the task.
self.State = State
# A string describing the error if the task has failed.
self.Error = Error

def __init__(self):
pass

54 changes: 54 additions & 0 deletions three/MF/V3/Tasks/DisconnectScanner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
from MF.V3.Task import TaskState as MF_V3_Task_TaskState


class DisconnectScanner:
"""*
Disconnect the desktop engine from its scanner (desktop engine only).

> Request example:

```json
{
"Task":{ "Index":1, "Type":"DisconnectScanner" }
}
```

> Response example:

```json
{
"Task":{ "Index":1, "Type":"DisconnectScanner", "Output":true, "State":"Completed" }
}
```
"""
class Request:

"""
Client request for the `DisconnectScanner` task.
"""
def __init__(self, Index: int, Type: str):
# A unique identifier generated by the client.
self.Index = Index
# "DisconnectScanner"
self.Type = Type

class Response:

"""
Server response for the `DisconnectScanner` task.
"""
def __init__(self, Index: int, Type: str, Output: bool = None, State: MF_V3_Task_TaskState = None, Error: str = None):
# The unique identifier generated by the client.
self.Index = Index
# "DisconnectScanner"
self.Type = Type
# Always true.
self.Output = Output
# The current state of the task.
self.State = State
# A string describing the error if the task has failed.
self.Error = Error

def __init__(self):
pass

65 changes: 65 additions & 0 deletions three/MF/V3/Tasks/DiscoverScanners.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
from MF.V3.Descriptors.ScannerList import ScannerList
from MF.V3.Task import TaskState as MF_V3_Task_TaskState


class DiscoverScanners:
"""*
Discover scanners on the local network (desktop engine only).

The engine browses mDNS for advertised scanners and additionally resolves
the default scanner host name, so scanners running older firmware that does
not advertise a service record are still found. The search runs for a few
seconds before the result is returned; run the task again to refresh.

> Request example:

```json
{
"Task":{ "Index":1, "Type":"DiscoverScanners" }
}
```

> Response example:

```json
{
"Task":{
"Index":1,
"Type":"DiscoverScanners",
"Output":{ "scanners":[{ "name":"THREE", "host":"matterandform.local", "ip":"192.168.50.115", "port":8081 }] },
"State":"Completed"
}
}
```
"""
class Request:

"""
Client request for the `DiscoverScanners` task.
"""
def __init__(self, Index: int, Type: str):
# A unique identifier generated by the client.
self.Index = Index
# "DiscoverScanners"
self.Type = Type

class Response:

"""
Server response for the `DiscoverScanners` task.
"""
def __init__(self, Index: int, Type: str, Output: ScannerList = None, State: MF_V3_Task_TaskState = None, Error: str = None):
# The unique identifier generated by the client.
self.Index = Index
# "DiscoverScanners"
self.Type = Type
# The discovered scanners.
self.Output = Output
# The current state of the task.
self.State = State
# A string describing the error if the task has failed.
self.Error = Error

def __init__(self):
pass

59 changes: 59 additions & 0 deletions three/MF/V3/Tasks/DownloadScannerProject.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
from MF.V3.Task import TaskState as MF_V3_Task_TaskState


class DownloadScannerProject:
"""*
Download a project archive from the connected scanner (desktop engine
only).

The archive is sent to the client as a task buffer whose descriptor is the
suggested file name. The counterpart of `DownloadProject`, which archives a
local project.

> Request example:

```json
{
"Task":{ "Index":1, "Type":"DownloadScannerProject", "Input":2 }
}
```

> Response example:

```json
{
"Task":{ "Index":1, "Type":"DownloadScannerProject", "State":"Completed" }
}
```
"""
class Request:

"""
Client request for the `DownloadScannerProject` task.
"""
def __init__(self, Index: int, Type: str, Input: int):
# A unique identifier generated by the client.
self.Index = Index
# "DownloadScannerProject"
self.Type = Type
# The scanner project index to download.
self.Input = Input

class Response:

"""
Server response for the `DownloadScannerProject` task.
"""
def __init__(self, Index: int, Type: str, State: MF_V3_Task_TaskState = None, Error: str = None):
# The unique identifier generated by the client.
self.Index = Index
# "DownloadScannerProject"
self.Type = Type
# The current state of the task.
self.State = State
# A string describing the error if the task has failed.
self.Error = Error

def __init__(self):
pass

Loading