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

Provide feature to manage alignment objects (such as road or tunnel axis) usually defined in LandXML files. More...

Inheritance diagram for SAlignment:
SComp

Public Member Functions

Object ConvertToPolyline ()
 Converts the alignment into polylines. More...
 
Object GetDistance (SPoint pointToProject)
 Return the 3D distance, vertical, horizontal, the nearest station and the coordinates if the projected point. More...
 
Object GetLength ()
 Return both 3D and 2D lengths of the alignment. More...
 
Object GetPoint (number abscissa)
 Get the corresponding 2D point and 3D point from a given station (abscissa) More...
 
Object GetStationStarts ()
 Get a list of station starts usually defined in a LandXML file. More...
 
 SAlignment ()
 Default constructor. More...
 
string toString ()
 Get the type of the variable. More...
 
string ValuesToString ()
 Get a debug string representation of the SAlignment. 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< SAlignmentAll (VisibilityEnum visCrit=SComp.ANY_VISIBILITY)
 Get all the SAlignment in the document. More...
 
static Object FromClick ()
 Launch an interaction to select a SAlignment in the scene. More...
 
static Array< SAlignmentFromName (string name)
 Search all the SAlignment with the given name. More...
 
static Array< SAlignmentFromSel ()
 Get all the selected SAlignment. 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...
 

Additional Inherited Members

- Public Types inherited from SComp
enum  VisibilityEnum { HIDDEN_ONLY = 0 , VISIBLE_ONLY = 1 , ANY_VISIBILITY = 2 }
 Visible criteria. More...
 

Detailed Description

Provide feature to manage alignment objects (such as road or tunnel axis) usually defined in LandXML files.

See also
SSurveyingFormat::ImportLandXML()

Constructor & Destructor Documentation

◆ SAlignment()

SAlignment::SAlignment ( )

Default constructor.

Member Function Documentation

◆ All()

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

Get all the SAlignment in the document.

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

◆ ConvertToPolyline()

Object SAlignment::ConvertToPolyline ( )

Converts the alignment into polylines.

Return values
ret.Multis2D(Array<SMultiline>) Get 2D multilines corresponding to the planar axis
ret.Multis3D(Array<SMultiline>) Get 3D multilines corresponding to the planar axis

◆ FromClick()

static Object SAlignment::FromClick ( )
static

Launch an interaction to select a SAlignment 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 SAlignment is selected.
  • 1: Nothing is selected.
  • 2: The ESCape key has been pressed
ret.Alignment(SAlignment) The selected SAlignment

◆ FromName()

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

Search all the SAlignment with the given name.

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

◆ FromSel()

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

Get all the selected SAlignment.

Returns
(Array<SAlignment>) All the selected SAlignment

◆ GetDistance()

Object SAlignment::GetDistance ( SPoint  pointToProject)

Return the 3D distance, vertical, horizontal, the nearest station and the coordinates if the projected point.

Parameters
pointToProject(SPoint) The input point to project on the alignment.
Return values
ret.ErrorCode(number) The error code
  • 0: No error
  • 1: No 3D point defined with this given abscissa.
  • 2: Unknown error
ret.Distance3D(number) 3D distance between the input point and the projected point.
ret.Horizontal(number) The horizontal distance between the input point and the projected point.
ret.Vertical(number) The vertical distance between the input point and the projected point.
ret.Station(number) The value of the nearest station.
ret.ProjectedPoint(SPoint) 3D point projected on the alignment.

◆ GetLength()

Object SAlignment::GetLength ( )

Return both 3D and 2D lengths of the alignment.

Return values
ret.Length2D(number) 2D length of the alignment
ret.Length3D(number) 3D length of the alignment

◆ GetPoint()

Object SAlignment::GetPoint ( number  abscissa)

Get the corresponding 2D point and 3D point from a given station (abscissa)

Parameters
abscissa(number) Station abscissa along the alignment
Return values
ret.ErrorCode(number) The error code
  • 0: No error
  • 1: No 3D point defined with this given abscissa.
  • 2: Unknown error
  • 3: The station is outside the alignment bounds
ret.RetPoint2D(SPoint) 2D point of the station
ret.RetPoint3D(SPoint) 3D point of the station

◆ GetStationStarts()

Object SAlignment::GetStationStarts ( )

Get a list of station starts usually defined in a LandXML file.

Note
Example of using the command to extract the list of stations from the alignment and its information.
var alignment = SAlignment.FromName("Alignment")[0];
var stations = alignment.GetStationStarts();
var stationTbl = stations.StaStartTbl;
for(var i = 0; i < stationTbl.length; i++)
{
print(stationTbl[i].CurveType+": "+stationTbl[i].Abscissa+" Coordinate: "+stationTbl[i].Coordinate.ValuesToString());
}
Provide feature to manage alignment objects (such as road or tunnel axis) usually defined in LandXML ...
Definition: Reshaper.h:2867
static Array< SAlignment > FromName(string name)
Search all the SAlignment with the given name.
Return values
ret.StaStartTbl(Array<Object>) Get a list of station starts usually defined in a LandXML file. Each member of the table is a structure with the following members:
  • Abscissa (number): curvilinear abscissa
  • CurveType (string): Type of the alignment part : "line", "curve", "clothoid" or "irregularline"
  • Coordinate (SPoint): 3D coordinate of the corresponding station

◆ toString()

string SAlignment::toString ( )

Get the type of the variable.

Returns
(string) The type name

◆ ValuesToString()

string SAlignment::ValuesToString ( )

Get a debug string representation of the SAlignment.

Returns
(string) A debug string representing the SAlignment