Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2025.
Loading...
Searching...
No Matches
SRTC360Interface Class Reference

Provides methods to interact with an RTC360 scanner. More...

Public Member Functions

Object CreateJob (string jobName)
 Creates a new job on the scanner.
 
Object DownloadJob (Object options)
 Downloads a job from the scanner and waits for completion.
 
Object GetJobList ()
 Retrieves the list of jobs available on the connected scanner.
 
Object ImportJob (Object options)
 Downloads a job from the scanner and imports its point clouds.
 
boolean IsConnected ()
 Checks the connection to the scanner.
 
Object SelectJob (string jobName)
 Selects a job by name to be used for the next scan.
 
Object StartScan (Object options)
 Starts a new scan on the scanner using the currently selected job.
 

Static Public Member Functions

static Object ImportLocalJob (Object options)
 Import all clouds from a local RTC360 job directory.
 
static SRTC360Interface New ()
 Creates a new SRTC360Interface object and connect to an RTC360 Scanner.
 

Detailed Description

Provides methods to interact with an RTC360 scanner.

This object is not constructible, it must be retrieved from a specific source.

Member Function Documentation

◆ CreateJob()

Object SRTC360Interface::CreateJob ( string jobName)

Creates a new job on the scanner.

Parameters
jobName(string) The name for the new job.
Return values
ret.ErrorCode(number) The error code.
  • 0: Success: The operation completed with no errors.
  • 1: Error: An unknown or unhandled error occurred.
  • 2: Error [Connection]: The scanner is disconnected.
  • 3: Error [Job]: Failed to retrieve the list of jobs from the scanner.
  • 4: Error [Job]: Could not create a job with the specified name (it may be invalid).
  • 5: Error [Job]: The job already exists on the scanner

◆ DownloadJob()

Object SRTC360Interface::DownloadJob ( Object options)

Downloads a job from the scanner and waits for completion.

This function starts a download and blocks until it is finished, aborted, or fails, showing progress in the console.

Parameters
options(Object) Download options.
  • jobName (string): The name of the job to download.
  • dirName (string): The local PARENT directory to save the job to.
Return values
ret.ErrorCode(number) The final error code.
  • 0: Success: The operation completed with no errors.
  • 1: Error: An unknown or unhandled error occurred.
  • 2: Error [Connection]: The scanner is disconnected.
  • 3: Error [Operation]: Failed to create a new download operation on the scanner.
  • 4: Error [Operation]: The download operation failed.

◆ GetJobList()

Object SRTC360Interface::GetJobList ( )

Retrieves the list of jobs available on the connected scanner.

Return values
ret.ErrorCode(number) The error code.
  • 0: Success: The operation completed with no errors.
  • 1: Error: An unknown or unhandled error occurred.
  • 2: Error [Connection]: The scanner is disconnected.
  • 3: Error [Job]: Failed to retrieve the list of jobs from the scanner.
  • 4: Error [Job]: Failed while iterating through the job list on the scanner.
ret.jobList(Array<string>) An array of job names.

◆ ImportJob()

Object SRTC360Interface::ImportJob ( Object options)

Downloads a job from the scanner and imports its point clouds.

Parameters
options(Object) Import options.
  • jobName (string): The name of the job on the scanner to download.
  • dirName (string): The local path where the job will be downloaded and imported from.
  • cloud (boolean): Set to true to import all point clouds.
  • color (boolean): Set to true to import colorized point clouds.
Return values
ret.ErrorCode(number) The error code.
  • 0: Success: The operation completed with no errors.
  • 1: Error: An unknown or unhandled error occurred.
  • 2: Error [Connection]: The scanner is disconnected.
  • 3: Error [Job]: The jobs path is invalid.
  • 4: Error [Job]: Failed to mount the job path.
  • 5: Error [Job]: Failed to retrieve the list of jobs from the scanner.
  • 6: Error [Operation]: The download operation failed.
ret.CloudTbl(Array<SCloud>) The table of imported SCloud objects.

◆ ImportLocalJob()

static Object SRTC360Interface::ImportLocalJob ( Object options)
static

Import all clouds from a local RTC360 job directory.

Iterate on all setups inside a job and return the setups clouds.

