![]() |
Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2024.
|
Provide point edition and creation methods. More...
Public Member Functions | |
| SPoint | Add (SPoint addValue) |
| Calculate the sum of two points (to be able to do some averages) More... | |
| number | Distance (SPoint ptToCompare) |
| Calculate the true distance between 'this' and ptToCompare. More... | |
| SPoint | Div (number divValue) |
| Calculate the division of a point by a scalar (to be able to do averages). More... | |
| boolean | Equals (SPoint ptToCompare) |
| Test if two 3D points are equal or not. More... | |
| number | GetPointSize () |
| Return the current point size. More... | |
| number | GetX () |
| Get the X coordinate value. More... | |
| number | GetY () |
| Get the Y coordinate value. More... | |
| number | GetZ () |
| Get the Z coordinate value. More... | |
| SPoint | Mult (number multValue) |
| Calculate the multiplication of a point by a scalar. More... | |
| SetPointSize (number pointSize) | |
| New point size. More... | |
| SetX (number x) | |
| Set the X coordinate. More... | |
| SetY (number y) | |
| Set the Y coordinate. More... | |
| SetZ (number z) | |
| Set the Z coordinate. More... | |
| ShowName (boolean showName) | |
| Control whether the name of the point is shown or not in the scene. More... | |
| SPoint () | |
| Default constructor to create an empty new SPoint. X = Y = Z = 0. More... | |
| SPoint (number iX, number iY, number iZ) | |
| Constructor from X, Y, Z coordinates. More... | |
| SPoint (SPoint iPoint) | |
| Constructor by copy from other point. More... | |
| SPoint | Sub (SPoint subValue) |
| Calculate the subtraction of two points. More... | |
| string | toString () |
| Get the type of the variable. More... | |
| string | ValuesToString () |
| Get a string representation of the point. 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 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< SPoint > | All (VisibilityEnum visCrit=SComp.ANY_VISIBILITY) |
| Get all the SPoint in the document. More... | |
| static Object | FromClick () |
| Launch an interaction to select a SPoint in the scene. More... | |
| static Object | FromFile (string fileName) |
| Import points from a file. Authorized file extensions : .asc, .txt. More... | |
| static Array< SPoint > | FromName (string name) |
| Search all the SPoint with the given name. More... | |
| static Array< SPoint > | FromSel () |
| Get all the selected SPoint. More... | |
| static SPoint | New () |
| Default constructor to create an empty new SPoint. X = Y = Z = 0. More... | |
| static SPoint | New (number iX, number iY, number iZ) |
| Constructor from X, Y, Z coordinates. More... | |
| static SPoint | New (SPoint iPoint) |
| Constructor by copy from other point. More... | |
| static Object | Save (string filePath, Array< SPoint > pointsToSave, SMatrix coordinateSystemMatrix=SMatrix()) |
| Save points into a file. Supported extensions : .asc, .txt. 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... | |
Additional Inherited Members | |
Public Types inherited from SComp | |
| enum | VisibilityEnum { HIDDEN_ONLY = 0 , VISIBLE_ONLY = 1 , ANY_VISIBILITY = 2 } |
| Visible criteria. More... | |
Provide point edition and creation methods.
| SPoint::SPoint | ( | ) |
Default constructor to create an empty new SPoint. X = Y = Z = 0.
| SPoint::SPoint | ( | SPoint | iPoint | ) |
Constructor by copy from other point.
| iPoint | (SPoint) Point to copy |
| SPoint::SPoint | ( | number | iX, |
| number | iY, | ||
| number | iZ | ||
| ) |
Constructor from X, Y, Z coordinates.
| iX | (number) X coordinate |
| iY | (number) Y coordinate |
| iZ | (number) Z coordinate |
Calculate the sum of two points (to be able to do some averages)
|
static |
Get all the SPoint in the document.
| visCrit | (VisibilityEnum) Visible selection criteria
|
| number SPoint::Distance | ( | SPoint | ptToCompare | ) |
Calculate the true distance between 'this' and ptToCompare.
| ptToCompare | (SPoint) The point to calculate the distance with. |
| SPoint SPoint::Div | ( | number | divValue | ) |
Calculate the division of a point by a scalar (to be able to do averages).
| divValue | (number) The value used for the division |
| boolean SPoint::Equals | ( | SPoint | ptToCompare | ) |
Test if two 3D points are equal or not.
| ptToCompare | (SPoint) The point to compare with. |
|
static |
Launch an interaction to select a SPoint in the scene.
|
static |
Import points from a file. Authorized file extensions : .asc, .txt.
| fileName | (string) The file name path |
|
static |
|
static |
| number SPoint::GetPointSize | ( | ) |
Return the current point size.
| number SPoint::GetX | ( | ) |
Get the X coordinate value.
| number SPoint::GetY | ( | ) |
Get the Y coordinate value.
| number SPoint::GetZ | ( | ) |
Get the Z coordinate value.
| SPoint SPoint::Mult | ( | number | multValue | ) |
|
static |
|
static |
|
static |
Save points into a file. Supported extensions : .asc, .txt.
| filePath | (string) The complete file path to save into |
| pointsToSave | (Array<SPoint>) the points to save |
| coordinateSystemMatrix | (SMatrix) The matrix to define a UCS used for the export (or identity to use the WCS) |
| ret.ErrorCode | (number) The error code.
|
| SPoint::SetPointSize | ( | number | pointSize | ) |
New point size.
| pointSize | (number) The new point size. |
| SPoint::SetX | ( | number | x | ) |
Set the X coordinate.
| x | (number) Value to set. |
| SPoint::SetY | ( | number | y | ) |
Set the Y coordinate.
| y | (number) Value to set. |
| SPoint::SetZ | ( | number | z | ) |
Set the Z coordinate.
| z | (number) Value to set. |
| SPoint::ShowName | ( | boolean | showName | ) |
Control whether the name of the point is shown or not in the scene.
| showName | (boolean) The new visibility state of the point name |
Calculate the subtraction of two points.
| string SPoint::toString | ( | ) |
Get the type of the variable.
| string SPoint::ValuesToString | ( | ) |
Get a string representation of the point.