![]() |
Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2024.
|
Provide various methods of analysis for SCloud, SPoly and SMultiline. More...
Enumerations | |
enum | InspectionType { TunnelType = 0 , RoadType = 1 } |
The type of inspection for cross sections. More... | |
enum | TunnelComputedObj { TunnelMesh = 1 , TunnelCloud = 2 , TunnelNoiseCloud = 4 } |
The objects to extract with SSurveying.ExtractTunnel. More... | |
enum | TunnelMeshingStrategy { FastMesh = 0 , RegularResampling = 1 , RefineMesh = 2 } |
The tunnel meshing strategy. More... | |
Functions | |
Object | CompareCrossSections (Array< SComp > tblDComp, InspectionType inspectionType, SVector direction2D, string referenceName, Object options={}, SReportData reportData=null) |
Compare sections by pair. To keep the compatibility between sections, they should be generated using the command Create along axis or the script function SSurveying.CreateCrossSections. This function gives new lines with colorized segments, showing the differences between two profiles. These differences may have positive or negative values. More... | |
Object | ComputeDsm (Array< SCloud > clouds, number step=0) |
Compute the Digital Surface Model of one (or several) SCloud. More... | |
Object | ContourLinesCloud (SCloud cloud, SVector normalAxis, number step, number heightStart, number heightEnd=0, number planeThickness=1, number chainingDist=1, boolean checkNoise=true, Object renderingOption={}, number filterLength=0) |
Create contour lines on a SCloud. More... | |
Object | ContourLinesPoly (SPoly poly, SVector normalAxis, number step, number heightStart, number heightEnd=0, Object renderingOption={}, number filterLength=0) |
Create contour lines on a SPoly. More... | |
Object | CreateCrossSections (SComp firstComp, SComp secondComp, SComp neutralAxis, Array< number > distanceList=[], Object sections={}, Object options={}) |
Create cross sections on an object (SPoly or SCloud) along a SMultiline. More... | |
Object | EstimateScanDirFromTrajectory (SCloud cloud, STrajectory trajectory) |
Compute the scanning directions of a SCloud using a STrajectory. A new SCloud with scanning directions is returned. More... | |
Object | ExtractGround (SCloud cloud, number step, number angleDeg, SVector direction, number groundExtractionStrategy, number meshingStrategy) |
Extract points on the ground (in a grid) and create a SPoly corresponding to the terrain in the SCloud. More... | |
Object | ExtractTunnel (SCloud initialCloud, SMultiline neutralAxis, number step, TunnelComputedObj computedObjects=SSurveying.TunnelMesh, TunnelMeshingStrategy meshingStrategy=SSurveying.FastMesh, boolean tryToKeepDetails=false) |
Extract points on exterior layer of the tunnel and create a SPoly from those points. More... | |
Object | FilterFeatureLines (SSetMultiline ridgeLines, SSetMultiline ravineLines, number length, number pertinence) |
Filter feature lines according to their length/pertinence. More... | |
Object | FlattenCylindricCloud (SCloud cloudToFlatten, SMultiline axis, number radius, boolean withRelief=false, SVector direction=SVector(), Object gridOptions={}) |
Flatten a SCloud representing a tubular shape (for example a tunnel) More... | |
Object | FlattenCylindricPoly (SPoly polyToFlatten, SMultiline axis, number radius, boolean withRelief=false, SVector direction=SVector(), Object gridOptions={}) |
Flatten a SPoly representing a tubular shape (for example a tunnel) More... | |
Object | FloorFlatness (Array< SComp > compsToTreat, SVector direction, number rulerLength, number tolerance) |
Compute a floor flatness analysis on SPoly or SCloud. More... | |
Object | SlopeAnalysis (Array< SComp > compsToTreat, number slopeTolerance, boolean isPercentage, number neighborsDistance=0, SVector upVector=SVector()) |
Get the slope on each point of the object. More... | |
Object | SurfaceLevelness (Array< SComp > compsToTreat, SVector direction, SPoint planePosition) |
Compute a surface levelness analysis on SPoly or SCloud. More... | |
Object | UnrollAlong (Array< SMultiline > multisToUnroll, SMultiline axis, number altiRef) |
Unroll SMultiline along an axis. More... | |
Object | WallsAndFloors (Array< SCloud > cloudsToTreat, Object options) |
Segment walls, floors and ceilings from a SCloud. More... | |
Provide various methods of analysis for SCloud, SPoly and SMultiline.
The objects to extract with SSurveying.ExtractTunnel.
Enumerator | |
---|---|
TunnelMesh | To extract the SPoly corresponding to the tunnel shape. |
TunnelCloud | To extract the SCloud containing the points on the tunnel. |
TunnelNoiseCloud | To extract the SCloud containing the points that are INSIDE or OUTSIDE the tunnel and suspected to be noise. |
Object SSurveying::CompareCrossSections | ( | Array< SComp > | tblDComp, |
InspectionType | inspectionType, | ||
SVector | direction2D, | ||
string | referenceName, | ||
Object | options = {} , |
||
SReportData | reportData = null |
||
) |
Compare sections by pair. To keep the compatibility between sections, they should be generated using the command Create along axis or the script function SSurveying.CreateCrossSections. This function gives new lines with colorized segments, showing the differences between two profiles. These differences may have positive or negative values.
tblDComp | (Array<SComp>) The table of SComp containing the SSetMultiline and the SPoint |
inspectionType | (InspectionType) The inspection type
|
direction2D | (SVector) The direction for 2D inspection. If 3D inspection choose Z direction |
referenceName | (string) The name of the reference SSetMultiline |
options | (Object) The data structure containing filtering options
|
reportData | (SReportData) The SReportData to fill with compared sections data, view set, ... |
ret.ErrorCode | (number) The error code
|
ret.CompTbl | (Array<SComp>) The table containing the inspected SSetMultiline. The defined colors are: blue for underbreak and red for overbreak |
Object SSurveying::ComputeDsm | ( | Array< SCloud > | clouds, |
number | step = 0 |
||
) |
Object SSurveying::ContourLinesCloud | ( | SCloud | cloud, |
SVector | normalAxis, | ||
number | step, | ||
number | heightStart, | ||
number | heightEnd = 0 , |
||
number | planeThickness = 1 , |
||
number | chainingDist = 1 , |
||
boolean | checkNoise = true , |
||
Object | renderingOption = {} , |
||
number | filterLength = 0 |
||
) |
Create contour lines on a SCloud.
cloud | (SCloud) The SCloud on which to create the contour lines |
normalAxis | (SVector) The normal vector of the contour lines |
step | (number) The step between contour lines |
heightStart | (number) The starting height - Major lines, if any, will be located at this height |
heightEnd | (number) The ending height; or 0 if contour lines all over |
planeThickness | (number) The plane thickness. All the points between two parallel planes distant from this value are taken into account to create the contour line. Half of the thickness is taken on each side of each plane |
chainingDist | (number) If the distance between two neighbor points is less than this value, a segment is created |
checkNoise | (boolean) Should noise reduction be activated? |
renderingOption | (Object) The data structure containing rendering options
|
filterLength | (number) Delete contour lines whose length is smaller than this value |
ret.ErrorCode | (number) The error code
|
ret.SetMulti | (SSetMultiline) The created SSetMultiline |
Object SSurveying::ContourLinesPoly | ( | SPoly | poly, |
SVector | normalAxis, | ||
number | step, | ||
number | heightStart, | ||
number | heightEnd = 0 , |
||
Object | renderingOption = {} , |
||
number | filterLength = 0 |
||
) |
Create contour lines on a SPoly.
poly | (SPoly) The SPoly on which to create the contour lines |
normalAxis | (SVector) The normal vector of the contour lines |
step | (number) The step between contour lines |
heightStart | (number) The starting height - Major lines, if any, will be located at this height |
heightEnd | (number) The ending height; or 0 if contour lines all over |
renderingOption | (Object) The data structure containing rendering options
|
filterLength | (number) Delete contour lines whose length is smaller than this value |
ret.ErrorCode | (number) The error code
|
ret.SetMulti | (SSetMultiline) The created SSetMultiline |
Object SSurveying::CreateCrossSections | ( | SComp | firstComp, |
SComp | secondComp, | ||
SComp | neutralAxis, | ||
Array< number > | distanceList = [] , |
||
Object | sections = {} , |
||
Object | options = {} |
||
) |
Create cross sections on an object (SPoly or SCloud) along a SMultiline.
firstComp | (SComp) The first comp (could be a SPoly or a SCloud) |
secondComp | (SComp) The second comp, if any (could be a SPoly or a SCloud) |
neutralAxis | (SComp) The neutral axis along which sections are created |
distanceList | (Array<number>) The first option to create sections: define a list of distances |
sections | (Object) The second option to create sections: with a regular step
|
options | (Object) The data structure containing rendering options
|
ret.ErrorCode | (number) The error code
|
ret.CompTbl | (Array<SComp>) The table containing the computed objects: the table of points and the computed sections |
ret.ReportData | (SReportData) The SReportData containing all sections data, view set, ... |
Object SSurveying::EstimateScanDirFromTrajectory | ( | SCloud | cloud, |
STrajectory | trajectory | ||
) |
Compute the scanning directions of a SCloud using a STrajectory. A new SCloud with scanning directions is returned.
cloud | (SCloud) The SCloud to use to compute the scanning directions |
trajectory | (STrajectory) The STrajectory |
Object SSurveying::ExtractGround | ( | SCloud | cloud, |
number | step, | ||
number | angleDeg, | ||
SVector | direction, | ||
number | groundExtractionStrategy, | ||
number | meshingStrategy | ||
) |
Extract points on the ground (in a grid) and create a SPoly corresponding to the terrain in the SCloud.
cloud | (SCloud) The SCloud on which to extract ground |
step | (number) The dimension of the squares inside the SPoly |
angleDeg | (number) The max slope angle (in degree) of the terrain that can be seen on the ground. 0 means a terrain perfectly flat, in other words, perfectly perpendicular to the horizontal plane normal vector |
direction | (SVector) The normalized normal vector of the horizontal plane. Most of the time, this vector is (0, 0, 1) |
groundExtractionStrategy | (number) The ground extraction strategy
|
meshingStrategy | (number) The meshing strategy
|
ret.ErrorCode | (number) The error code
|
ret.PolyGround | (SPoly) The SPoly representing the extracted ground |
ret.GroundCloud | (SCloud) The SCloud containing the points on the ground |
ret.CloudNotOnGround | (SCloud) The SCloud containing the points not on the ground |
ret.CloudNoisy | (SCloud) The SCloud containing the noisy points |
Object SSurveying::ExtractTunnel | ( | SCloud | initialCloud, |
SMultiline | neutralAxis, | ||
number | step, | ||
TunnelComputedObj | computedObjects = SSurveying.TunnelMesh , |
||
TunnelMeshingStrategy | meshingStrategy = SSurveying.FastMesh , |
||
boolean | tryToKeepDetails = false |
||
) |
Extract points on exterior layer of the tunnel and create a SPoly from those points.
initialCloud | (SCloud) The initial SCloud of the tunnel |
neutralAxis | (SMultiline) The neutral axis of the tunnel |
step | (number) The step to travel along the neutral axis. This value directly implies: output mesh density and number of slices |
computedObjects | (TunnelComputedObj) Choose the objects to extract
|
meshingStrategy | (TunnelMeshingStrategy) The meshing strategy
|
tryToKeepDetails | (boolean) The options of tunnel extraction processing |
ret.ErrorCode | (number) The error code
|
ret.Poly | (SPoly) The SPoly corresponding to the tunnel shape |
ret.Cloud | (SCloud) The SCloud containing the points on the tunnel |
ret.CloudNoisy | (SCloud) The SCloud containing the points that are not on the tunnel |
Object SSurveying::FilterFeatureLines | ( | SSetMultiline | ridgeLines, |
SSetMultiline | ravineLines, | ||
number | length, | ||
number | pertinence | ||
) |
Filter feature lines according to their length/pertinence.
ridgeLines | (SSetMultiline) The convex lines to filter |
ravineLines | (SSetMultiline) The concave lines to filter |
length | (number) The minimal length threshold |
pertinence | (number) The minimal pertinence threshold (between 0 and 1) |
ret.ErrorCode | (number) The error code
|
ret.SetMultiTbl | (Array<SSetMultiline>) The table of SSetMultiline containing successively the filtered convex (item 0) and concave lines (item 1) |
Object SSurveying::FlattenCylindricCloud | ( | SCloud | cloudToFlatten, |
SMultiline | axis, | ||
number | radius, | ||
boolean | withRelief = false , |
||
SVector | direction = SVector() , |
||
Object | gridOptions = {} |
||
) |
Flatten a SCloud representing a tubular shape (for example a tunnel)
cloudToFlatten | (SCloud) The SCloud to flatten |
axis | (SMultiline) The neutral axis of the SCloud |
radius | (number) The mean radius of the SCloud |
withRelief | (boolean) Should the relief be preserved? |
direction | (SVector) The direction to project the axis |
gridOptions | (Object) The array of grid options
|
ret.ErrorCode | (number) The error code
|
ret.Cloud | (SCloud) The flattened SCloud |
ret.ReportData | (SReportData) The SReportData containing the unroll data |
Object SSurveying::FlattenCylindricPoly | ( | SPoly | polyToFlatten, |
SMultiline | axis, | ||
number | radius, | ||
boolean | withRelief = false , |
||
SVector | direction = SVector() , |
||
Object | gridOptions = {} |
||
) |
Flatten a SPoly representing a tubular shape (for example a tunnel)
polyToFlatten | (SPoly) The SPoly to flatten |
axis | (SMultiline) The neutral axis of the SPoly |
radius | (number) The mean radius of the SPoly |
withRelief | (boolean) Should the relief be preserved? |
direction | (SVector) The direction to project the axis |
gridOptions | (Object) The array of grid options
|
ret.ErrorCode | (number) The error code
|
ret.Poly | (SPoly) The flattened SPoly |
ret.ReportData | (SReportData) The SReportData containing the unroll data |
Object SSurveying::FloorFlatness | ( | Array< SComp > | compsToTreat, |
SVector | direction, | ||
number | rulerLength, | ||
number | tolerance | ||
) |
Compute a floor flatness analysis on SPoly or SCloud.
compsToTreat | (Array<SComp>) The objects to use (only SPoly or SCloud are processed) |
direction | (SVector) The normalized normal vector of the horizontal plane. Most of the time, this vector is (0, 0, 1) |
rulerLength | (number) The ruler length |
tolerance | (number) The tolerance |
ret.ErrorCode | (number) The error code
|
ret.PolyTbl | (Array<SPoly>) The table containing the new colored SPoly representing flatness on input SPoly |
ret.CloudTbl | (Array<SCloud>) The table containing the new colored SCloud representing flatness on input SCloud |
ret.ReportData | (SReportData) The SReportdata containing the floor flatness data |
Object SSurveying::SlopeAnalysis | ( | Array< SComp > | compsToTreat, |
number | slopeTolerance, | ||
boolean | isPercentage, | ||
number | neighborsDistance = 0 , |
||
SVector | upVector = SVector() |
||
) |
Get the slope on each point of the object.
compsToTreat | (Array<SComp>) The objects to use (only SPoly or SCloud are processed) |
slopeTolerance | (number) The slope tolerance, in degrees |
isPercentage | (boolean) Should the results be displayed in percentage? |
neighborsDistance | (number) This distance will be used to approximate the normal ( > 0) (searching the neighbors at this distance). If neighborsDistance <= 0 then neighborsDistance = cloud.GetMeanDistance()*2.0; |
upVector | (SVector) The vector used as Up vector for slope computation |
ret.ErrorCode | (number) The error code
|
ret.PolyTbl | (Array<SPoly>) The table containing the new colored SPoly representing slope on input SPoly |
ret.CloudTbl | (Array<SCloud>) The table containing the new colored SCloud representing slope on input SCloud |
ret.ReportData | (SReportData) The SReportData containing the slope analysis data |
Object SSurveying::SurfaceLevelness | ( | Array< SComp > | compsToTreat, |
SVector | direction, | ||
SPoint | planePosition | ||
) |
Compute a surface levelness analysis on SPoly or SCloud.
compsToTreat | (Array<SComp>) The objects to use (only SPoly or SCloud are processed) |
direction | (SVector) The normal direction of the analysis |
planePosition | (SPoint) The point to define the origin |
ret.ErrorCode | (number) The error code
|
ret.PolyTbl | (Array<SPoly>) The table containing the new colored SPoly representing levelness on input SPoly |
ret.CloudTbl | (Array<SCloud>) The table containing the new colored SCloud representing levelness on input SCloud |
ret.ReportData | (SReportData) The SReportData containing surface levelness data |
Object SSurveying::UnrollAlong | ( | Array< SMultiline > | multisToUnroll, |
SMultiline | axis, | ||
number | altiRef | ||
) |
Unroll SMultiline along an axis.
multisToUnroll | (Array<SMultiline>) The SMultiline to unroll |
axis | (SMultiline) The axis for the unroll |
altiRef | (number) The reference altitude to use for the unroll |
ret.ErrorCode | (number) The error code
|
ret.SetMulti | (SSetMultiline) The SSetMultiline of unrolled SMultiline |
ret.ReportData | (SReportData) The SReportData containing the unroll along axis data |
Object SSurveying::WallsAndFloors | ( | Array< SCloud > | cloudsToTreat, |
Object | options | ||
) |
Segment walls, floors and ceilings from a SCloud.
cloudsToTreat | (Array<SCloud>) The SCloud to use |
options | (Object) The data structure containing computation options
|
ret.ErrorCode | (number) The error code
|
ret.WallsTbl | (Array<SCloud>) The table containing the computed SCloud corresponding to walls |
ret.FloorsTbl | (Array<SCloud>) The table containing the computed SCloud corresponding to the floors (if scanning directions are available) |
ret.CeilingsTbl | (Array<SCloud>) The table containing the computed SCloud corresponding to ceilings (if scanning directions are available) |
ret.FloorsCeilingsTbl | (Array<SCloud>) The table containing the computed SCloud corresponding to both floors and ceilings (if scanning directions are not available) |
ret.OtherTbl | (Array<SCloud>) The table containing the computed SCloud corresponding to other points |