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

Provide CloudWorx cloud edition and creation methods. More...

Inheritance diagram for SCwCloud:
SComp

Public Types

enum  CwCloudColorSchemeTypeEnum {
  CWCLOUD_SCHEME_MULTIHUE = 0 , CWCLOUD_SCHEME_GRAYSCALE = 1 , CWCLOUD_SCHEME_RED = 2 , CWCLOUD_SCHEME_GREEN = 3 ,
  CWCLOUD_SCHEME_BLUE = 4
}
 The type of color scheme for an SCwCloud (when representation is Intensity) More...
 
enum  CwCloudRepresentationTypeEnum { CWCLOUD_COLORED = 0 , CWCLOUD_INTENSITY = 1 , CWCLOUD_APPEARANCE = 2 , CWCLOUD_CLASSIFICATION = 3 }
 The different representation types for SCwCloud. More...
 
enum  ObjectsToConvert { CLOUDS = 1 , IMAGES = 2 , TRAJECTORIES = 4 }
 Enum to know which objects types must be converted. More...
 
- Public Types inherited from SComp
enum  VisibilityEnum { HIDDEN_ONLY = 0 , VISIBLE_ONLY = 1 , ANY_VISIBILITY = 2 }
 Visible criteria. More...
 

Public Member Functions

CwCloudColorSchemeTypeEnum GetColorScheme ()
 Get the current color scheme of the SCwCloud.
 
CwCloudRepresentationTypeEnum GetCwCloudRepresentation ()
 Get the current representation of the SCwCloud.
 
Object SaveCwProject (string projectFileName)
 Save the SCwCloud into a cwprj file.
 
 SetColorScheme (CwCloudColorSchemeTypeEnum colorScheme)
 Set the color scheme of the SCwCloud (the color scheme is only defined for the intensity representation)
 
 SetCwCloudRepresentation (CwCloudRepresentationTypeEnum representation)
 Set the representation of the SCwCloud.
 
Object ToCloud (number nbPointsAsked, boolean convertIntoSpherical=false, boolean convertCloudOnly=false)
 Create an SCloud and optionally an SImage table from the SCwCloud.
 
Object ToMMSData (number nbPointsAsked, ObjectsToConvert objectsToConvert=SCwCloud.CLOUDS, number imagesMinimumStep=5, boolean importSidePhotos=false, boolean convertCubefaceToSpherical=true)
 Convert mobile data from an LGSx file, creating a table of SCloud and / or a table of SImage tables and / or a table of STrajectory from the SCwCloud.
 
string toString ()
 Get the type of the variable.
 
string ValuesToString ()
 Get a debug string representation of the SCwCloud.
 
- Public Member Functions inherited from SComp
 AddToDoc ()
 Add the object to the document.
 
 ApplyTransformation (SMatrix matrix)
 Apply a geometric transformation to the current object by making a product with the given matrix.
 
Object GetBoundingBox (SMatrix ucs=null)
 Calculate the bounding box of the object.
 
Object GetColors ()
 Get the colors of the object.
 
string GetFolderName ()
 Get the name of the folder containing the object.
 
string GetName ()
 Return the object's name.
 
string GetPath ()
 Return the full path of an SComp in the tree.
 
 Invert ()
 Invert the normal of the object.
 
boolean IsInDoc ()
 Return if the object is in the document or not.
 
boolean IsVisible ()
 Get the visibility of the object.
 
 MoveToGroup (string groupPath, boolean moveInsideTopParent=true)
 Move the object to the document group represent by the given path. If some groups, in the path, don't exist, they will be created.
 
 RemoveFromDoc ()
 Remove the object from the document.
 
 SetClippable (boolean clipping)
 Set clippable or not.
 
 SetColors (number red, number green, number blue)
 Set the colors of the object.
 
 SetName (string objectName)
 Set the object's name.
 
 SetTransparency (number alpha)
 Set the transparency of the object.
 
 SetVisibility (boolean visible)
 Set the object to be visible, or not visible.
 
string toString ()
 Get the type of the variable.
 
 Translate (SVector vector)
 Make a translation of the current object with an SVector.
 

