Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2023.
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 a 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  CWMeshingMode { LOW = 0 , MEDIUM = 1 , HIGH = 2 }
 The meshing mode for SCwCloud.ScanToMesh() More...
 
enum  ObjectsToConvert { CLOUDS = 1 , IMAGES = 2 }
 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. More...
 
CwCloudRepresentationTypeEnum GetCwCloudRepresentation ()
 Get the current representation of the SCwCloud. More...
 
 RegeneratePoints ()
 Ask to regenerate points from the data source. More...
 
Object SaveCwProject (string projectFileName)
 Save the SCwCloud into a cwprj file. More...
 
Object ScanToMesh (CWMeshingMode meshingMode, boolean textureFromCloud, boolean ignoreScanDir)
 Create a SPoly from predefined settings. More...
 
 SetColorScheme (CwCloudColorSchemeTypeEnum colorScheme)
 Set the color scheme of the SCwCloud (the color scheme is only defined for the intensity representation) More...
 
 SetCwCloudRepresentation (CwCloudRepresentationTypeEnum representation)
 Set the representation of the SCwCloud. More...
 
Object ToCloud (number nbPointsAsked, boolean convertIntoSpherical=false, boolean convertCloudOnly=false)
 Create a SCloud and optionally a SImage table from the SCwCloud. More...
 
Object ToMMSData (number nbPointsAsked, ObjectsToConvert objectsToConvert=SCwCloud.CLOUDS, number imagesMinimumStep=5)
 Convert MMS data from a LGS file, creating a SCloud table and / or a table of SImage tables from the SCwCloud. More...
 
string toString ()
 Get the type of the variable. More...
 
string ValuesToString ()
 Get a debug string representation of the SCwCloud. More...
 
- Public Member Functions inherited from SComp
 AddToDoc ()
 Add the object to the document. More...
 
 ApplyTransformation (SMatrix matrix)
 Apply a geometric transformation to the current object by making a product with the given matrix. More...
 
Object GetBoundingBox ()
 Calculate the bounding box of the object. More...
 
Object GetColors ()
 Get the colors of the object. More...
 
string GetFolderName ()
 Get the name of the folder containing the object. More...
 
string GetName ()
 Return the object's name. More...
 
string GetPath ()
 Return the full path of a SComp in the tree. More...
 
 Invert ()
 Invert the normal of the object. More...
 
boolean IsInDoc ()
 Return if the object is in the document or not. More...
 
boolean IsVisible ()
 Get the visibility of the object. More...
 
 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. More...
 
 RemoveFromDoc ()
 Remove the object from the document. More...
 
 SetClippable (boolean clipping)
 Set clippable or not. More...
 
 SetColors (number red, number green, number blue)
 Set the colors of the object. More...
 
 SetName (string objectName)
 Set the object's name. More...
 
 SetTransparency (number alpha)
 Set the transparency of the object. More...
 
 SetVisibility (boolean visible)
 Set the object to be visible, or not visible. More...
 
string toString ()
 Get the type of the variable. More...
 
 Translate (SVector vector)
 Make a translation of the current object with an SVector. More...
 

Static Public Member Functions

static Array< SCwCloudAll (VisibilityEnum visCrit=SComp.ANY_VISIBILITY)
 Get all the SCwCloud in the document. More...
 
static CloseCwProject ()
 Remove the existing SCwCloud from the current document, if any. More...
 
static DefineJetStreamServer ()
 Open a dialog to define the JetStream server address and port. More...
 
static Object FromClick ()
 Launch an interaction to select a SCwCloud in the scene. More...
 
static Array< SCwCloudFromName (string name)
 Search all the SCwCloud with the given name. More...
 
static Array< SCwCloudFromSel ()
 Get all the selected SCwCloud. More...
 
static Object NewFromCwProjectFile (string fileName)
 Constructor to load a CloudWorx Project. More...
 
static Object NewFromImpData ()
 Constructor to load a SCwCloud from a IMP file. More...
 
static Object NewFromJetStreamData ()
 Constructor to load a SCwCloud from a JetStream server. More...
 
static Object NewFromLGSData ()
 Constructor to load a SCwCloud from a LGS file. More...
 
