Open topic with navigation
FlexScan3D User Manual - Version 3.3.4.x
Functions
|
Functions that pass file and folder names support Unicode in these names, letting you use localized names containing non-ASCII characters.
|
Calibrating
AddScanner(scannerID)
Adds a scanner.
- Parameters
- scannerID: The ID of the scanner.
- Example
- AddScanner(GetScannerIDs()[0])
- Returns
- True if scanner was added successfully.
AddScannerByType(scannerType, serialNumber)
Adds a scanner by a given type.
- Parameters
- scannerType: The type of the scanner. Current valid values are "HDI" or "HDI Advance".
- serialNumber: The serial number of the scanner.
- Example
- AddScannerByType("HDI", 12078)
- Returns
- True if scanner was added successfully, along with the name of the scanner added.
AutoSetExposure()
Automatically selects the exposure for all scanners and enables HDR if necessary.
- Returns
- true if successful, otherwise false, as well as a boolean indicating whether HDR is recommended.
ExportScanner(scannerName, fileName, preserveImages)
- Parameters
- scannerName: The name of a scanner.
- fileName: Name of file to export scanner to. Supports Unicode characters.
- preserveImages: true if calibration images should be preserved, otherwise false to minimize space.
- Example
- ExportScanner("Scanner-001", "C:\Exports\Scanner.7z", true)
- Returns
- true if successful, otherwise false.
GetPattern(scannerName)
Gets the focus pattern of the named scanner.
- Parameters
- scannerName: The name of a scanner.
- Example
- GetPattern("Scanner-001")
- Returns
- The name of the current focus pattern.
GetScannerIDs()
Gets a list of all available scanner IDs.
- Returns
- A list of scanner IDs.
GetScannerIndexFromName(scannerName)
Gets the internal scanner index based on its name.
- Parameters
- scannerName: The name of a scanner.
- Example
- GetScannerIndexFromName("Scanner-001")
- Returns
- The index of the scanner in the current calibration, or -1 if it does not exist.
GetScannerNameFromIndex(scannerIndex)
Gets the name of the scanner based on its internal index in the current calibration.
- Parameters
- scannerIndex: A zero-based index into the list of scanners.
- Example
- GetScannerNameFromIndex(0)
- Returns
- The scanner name if successful, nil if unsuccessful.
HDI_Advance_CalculateDelayTiming(scannerName)
Auto calculate the delay timing values for a scanner.
- Parameters
- scannerName: The name of the scanner.
- Example
- HDI_Advance_CalculateDelayTiming(GetScannerNameFromIndex(0))
- Returns
- true if successful, false if unsuccessful.
HDI_Advance_CalculateWhiteBalance(scannerName)
Auto calculate the white balance for a scanner.
- Parameters
- scannerName: The name of the scanner.
- Example
- HDI_Advance_CalculateWhiteBalance(GetScannerNameFromIndex(0))
- Returns
- true if successful, false if unsuccessful.
HDI_Advance_Calibrate(scannerName)
Calibrates a scanner based on its calibration images.
- Parameters
- scannerName: The name of the scanner.
- Example
- HDI_Advance_Calibrate(GetScannerNameFromIndex(0))
- Returns
- true if successful, false if unsuccessful.
HDI_Advance_CaptureCalibrationImage(scannerName)
Captures a calibration image.
- Parameters
- scannerName: The name of the scanner.
- Example
- HDI_Advance_CaptureCalibrationImage(GetScannerNameFromIndex(0))
- Returns
- true if successful, false if unsuccessful.
HDI_Advance_DeleteCalibration(scannerName)
Deletes all calibration data in a scanner.
- Parameters
- scannerName: The name of the scanner.
- Example
- HDI_Advance_DeleteCalibration(GetScannerNameFromIndex(0))
- Returns
- true if successful, false if unsuccessful.
HDI_Advance_DeleteCalibrationImage(scannerName, imageID)
Delete a calibration image.
- Parameters
- scannerName: The name of the scanner.
- imageID: The id of the image to delete.
- Example
- HDI_Advance_DeleteCalibrationImage(GetScannerNameFromIndex(0), 15)
- Returns
- true if successful, false if unsuccessful.
HDI_Calibrate(scannerName)
Calibrates a scanner based on its calibration images.
- Parameters
- scannerName: The name of the scanner.
- Example
- HDI_Calibrate(GetScannerNameFromIndex(0))
- Returns
- true if successful, false if unsuccessful.
HDI_CaptureCalibrationImage(scannerName)
Captures a calibration image.
- Parameters
- scannerName: The name of the scanner.
- Example
- HDI_CaptureCalibrationImage(GetScannerNameFromIndex(0))
- Returns
- true if successful, false if unsuccessful.
HDI_DeleteCalibrationImage(scannerName, imageID)
Deletes a calibration image.
- Parameters
- scannerName: The name of the scanner.
- imageID: The id of the image to delete.
- Example
- HDI_DeleteCalibrationImage(GetScannerNameFromIndex(0), 15)
- Returns
- true if successful, false if unsuccessful.
ImportScanner(fileName)
Imports a scanner from a previously exported scanner file.
- Parameters
- fileName: Name of file to import scanner from. Supports Unicode characters.
- Example
- ImportScanner("C:\Exports\Scanner.7z")
- Returns
- true if successful, otherwise false.
IsScannerEnabled(scannerName)
Get a scanner's enabled state.
Note that the scanner must be connected first using ScannerConnnect().
- Parameters
- scannerName: The existing scanner name.
- Example
- IsScannerEnabled("Scanner1")
- Returns
- true if enabled, otherwise false.
RemoveScanner(scannerName)
Removes a scanner from the current calibration and deletes the local scanner data.
- Parameters
- scannerName: The existing scanner name.
- Example
- RemoveScanner("Bottom")
RemoveScanners()
Deletes the current scanner configuration, including all associated local files.
RenameScanner(scannerName, newScannerName)
Renames a scanner in the current calibration. Note that the calibration must have been created as type "Multi".
- Parameters
- scannerName: The existing scanner name.
- newScannerName: The new scanner name.
- Example
- RenameScanner("Scanner1", "Bottom")
- Returns
- true if successful, false if unsuccessful.
SetScannerEnabled(scannerName, enabled)
Enable or disable a scanner.
- Parameters
- scannerName: The name of the scanner.
- enabled: true if scanner should be enabled, false for disabled.
- Example
- SetScannerEnabled("Scanner1", true)
- Returns
- true if successful, otherwise false.
ShowPattern(scannerName, patternName)
Sets the projector pattern.
- Parameters
- scannerName: The name of a scanner.
- patternName: The name of the pattern to project.
- Example
- ShowPattern("Scanner-001", "Focus")
- Returns
- true if successful, otherwise false.
StartVideo(scannerName)
Starts live video for a scanner.
- Parameters
- scannerName: The name of a scanner.
- Example
- StartVideo("Scanner-001")
- Returns
- true if successful, otherwise false.
StopVideo(scannerName)
Stops live video for a scanner.
- Parameters
- scannerName: The name of a scanner.
- Example
- StopVideo("Scanner-001")
- Returns
- true if successful, otherwise false.
TestCalibration(scannerName)
Calculate reprojection error for a specific board.
- Parameters
- scannerName: The name of a scanner.
- Example
- TestCalibration("Scanner-001")
- Returns
- true if successful, false if unsuccessful, followed by the scanner and board reprojection error values respectively (in microns).
Cameras
AttachVideoWindow(scannerName, cameraID, windowHandle)
Attaches the live video feed for the specified camera to an application window handle.
- Parameters
- scannerName: The name of a scanner.
- cameraID: The camera ID.
- windowHandle: The application window handle.
- Example
- AttachVideoWindow("Scanner-001", 0, 51347692)
- Returns
- true if successful, false if unsuccessful.
DetachVideoWindow(scannerName, cameraID)
Detaches the live video feed for the specified camera.
- Parameters
- scannerName: The name of the scanner to get the camera from.
- cameraID: The camera ID.
- Example
- DetachVideoWindow("Scanner-001", 0)
- Returns
- true if successful, otherwise false.
Configuration
HDI_AutoUpdateScanner(scannerName)
Updates to the latest scanner firmware included with this software distribution.
- Parameters
- scannerName: The name of the scanner.
- Example
- HDI_AutoUpdateScanner(GetScannerNameFromIndex(0))
- Returns
- true if successful, false if unsuccessful.
HDI_CheckScanner(scannerName)
Determines whether the scanner firmware needs to be updated.
- Parameters
- scannerName: The name of the scanner.
- Example
- HDI_CheckScanner(GetScannerNameFromIndex(0))
- Returns
- 0 = OK
- -1 = Scanner Not Found
- -2 = Scanner Not Discovered
- -3 = Network Configuration Required
- -4 = Firmware Update Required
- -5 = Model Unsupported
HDI_GetFirmwareVersion(scannerName)
Gets the firmware version of the scanner.
- Parameters
- scannerName: The name of the scanner.
- Example
- HDI_GetFirmwareVersion(GetScannerNameFromIndex(0))
- Returns
- true if successful, false if unsuccessful, as well as the firmware version of the scanner.
HDI_GetScannerHealth(scannerName)
Gets comprehensive details regarding the current state of the scanner.
- Parameters
- scannerName: The name of the scanner.
- Example
- HDI_GetScannerHealth(GetScannerNameFromIndex(0))
- Returns
- true if the scanner exists, false if the scanner does not exist, as well as the following details:
- - temperature (degrees C)
- - memory used (bytes)
- - memory capacity (bytes)
- - storage used (bytes)
- - storage capacity (bytes)
- - CPU used (%)
- - netOutUsed
- - netOutCapacity
- - uptime (seconds)
- - current state (1: Conflict, 2: Ready, 3: Running)
- - camera frame error count
- - camera frame drop count
- - messageInDrops
- - messageOutDrops.
HDI_GetScannerModel(scannerName)
Gets the internal model name of a scanner.
- Parameters
- scannerName: The name of the scanner.
- Example
- HDI_GetScannerModel(GetScannerNameFromIndex(0))
- Returns
- true if the scanner exists, false if the scanner does not exist, as well as the model name of the scanner.
HDI_GetScannerOptionCode(scannerName)
Gets the internal option code of a scanner.
- Parameters
- scannerName: The name of the scanner.
- Example
- HDI_GetScannerOptionCode(GetScannerNameFromIndex(0))
- Returns
- true if the scanner exists, false if the scanner does not exist, as well as the model name of the scanner.
HDI_IsUpdateRequired(scannerName)
Determines whether or not the scanner firmware needs to be updated.
- Parameters
- scannerName: The name of the scanner.
- Example
- HDI_IsUpdateRequired(GetScannerNameFromIndex(0))
- Returns
- true if the scanner is connected and needs a firmware update. false in all other cases.
HDI_UpdateScanner(scannerName, firmwarePath)
Updates the scanner using the firmware file at the specified path.
- Parameters
- scannerName: The name of the scanner.
- firmwarePath: The path to the firmware file. Supports Unicode characters.
- Example
- HDI_UpdateScanner(GetScannerNameFromIndex(0), C:\firmware\upgrade.dat)
- Returns
- true if successful, false if unsuccessful.
General
DisplayString(text)
Displays a string in the status bar and/or the log file.
- Parameters
- text: The string to display.
- Example
- DisplayString("Scanners are ready.")
Get(settingName)
Gets an application setting value by name.
- Parameters
- settingName: An application setting name.
- Example
- Get("Calibrating_MinCalibrationImages")
- Returns
- The value of the setting as text if successful, nil if unsuccessful.
NewListString()
Utility function to allow for the creation of lists compatible with other FlexScan3D script functions. Items (such as scan group IDs) can be added to the list using myListName:Add("Scan01").
- Returns
- An empty list.
PrintValue(variable)
Displays the current variable value in the log. Useful for debugging purposes.
- Parameters
- variable: Any variable returned from a script function.
- Example
- PrintValue(groupID)
QuietModeOff()
Disables quiet mode when running scripts from the script editor.
QuietModeOn()
Enables quiet mode when running scripts from the script editor. This suppresses pop-up messages that only has an OK button. Yes/No prompts will still appear. Note that each QuietModeOn() call must be paired with QuietModeOff().
QuietModeStackSize()
Returns the size of the quiet mode stack. This can be used to determine how many times QuietModeOff() must be called to completely disable quiet mode.
- Returns
- size of quiet mode stack.
Run(fileName, arguments)
Launches an external application and waits until it closes.
- Parameters
- fileName: The complete path to an application. Supports Unicode characters.
- arguments: Any arguments to the application.
- Example
- Run("C:\Windows\notepad.exe", "C:\My Scripts\My Scan.script")
- Returns
- true if successful, false if unsuccessful.
Set(name, value)
Sets an application setting value by name.
- Parameters
- name: An application setting name.
- arguments: An application setting value, as text.
- Example
- Set("Calibrating_MinCalibrationImages", "10")
- Returns
- true if successful, false if unsuccessful.
SetHotKey(name, key, script, description)
Sets a hotkey to trigger a script sequence.
- Parameters
- name: The display name of the hotkey.
- key: The hotkey to assign.
- script: The script to run.
- description: Further information that describes this hotkey function.
- Example
- SetHotKey("Scan", "Ctrl-F1", "Scan()", "Perform a scan and process.")
- Returns
- true if successful, otherwise false.
UnsetHotKey(key)
Unsets a hotkey.
- Parameters
- key: The hotkey to unassign.
- Example
- UnsetHotKey("Ctrl-F1")
- Returns
- true if successful, otherwise false.
Wait(seconds)
Pauses the script for a specified delay.
- Parameters
- seconds: The delay time (in seconds).
- Example
- Wait(1.33)
Groups
Copy(groupID, suffix)
Makes a copy of a scan group.
- Parameters
- groupID: A scan group ID.
- suffix: A suffix to append to the new group ID.
- Example
- Copy("1", "copy")
- Returns
- true if successful, false if unsuccessful, as well as the new group ID.
DeleteAllGroups()
Deletes all scan groups in the current project.
DeleteGroup(groupName)
Deletes a scan group.
- Parameters
- groupName: The name of a scan group.
- Example
- DeleteGroup("Scan01")
DeleteSelectedGroups()
Deletes all selected scan groups in the current project.
DeselectAll()
Deselects all scan groups.
DeselectGroup(groupID)
Deselects a scan group.
- Parameters
- groupID: A scan group ID.
- Example
- DeselectGroup("1")
GetAllGroups()
Gets a list of all scan groups in the current project.
- Returns
- A list of all scan groups.
GetGroupAliasFromID(gid)
Gets the group alias its corresponding ID.
- Parameters
- gid: A group ID.
- Example
- GetGroupAliasFromID("1")
- Returns
- The group alias if found, nil if not found.
GetGroupIDFromAlias(alias)
Gets the group ID its corresponding alias.
- Parameters
- alias: A group ID.
- Example
- GetGroupIDFromAlias("Side Scan 1")
- Returns
- The group ID if found, nil if not found.
GetSelectedGroups()
Gets a list of selected scan groups.
- Returns
- A list of selected scan groups.
IsGroupLoaded(groupID)
Returns whether a scan group is loaded.
- Parameters
- groupID: A scan group ID.
- Example
- IsGroupLoaded("1")
- Returns
- true if the specified group is loaded, otherwise false.
IsGroupLocked(groupID)
Returns whether a scan group is locked.
- Parameters
- groupID: A scan group ID.
- Example
- IsGroupLocked("1")
- Returns
- true if the specified group is locked, otherwise false.
IsGroupSelected(groupID)
Returns whether a scan group is selected.
- Parameters
- groupID: A scan group ID.
- Example
- IsGroupSelected("1")
- Returns
- true if the specified group is selected, otherwise false.
LoadAll()
Loads all scan groups.
LoadGroup(groupID)
Loads a scan group.
- Parameters
- groupID: A group ID.
- Example
- LoadGroup("1")
- Returns
- true if successful, false if unsuccessful.
LoadSelected()
Loads all selected scan groups.
- Returns
- true if successful, false if unsuccessful.
LockGroup(groupID)
Locks a scan group.
- Parameters
- groupID: A scan group ID.
- Example
- LockGroup("1")
SaveGroup(groupID)
Saves a scan group.
- Parameters
- groupID: A scan group ID.
- Example
- SaveGroup("1")
- Returns
- true if successful, false if unsuccessful.
SaveGroups(groupIDs)
Saves a list of scan groups.
- Parameters
- groupIDs: A list of scan group IDs.
- Example
- SaveGroups({ "1", "2", "3", "4" })
- Returns
- true if successful, false if unsuccessful.
SelectAll()
Selects all scan groups.
SelectGroup(groupID)
Selects a scan group.
- Parameters
- groupID: A scan group ID.
- Example
- SelectGroup("1")
SetGroupAlias(groupID, alias)
Sets the alias of a group.
- Parameters
- groupID: A scan group ID.
- alias: The new group alias.
- Example
- SetGroupAlias("1", "Side Scan 1")
- Returns
- true if successful, false if unsuccessful.
UnloadAll()
Unloads all scan groups.
UnloadGroup(groupID)
Unloads a scan group.
- Parameters
- groupID: A scan group ID.
- Example
- UnloadGroup("1")
UnloadSelected()
Unloads all selected scan groups.
UnlockGroup(groupID)
Unlocks a scan group.
- Parameters
- groupID: A scan group ID.
- Example
- UnlockGroup("1")
Networking
HDI_AutoConfigureNetwork(scannerName)
Automatically configures the network address of the scanner (and network adapter, if necessary).
- Parameters
- scannerName: The name of the scanner.
- Example
- HDI_AutoConfigureNetwork(GetScannerNameFromIndex(0))
- Returns
- true if successful, false if unsuccessful.
HDI_GetScannerAddress(scannerName)
Changes the network address of the scanner.
- Parameters
- scannerName: The name of the scanner.
- Example
- HDI_GetScannerAddress(GetScannerNameFromIndex(0))
- Returns
- true if successful, false if unsuccessful, as well as the IP address, subnet mask, gateway, and DHCP state (true/false).
HDI_SetScannerAddress(scannerName, ipAddress, subnetMask, gateway, useDHCP)
Changes the network address of the scanner.
- Parameters
- scannerName: The name of the scanner.
- ipAddress: A network IP address.
- subnetMask: A network subnet mask.
- gateway: A network gateway IP address.
- useDHCP: Set to true to enable DHCP on the scanner (useful when the scanner is connected to a router, for example), or false to use a static IP.
- Example
- HDI_SetScannerAddress(GetScannerNameFromIndex(0), 192.168.61.51, 255.0.0.0, 192.168.61.1, false)
- Returns
- true if successful, false if unsuccessful.
Processing
Align()
Aligns one or more unlocked meshes to any locked meshes. Meshes must be loaded. Note that the alignment method used is based on the Processing_Alignment_Type setting.
- Returns
- true if successful, false if unsuccessful.
AlignFastICP(calibDir)
Fast ICP all selected.
ClipGroup(groupID, xMin, xMax, yMin, yMax, zMin, zMax)
Removes all points outside of the specified clipping boundaries. Please note that transformations are ignored, and combined groups are not supported.
- Parameters
- groupID: A scan group ID.
- xMin: A minimum value for X.
- xMax: A maximum value for X.
- yMin: A minimum value for Y.
- yMax: A maximum value for Y.
- zMin: A minimum value for Z.
- zMax: A maximum value for Z.
- Example
- ClipGroup("10", -50.0, 50.0, -50.0, 50.0, -50.0, 50.0)
- Returns
- true if successful, false if unsuccessful.
Combine(groups)
Combines multiple groups of one or more meshes into a single group.
- Parameters
- groups: A list of one or more scan group IDs.
- Example
- Combine({ "1", "2", "3", "4" })
- Returns
- true if successful, false if unsuccessful, as well as the combined group ID.
Decimate(groupList)
Applies mesh decimation to all selected scan groups. The decimated resolution is defined by the Processing_MeshDecimationResolution application setting, where 25.0 results in approximately 25% of the original number of vertices, and 100.0 = 100% of the original (no decimation).
- Returns
- true if successful, false if unsuccessful.
Deviation(referenceGroupID, targetGroupID, exportFile, pointIDs, targetPoints)
Performs a deviation between 2 meshes and exports the results to a file. This only works on single scans, and assumes the scans are already aligned.
- Parameters
- referenceGroupID: The reference group ID.
- targetGroupID: The target group ID.
- exportFile: The file name for the exported ASCII deviation data. Supports Unicode characters.
- pointIDs: Whether or not to include the point IDs in the exported data.
- targetPoints: Whether or not to include the target points in the exported data.
- Example
- Deviation("10", "11", C:\Deviations\dev.txt, false, false)
- Returns
- true if successful, false if unsuccessful, as well as the maximum, minimum, maximum average, minimum average, absolute average, and standard deviation values, respectively.
ErodeSelected()
Applies mesh erosion to all selected scan groups. The number of erosion passes is defined by the Processing_Erosion application setting.
- Returns
- true if successful, false if unsuccessful.
Export(outputDir, ext)
Exports all loaded groups except for combined groups.
- Parameters
- outputDir: The complete path to an existing output directory. Supports Unicode characters.
- ext: The exported file type/extension. Can be ".3d3", ".asc", ".obj", ".ply", ".stl", ".png", or ".dep". Note that when using a texture camera, OBJ, PLY, and 3D3 types will also export the texture images, and in the case of OBJ, accompanying ".mtl" files.
- Example
- Export("C:\Exported Meshes\", ".obj")
- Returns
- A list of complete paths to the exported meshes. Any mesh which failed to export will result in a blank entry ("").
ExportGroups(outputDir, ext, groups)
Exports all specified groups.
- Parameters
- outputDir: The complete path to an existing output directory. Supports Unicode characters.
- ext: The exported file type/extension. Can be ".3d3", ".asc", ".obj", ".ply", ".stl", ".png", or ".dep". Note that when using a texture camera, OBJ, PLY, and 3D3 types will also export the texture images, and in the case of OBJ, accompanying ".mtl" files.
- groups: A list of one or more scan group IDs.
- Example
- ExportGroups("C:\Exported Meshes\", ".obj", { "1", "2", "3", "4" })
- Returns
- A list of complete paths to the exported meshes. Any mesh which failed to export will result in a blank entry ("").
Finalize(groups)
For each group, creates a unified mesh based on one or more combined meshes. This is affected by the Processing_Merging_Type setting: if it is 0, then the existing data is used as-is; if it is 1, then the data is resampled based on Poisson surface reconstruction. Also note that if the Processing_Finalize_RemoveSourceData setting is false, a new scan group will be created for each group ID.
- Parameters
- groups: A list of one or more scan group IDs.
- Example
- Finalize({ "1", "2", "3", "4" })
- Returns
- true if successful, false if unsuccessful, as well as a list of one or more output group IDs.
FineAlign(groups, type)
Runs a thorough global alignment. Note that the meshes must already be loaded.
- Parameters
- groups: A list of one or more scan group IDs.
- type: Alignment type. Must be 3.
- Example
- FineAlign({ "1", "2", "3", "4" }, 3)
- Returns
- true if successful, false if unsuccessful.
GetMarkers(groupID)
Gets the markers for the specified scan group.
- Parameters
- groupID: A scan group ID.
- Example
- GetMarkers("10")
- Returns
- true if successful, false if unsuccessful, as well as a list of marker points (untransformed). Each item in the list consists of an X/Y/Z coordinate, stored as a 3-value array.
GetMeshDetails(groupID)
Gets information about the 3D mesh represented by the groupID.
- Parameters
- groupID: A scan group ID.
- Example
- GetMeshDetails("1")
- Returns
- true if successful, false if unsuccessful, as well as the number of vertices, faces, and markers, respectively.
GetTransformation(groupID)
Gets the current transformation of the specified scan group.
- Parameters
- groupID: A scan group ID.
- Example
- GetTransformation("10")
- Returns
- A 4x4 3D transformation matrix, returned as an array containing all 16 values, or nil if an error occurred.
Import(fileName, markers)
Imports a mesh.
- Parameters
- fileName: The complete path to a mesh file. Acceptable formats are 3D3, OBJ, and STL. Supports Unicode characters.
- markers: If this flag is true, then the imported points will be treated as a set of markers instead of a mesh.
- Example
- Import("C:\Models\Car.obj", false)
- Returns
- The new group ID if successful, nil if unsuccessful.
MeshClean()
Cleans up.
NewTransformationMatrix()
Creates a transformation matrix.
- Returns
- A 4x4 3D transformation matrix, returned as an array containing 16 values.
Process(groupID, generateType)
Generates 3D data from 2D scan images.
- Parameters
- groupID: The scan group ID.
- generateType: 0 for Mesh, 1 for Points.
- Example
- Process("16", 0)
- Returns
- true if successful, false if unsuccessful.
ProcessGroups(groups, generateType)
Generates 3D data from 2D scan images.
- Parameters
- groups: A list of one or more scan group IDs.
- generateType: 0 for Mesh, 1 for Points.
- Example
- ProcessGroups({ "1", "2", "3", "4" }, 0)
- Returns
- true if successful, false if unsuccessful.
ReprojectUVTexture(referenceID, targetID, txtWidth, txtHeight)
Projects the texture from one group onto another.
- Parameters
- referenceID: A source scan group ID. The mesh must contain texture coordinates.
- txtWidth: The width of the texture.
- txtHeight: The height of the texture.
- Returns
- true if successful, false if unsuccessful.
SetCleanUpType(cleanUpType)
Set the type of clean-up on mesh generation.
- Parameters
- cleanUpType: A type of clean-up on meshing: 0 - None, 1 - Relaxed, 2 - Standard, 3 - High, 4 - Extreme.
- Example
- SetCleanUpType(1)
SetPresetTransform(groups)
Set preset alignment based on specified prealigned scans. Assumes each group has only 1 scan.
- Returns
- true if successful, false if unsuccessful.
SetTransformation(groupID, matrix)
Sets the transformation of the specified scan group.
- Parameters
- groupID: A scan group ID.
- matrix: A 4x4 matrix representing a 3D transformation.
- Example
- SetTransformation("10", {1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1})
- Returns
- true if successful, false if unsuccessful.
SmoothSelected()
Applies mesh smoothing to all selected scan groups. The number of smoothing passes is defined by the Processing_Smoothing application setting.
- Returns
- true if successful, false if unsuccessful.
UnCombine(groupID)
Splits a combined group into its component groups. The output groups only contain a single mesh each.
- Parameters
- groupID: A combined group ID.
- Example
- UnCombine("10")
- Returns
- true if successful, false if unsuccessful, as well as a list of one or more output group IDs.
Projector
HDI_Advance_SetProjectorBrightness(scannerName, brightness)
Sets the brightness of the projector for a specific scanner.
- Parameters
- scannerName: The name of a scanner in the current calibration.
- brightness: A brightness level from full black (0.0) to full white (1.0).
- Example
- HDI_Advance_SetProjectorBrightness("AdvancePlugin::1", 0.85)
HDI_Advance_ShowImage(scannerName, imageFileName)
Displays an image on the projector.
- Parameters
- scannerName: The name of a scanner in the current calibration.
- imageFileName: The name of an image to display on the projector. Supports Unicode characters.
- Returns
- true if successful, false if unsuccessful.
Projects
CloseProject()
Closes the current project.
- Returns
- true if successful, false if unsuccessful.
DeleteProject(name)
Deletes a project by name.
- Parameters
- name: A project name. Supports Unicode characters.
- Example
- DeleteProject("My Project")
- Returns
- true if successful, false if unsuccessful.
DeleteProjectPath(dir)
Deletes a project by complete path.
- Parameters
- dir: A project directory. Supports Unicode characters.
- Example
- DeleteProjectPath("C:\Users\User\Documents\FlexScan3D\Projects\My Project\")
- Returns
- true if successful, false if unsuccessful.
GetProjectNames()
Gets a list of project names.
GetProjectsPath()
Gets the projects directory (the base path where projects are stored).
LoadProject(name)
Loads a project by name.
- Parameters
- name: A project name. Supports Unicode characters.
- Example
- LoadProject("My Project")
- Returns
- true if successful, false if unsuccessful.
LoadProjectPath(dir)
Loads a project by complete path.
- Parameters
- dir: A project directory. Supports Unicode characters.
- Example
- LoadProjectPath("C:\Users\User\Documents\FlexScan3D\Projects\My Project\")
- Returns
- true if successful, false if unsuccessful.
NewProject(name)
Creates a new project by name.
- Parameters
- name: A project name. Supports Unicode characters.
- Example
- NewProject("My Project")
- Returns
- true if successful, false if unsuccessful.
NewProjectPath(dir)
Creates a new project by complete path.
- Parameters
- name: A project directory. Supports Unicode characters.
- Example
- NewProjectPath("C:\Users\User\Documents\FlexScan3D\Projects\My Project\")
- Returns
- true if successful, false if unsuccessful.
SaveProject()
Saves the current project.
- Returns
- true if successful, false if unsuccessful.
Rotary
GetNumMotors()
- Returns
- True if rotary is connected and number of motors.
IsRotaryCalibrated(scannerName)
Determines whether or not a rotary is calibrated.
- Returns
- true if a rotary is calibrated, false if a rotary is not calibrated.
IsRotaryConnected()
Determines whether or not a rotary is connected.
- Returns
- true if a rotary is connected, false if a rotary is not connected.
Rotary360Scan(motor, nScans, HDR)
Runs a 360-degree rotary scan.
- Parameters
- motor: The rotary motor index (1-4).
- nScans: The number of scans. Ideally, this should be a factor of 360.
- HDR: Scan using HDR technology.
- Example
- Rotary360Scan(1, 12, false)
- Returns
- true if successful, false if unsuccessful, as well as a list of new scan group IDs.
RotaryAlignScanner(scannerName, motor)
Does a rotary alignment on the specified scanner. Note that a calibration board must first be placed on the rotary, facing the scanner.
- Parameters
- scannerName: The name of a scanner.
- motor: Axis number.
- Example
- RotaryAlignScanner("Scanner-001", 1)
- Returns
- true if successful, false if unsuccessful.
RotaryCalibrate(scannerName, axis)
Calibrate the rotary table using the available rotary calibration images.
- Parameters
- scannerName: The name of a scanner.
- axis: The axis/motor to calibrate for.
- Example
- RotaryCalibrate("Scanner-001", 1)
- Returns
- true if successful, false if unsuccessful.
RotaryCaptureCalibrationImage(scannerName)
Capture images of the calibration board for rotary table calibration.
- Parameters
- scannerName: The name of a scanner.
- Example
- RotaryCaptureCalibrationImage("Scanner-001")
- Returns
- true if successful, false if unsuccessful.
RotaryDeleteCalibration(scannerName)
Resets the rotary calibration.
- Parameters
- scannerName: The name of a scanner.
- Example
- RotaryDeleteCalibration("Scanner-001")
- Returns
- true if successful, false if unsuccessful.
RotaryGetCurrAngle(motor)
- Parameters
- motor: The rotary motor index (1-4).
- Example
- RotaryGetCurrAngle(1)
- Returns
- True if rotary is connected and current position of the rotary in the form of angle in degrees.
RotaryGetCurrStep(motor)
- Parameters
- motor: The rotary motor index (1-4).
- Example
- RotaryGetCurrStep(1)
- Returns
- True if rotary is connected and current position of the rotary in the form of steps.
RotaryGetStepsPerTurn(motor)
- Parameters
- motor: The rotary motor index (1-4).
- Example
- RotaryGetStepsPerTurn(1)
RotaryIDs()
Get a list of all available rotaries.
- Returns
- Autodetect all rotary tables and returns a list of rotary IDs.
RotaryMove(motor, steps)
Moves the rotary.
- Parameters
- motor: The rotary motor index (1-4).
- steps: The number of steps to move the rotary.
- Example
- RotaryMove(1, 150)
- Returns
- true if successful, false if unsuccessful.
RotaryReset()
Resets the rotary position.
- Returns
- true if successful, false if unsuccessful.
RotaryRotate(motor, degrees)
Rotates the rotary.
- Parameters
- motor: The rotary motor index (1-4).
- degrees: The number of degrees to rotate the rotary.
- Example
- RotaryRotate(1, 15)
- Returns
- true if successful, false if unsuccessful.
RotarySet(ID)
Instead of using any available rotary use one specified by ID. Set to null to revert to default behaviour.
- Parameters
- ID: ID of the rotary table, usually one returned by RotaryIDs().
- Example
- RotarySet(PluginRotaryWR::COM3)
RotarySetStepsPerTurn(motor, steps)
- Parameters
- motor: The rotary motor index (1-4).
- Example
- RotarySet(PluginRotaryWR::COM3)
Scanning
ClearMarkerExposure(scannerName)
Clears the marker exposure. Markers can still be detected using the scan exposure.
- Parameters
- scannerName: The name of a scanner.
- Example
- ClearMarkerExposure("Scanner-001")
- Returns
- true if successful, false if unsuccessful.
EasyScan()
Determines exposure settings, then does a scan. HDR will be used if necessary.
- Returns
- true if successful, false if unsuccessful, as well as a list of new scan group IDs.
GetMarkerExposure(scannerName)
Gets the exposure time for markers.
- Parameters
- scannerName: The name of the scanner to query the marker exposure from.
- Example
- GetMarkerExposure(Scanner001)
- Returns
- The exposure time for markers.
GetScannerExposure(scannerName)
Gets the exposure for this scanner's geometry camera(s).
- Parameters
- scannerName: The name of the scanner to query the exposure from.
- Example
- GetScannerExposure(Scanner001)
- Returns
- The current exposure time.
GetScannerGroup(scannerName)
Gets the scanner group.
- Parameters
- scannerName: The scanner name.
- Example
- GetScannerGroup("Scanner1")
- Returns
- true if successful, false if unsuccessful, as well as the name of the scanning group.
IsScannerConnected(scannerName)
Checks to see whether the specified scanner is connected.
- Parameters
- scannerName: The scanner name.
- Example
- IsScannerConnected("Scanner 1")
- Returns
- true if the scanner is connected, otherwise false.
Scan()
Scans into the project using the scanner(s) defined in the current calibration. Note that the Scanning_Generation_Type setting will affect whether the resulting scan is automatically processed or not, and if so, whether to generate a complete mesh or just a point cloud.
- Returns
- true if successful, false if unsuccessful, as well as a list of one or more output group IDs.
ScanHDR()
Scan the object at different exposures and combine them into one scan to get maximum data.
- Returns
- true if successful, false if unsuccessful, as well as a list of new scan group IDs.
ScannerConnect()
Ensures that all scanners in the current calibration are connected and working properly.
- Returns
- true if successful, false if unsuccessful.
SetMarkerExposure(scannerName)
Sets the marker exposure according to the current exposure value.
- Parameters
- scannerName: The scanner name.
- Example
- SetMarkerExposure("Scanner-001")
- Returns
- true if successful, false if unsuccessful.
SetScannerExposure(scannerName, time)
Sets the exposure for this scanner's geometry camera(s).
- Parameters
- scannerName: The name of the scanner to apply the exposure to.
- time: The exposure time to apply (in milliseconds).
- Example
- SetScannerExposure(Scanner001, 16.6)
- Returns
- true if successful, false if unsuccessful.
SetScannerExposureSize(scannerName, size)
Sets the exposure size for this scanner's geometry camera(s).
- Parameters
- scannerName: The name of the scanner to apply the exposure to.
- size: The exposure delta size from the minimum to maximum exposure for HDR scans (in milliseconds).
- Example
- SetScannerExposureSize(Scanner001, 33.3)
- Returns
- true if successful, false if unsuccessful.
SetScannerGroup(scannerName, groupName)
Sets the scanner group. Scanners within the same group will all start capturing simultaneously.
- Parameters
- scannerName: The scanner name.
- groupName: A logical scanning group.
- Example
- SetScannerGroup("Scanner1", "1")
- Returns
- true if successful, false if unsuccessful.
StartLiveScan()
Enable live scan mode, then begin scanning using current scan options.
- Returns
- true if successful, false if unsuccessful.
StopLiveScan()
Stop live scan mode, if it was enabled.
- Returns
- true if successful, false if unsuccessful, as well as a list of new scan group IDs acquired during live scanning.
StopLiveScan()
Stop live scan mode, if it was enabled.
- Returns
- true if successful, false if unsuccessful, as well as a list of new scan group IDs acquired during live scanning.
UI
UI_InvertSelection()
Inverts the mesh selection.
UI_Recenter()
Recenters the 3D scene.
Various
GetMemoryUsage()
Gets the memory usage of FlexScan3D.
- Returns
- private memory usage of FlexScan3D, in bytes.
TranslucencyCompensation(groupID, k)
Scale the scan in z direction as: z = z + k * abs(nz).
- Parameters
- groupID: A combined group ID.
- k: Constant multiplier which is the max shift in millimeters.
- Example
- TranslucencyCompensation("10", 0.75)
- Returns
- true if successful, false if unsuccessful.
Copyright © 2015 LMI Technologies, Inc. All rights reserved.