Static Public Member Functions

static Array< SCwCloudAll (VisibilityEnum visCrit=SComp.ANY_VISIBILITY)
 Get all the SCwCloud in the document.
 
static Object CloneLGSx (Array< SCloud > clouds, SCwCloud cwCloud, string path, Object options={})
 Clone an LGSx project while updating with the points.
 
static CloseCwProject ()
 Remove the existing SCwCloud from the current document, if any.
 
static DefineJetStreamServer ()
 Open a dialog to define the JetStream server address and port.
 
static Object ExportLGSx (Array< SComp > objects, string path, Object options={})
 Export objects as a new LGSx project.
 
static Object FromClick ()
 Launch an interaction to select a SCwCloud in the scene.
 
static Array< SCwCloudFromName (string name)
 Search all the SCwCloud with the given name.
 
static Array< SCwCloudFromSel ()
 Get all the selected SCwCloud.
 
static ManageConnections ()
 Open a dialog to define the CloudWorx server address and port.
 
static Object NewFromCwProjectFile (string fileName)
 Constructor to load a CloudWorx Project.
 
static Object NewFromImpData ()
 Constructor to load an SCwCloud from an IMP file.
 
static Object NewFromLGSData ()
 Constructor to load an SCwCloud from an LGSx file.
 
static Object NewFromLGSData (string fileName)
 Constructor to load an SCwCloud from an LGSx file.
 
static Object NewFromLGSxData ()
 Constructor to load an SCwCloud from an LGSx file.
 
static Object NewFromLGSxData (string fileName)
 Constructor to load an SCwCloud from an LGSx file.
 
- Static Public Member Functions inherited from SComp
static Array< SCompAll (VisibilityEnum visCrit=SComp.ANY_VISIBILITY)
 Get all the SComp in the document.
 
static Object FromClick ()
 Launch an interaction to select a SComp in the scene.
 
static Array< SCompFromName (string name)
 Search all the SComp with the given name.
 
static Array< SCompFromSel ()
 Get all the selected SComp.
 

Detailed Description

Provide CloudWorx cloud edition and creation methods.

Member Enumeration Documentation

◆ CwCloudColorSchemeTypeEnum

The type of color scheme for an SCwCloud (when representation is Intensity)

Enumerator
CWCLOUD_SCHEME_MULTIHUE 

Multi hue.

CWCLOUD_SCHEME_GRAYSCALE 

Gray scale.

CWCLOUD_SCHEME_RED 

Red.

CWCLOUD_SCHEME_GREEN 

Green.

CWCLOUD_SCHEME_BLUE 

Blue.

◆ CwCloudRepresentationTypeEnum

The different representation types for SCwCloud.

Enumerator
CWCLOUD_COLORED 

Colored points.

CWCLOUD_INTENSITY 

Intensity.

CWCLOUD_APPEARANCE 

Appearance.

CWCLOUD_CLASSIFICATION 

Classification.

◆ ObjectsToConvert

Enum to know which objects types must be converted.

Enumerator
CLOUDS 

Convert the clouds.

IMAGES 

Convert the images.

TRAJECTORIES 

Convert the trajectories.

Member Function Documentation

◆ All()

static Array< SCwCloud > SCwCloud::All ( VisibilityEnum visCrit = SComp.ANY_VISIBILITY)
static

Get all the SCwCloud in the document.

Parameters
visCrit(VisibilityEnum) Visible selection criteria
Returns
(Array<SCwCloud>) Array of all the SCwCloud contained in the document, that fulfill the visibility criteria

◆ CloneLGSx()

static Object SCwCloud::CloneLGSx ( Array< SCloud > clouds,
SCwCloud cwCloud,
string path,
Object options = {} )
static

Clone an LGSx project while updating with the points.

A publisher license is required.