static Object NewFromLGSData (string fileName)
 Constructor to load a SCwCloud from a LGS file. More...
 
- Static Public Member Functions inherited from SComp
static Array< SCompAll (VisibilityEnum visCrit=SComp.ANY_VISIBILITY)
 Get all the SComp in the document. More...
 
static Object FromClick ()
 Launch an interaction to select a SComp in the scene. More...
 
static Array< SCompFromName (string name)
 Search all the SComp with the given name. More...
 
static Array< SCompFromSel ()
 Get all the selected SComp. More...
 

Detailed Description

Provide CloudWorx cloud edition and creation methods.

Member Enumeration Documentation

◆ CwCloudColorSchemeTypeEnum

The type of color scheme for a 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.

◆ CWMeshingMode

The meshing mode for SCwCloud.ScanToMesh()

Enumerator
LOW 

Low detail level, short computation time.

MEDIUM 

Medium detail level, medium computation time.

HIGH 

High detail level, long computation time.

◆ ObjectsToConvert

Enum to know which objects types must be converted.

Enumerator
CLOUDS 

Convert the clouds.

IMAGES 

Convert the images.

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

◆ 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.

◆ 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

◆ 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 a 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, a SCwCloud has been loaded
  • 1: Nothing done

◆ NewFromImpData()

static Object SCwCloud::NewFromImpData ( )
static

Constructor to load a SCwCloud from a 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 a IMP file
This function will fail if a SCwCloud is already present inside the project
Return values
ret.ErrorCode(number) The error code
  • 0: No error, a SCwCloud has been loaded
  • 1: Nothing done
ret.CwCloud(SCwCloud) The loaded SCwCloud, if any

◆ NewFromJetStreamData()

static Object SCwCloud::NewFromJetStreamData ( )
static

Constructor to load a SCwCloud from a JetStream server.

Note
The cloud is automatically added to the scene
This function will popup a dialog to the user in order to select a cloud on the JetStream server
This function will fail if a SCwCloud is already present inside the project
Return values
ret.ErrorCode(number) The error code
  • 0: No error, a 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 a SCwCloud from a LGS 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 a LGS file
This function will fail if a SCwCloud is already present inside the project
Return values
ret.ErrorCode(number) The error code
  • 0: No error, a 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 a SCwCloud from a LGS file.

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

◆ RegeneratePoints()

SCwCloud::RegeneratePoints ( )

Ask to regenerate points from the data source.

Deprecated:
This function is deprecated. You no longer need to regenerate points.

◆ 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

◆ ScanToMesh()

Object SCwCloud::ScanToMesh ( CWMeshingMode  meshingMode,
boolean  textureFromCloud,
boolean  ignoreScanDir 
)

Create a SPoly from predefined settings.

Deprecated:
This function is deprecated. Use SPoly.ScanToMesh() instead.
Parameters
meshingMode(CWMeshingMode) The meshing mode, to choose detail level
textureFromCloud(boolean) If true, create a textured mesh from cloud color
ignoreScanDir(boolean) If true, ignore the scanning directions for computation
Return values
ret.Poly(SPoly) The computed SPoly
ret.ErrorCode(number) The error code
  • 0: No error
  • 1: An error occurred
  • 2: The meshing of some part(s) failed
  • 3: The texturing of some part(s) failed
  • 4: The global computation failed

◆ 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 a SCloud and optionally a 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 
)

Convert MMS data from a LGS file, creating a SCloud table and / or a table of SImage tables from the SCwCloud.

Note
How to use the outputs of the function
// Convert the SCwCloud
var cwCloud = SCwCloud.All()[0];
var result = cwCloud.ToMMSData(10000, SCwCloud.ObjectsToConvert.CLOUDS + SCwCloud.ObjectsToConvert.IMAGES, 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();
}
}
Provide CloudWorx cloud edition and creation methods.
Definition: Reshaper.h:4337
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:4384
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 spherical images along one trajectory
Return values
ret.ErrorCode(number) The error code
  • 0: No error
  • 1: No image to extract
  • 2: An error occurred during the MMS 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

◆ 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