![]() |
Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2025.
|
Provides measurement features, to display and analyze measurements in the 3D scene. More...
Public Types | |
| enum | SPositionningMode { FIXED = 0 , BORDER = 1 } |
| The positioning mode for measures. More... | |
Public Types inherited from SComp | |
| enum | VisibilityEnum { HIDDEN_ONLY = 0 , VISIBLE_ONLY = 1 , ANY_VISIBILITY = 2 } |
| Visible criteria. More... | |
Public Member Functions | |
| Object | AddRow (Object rowDefinition) |
| Add a new row to the measure. A row is identified by a unique key and can contain multiple values that will be displayed in columns. Each value is defined by a key and a numeric value. Optionally, a prefix can be added. More... | |
| Object | GetComment () |
| Get the comment associated to the measure. More... | |
| number | GetID () |
| Get the ID of the measure. More... | |
| Object | GetPoint () |
| Get the anchor point of the measure. More... | |
| Object | GetRowData (string rowKey) |
| Get all data related to a given row identified by its key. More... | |
| Object | GetRowName (string rowKey) |
| Get the row name and unit. More... | |
| Object | GetRowsKeys () |
| Get all row keys of the measure. More... | |
| Object | GetTolerances (string rowKey) |
| Return the min/max tolerances of a given row identified by its key. More... | |
| Object | GetValues (string rowKey) |
| Get the values of a given row identified by its key. More... | |
| boolean | HasTolerances (string rowKey) |
| Check if tolerances are defined on a given row. More... | |
| SetComment (string comment) | |
| Set a comment to the measure. More... | |
| SetID (number id) | |
| Set the ID of the measure. More... | |
| Object | SetPoint (SPoint point) |
| Set the anchor point of the measure. More... | |
| Object | SetTolerances (string rowKey, number tolMin, number tolMax) |
| Set the min/max tolerances of a given row. More... | |
| SMeasure () | |
| Default constructor. | |
| SMeasure (SMeasure other) | |
Construct a SMeasure by copying the SMeasure other. More... | |
| SMeasure (string name, SPoint point, number id=-1, string comment="") | |
| Construct a custom measure. More... | |
| Object | ToJSON () |
| Get all data related to the measure in a JSON format. More... | |
| string | toString () |
| Get the type of the variable. 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 (SMatrix ucs=null) |
| 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 an SComp in the tree. More... | |
| Invert () | |
| Invert the normal of the object. | |
| 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. | |
| 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< SMeasure > | All (VisibilityEnum visCrit=SComp.ANY_VISIBILITY) |
| Get all the SMeasure in the document. More... | |
| static Object | CreateAnalysisMeasure (SPoint seedPoint, SComp comp) |
| Create a measure from analysis information at a specific point of an object. More... | |
| static Object | CreateInfosMeasure (SPoint seedPoint, SComp comp) |
| Create a measure from all attributes at a specific point of an object. More... | |
| static Object | FromClick () |
| Launch an interaction to select a SMeasure in the scene. More... | |
| static Array< SMeasure > | FromName (string name) |
| Search all the SMeasure with the given name. More... | |
| static Array< SMeasure > | FromSel () |
| Get all the selected SMeasure. More... | |
| static Object | GetPositioningMode () |
| Get the current positioning mode of measures. More... | |
| static SMeasure | New (SMeasure other) |
Construct a SMeasure by copying the SMeasure other. More... | |
| static SMeasure | New (string name, SPoint point, number id=-1, string comment="") |
| Construct a custom measure. More... | |
| static Object | SetPositioningMode (SPositionningMode mode) |
| Switch between 'Fixed positioning' or 'Border positioning'. 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... | |
Provides measurement features, to display and analyze measurements in the 3D scene.
| SMeasure::SMeasure | ( | SMeasure | other | ) |
| SMeasure::SMeasure | ( | string | name, |
| SPoint | point, | ||
| number | id = -1, |
||
| string | comment = "" |
||
| ) |
Construct a custom measure.
| name | (string) The name of the measure |
| point | (SPoint) The anchor point |
| id | (number) The ID (default -1) |
| comment | (string) The comment (default empty) |
| Object SMeasure::AddRow | ( | Object | rowDefinition | ) |
Add a new row to the measure. A row is identified by a unique key and can contain multiple values that will be displayed in columns. Each value is defined by a key and a numeric value. Optionally, a prefix can be added.
| rowDefinition | (Object) The new row data definition
|
| ret.ErrorCode | (number) The error code
|
|
static |
Get all the SMeasure in the document.
| visCrit | (VisibilityEnum) Visible selection criteria
|
Create a measure from analysis information at a specific point of an object.
| seedPoint | (SPoint) The seed point (projected on the component) |
| comp | (SComp) The component to analyze |
| ret.ErrorCode | (number) The error code
|
| ret.Measure | (SMeasure) The new analysis measure |
Create a measure from all attributes at a specific point of an object.
| seedPoint | (SPoint) The seed point (projected on the component) |
| comp | (SComp) The component to measure |
| ret.ErrorCode | (number) The error code
|
| ret.Measure | (SMeasure) The new infos measure |
|
static |
Launch an interaction to select a SMeasure in the scene.
|
static |
|
static |
| Object SMeasure::GetComment | ( | ) |
Get the comment associated to the measure.
| ret.ErrorCode | (number) The error code
|
| ret.String | (string) The comment associated to the measure |
| number SMeasure::GetID | ( | ) |
| Object SMeasure::GetPoint | ( | ) |
Get the anchor point of the measure.
| ret.ErrorCode | (number) The error code
|
| ret.Point | (SPoint) The anchor point of the measure |
|
static |
Get the current positioning mode of measures.
| ret.ErrorCode | (number) The error code
|
| ret.MeasurePositioningMode | (SPositionningMode) The current positioning mode
|
| Object SMeasure::GetRowData | ( | string | rowKey | ) |
Get all data related to a given row identified by its key.
| rowKey | (string) The key of the measure row |
| ret.ErrorCode | (number) The error code
|
| ret.Result | (Object) A structured object containing row data
|
| Object SMeasure::GetRowName | ( | string | rowKey | ) |
Get the row name and unit.
| rowKey | (string) The key of the measure row |
| ret.ErrorCode | (number) The error code
|
| ret.Result | (Object) Object with Name and Unit properties
|
| Object SMeasure::GetRowsKeys | ( | ) |
Get all row keys of the measure.
| ret.ErrorCode | (number) The error code
|
| ret.StringTbl | (Array<string>) A table of row keys |
| Object SMeasure::GetTolerances | ( | string | rowKey | ) |
Return the min/max tolerances of a given row identified by its key.
| rowKey | (string) The key of the measure row |
| ret.ErrorCode | (number) The error code
|
| ret.Result | (Object) An object with tolerance minimum and maximum
|
| Object SMeasure::GetValues | ( | string | rowKey | ) |
Get the values of a given row identified by its key.
| rowKey | (string) The key of the measure row |
| ret.ErrorCode | (number) The error code
|
| ret.StringTbl | (Array<string>) Array of values for the row |
| boolean SMeasure::HasTolerances | ( | string | rowKey | ) |
Check if tolerances are defined on a given row.
| rowKey | (string) The key of the measure row |
| SMeasure::SetComment | ( | string | comment | ) |
Set a comment to the measure.
| comment | (string) The comment to set |
| SMeasure::SetID | ( | number | id | ) |
| Object SMeasure::SetPoint | ( | SPoint | point | ) |
Set the anchor point of the measure.
| point | (SPoint) The anchor point to set |
| ret.ErrorCode | (number) The error code
|
|
static |
Switch between 'Fixed positioning' or 'Border positioning'.
| mode | (SPositionningMode) The positioning mode to set
|
| ret.ErrorCode | (number) The error code
|
| Object SMeasure::SetTolerances | ( | string | rowKey, |
| number | tolMin, | ||
| number | tolMax | ||
| ) |
Set the min/max tolerances of a given row.
| rowKey | (string) The key of the measure row |
| tolMin | (number) The minimum tolerance |
| tolMax | (number) The maximum tolerance |
| ret.ErrorCode | (number) The error code
|
| Object SMeasure::ToJSON | ( | ) |
Get all data related to the measure in a JSON format.
| ret.ErrorCode | (number) The error code
|
| ret.Result | (Object) A structured object containing all data
|
| string SMeasure::toString | ( | ) |
Get the type of the variable.