See also
SCwCloud.ExportLGSx()
Parameters
clouds(Array<SCloud>) An array of SCloud that will be used to update the LGSx project.
cwCloud(SCwCloud) An SCwCloud opened from the LGSx project that will be cloned.
path(string) Path for generated clone project.
options(Object)
  • selectedSetupsAndTracksOnly (boolean): Clone only setups and tracks belonging to the selected clouds. Default: true
  • replaceAllPoints (boolean): Replace all points from the original LGSx file or append to the existing ones. Used only when all input points are unstructured. Default: true
  • password (string): Password protection for the generated. Default: empty
Return values
ret.ErrorCode(number) Status
  • 0: Success
  • 1: Unknown error
  • 2: License error
  • 3: Not enough memory
  • 4: Invalid path
  • 5: Invalid project type
  • 6: No valid points
  • 7: Input clouds contain static and mobile data.
ret.InvalidMobilePoints(number) Number of invalid mobile points. These have been ignored.
ret.UnstructuredPoints(number) Number of unstructured points.

◆ CloseCwProject()

static SCwCloud::CloseCwProject ( )
static

Remove the existing SCwCloud from the current document, if any.

Note
Only the CwCloud will be removed. If you want to remove clipping objects you can use ClearDoc() which will remove all objects inside the document

◆ DefineJetStreamServer()

static SCwCloud::DefineJetStreamServer ( )
static

Open a dialog to define the JetStream server address and port.

Deprecated
This function is deprecated. Use ManageConnections() instead.

◆ ExportLGSx()

static Object SCwCloud::ExportLGSx ( Array< SComp > objects,
string path,
Object options = {} )
static

Export objects as a new LGSx project.

See also
SCwCloud.CloneLGSx()
Parameters
objects(Array<SComp>) Objects to export. These can be clouds, trajectories or clipping objects. There must be at least one cloud.
path(string) Path where the LGSx should be exported to.
options(Object)
  • password (string): An optional password to protect the generated LGSx (default: empty = no password)
Return values
ret.ErrorCode(number) Status
  • 0: Success
  • 1: Unknown error
  • 2: No points to export
  • 3: License error

◆ FromClick()

static Object SCwCloud::FromClick ( )
static

Launch an interaction to select a SCwCloud in the scene.

Warning
This function will pause the script, and wait for user interaction
Return values
ret.ErrorCode(number) The error code
  • 0: No error, the SCwCloud is selected.
  • 1: Nothing is selected.
  • 2: The ESCape key has been pressed
ret.CwCloud(SCwCloud) The selected SCwCloud

◆ FromName()

static Array< SCwCloud > SCwCloud::FromName ( string name)
static

Search all the SCwCloud with the given name.

Parameters
name(string) The name to find
Returns
(Array<SCwCloud>) All the SCwCloud with the given name

◆ FromSel()

static Array< SCwCloud > SCwCloud::FromSel ( )
static

Get all the selected SCwCloud.

Returns
(Array<SCwCloud>) All the selected SCwCloud

◆ GetColorScheme()

CwCloudColorSchemeTypeEnum SCwCloud::GetColorScheme ( )

Get the current color scheme of the SCwCloud.

Returns
(CwCloudColorSchemeTypeEnum) The current color scheme

◆ GetCwCloudRepresentation()

CwCloudRepresentationTypeEnum SCwCloud::GetCwCloudRepresentation ( )

Get the current representation of the SCwCloud.

Returns
(CwCloudRepresentationTypeEnum) The current representation

◆ ManageConnections()

static SCwCloud::ManageConnections ( )
static

Open a dialog to define the CloudWorx server address and port.

◆ NewFromCwProjectFile()

static Object SCwCloud::NewFromCwProjectFile ( string fileName)
static

Constructor to load a CloudWorx Project.

Note
The cloud is automatically added to the scene
This function will fail if an SCwCloud is already present inside the project
Parameters
fileName(string) The fileName of the CloudWorx Project to load
Return values
ret.ErrorCode(number) The error code
  • 0: No error, an SCwCloud has been loaded
  • 1: Nothing done

◆ NewFromImpData()

static Object SCwCloud::NewFromImpData ( )
static

Constructor to load an SCwCloud from an IMP file.