var importOptions = {
dirName: jobPath,
cloud: true,
color: true
};
var result = SRTC360Interface.ImportLocalJob(importOptions);
if(result.ErrorCode == 0) {
if (result.CloudTbl && result.CloudTbl.length > 0) {
print("Success! " + result.CloudTbl.length + " point cloud(s) were imported.");
for (var i = 0; i < result.CloudTbl.length; i++) {
var aCloud = result.CloudTbl[i];
var newName = "RTC360_Setup_" + (i + 1);
aCloud.SetName(newName);
// If color was imported, set the representation to show it
if (importOptions.color) {
aCloud.SetCloudRepresentation(SCloud.CloudRepresentationTypeEnum.CLOUD_RGB);
} else {
aCloud.SetCloudRepresentation(SCloud.CloudRepresentationTypeEnum.CLOUD_INTENSITY);
}
aCloud.AddToDoc();
}
}
}
Provide point cloud edition and creation methods.
Definition Reshaper.h:3969
CloudRepresentationTypeEnum
The different representation types for clouds.
Definition Reshaper.h:4012
Provides methods to interact with an RTC360 scanner.
Definition Reshaper.h:2763
static Object ImportLocalJob(Object options)
Import all clouds from a local RTC360 job directory.
ZoomAll()
Do a zoom on all the visible SComp.
Parameters
options(Object) Import options.
  • dirName (string): The path and name of the directory to import.
  • cloud (boolean): Set to true to import all point clouds.
  • color (boolean): Set to true to import colorized point clouds.
  • nbPtToKeep (number): Max number of points to keep (0 for unlimited).
Return values
ret.ErrorCode(number) The error code.
  • 0: Success: The operation completed with no errors.
  • 1: Error: An unknown or unhandled error occurred.
  • 2: Error [Job]: The jobs path is invalid.
  • 3: Error [Job]: Failed to mount the path.
  • 4: Error [Job]: Failed to retrieve the list of jobs from the scanner.
  • 5: Error [Operation]: The download operation failed.
ret.CloudTbl(Array<SCloud>) The table of imported SCloud objects.

◆ IsConnected()

boolean SRTC360Interface::IsConnected ( )

Checks the connection to the scanner.

Returns
(boolean) True if connected, false otherwise.

◆ New()

static SRTC360Interface SRTC360Interface::New ( )
static

Creates a new SRTC360Interface object and connect to an RTC360 Scanner.

Returns
(SRTC360Interface)

◆ SelectJob()

Object SRTC360Interface::SelectJob ( string jobName)

Selects a job by name to be used for the next scan.

Parameters
jobName(string) The name of the job to select.
Return values
ret.ErrorCode(number) The error code.
  • 0: Success: The operation completed with no errors.
  • 1: Error: An unknown or unhandled error occurred.
  • 2: Error [Connection]: The scanner is disconnected.
  • 3: Error [Job]: The specified job was not found on the scanner.
  • 4: Error [Job]: Failed to retrieve the list of jobs from the scanner.
  • 5: Error [Job]: Failed while iterating through the job list on the scanner.

◆ StartScan()

Object SRTC360Interface::StartScan ( Object options)

Starts a new scan on the scanner using the currently selected job.

This function initiates a measurement with the specified parameters. A job must be selected first using SelectJob().

var rtc = SRTC360Interface.New();
if (!rtc.IsConnected()) {
print("Not connected to scanner.");
} else {
rtc.SelectJob("MyNewJob"); // Select a job first
var scanOptions = {
resolution: 0, // Low
imaging: true,
doubleScan: false,
vis: true,
setupName: "FirstScan"
};
var result = rtc.StartScan(scanOptions);
if (result.ErrorCode == 0) {
print("Scan started successfully!");
} else {
print("Failed to start scan. Error: " + result.ErrorCode);
}
}
static SRTC360Interface New()
Creates a new SRTC360Interface object and connect to an RTC360 Scanner.
print(any arg)
Print to output the argument.
Parameters
options(Object) Scan options.
  • resolution (number): Scan resolution: 0=Low, 1=Medium, 2=High.
  • imaging (boolean): Set to true to enable imaging.
  • doubleScan (boolean): Set to true to enable double scan.
  • vis (boolean): Set to true to enable Visual Inertial System (VIS) tracking.
  • setupName (string): An optional name for the new setup.
Return values
ret.ErrorCode(number) The error code.
  • 0: Success: The operation completed with no errors.
  • 1: Error: An unknown or unhandled error occurred.
  • 2: Error [Connection]: The scanner is disconnected.
  • 3: Error [Job]: No job selected.
  • 4: Error [Scan]: The measurement operation failed to start.
  • 5: Error [Scan]: Failed to retrieve the progress status.