|  | Cyclone 3DR Script
    from Technodigit, part of Hexagon. Copyright 1997-2023. | 
Provide labeling features, to annotate objects in the 3D scene and extract analysis values. More...
 
  
| Public Types | |
| enum | SLabelBackgroundType { NO_BACKGROUND = 0 , SCENE_BACKGROUND_COLOR = 1 , SPECIAL_COLOR = 2 , TOLERANCE_COLOR = 3 } | 
| The type of background.  More... | |
| enum | SLabelCol { Reference = 0 , Measure = 1 , Deviation = 2 , TolMin = 3 , TolMax = 4 , Note = 5 , Flushing = 6 , EmptyCol = 7 , Nominal = 8 , BBoxMin = 9 , BBoxMax = 10 , Size = 11 , Centroid = 12 , LowestPoint = 13 , UppestPoint = 14 , Count = 15 , UndefinedCol = 16 } | 
| The column headers.  More... | |
| enum | SLabelLine { XX = 0 , YY = 1 , ZZ = 2 , NormalX = 3 , NormalY = 4 , NormalZ = 5 , Radius = 6 , Diameter = 7 , Angle = 8 , Circularity = 9 , Cylindricity = 10 , Planeity = 11 , Distance = 12 , AngleX = 13 , AngleY = 14 , AngleZ = 15 , AngleCompX = 16 , AngleCompY = 17 , AngleCompZ = 18 , AngleSuppX = 19 , AngleSuppY = 20 , AngleSuppZ = 21 , AngleC = 22 , AngleS = 23 , Dev3D = 24 , Curv = 25 , EmptyLine = 26 , Length = 27 , Width = 28 , Linearity = 29 , Sphericity = 30 , DistanceXY = 31 , DistanceYZ = 32 , DistanceXZ = 33 , DistanceX = 34 , DistanceY = 35 , DistanceZ = 36 , Volume = 37 , Intensity = 38 , VolumeOver = 39 , VolumeUnder = 40 , Perpendicularity = 41 , Parallelism = 42 , Level = 43 , Surface = 44 , NbPoints = 45 , NbTriangles = 46 , NbPieces = 47 , NbFreeCont = 48 , UndefinedLine = 49 , Flatness = 50 } | 
| The line headers.  More... | |
| enum | SLabelType { LONG = 0 , MEDIUM = 1 , SMALL = 2 , MINIMUM = 3 } | 
| The size of the label.  More... | |
|  Public Types inherited from SComp | |
| enum | VisibilityEnum { HIDDEN_ONLY = 0 , VISIBLE_ONLY = 1 , ANY_VISIBILITY = 2 } | 
| Visible criteria.  More... | |
| Public Member Functions | |
| AddSComp (Array< SComp > tblSComp) | |
| Add some SComp to the label. The label and the SComp will be one entity. More... | |
| AddToDoc () | |
| Add the SLabel to the current document.  More... | |
| AttachToPoint (SPoint attachedPoint) | |
| Attach the label to a 3D point in the scene.  More... | |
| Object | GetCell (number idxLine, number idxColumn) | 
| Get the content of a cell.  More... | |
| Object | GetCol (number idxColumn) | 
| Get all the contents of the column with given index.  More... | |
| Object | GetColByType (SLabelCol colType) | 
| Get the indices of the columns with given column type.  More... | |
| string | GetComment () | 
| Get the comment associated to the label.  More... | |
| Object | GetLine (number idxLine) | 
| Get all the contents of the line with given index.  More... | |
| Object | GetLineByType (SLabelLine lineType) | 
| Get the index of the line with given line type.  More... | |
| Object | SetCell (number idxLine, number idxColumn, number value) | 
| Set the content of a cell.  More... | |
| Object | SetCol (number idxColumn, Array< number > valueTbl) | 
| Set the content of all the columns with given index.  More... | |
| Object | SetColType (Array< SLabelCol > colType) | 
| Set the type for all columns.  More... | |
| SetComment (string comment) | |
| Set a comment to the label.  More... | |
| Object | SetLine (number idxLine, Array< number > valueTbl) | 
| Set the content of all the lines with given index.  More... | |
| Object | SetLineType (Array< SLabelLine > lineType) | 
| Set the type for all lines.  More... | |
| SetTolerance (number lowerTol, number upperTol) | |
| Set the default tolerance.  More... | |
| Object | SetVisibleColumn (number columnIndex, boolean isVisible) | 
| Hide/show one column with a given index.  More... | |
| Object | SetVisibleRow (number rowIndex, boolean isVisible) | 
| Hide/show one row with a given index.  More... | |
| ShowComment (boolean showComment) | |
| Show or hide the comment.  More... | |
| SLabel () | |
| Default constructor.  More... | |
| SLabel (number nbLine, number nbColumn) | |
| Construct a SLabel with given number of lines and columns.  More... | |
| SLabel (SLabel other) | |
| Construct a SLabel by copying the SLabel other.  More... | |
| string | toString () | 
| Get the type of the variable.  More... | |
| string | ValuesToString () | 
| Get a debug string representation of the label.  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< SLabel > | All (VisibilityEnum visCrit=SComp.ANY_VISIBILITY) | 
| Get all the SLabel in the document.  More... | |
| static Object | FromClick () | 
| Launch an interaction to select a SLabel in the scene.  More... | |
| static Array< SLabel > | FromName (string name) | 
| Search all the SLabel with the given name.  More... | |
| static Array< SLabel > | FromSel () | 
| Get all the selected SLabel.  More... | |
| static SLabel | New (number nbLine, number nbColumn) | 
| Construct a SLabel with given number of lines and columns.  More... | |
| static SLabel | New (SLabel other) | 
| Construct a SLabel by copying the SLabel other.  More... | |
| static | SetBackgroundColor (number red, number green, number blue, number transparency) | 
| Define the SLabel background color.  More... | |
| static | SetBackgroundType (SLabelBackgroundType backgroundType) | 
| Define the background type.  More... | |
| static | SetDecimalNumber (number nbDecimal) | 
| Define number of decimals to display in the SLabel.  More... | |
| static | SetLineColor (number red, number green, number blue) | 
| Define the color of line contour and text.  More... | |
| static | SetSizeType (SLabelType labelType) | 
| Define how the SLabel is displayed.  More... | |
| static | UseEngineeringNotation (boolean use) | 
| Define if SLabel use engineering notation ( Xe+y )  More... | |
|  Static Public Member Functions inherited from SComp | |
| static Array< SComp > | All (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< SComp > | FromName (string name) | 
| Search all the SComp with the given name.  More... | |
| static Array< SComp > | FromSel () | 
| Get all the selected SComp.  More... | |
Provide labeling features, to annotate objects in the 3D scene and extract analysis values.
 
| enum SLabel::SLabelCol | 
The column headers.
| enum SLabel::SLabelLine | 
The line headers.
| enum SLabel::SLabelType | 
| SLabel::SLabel | ( | ) | 
Default constructor.
| SLabel::SLabel | ( | SLabel | other | ) | 
| SLabel::SLabel | ( | number | nbLine, | 
| number | nbColumn | ||
| ) | 
Construct a SLabel with given number of lines and columns.
| nbLine | (number) The number of lines | 
| nbColumn | (number) The number of columns | 
| SLabel::AddSComp | ( | Array< SComp > | tblSComp | ) | 
Add some SComp to the label.
The label and the SComp will be one entity. 
| SLabel::AddToDoc | ( | ) | 
Add the SLabel to the current document.
| 
 | static | 
Get all the SLabel in the document.
| visCrit | (VisibilityEnum) Visible selection criteria 
 | 
| SLabel::AttachToPoint | ( | SPoint | attachedPoint | ) | 
| 
 | static | 
Launch an interaction to select a SLabel in the scene.
| 
 | static | 
| 
 | static | 
| Object SLabel::GetCell | ( | number | idxLine, | 
| number | idxColumn | ||
| ) | 
Get the content of a cell.
| idxLine | (number) The line index (0 <= idxLine < Nb Line) | 
| idxColumn | (number) The column index (0 <= idxColumn < Nb Column) | 
| ret.ErrorCode | (number) The error code 
 | 
| ret.Value | (number) The value associated to the cell | 
| Object SLabel::GetCol | ( | number | idxColumn | ) | 
Get all the contents of the column with given index.
| idxColumn | (number) The column index (0 <= idxColumn < Nb Column) | 
| ret.ErrorCode | (number) The error code 
 | 
| ret.ValueTbl | (Array<number>) A table of all values associated to the column | 
| ret.Header | (number) The type of the column (see SLabelCol) | 
| Object SLabel::GetColByType | ( | SLabelCol | colType | ) | 
Get the indices of the columns with given column type.
| colType | (SLabelCol) The column type 
 | 
| ret.IndexTbl | (Array<number>) All the column indices with given type | 
| string SLabel::GetComment | ( | ) | 
Get the comment associated to the label.
| Object SLabel::GetLine | ( | number | idxLine | ) | 
Get all the contents of the line with given index.
| idxLine | (number) The line index (0 <= idxLine < Nb Line) | 
| ret.ErrorCode | (number) The error code 
 | 
| ret.ValueTbl | (Array<number>) A table of all values associated to the line | 
| ret.Header | (number) The type of the line (see SLabelLine) | 
| Object SLabel::GetLineByType | ( | SLabelLine | lineType | ) | 
Get the index of the line with given line type.
| ret.IndexTbl | (Array<number>) All the line indices with given type | 
| 
 | static | 
| 
 | static | 
Define the SLabel background color.
| red | (number) The red color (between 0 and 1) | 
| green | (number) The green color (between 0 and 1) | 
| blue | (number) The blue color (between 0 and 1) | 
| transparency | (number) The transparency (between 0 and 1) | 
| 
 | static | 
Define the background type.
| backgroundType | (SLabelBackgroundType) Type of background to apply 
 | 
| Object SLabel::SetCell | ( | number | idxLine, | 
| number | idxColumn, | ||
| number | value | ||
| ) | 
Set the content of a cell.
| idxLine | (number) The line index (0 <= idxLine < Nb Line) | 
| idxColumn | (number) The column index (0 <= idxColumn < Nb Column) | 
| value | (number) The data to store in the cell | 
| ret.ErrorCode | (number) The error code 
 | 
| Object SLabel::SetCol | ( | number | idxColumn, | 
| Array< number > | valueTbl | ||
| ) | 
Set the content of all the columns with given index.
| idxColumn | (number) The column index (0 <= idxColumn < Nb Column) | 
| valueTbl | (Array<number>) A table of values | 
| ret.ErrorCode | (number) The error code 
 | 
| Object SLabel::SetColType | ( | Array< SLabelCol > | colType | ) | 
Set the type for all columns.
| colType | (Array<SLabelCol>) The column types to set. | 
| ret.ErrorCode | (number) The error code 
 | 
| SLabel::SetComment | ( | string | comment | ) | 
Set a comment to the label.
| comment | (string) The comment to set | 
| 
 | static | 
Define number of decimals to display in the SLabel.
| nbDecimal | (number) The number of decimals (between 0 and 5) | 
| Object SLabel::SetLine | ( | number | idxLine, | 
| Array< number > | valueTbl | ||
| ) | 
Set the content of all the lines with given index.
| idxLine | (number) The line index (0 <= idxLine < Nb Line) | 
| valueTbl | (Array<number>) A table of value | 
| ret.ErrorCode | (number) The error code 
 | 
| 
 | static | 
Define the color of line contour and text.
| red | (number) The red color (between 0 and 1) | 
| green | (number) The green color (between 0 and 1) | 
| blue | (number) The blue color (between 0 and 1) | 
| Object SLabel::SetLineType | ( | Array< SLabelLine > | lineType | ) | 
Set the type for all lines.
| lineType | (Array<SLabelLine>) The line types | 
| ret.ErrorCode | (number) The error code 
 | 
| 
 | static | 
Define how the SLabel is displayed.
| labelType | (SLabelType) The type of label to use 
 | 
| SLabel::SetTolerance | ( | number | lowerTol, | 
| number | upperTol | ||
| ) | 
Set the default tolerance.
| lowerTol | (number) The lower tolerance | 
| upperTol | (number) The upper tolerance | 
| Object SLabel::SetVisibleColumn | ( | number | columnIndex, | 
| boolean | isVisible | ||
| ) | 
Hide/show one column with a given index.
| columnIndex | (number) The column index to hide/show. | 
| isVisible | (boolean) True if the column must be visible, else false | 
| ret.ErrorCode | (number) The error code 
 | 
| Object SLabel::SetVisibleRow | ( | number | rowIndex, | 
| boolean | isVisible | ||
| ) | 
Hide/show one row with a given index.
| rowIndex | (number) The row index to hide/show. | 
| isVisible | (boolean) True if the row must be visible, else false | 
| ret.ErrorCode | (number) The error code 
 | 
| SLabel::ShowComment | ( | boolean | showComment | ) | 
Show or hide the comment.
| showComment | (boolean) True to show the comment, false to hide. | 
| string SLabel::toString | ( | ) | 
Get the type of the variable.
| 
 | static | 
Define if SLabel use engineering notation ( Xe+y )
| use | (boolean) True to use engineering notation, else false | 
| string SLabel::ValuesToString | ( | ) | 
Get a debug string representation of the label.