Note
The cloud is automatically added to the scene
This function will popup a dialog to the user in order to select a cloud from an IMP file
This function will fail if an SCwCloud is already present inside the project
Return values
ret.ErrorCode(number) The error code
  • 0: No error, an SCwCloud has been loaded
  • 1: Nothing done
ret.CwCloud(SCwCloud) The loaded SCwCloud, if any

◆ NewFromLGSData() [1/2]

static Object SCwCloud::NewFromLGSData ( )
static

Constructor to load an SCwCloud from an LGSx file.

Note
The cloud is automatically added to the scene
This function will popup a dialog to the user in order to select a cloud from an LGSx file
This function will fail if an SCwCloud is already present inside the project
Deprecated
This function is deprecated. Use NewFromLGSxData() instead.
Return values
ret.ErrorCode(number) The error code
  • 0: No error, an SCwCloud has been loaded
  • 1: Nothing done
ret.CwCloud(SCwCloud) The loaded SCwCloud, if any

◆ NewFromLGSData() [2/2]

static Object SCwCloud::NewFromLGSData ( string fileName)
static

Constructor to load an SCwCloud from an LGSx file.

Note
The cloud is automatically added to the scene
This function will fail if an SCwCloud is already present inside the project
Deprecated
This function is deprecated. Use NewFromLGSxData(string) instead.
Parameters
fileName(string) The fileName of the LGSx to load
Return values
ret.ErrorCode(number) The error code
  • 0: No error, an SCwCloud has been loaded
  • 1: Nothing done
ret.CwCloud(SCwCloud) The loaded SCwCloud, if any

◆ NewFromLGSxData() [1/2]

static Object SCwCloud::NewFromLGSxData ( )
static

Constructor to load an SCwCloud from an LGSx file.

Note
The cloud is automatically added to the scene
This function will popup a dialog to the user in order to select a cloud from an LGSx file
This function will fail if an SCwCloud is already present inside the project
Deprecated
This function is deprecated. Use NewFromLGSxData() instead.
Return values
ret.ErrorCode(number) The error code
  • 0: No error, an SCwCloud has been loaded
  • 1: Nothing done
ret.CwCloud(SCwCloud) The loaded SCwCloud, if any

◆ NewFromLGSxData() [2/2]

static Object SCwCloud::NewFromLGSxData ( string fileName)
static

Constructor to load an SCwCloud from an LGSx file.

Note
The cloud is automatically added to the scene
This function will fail if an SCwCloud is already present inside the project
Parameters
fileName(string) The fileName of the LGSx to load
Return values
ret.ErrorCode(number) The error code
  • 0: No error, an SCwCloud has been loaded
  • 1: Nothing done
ret.CwCloud(SCwCloud) The loaded SCwCloud, if any

◆ SaveCwProject()

Object SCwCloud::SaveCwProject ( string projectFileName)

Save the SCwCloud into a cwprj file.

Parameters
projectFileName(string) The full path of the cwprj file
Return values
ret.ErrorCode(number) The error code
  • 0: No error
  • 1: An error occurred

◆ SetColorScheme()

SCwCloud::SetColorScheme ( CwCloudColorSchemeTypeEnum colorScheme)

Set the color scheme of the SCwCloud (the color scheme is only defined for the intensity representation)

Parameters
colorScheme(CwCloudColorSchemeTypeEnum) The new color scheme to use

◆ SetCwCloudRepresentation()

SCwCloud::SetCwCloudRepresentation ( CwCloudRepresentationTypeEnum representation)

Set the representation of the SCwCloud.

Parameters
representation(CwCloudRepresentationTypeEnum) The SCwCloud representation type

◆ ToCloud()

Object SCwCloud::ToCloud ( number nbPointsAsked,
boolean convertIntoSpherical = false,
boolean convertCloudOnly = false )

Create an SCloud and optionally an SImage table from the SCwCloud.

See also
SCwCloud.ToMMSData()
Parameters
nbPointsAsked(number) An estimation of the number of points to extract
convertIntoSpherical(boolean) If true, cubic images will be converted into spherical images
convertCloudOnly(boolean) Define if it converts only the cloud or also the images if any
  • true: Convert only the cloud
  • false: Convert the cloud and the images, if any
Return values
ret.ErrorCode(number) The error code
  • 0: No error
  • 1: An error occurred during the SCloud conversion
  • 2: An error occurred during the SImage extraction
  • 3: No image to extract
ret.Cloud(SCloud) The extracted SCloud
ret.ImageTbl(Array<SImage>) The extracted SImage table

◆ ToMMSData()

Object SCwCloud::ToMMSData ( number nbPointsAsked,
ObjectsToConvert objectsToConvert = SCwCloud.CLOUDS,
number imagesMinimumStep = 5,
boolean importSidePhotos = false,
boolean convertCubefaceToSpherical = true )

Convert mobile data from an LGSx file, creating a table of SCloud and / or a table of SImage tables and / or a table of STrajectory from the SCwCloud.

Note
How to use the outputs of the function
// Convert the SCwCloud, getting all objects: clouds, images, trajectories
var cwCloud = SCwCloud.All()[0];
var result = cwCloud.ToMMSData(10000, SCwCloud.ObjectsToConvert.CLOUDS + SCwCloud.ObjectsToConvert.IMAGES + SCwCloud.ObjectsToConvert.TRAJECTORIES, 10);
// Add all clouds to the document
for(var trackIndex = 0; trackIndex < result.CloudTbl.length; ++trackIndex)
{
var cloudName = "Track " + trackIndex + " - Cloud";
result.CloudTbl[trackIndex].SetName(cloudName);
result.CloudTbl[trackIndex].AddToDoc();
}
// Add all images to the document
for(var trackIndex = 0; trackIndex < result.ImageTblTbl.length; ++trackIndex)
{
var trackImagesTable = result.ImageTblTbl[trackIndex]; // All images from track number trackIndex
for(var imageIndex = 0; imageIndex < trackImagesTable.length; ++imageIndex)
{
var imageName = "Track " + trackIndex + " - Image " + imageIndex;
trackImagesTable[imageIndex].SetName(imageName);
trackImagesTable[imageIndex].AddToDoc();
}
}
// Add all trajectories to the document
for(var trackIndex = 0; trackIndex < result.TrajectoryTbl.length; ++trackIndex)
{
var trajectoryName = "Track " + trackIndex + " - Trajectory";
result.TrajectoryTbl[trackIndex].SetName(trajectoryName);
result.TrajectoryTbl[trackIndex].AddToDoc();
}
Provide CloudWorx cloud edition and creation methods.
Definition Reshaper.h:5146
static Array< SCwCloud > All(VisibilityEnum visCrit=SComp.ANY_VISIBILITY)
Get all the SCwCloud in the document.
ObjectsToConvert
Enum to know which objects types must be converted.
Definition Reshaper.h:5181
See also
SCwCloud.ToCloud()
Parameters
nbPointsAsked(number) An estimation of the total number of points to extract
objectsToConvert(ObjectsToConvert) Define the types of objects to convert
imagesMinimumStep(number) Minimum distance between two consecutive extracted images along one trajectory
importSidePhotos(boolean) To import or not images from butterfly side cameras from TRK data
convertCubefaceToSpherical(boolean) To convert or not cubeface images to spherical images
Return values
ret.ErrorCode(number) The error code
  • 0: No error
  • 1: No image to extract
  • 2: An error occurred during the mobile data extraction
  • 3: An error occurred during the scan direction computation
ret.CloudTbl(Array<SCloud>) The extracted table of SCloud: each SCloud corresponds to a track
ret.ImageTblTbl(Array<Array<SImage>>) The extracted tables of SImage: each table of SImage corresponds to a track
ret.TrajectoryTbl(Array<STrajectory>) The extracted table of STrajectory: each STrajectory corresponds to a track

◆ toString()

string SCwCloud::toString ( )

Get the type of the variable.

Returns
(string) The type name

◆ ValuesToString()

string SCwCloud::ValuesToString ( )

Get a debug string representation of the SCwCloud.

Returns
(string) A debug string representing the SCwCloud