Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2024.
|
Provide point cloud edition and creation methods. More...
Public Types | |
enum | BestRectangleForce { NO_FORCE = 0 , FORCE_NORMAL = 1 , FORCE_PLANE = 2 , FORCE_MAIN_DIRECTION = 4 , FORCE_LENGTH = 8 , FORCE_WIDTH = 16 , FORCE_SQUARE = 32 , FORCE_IN_BEST_PLANE = 64 , FORCE_CENTER = 128 } |
How the best square slot is forced. More... | |
enum | CircleEnum { CIRCLE_FORCE_NOTHING = 0 , CIRCLE_FORCE_RADIUS = 1 , CIRCLE_FORCE_CENTER = 2 , CIRCLE_FORCE_NORMAL = 4 } |
Enum to know which parameter(s) are forced and do not need to be computed. More... | |
enum | CloudRepresentationTypeEnum { CLOUD_FLAT = 0 , CLOUD_SMOOTH = 1 , CLOUD_SMOOTH_BACK = 2 , CLOUD_COLORED = 3 , CLOUD_INSPECTION = 4 , CLOUD_CLASSIFICATION = 6 } |
The different representation types for clouds. More... | |
enum | CloudScriptTypesEnum { _3PI = 5 , _3PI_TRANSF = 6 , ASC_ESRI = 16 , ASC_SCAN = 17 , CSV_ASCII = 18 , CSV_CSLM = 19 , AUTO_DETECT = 21 } |
The set of possible files to load. More... | |
enum | CylinderEnum { CYL_FORCE_NOTHING = 0 , CYL_FORCE_RADIUS = 1 , CYL_INIT_RADIUS = 2 , CYL_FORCE_CENTER = 4 , CYL_INIT_CENTER = 8 , CYL_FORCE_DIRECTION = 16 , CYL_INIT_DIRECTION = 32 } |
Enum to know which parameter(s) are forced and do not need to be computed. More... | |
enum | FillCloudEnum { FILL_ALL = 0 , FILL_IN_ONLY = 1 , FILL_OUT_ONLY = 2 , FILL_NONE = 3 } |
Enum to know which cloud(s) should be filled when separated from a feature or calculating a best feature. More... | |
enum | LineEnum { LINE_FORCE_NOTHING = 0 , LINE_FORCE_POINT = 1 , LINE_FORCE_DIRECTION = 2 } |
Enum to know which parameter(s) are forced and do not need to be computed. More... | |
enum | MethodBestCircleEnum { BEST_CIRCLE = 0 , BEST_CIRCULARITY = 3 } |
Method to measure the best circle. More... | |
enum | MethodBestSqSlotEnum { BEST_SQ_SLOT = 2 } |
Method to measure the slot (best, inner, outer) More... | |
enum | OutputCloudsTypeClippPlanesEnum { Clipped = 0 , Unclipped = 1 , BothClipping = 2 } |
Specify which clouds are kept. More... | |
enum | OutputCloudsTypeInspectionValuesEnum { Inside = 0 , Outside = 1 , Both = 2 } |
Specify which clouds are kept. More... | |
enum | PlaneEnum { PLANE_FORCE_NOTHING = 0 , PLANE_FORCE_POINT = 1 , PLANE_FORCE_NORMAL = 2 } |
Enum to know which parameter(s) are forced and do not need to be computed. More... | |
enum | RectangleEnum { RECTANGLE_FORCE_NOTHING = 0 , RECTANGLE_FORCE_NORMAL = 1 , RECTANGLE_FORCE_PLANE = 2 , RECTANGLE_FORCE_MAIN_DIRECTION = 4 , RECTANGLE_FORCE_LENGTH = 8 , RECTANGLE_FORCE_WIDTH = 16 , RECTANGLE_FORCE_SQUARE = 32 , RECTANGLE_FORCE_IN_BEST_PLANE = 64 , RECTANGLE_FORCE_CENTER = 128 } |
How the extracted rectangle is forced. More... | |
enum | SphereEnum { SPHERE_FORCE_NOTHING = 0 , SPHERE_FORCE_RADIUS = 1 , SPHERE_FORCE_CENTER = 2 } |
Enum to know which parameter(s) are forced and do not need to be computed. More... | |
Public Types inherited from SComp | |
enum | VisibilityEnum { HIDDEN_ONLY = 0 , VISIBLE_ONLY = 1 , ANY_VISIBILITY = 2 } |
Visible criteria. More... | |
Public Member Functions | |
AddPoint (SPoint pointToAdd) | |
Add a new point to the cloud. More... | |
Object | BestCircle (MethodBestCircleEnum method=SCloud.BEST_CIRCLE, number nbPointElim=0, CircleEnum force=SCloud.CIRCLE_FORCE_NOTHING, SPoint center=SPoint(), SVector normal=SVector(), number radius=1, FillCloudEnum fillCloud=SCloud.FILL_ALL) |
Compute the best circle fitting with the cloud in the mean squares sense.Best fit with all the points. More... | |
Object | BestCone (FillCloudEnum fillCloud=SCloud.FILL_ALL, number nbPointsElim=0) |
Compute the best cone fitting with the cloud. More... | |
Object | BestCylinder (number nbPointElim=0, CylinderEnum force=SCloud.CYL_FORCE_NOTHING, SPoint center=SPoint(), SVector directionVector=SVector(), number radius=1, FillCloudEnum fillCloud=SCloud.FILL_ALL) |
Initialize a SCylinder using the best cylinder extracted from a cloud (inner, outer...) More... | |
Object | BestLine (number nbPointElim=0, LineEnum force=SCloud.LINE_FORCE_NOTHING, SPoint averagePoint=SPoint(), SVector directionVector=SVector(), FillCloudEnum fillCloud=SCloud.FILL_ALL) |
Compute the best line fitting with the cloud. More... | |
Object | BestPlane (number nbPointElim=0, PlaneEnum force=SCloud.PLANE_FORCE_NOTHING, SPoint ptToForce=SPoint(), SVector directionToForce=SVector(), FillCloudEnum fillCloud=SCloud.FILL_ALL) |
Compute the best plane fitting with all points from the cloud. More... | |
Object | BestSphere (number nbPointElim=0, SphereEnum force=SCloud.SPHERE_FORCE_NOTHING, SPoint center=SPoint(), number radius=0, FillCloudEnum fillCloud=SCloud.FILL_ALL) |
Compute the best sphere fitting with the cloud. More... | |
Object | BestSqSlot (MethodBestSqSlotEnum method=SCloud.BEST_SQ_SLOT, number nbPointElim=0, BestRectangleForce force=SCloud.NO_FORCE, SPoint center=SPoint(), SVector normal=SVector(), SVector mainDirection=SVector(), number length=0, number width=0, FillCloudEnum fillCloud=SCloud.FILL_ALL) |
Compute the best square slot fitting with the cloud. More... | |
Object | Chain (number chainingDist) |
Chain the current point cloud and creates the shortest SMultiline(s). More... | |
Object | CleanFeatureOrientation (SFeature featureType, number angle, number distanceTolerance, boolean useEstimatedDirection, FillCloudEnum fillCloud=SCloud.FILL_ALL) |
Get all the points found to be scanned (or estimated) with an angle to the feature normal lower than a threshold. More... | |
Object | CleanPolyOrientation (SPoly polyhedron, number angle, number distanceTolerance, boolean useEstimatedDirection, boolean checkForThinParts, FillCloudEnum fillCloud=SCloud.FILL_ALL) |
Get all the points found inside (or outside) a SPoly. More... | |
Object | CleanWithLocalNormal (number angle, FillCloudEnum fillCloud=SCloud.FILL_ALL) |
Clean the cloud according to the angle between: * the local estimated normal of one point. * and the scanning direction of the point. More... | |
Clear () | |
Deallocate memory of the object. More... | |
Object | ClosestPoint (SPoint inputPt, SPoint centerPt=SPoint(), number distance=0) |
Find the point in the current cloud that is the closest from an input point and optionally inside a sphere. More... | |
Object | Compare (SCloud measuredCloud, number distMax, SVector direction=null, boolean checkBothDirection=false, number maxCosAngle=-2, boolean checkNormals=false) |
Compute the distances between 2 point clouds. More... | |
Object | ComputeDensityFromNearestPoints () |
Compute the density around each point of the cloud. More... | |
Object | ComputeDensityFromSphere (number NeighborhoodRadiusSize=1) |
Compute the density around each point of the cloud. More... | |
Object | ComputeFlatAndCurvedAreas (number neighborhoodRadius=0, number optionMask=0) |
Compute the flat and curved areas on the cloud. More... | |
Object | ConvertInspectionToColor () |
Convert the gradient of inspection into color for each point. More... | |
Object | Explode (number maxDistance=0, number delNb=0, number maxNb=0) |
Split a SCloud into a group of point SClouds based on the distance between the points. More... | |
Object | ExplodeByClass () |
Explode a classified cloud by class. More... | |
Object | ExplodeColor () |
Explode a SCloud by inspection colors, or real colors if no inspection colors available. More... | |
Object | ExplodeWithInspectionSteps () |
Split the cloud according to the scalar steps. More... | |
Object | ExtractCylinder (Array< SPoint > seedPoint, number tolerance, CylinderEnum force=SCloud.CYL_FORCE_NOTHING, SPoint center=SPoint(), SVector directionVector=SVector(), number radius=0, FillCloudEnum fillCloud=SCloud.FILL_ALL) |
Extract the cylinder region on the current cloud starting from seed point(s). More... | |
Object | ExtractLine (SPoint seedPoint, number tolerance, LineEnum force=SCloud.LINE_FORCE_NOTHING, SPoint passingPoint=SPoint(), SVector directionVector=SVector(), FillCloudEnum fillCloud=SCloud.FILL_ALL) |
Extract the line on the current cloud, starting from seed point(s). More... | |
Object | ExtractMedianPointOnWhiteLine (SPoint seedPoint, number sphereRadius, number optionMask, FillCloudEnum fillCloud=SCloud.FILL_NONE) |
Search a point on the median of the nearest white line of the seed point, in the area of a sphere with the given radius. More... | |
Object | ExtractMultilineFromSeed (SPoint seedPoint, number tolerance, number cylinderLength, number searchRange, boolean chainOption) |
Extract a polyline inside a section cloud, from a seed point. More... | |
Object | ExtractPlane (Array< SPoint > seedPoint, number tolerance, PlaneEnum force=SCloud.PLANE_FORCE_NOTHING, SPoint averagePoint=SPoint(), SVector directionVector=SVector(), FillCloudEnum fillCloud=SCloud.FILL_ALL) |
Extract the planar region on the current cloud, starting from seed point(s). More... | |
Object | ExtractRectangle (SPoint seedPoint, number tolerance, RectangleEnum force=SCloud.RECTANGLE_FORCE_NOTHING, SPoint center=SPoint(), SVector normalAxis=SVector(), SVector mainAxis=SVector(), number length=0, number width=0, boolean fillCloud=true) |
Extract the rectangle region on the current cloud starting from the seed point. More... | |
Object | ExtractSphere (Array< SPoint > seedPoint, number tolerance, SphereEnum force=SCloud.SPHERE_FORCE_NOTHING, SPoint center=SPoint(), number radius=0, FillCloudEnum fillCloud=SCloud.FILL_ALL) |
Extract the spherical region on the current cloud starting from seed point(s). More... | |
Object | FilterByNormalDirection (SVector direction, number minCosAngle, boolean isDirectionSigned) |
Filter a cloud in function of the direction of the normals. The missing normals will be computed and stored in the extra data of the cloud. More... | |
Object | FilterMovingObjects (number resolutionAt10m, number threshold) |
Separate a cloud into two clouds, containing moving and fixed points respectively. More... | |
Object | FlipIntensities () |
Turn intensity values upside down. More... | |
Object | GetCentroid () |
Compute the Centroid of a point cloud. More... | |
CloudRepresentationTypeEnum | GetCloudRepresentation () |
Return the current representation of the cloud. More... | |
Object | GetColorGradient () |
Get the color gradient of the SCloud. More... | |
Object | GetConvexContour (SVector viewDirection=null, SPoint pointOnPlane=null, boolean is3dContour=false) |
Compute the convex contour of the cloud according to a direction. More... | |
Object | GetConvexHull () |
Compute the convex hull of a point cloud. More... | |
Object | GetHighestPoint (SVector direction) |
Get the highest point according to a direction. More... | |
SCloudIterator | GetIterator () |
Return an iterator on the current cloud. This iterator is initialized with a point of the cloud. More... | |
Object | GetLowestPoint (SVector direction) |
Get the lowest point according to a direction. More... | |
number | GetMeanDistance () |
Compute the average distance between points of the cloud. More... | |
number | GetNumber () |
Return the number of points in the cloud. More... | |
number | GetPointSize () |
Return the current point size. More... | |
Object | GetScanningPositions () |
Extract the scanning positions of the cloud. More... | |
number | HasColor () |
Check if the cloud has color information. More... | |
number | HasGriddedInformation () |
Check if points are organized as a gridded structure. More... | |
number | HasInspection () |
Check if the cloud has inspection information. More... | |
boolean | HasScanDir () |
Allow the user to know if the cloud contains a scanning direction. More... | |
Object | LoadColorGradient (string filePath) |
Load the color gradient from a file (*.rsi binary file). More... | |
Object | LocalizeValues (number min, number max) |
Extract the minimum and maximum threshold values of an inspected cloud. More... | |
Object | NoiseReductionSplit (number threshold) |
Split the cloud in 2 clouds according to a noise reduction threshold: 1) The "good" points. 2) The "bad" (noisy) points. The technique used in this function supposes that the point density within the cloud is constant or nearly. The function will consider as noisy the points in the zone under a certain density threshold. More... | |
Object | ProjDir (SPoint pointToProject, SVector direction, number aperture, boolean isDirectionUnsigned=false) |
Compute the projection of a point on a cloud. More... | |
Object | ProjectOnPlane (SPlane plane) |
Project the point cloud onto a plane. More... | |
Object | Reduce (number numberOfPoints) |
Compute a reduced point cloud with points evenly spaced (as much as possible). More... | |
Object | ReduceBest (number minAverageDist, number maxAverageDist) |
Compute a reduced point cloud keeping only the "best" points as much as possible evenly spaced. More... | |
Object | RegionGrowFreePolyline (SPoint seedPoint, number samplingStep) |
Extract polyline using a seed point on the line and a sampling step that includes the line. More... | |
Object | Save (string filePath, string decimalSeparator=".", boolean exportScanDir=false, SMatrix coordinateSystemMatrix=SMatrix()) |
Save the cloud into a file. More... | |
Object | SaveColorGradient (string filePath) |
Save the color gradient into a file (*.rsi binary file). More... | |
Object | ScalarSteps () |
Split the cloud according to the scalar steps. More... | |
SCloud () | |
Default constructor. More... | |
SCloud (SCloud other) | |
Copy constructor. More... | |
Object | SectionPlane (SVector planesNormalVector, SPoint firstPlanePoint, number numberOfParallelPlanes, number distanceBetweenPlanes, number planeThickness, number chainingDistance, boolean doNoiseReduction) |
Intersection of a point cloud by parallel planes. More... | |
Object | Separate (SMultiline closedContour, SVector direction, SPoint pntFirstPlane=SPoint(), SPoint pntSecondPlane=SPoint(), FillCloudEnum fillCloud=SCloud.FILL_ALL) |
Make a copy of points found INside and/or OUTside the box and preserve the current cloud. More... | |
Object | SeparateFeature (SFeature featureType, number tolerance, FillCloudEnum fillCloud=SCloud.FILL_ALL) |
Get all the points found INside (or OUTside) a feature (circle, cylinder, plane). More... | |
Object | SeparateMultiline (SMultiline multiline, number tolerance, FillCloudEnum fillCloud=SCloud.FILL_ALL) |
Separate the points in two parts with an offset on both sides of the multiline. More... | |
Object | SeparatePoly (SPoly polyhedron, number tolerance, FillCloudEnum fillCloud=SCloud.FILL_ALL) |
Get all the points found INside (or OUTside) a SPoly. More... | |
SetCloudRepresentation (CloudRepresentationTypeEnum representation) | |
Modify the representation of the component. More... | |
SetPointSize (number pointSize) | |
Modify the point size. More... | |
boolean | ShowInspectionQuotations (boolean showQuotations, Object options={}) |
Manage inspection quotations appearance. More... | |
string | toString () |
Get the type of the variable. More... | |
string | ValuesToString () |
Get a debug string representation of the cloud. 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< SCloud > | All (VisibilityEnum visCrit=SComp.ANY_VISIBILITY) |
Get all the SCloud in the document. More... | |
static Object | Classify (Array< SCloud > clouds, string modelName) |
Classify the point clouds using a trained model. More... | |
static Object | ColorAlongDir (Array< SCloud > clouds, SVector directionVect, SPoint origin=null) |
Color the clouds along a direction with a gradient. More... | |
static Object | Extract (Array< SComp > tableSComp, number samplingDistance=0, boolean generateColor=false) |
Extract the cloud from an SComp array. More... | |
static Object | FilterWithInspectionValues (Array< SCloud > cloudOfPoints, number lowerThreshold, number upperThreshold, OutputCloudsTypeInspectionValuesEnum outputCloudsType=SCloud.Both) |
Separate cloud(s) into 2 clouds according to inspection values. More... | |
static Object | FilterWithScalarRange (Array< SCloud > cloudOfPoints, number lowerThreshold, number upperThreshold, OutputCloudsTypeInspectionValuesEnum outputCloudsType=SCloud.Both) |
Separate cloud(s) into 2 clouds according to inspection values. More... | |
static Object | FromAsciiFile (string fileName, string format, number nbPtToKeep=0, boolean importScanDir=true) |
Read an ascii point cloud. More... | |
static Object | FromClick () |
Launch an interaction to select a SCloud in the scene. More... | |
static Object | FromFile (string fileName, CloudScriptTypesEnum indexType=SCloud.AUTO_DETECT, number nbPtToKeep=6000000) |
Import clouds from a file. Authorized file extensions : .ac, .asc, .csv, .fls, .fws, .nsd, .ply, .psl, .pts, .ptx, .raw, .txt, .xyz, .yxz, .3pi. More... | |
static Array< SCloud > | FromName (string name) |
Search all the SCloud with the given name. More... | |
static Array< SCloud > | FromSel () |
Get all the selected SCloud. More... | |
static Object | GetCategoriesInModel (string modelName) |
Get the categories available in the given model. More... | |
static Array< string > | GetClassificationModels () |
Get a table of the names of all the classification models available. More... | |
static Object | GetClassName (number classId) |
Get the class name for a given class ID. More... | |
static Object | GriddedInspection (SPoly poly, SPoint origin, SVector projectionDir, SVector horizontalDir, number stepHorizontal, number stepVertical) |
Compute the inspected grid cloud projected onto an inspected SPoly. More... | |
static Object | Merge (Array< SCloud > tableSCloud) |
Merge an array of clouds into one single cloud. More... | |
static SCloud | New () |
Default constructor. More... | |
static SCloud | New (SCloud other) |
Copy constructor. More... | |
static Object | ProjectGrid (SPoly poly, SPoint origin, SVector projectionDir, SVector horizontalDir, number stepHorizontal, number stepVertical) |
Compute the grid cloud projected onto a SPoly. More... | |
static Object | SeparateWithClippingObjects (Array< SCloud > cloudOfPoints, OutputCloudsTypeClippPlanesEnum outputCloudsType=SCloud.BothClipping) |
Separate cloud(s) according to active clipping objects. More... | |
static Object | SeparateWithRealColors (Array< SCloud > cloudOfPoints, number colorR, number colorG, number colorB, number tolerance) |
Separate cloud(s) into 2 clouds according to real colors. More... | |
static Object | SeparateWithScanningPositions (Array< SCloud > clouds, boolean createCloudWithoutScanningPositions) |
Separate cloud(s) into many clouds according to their scanning positions. More... | |
static Object | SeparateWithScanPatches (Array< SCloud > clouds, boolean createCloudWithoutScanPatches) |
Separate cloud(s) into many clouds according to scan patches. 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 point cloud edition and creation methods.
How the best square slot is forced.
enum SCloud::CircleEnum |
Enum to know which parameter(s) are forced and do not need to be computed.
The different representation types for clouds.
The set of possible files to load.
The FromFile() function requires to specify extension type for specific formats. If it's not a specific format as described below use SCloud.AUTO_DETECT.
Enumerator | |
---|---|
_3PI | ShapeGrabber format. |
_3PI_TRANSF | ShapeGrabber format. |
ASC_ESRI | ESRI format. |
ASC_SCAN | Ascii format. |
CSV_ASCII | Excel format. |
CSV_CSLM | Excel format. |
AUTO_DETECT | Auto detect. |
enum SCloud::CylinderEnum |
Enum to know which parameter(s) are forced and do not need to be computed.
Enum to know which cloud(s) should be filled when separated from a feature or calculating a best feature.
Enumerator | |
---|---|
FILL_ALL | Both InCloud and OutCloud should be filled. |
FILL_IN_ONLY | Only Fills the InCloud. |
FILL_OUT_ONLY | Only Fills the OutCloud. |
FILL_NONE | Neither InCloud nor OutCloud should be filled. |
enum SCloud::LineEnum |
Enum to know which parameter(s) are forced and do not need to be computed.
enum SCloud::PlaneEnum |
How the extracted rectangle is forced.
enum SCloud::SphereEnum |
SCloud::SCloud | ( | ) |
Default constructor.
SCloud::AddPoint | ( | SPoint | pointToAdd | ) |
Add a new point to the cloud.
pointToAdd | (SPoint) The point to add |
|
static |
Get all the SCloud in the document.
visCrit | (VisibilityEnum) Visible selection criteria
|
Object SCloud::BestCircle | ( | MethodBestCircleEnum | method = SCloud.BEST_CIRCLE , |
number | nbPointElim = 0 , |
||
CircleEnum | force = SCloud.CIRCLE_FORCE_NOTHING , |
||
SPoint | center = SPoint() , |
||
SVector | normal = SVector() , |
||
number | radius = 1 , |
||
FillCloudEnum | fillCloud = SCloud.FILL_ALL |
||
) |
Compute the best circle fitting with the cloud in the mean squares sense.Best fit with all the points.
method | (MethodBestCircleEnum) Method to measure the circle (best, circularity)
|
nbPointElim | (number) The number of points to eliminate. The worst points are eliminated. This number should not be greater than the total number of points -4 |
force | (CircleEnum) Enum to know which option(s) is forced or selected.
|
center | (SPoint) The first point of the center line. |
normal | (SVector) The normed Normal vector of the plane. |
radius | (number) The radius of the circle |
fillCloud | (FillCloudEnum) Which cloud should be filled: both, only one or none
|
ret.ErrorCode | (number) The error code
|
ret.Circle | (SCircle) The resulting best SCircle. |
ret.StdDeviation | (number) The standard deviation. |
ret.DistWorstPt | (number) The distance of the worst point to the best shape found. |
ret.FormError | (number) The form error. In this case, circularity. |
ret.InCloud | (SCloud) The extracted points. This option is only valid if the method selected is BEST_CIRCLE or BEST_CIRCULARITY |
ret.OutCloud | (SCloud) The cloud without the extracted points. This option is only valid if the method selected is BEST_CIRCLE or BEST_CIRCULARITY |
Object SCloud::BestCone | ( | FillCloudEnum | fillCloud = SCloud.FILL_ALL , |
number | nbPointsElim = 0 |
||
) |
Compute the best cone fitting with the cloud.
fillCloud | (FillCloudEnum) Which cloud should be filled: both, only one or none
|
nbPointsElim | (number) Optional number of points to eliminate or 0 if none |
ret.ErrorCode | (number) The error code
|
ret.Cone | (SCone) The resulting best SCone. |
ret.StdDeviation | (number) The standard deviation. |
ret.DistWorstPt | (number) The distance of the worst point to the best shape found. |
ret.FormError | (number) The form error. In this case, conicity. |
ret.InCloud | (SCloud) The extracted points. |
ret.OutCloud | (SCloud) The cloud without the extracted points. |
Object SCloud::BestCylinder | ( | number | nbPointElim = 0 , |
CylinderEnum | force = SCloud.CYL_FORCE_NOTHING , |
||
SPoint | center = SPoint() , |
||
SVector | directionVector = SVector() , |
||
number | radius = 1 , |
||
FillCloudEnum | fillCloud = SCloud.FILL_ALL |
||
) |
Initialize a SCylinder using the best cylinder extracted from a cloud (inner, outer...)
nbPointElim | (number) The number of points to eliminate. The worst points are eliminated. This number should not be greater than the total number of points -4 |
force | (CylinderEnum) Enum to know which parameter(s) is forced or initialized (initializing the computation provides a faster computation.
|
center | (SPoint) The first point of the center line. |
directionVector | (SVector) The normed Normal vector of the plane. |
radius | (number) The radius of the circle |
fillCloud | (FillCloudEnum) Which cloud should be filled: both, only one or none
|
ret.ErrorCode | (number) The error code
|
ret.Cylinder | (SCylinder) The resulting best cylinder. |
ret.StdDeviation | (number) The standard deviation. |
ret.DistWorstPt | (number) The distance of the worst point to the best shape found. |
ret.FormError | (number) The form error. In this case, cylindricity. |
ret.InCloud | (SCloud) The extracted points. |
ret.OutCloud | (SCloud) The cloud without the extracted points. |
Object SCloud::BestLine | ( | number | nbPointElim = 0 , |
LineEnum | force = SCloud.LINE_FORCE_NOTHING , |
||
SPoint | averagePoint = SPoint() , |
||
SVector | directionVector = SVector() , |
||
FillCloudEnum | fillCloud = SCloud.FILL_ALL |
||
) |
Compute the best line fitting with the cloud.
nbPointElim | (number) The number of points to eliminate. The worst points are eliminated. This number should not be greater than the total number of points -3 |
force | (LineEnum) Enum to know which parameter(s) are forced and do not need to be computed.
|
averagePoint | (SPoint) The point of the cloud that the line pass through |
directionVector | (SVector) The normed direction vector of the line. |
fillCloud | (FillCloudEnum) Which cloud should be filled: both, only one or none
|
ret.ErrorCode | (number) The error code
|
ret.Line | (SLine) The resulting best SLine. |
ret.StdDeviation | (number) The standard deviation. |
ret.DistWorstPt | (number) The distance of the worst point to the best shape found. |
ret.FormError | (number) The form error. In this case, linearity. |
ret.InCloud | (SCloud) The extracted points. |
ret.OutCloud | (SCloud) The cloud without the extracted points. |
Object SCloud::BestPlane | ( | number | nbPointElim = 0 , |
PlaneEnum | force = SCloud.PLANE_FORCE_NOTHING , |
||
SPoint | ptToForce = SPoint() , |
||
SVector | directionToForce = SVector() , |
||
FillCloudEnum | fillCloud = SCloud.FILL_ALL |
||
) |
Compute the best plane fitting with all points from the cloud.
nbPointElim | (number) The number of points to eliminate. The worst points are eliminated. This number should not be greater than the total number of points -3 |
force | (PlaneEnum) Enum to know which parameter(s) are forced and do not need to be computed.
|
ptToForce | (SPoint) The average point of the cloud to force |
directionToForce | (SVector) The normed Normal vector of the plane to force. |
fillCloud | (FillCloudEnum) Which cloud should be filled: both, only one or none. Plane size and orientation are optimized if the InCloud is filled
|
ret.ErrorCode | (number) The error code
|
ret.Plane | (SPlane) The resulting best SPlane. |
ret.StdDeviation | (number) The standard deviation. |
ret.DistWorstPt | (number) The distance of the worst point to the best shape found. |
ret.FormError | (number) The form error. In this case, flatness. |
ret.InCloud | (SCloud) The extracted points. |
ret.OutCloud | (SCloud) The cloud without the extracted points. |
Object SCloud::BestSphere | ( | number | nbPointElim = 0 , |
SphereEnum | force = SCloud.SPHERE_FORCE_NOTHING , |
||
SPoint | center = SPoint() , |
||
number | radius = 0 , |
||
FillCloudEnum | fillCloud = SCloud.FILL_ALL |
||
) |
Compute the best sphere fitting with the cloud.
nbPointElim | (number) The number of points to eliminate. The worst points are eliminated. This number should not be greater than the total number of points -4 |
force | (SphereEnum) Enum to know which parameter(s) is forced
|
center | (SPoint) The center of the sphere to force |
radius | (number) The radius of the sphere to force |
fillCloud | (FillCloudEnum) Which cloud should be filled: both, only one or none
|
ret.ErrorCode | (number) The error code
|
ret.Sphere | (SSphere) The resulting best SSphere. |
ret.StdDeviation | (number) The standard deviation. |
ret.DistWorstPt | (number) The distance of the worst point to the best shape found. |
ret.FormError | (number) The form error. In this case, sphericity. |
ret.InCloud | (SCloud) The extracted points. |
ret.OutCloud | (SCloud) The cloud without the extracted points. |
Object SCloud::BestSqSlot | ( | MethodBestSqSlotEnum | method = SCloud.BEST_SQ_SLOT , |
number | nbPointElim = 0 , |
||
BestRectangleForce | force = SCloud.NO_FORCE , |
||
SPoint | center = SPoint() , |
||
SVector | normal = SVector() , |
||
SVector | mainDirection = SVector() , |
||
number | length = 0 , |
||
number | width = 0 , |
||
FillCloudEnum | fillCloud = SCloud.FILL_ALL |
||
) |
Compute the best square slot fitting with the cloud.
method | (MethodBestSqSlotEnum) Method to measure the slot (best, inner, outer)
|
nbPointElim | (number) The number of points to eliminate. The worst points are eliminated. This number should not be greater than the total number of points -4 |
force | (BestRectangleForce) Only with BEST_SQ_SLOT Enum to know which parameter(s) is forced or initialized (initializing the computation provides a faster computation.
|
center | (SPoint) The center of the rectangle. |
normal | (SVector) The normal to the rectangle |
mainDirection | (SVector) The main direction of the rectangle |
length | (number) The length of the rectangle |
width | (number) The width of the rectangle |
fillCloud | (FillCloudEnum) Which cloud should be filled: both, only one or none
|
ret.ErrorCode | (number) The error code
|
ret.SquareSlot | (SSquareSlot) The resulting best SSquareSlot |
ret.InCloud | (SCloud) The extracted points. This option is only valid if the method selected is BEST_SQ_SLOT |
ret.OutCloud | (SCloud) The cloud without the extracted points. This option is only valid if the method selected is BEST_SQ_SLOT |
Object SCloud::Chain | ( | number | chainingDist | ) |
Chain the current point cloud and creates the shortest SMultiline(s).
chainingDist | (number) If the distance between two neighbor points is less than this value a segment is created. If <=0, no limit. |
ret.ErrorCode | (number) The error code
|
ret.MultiTbl | (Array<SMultiline>) The table of SMultiline. |
|
static |
Classify the point clouds using a trained model.
clouds | (Array<SCloud>) The table of clouds to classify |
modelName | (string) The model name |
ret.ErrorCode | (number) The error codes:
|
ret.CloudTbl | (Array<SCloud>) Table of classified clouds |
Object SCloud::CleanFeatureOrientation | ( | SFeature | featureType, |
number | angle, | ||
number | distanceTolerance, | ||
boolean | useEstimatedDirection, | ||
FillCloudEnum | fillCloud = SCloud.FILL_ALL |
||
) |
Get all the points found to be scanned (or estimated) with an angle to the feature normal lower than a threshold.
featureType | (SFeature) The feature to use when dissociating the points in the cloud |
angle | (number) Angle (range 0-180) in degrees between the scanning direction/local normal of the cloud andlocal feature normal on which is projected the point. When compared to the scanning direction, a value of 90 degrees guaranties that the point could be scanned If no scanning direction is defined in the cloud, range of valid values is 0-90 degrees |
distanceTolerance | (number) The distance tolerance for the projection
|
useEstimatedDirection | (boolean) If true, the estimated normal of the point is used instead of the scan direction. However if no scan direction is available for the cloud, the estimated normal will be used regardless of the value of this parameter |
fillCloud | (FillCloudEnum) Which cloud should be filled: both, only one or none
|
ret.ErrorCode | (number) The error code
|
ret.InCloud | (SCloud) The resulting points with a scan angle lower than the threshold when compared to the feature local normal. |
ret.OutCloud | (SCloud) The resulting points with a scan angle higher than the threshold when compared to the feature local normal. |
Object SCloud::CleanPolyOrientation | ( | SPoly | polyhedron, |
number | angle, | ||
number | distanceTolerance, | ||
boolean | useEstimatedDirection, | ||
boolean | checkForThinParts, | ||
FillCloudEnum | fillCloud = SCloud.FILL_ALL |
||
) |
Get all the points found inside (or outside) a SPoly.
polyhedron | (SPoly) The SPoly to use when dissociating the points in the cloud |
angle | (number) Angle (range 0-180) in degrees between the scanning direction of the cloud and the triangle normal on which is projected the point. When compared to the scanning direction, a value of 90 degrees guaranties that the point could be scanned If no scanning direction is defined in the cloud, range of valid values is 0-90 degrees |
distanceTolerance | (number) If <=0, all triangle can be considered as valid projection. If >0 Only the triangle within the radius of DistanceTolerance around the point can be used to project the point. |
useEstimatedDirection | (boolean) If true, always use the estimated normal of the point instead of the scan direction |
checkForThinParts | (boolean) If true, the point projection will try to find a suitable triangle that both fit the maximum angle and the distance tolerance instead of the closest triangle. This option is useful if a thin part was scanned from both sides. This option is used only if the scan direction is used (and not the estimated point normal) |
fillCloud | (FillCloudEnum) Which cloud should be filled: both, only one or none
|
Object SCloud::CleanWithLocalNormal | ( | number | angle, |
FillCloudEnum | fillCloud = SCloud.FILL_ALL |
||
) |
Clean the cloud according to the angle between:
* the local estimated normal of one point.
* and the scanning direction of the point.
angle | (number) Angle (range 0-90) in degrees between the scanning direction of one point and its local estimated normal. This angle represents a threshold to fill the InCloud or the OutCloud |
fillCloud | (FillCloudEnum) Which cloud should be filled: both, only one or none
|
SCloud::Clear | ( | ) |
Deallocate memory of the object.
Find the point in the current cloud that is the closest from an input point and optionally inside a sphere.
inputPt | (SPoint) The point from which the closest has to be found |
centerPt | (SPoint) If not null, center point: the point returned must be inside a sphere with this center. If null, inputPt is used as the center instead. |
distance | (number) Define the radius of the search sphere. Points outside of it will be ignored. If centerPt is not null, the distance must be >0. If centerPt is null, the distance can either be limited (>0) or not limited (=0) |
ret.ErrorCode | (number) The error code
|
ret.Point | (SPoint) The closest point found. |
|
static |
Color the clouds along a direction with a gradient.
clouds | (Array<SCloud>) The clouds to color |
directionVect | (SVector) The direction to use for coloring |
origin | (SPoint) The origin (the point at which the value should be zero) |
ret.ErrorCode | (number) The error code
|
ret.CloudTbl | (Array<SCloud>) The resulting colored clouds. This table contains the same number of clouds as the input table |
Object SCloud::Compare | ( | SCloud | measuredCloud, |
number | distMax, | ||
SVector | direction = null , |
||
boolean | checkBothDirection = false , |
||
number | maxCosAngle = -2 , |
||
boolean | checkNormals = false |
||
) |
Compute the distances between 2 point clouds.
measuredCloud | (SCloud) The SCloud considered as the measured object to project |
distMax | (number) Ignore point having a distance greater than this one |
direction | (SVector) Direction of the inspection. If it's a 3D inspection, no need of a vector direction |
checkBothDirection | (boolean) True to check direction in both side, false otherwise |
maxCosAngle | (number) The maximum cos value for angle (used to check orientation of normals and projection's direction) |
checkNormals | (boolean) True to check the normals, false otherwise |
ret.ErrorCode | (number) The error code
|
ret.Cloud | (SCloud) The new SCloud, which is the result of the comparison |
ret.ReportData | (SReportData) The new SReportData, which contains the view set with the inspected component. |
Object SCloud::ComputeDensityFromNearestPoints | ( | ) |
Compute the density around each point of the cloud.
This function will compute the local density around each point of the cloud. The local density is the radius of the minimal sphere, with the point as the center, that contains at maximum the 32 nearest neighbor points. The local density is converted to a number of points/<document unit>2 and added as density data. The conversion formula is 32 / (radius * radius * pi)
.
ret.ErrorCode | (number) The error code:
|
ret.Cloud | (SCloud) A new cloud with density |
Object SCloud::ComputeDensityFromSphere | ( | number | NeighborhoodRadiusSize = 1 | ) |
Compute the density around each point of the cloud.
This function will compute the local density around each point of the cloud. The local density is the number of points that contains the sphere, with the point as the center and as radius the given one. The local density is converted to a number of points/<document unit>2 and added as density data. The conversion formula is number of points / (NeighborhoodRadiusSize * NeighborhoodRadiusSize * pi)
.
NeighborhoodRadiusSize | (number) The radius of the sphere used to find the neighbors to compute the density. |
ret.ErrorCode | (number) The error code:
|
ret.Cloud | (SCloud) A new cloud with density |
Object SCloud::ComputeFlatAndCurvedAreas | ( | number | neighborhoodRadius = 0 , |
number | optionMask = 0 |
||
) |
Compute the flat and curved areas on the cloud.
neighborhoodRadius | (number) The radius of the sphere used to consider points as neighbors. If 0, an automatic value is computed according to the average distance between points ( 12 * GetMeanDistance(); ) |
optionMask | (number) option bit mask
|
ret.ErrorCode | (number) The error code.
|
ret.Cloud | (SCloud) A new cloud with color & inspection, if successful |
Object SCloud::ConvertInspectionToColor | ( | ) |
Convert the gradient of inspection into color for each point.
ret.ErrorCode | (number) The error code
|
ret.Cloud | (SCloud) A new cloud with color & inspection |
Object SCloud::Explode | ( | number | maxDistance = 0 , |
number | delNb = 0 , |
||
number | maxNb = 0 |
||
) |
Split a SCloud into a group of point SClouds based on the distance between the points.
maxDistance | (number) The distance threshold, which determines if two points belong to the same cloud or not. If you enter zero, the function will take a default value of 3*(the average distance between points of the cloud. As this dimension is a statistic, it is meaningful only if the number of points is high (minimum 1000 points)) |
delNb | (number) The delete threshold, or 0 if none. All clusters having a number of points less or equal to this value are deleted. |
maxNb | (number) The maximum number of clusters to return. If 0, taking the default value of 1000. Smallest cluster are automatically deleted so that the total number of component returned do not exceed this value. |
ret.ErrorCode | (number) The error code:
|
ret.CloudTbl | (Array<SCloud>) The exploded SCloud table |
Object SCloud::ExplodeByClass | ( | ) |
Explode a classified cloud by class.
ret.ErrorCode | (number) The error code
|
ret.CloudTbl | (Array<SCloud>) Table of the exploded clouds. |
ret.ClassTbl | (Array<number>) Table of classes. Each class correspond to the cloud with the same index in CloudTbl. |
Object SCloud::ExplodeColor | ( | ) |
Explode a SCloud by inspection colors, or real colors if no inspection colors available.
ret.ErrorCode | (number) The error code:
|
ret.CloudTbl | (Array<SCloud>) The resulting list of component. |
Object SCloud::ExplodeWithInspectionSteps | ( | ) |
Split the cloud according to the scalar steps.
ret.ErrorCode | (number) The error code:
|
ret.CloudTbl | (Array<SCloud>) The resulting list of component. |
|
static |
Extract the cloud from an SComp array.
tableSComp | (Array<SComp>) The SComp array from which to extract the cloud |
samplingDistance | (number) The maximum sampling distance for the SPoly. If the sampling distance equals to zero, the cloud is filled only with the vertices of the polyhedron |
generateColor | (boolean) To generate the new color of the cloud, or not:
|
Object SCloud::ExtractCylinder | ( | Array< SPoint > | seedPoint, |
number | tolerance, | ||
CylinderEnum | force = SCloud.CYL_FORCE_NOTHING , |
||
SPoint | center = SPoint() , |
||
SVector | directionVector = SVector() , |
||
number | radius = 0 , |
||
FillCloudEnum | fillCloud = SCloud.FILL_ALL |
||
) |
Extract the cylinder region on the current cloud starting from seed point(s).
seedPoint | (Array<SPoint>) Seed points around which the cylindrical region should be extracted. |
tolerance | (number) Extract only the region that is inside the tolerance, that is: only the vertices whose distance with the ideal sphere is less than this threshold. |
force | (CylinderEnum) Enum to know which parameter(s) is forced or initialized (initializing the computation provides a faster computation).
|
center | (SPoint) The first point of the center line. |
directionVector | (SVector) The normed Normal vector of the cylinder. |
radius | (number) The radius of the cylinder to force |
fillCloud | (FillCloudEnum) Which cloud should be filled: both, only one or none
|
ret.ErrorCode | (number) The error code
|
ret.Cylinder | (SCylinder) The resulting best SCylinder. |
ret.StdDeviation | (number) The standard deviation. |
ret.DistWorstPt | (number) The distance of the worst point to the best shape found. |
ret.InCloud | (SCloud) The extracted points. |
ret.OutCloud | (SCloud) The cloud without the extracted points. |
Object SCloud::ExtractLine | ( | SPoint | seedPoint, |
number | tolerance, | ||
LineEnum | force = SCloud.LINE_FORCE_NOTHING , |
||
SPoint | passingPoint = SPoint() , |
||
SVector | directionVector = SVector() , |
||
FillCloudEnum | fillCloud = SCloud.FILL_ALL |
||
) |
Extract the line on the current cloud, starting from seed point(s).
seedPoint | (SPoint) Seed point around which the line should be extracted. |
tolerance | (number) Extract only the region that is inside the tolerance, that is: only the vertices whose distance with the ideal line is less than this threshold. |
force | (LineEnum) Enum to know which parameter(s) are forced and do not need to be computed.
|
passingPoint | (SPoint) A passing point of the line |
directionVector | (SVector) The normed direction of the line. |
fillCloud | (FillCloudEnum) Which cloud should be filled: both, only one or none
|
ret.ErrorCode | (number) The error code
|
ret.Line | (SLine) The resulting extracted SLine. |
ret.StdDeviation | (number) The standard deviation. |
ret.DistWorstPt | (number) The distance of the worst point to the best line found. |
ret.InCloud | (SCloud) The extracted points. |
ret.OutCloud | (SCloud) The cloud without the extracted points. |
Object SCloud::ExtractMedianPointOnWhiteLine | ( | SPoint | seedPoint, |
number | sphereRadius, | ||
number | optionMask, | ||
FillCloudEnum | fillCloud = SCloud.FILL_NONE |
||
) |
Search a point on the median of the nearest white line of the seed point, in the area of a sphere with the given radius.
seedPoint | (SPoint) The center of the sphere of research |
sphereRadius | (number) The radius of the sphere around the seed point where we search the white points |
optionMask | (number) Bit mask option
|
fillCloud | (FillCloudEnum) Which cloud should be filled : both, only one or none.
|
ret.ErrorCode | (number) The error code:
|
ret.Point | (SPoint) The median point found on the white line |
ret.InCloud | (SCloud) The white line points found in the research sphere |
ret.OutCloud | (SCloud) The other points found in the research sphere |
Object SCloud::ExtractMultilineFromSeed | ( | SPoint | seedPoint, |
number | tolerance, | ||
number | cylinderLength, | ||
number | searchRange, | ||
boolean | chainOption | ||
) |
Extract a polyline inside a section cloud, from a seed point.
seedPoint | (SPoint) The seed point around which the polyline will be extracted |
tolerance | (number) The extraction tolerance value. It corresponds to a cylinder diameter for the algorithm and thickness for the user |
cylinderLength | (number) The length of each cylindrical selection. It corresponds to the length of the smallest line which can be extracted |
searchRange | (number) The maximum distance between two lines of the same line section |
chainOption | (boolean) Chaining option
|
ret.ErrorCode | (number) The error code.
|
ret.Multi | (SMultiline) The extracted multiline |
ret.LineTbl | (Array<SLine>) Returned lines (can be unchained) |
ret.InCloudTbl | (Array<SCloud>) Table of clouds containing points used for each extraction |
ret.OutCloud | (SCloud) Cloud containing all points, except points used for the multiline extraction |
ret.OutExtractedPtsCloud | (SCloud) Cloud containing all points used for multiline extraction |
Object SCloud::ExtractPlane | ( | Array< SPoint > | seedPoint, |
number | tolerance, | ||
PlaneEnum | force = SCloud.PLANE_FORCE_NOTHING , |
||
SPoint | averagePoint = SPoint() , |
||
SVector | directionVector = SVector() , |
||
FillCloudEnum | fillCloud = SCloud.FILL_ALL |
||
) |
Extract the planar region on the current cloud, starting from seed point(s).
seedPoint | (Array<SPoint>) Seed point(s) around which the planar region should be extracted. |
tolerance | (number) Extract only the region that is inside the tolerance, that is: only the vertices whose distance with the ideal plane is less than this threshold. |
force | (PlaneEnum) Enum to know which parameter(s) are forced and do not need to be computed.
|
averagePoint | (SPoint) The average point of the cloud |
directionVector | (SVector) The normed Normal vector of the plane. |
fillCloud | (FillCloudEnum) Which cloud should be filled: both, only one or none
|
ret.ErrorCode | (number) The error code
|
ret.Plane | (SPlane) The resulting extracted SPlane. |
ret.StdDeviation | (number) The standard deviation. |
ret.DistWorstPt | (number) The distance of the worst point to the best shape found. |
ret.InCloud | (SCloud) The extracted points. |
ret.OutCloud | (SCloud) The cloud without the extracted points. |
Object SCloud::ExtractRectangle | ( | SPoint | seedPoint, |
number | tolerance, | ||
RectangleEnum | force = SCloud.RECTANGLE_FORCE_NOTHING , |
||
SPoint | center = SPoint() , |
||
SVector | normalAxis = SVector() , |
||
SVector | mainAxis = SVector() , |
||
number | length = 0 , |
||
number | width = 0 , |
||
boolean | fillCloud = true |
||
) |
Extract the rectangle region on the current cloud starting from the seed point.
seedPoint | (SPoint) Seed point around which the rectangle should be extracted. |
tolerance | (number) Extract only the region that is inside the tolerance, that is: only the vertices whose distance with the ideal rectangle is less than this threshold. |
force | (RectangleEnum) Enum to know which parameter(s) is forced or initialized (initializing the computation provides a faster computation.
|
center | (SPoint) The center point of the rectangle. |
normalAxis | (SVector) The normal vector of the rectangle. |
mainAxis | (SVector) The main vector of the rectangle. |
length | (number) The length of the rectangle |
width | (number) The width of the rectangle |
fillCloud | (boolean) If true, fills the InCloud |
ret.ErrorCode | (number) The error code
|
ret.SquareSlot | (SSquareSlot) The extracted SSquareSlot. |
ret.StdDeviation | (number) The standard deviation. |
ret.DistWorstPt | (number) The distance of the worst point to the best shape found. |
ret.InCloud | (SCloud) The extracted points. |
Object SCloud::ExtractSphere | ( | Array< SPoint > | seedPoint, |
number | tolerance, | ||
SphereEnum | force = SCloud.SPHERE_FORCE_NOTHING , |
||
SPoint | center = SPoint() , |
||
number | radius = 0 , |
||
FillCloudEnum | fillCloud = SCloud.FILL_ALL |
||
) |
Extract the spherical region on the current cloud starting from seed point(s).
seedPoint | (Array<SPoint>) The seed point(s) around which the spherical region should be extracted. |
tolerance | (number) Extract only the region that is inside the tolerance that is: only the vertices whose distance with the ideal sphere is less than this threshold. |
force | (SphereEnum) Enum to know which parameter(s) is forced
|
center | (SPoint) The center of the sphere to force |
radius | (number) The radius of the sphere to force |
fillCloud | (FillCloudEnum) Which cloud should be filled: both, only one or none
|
ret.ErrorCode | (number) The error code
|
ret.Sphere | (SSphere) The resulting best SSphere. |
ret.StdDeviation | (number) The standard deviation. |
ret.DistWorstPt | (number) The distance of the worst point to the best shape found. |
ret.InCloud | (SCloud) The extracted points. |
ret.OutCloud | (SCloud) The cloud without the extracted points. |
Object SCloud::FilterByNormalDirection | ( | SVector | direction, |
number | minCosAngle, | ||
boolean | isDirectionSigned | ||
) |
Filter a cloud in function of the direction of the normals. The missing normals will be computed and stored in the extra data of the cloud.
direction | (SVector) The kept points must have a direction similar to this one. |
minCosAngle | (number) The angle threshold to filter the normals. |
isDirectionSigned | (boolean) True to check the sign of the direction, false otherwise |
ret.ErrorCode | (number) The error code.
|
Object SCloud::FilterMovingObjects | ( | number | resolutionAt10m, |
number | threshold | ||
) |
Separate a cloud into two clouds, containing moving and fixed points respectively.
resolutionAt10m | (number) The resolution at 10 m. |
threshold | (number) The value under which two points are considered identical. |
|
static |
Separate cloud(s) into 2 clouds according to inspection values.
The range is defined by iLowerThreshold and iUpperThreshold values. Good points correspond to points inside the range, bad points correspond to points outside the range.
cloudOfPoints | (Array<SCloud>) The table of clouds to filter |
lowerThreshold | (number) The lower threshold value |
upperThreshold | (number) The upper threshold value |
outputCloudsType | (OutputCloudsTypeInspectionValuesEnum) Output type
|
ret.InCloudTbl | (Array<SCloud>) Table of clouds containing points inside the range |
ret.OutCloudTbl | (Array<SCloud>) Table of clouds containing points outside the range |
ret.ErrorCode | (number) The error code.
|
|
static |
Separate cloud(s) into 2 clouds according to inspection values.
The range is defined by iLowerThreshold and iUpperThreshold values. Good points correspond to points inside the range, bad points correspond to points outside the range.
cloudOfPoints | (Array<SCloud>) The table of clouds to filter |
lowerThreshold | (number) The lower threshold value |
upperThreshold | (number) The upper threshold value |
outputCloudsType | (OutputCloudsTypeInspectionValuesEnum) Output type
|
ret.InCloudTbl | (Array<SCloud>) Table of clouds containing points inside the range |
ret.OutCloudTbl | (Array<SCloud>) Table of clouds containing points outside the range |
ret.ErrorCode | (number) The error code.
|
Object SCloud::FlipIntensities | ( | ) |
Turn intensity values upside down.
ret.ErrorCode | (number) The error code.
|
ret.Cloud | (SCloud) The resulting reduced cloud |
|
static |
Read an ascii point cloud.
fileName | (string) The file name path |
format | (string) if empty the format will be automatically recognized, provided the format is XY or XYZ or XYZI or XYZRGB of XYZIRGB. Characters must respect the convention as follows:
|
nbPtToKeep | (number) The umber of points to keep in the reduced cloud
|
importScanDir | (boolean) True to import the scanning directions, if they exist, false otherwise |
|
static |
Launch an interaction to select a SCloud in the scene.
|
static |
Import clouds from a file. Authorized file extensions : .ac, .asc, .csv, .fls, .fws, .nsd, .ply, .psl, .pts, .ptx, .raw, .txt, .xyz, .yxz, .3pi.
fileName | (string) The file name path |
indexType | (CloudScriptTypesEnum) The file type, a SCloud.CloudScriptTypesEnum value (SCloud.AUTO_DETECT or another value for special file types)
|
nbPtToKeep | (number) The maximum number of points to load (in case of memory save), or 0 if unlimited |
|
static |
|
static |
|
static |
Get the categories available in the given model.
modelName | (string) The model name |
ret.ErrorCode | (number) The error codes:
|
ret.StringTbl | (Array<string>) The table of the categories name |
Object SCloud::GetCentroid | ( | ) |
|
static |
Get a table of the names of all the classification models available.
|
static |
Get the class name for a given class ID.
classId | (number) The class ID, in the 0-255 interval |
ret.Name | (string) The name of the class |
ret.ErrorCode | (number) The error code:
|
CloudRepresentationTypeEnum SCloud::GetCloudRepresentation | ( | ) |
Return the current representation of the cloud.
Object SCloud::GetColorGradient | ( | ) |
Get the color gradient of the SCloud.
ret.ErrorCode | (number) The error code
|
ret.Gradient | (SColorGradient) The SColorGradient associated to the current SCloud |
Object SCloud::GetConvexContour | ( | SVector | viewDirection = null , |
SPoint | pointOnPlane = null , |
||
boolean | is3dContour = false |
||
) |
Compute the convex contour of the cloud according to a direction.
viewDirection | (SVector) The direction in which the computation must be done. If null, the direction is the normal to the best plane of the points. |
pointOnPlane | (SPoint) If a planar result is requested, a point of the plane. If null, the average point of the cloud is taken. |
is3dContour | (boolean) If false a planar contour is computed. If true a 3D contour is computed. |
ret.ErrorCode | (number) The error code
|
ret.Multi | (SMultiline) The computed convex contour. |
Object SCloud::GetConvexHull | ( | ) |
Compute the convex hull of a point cloud.
ret.ErrorCode | (number) The error code.
|
ret.Poly | (SPoly) The computed convex hull. |
Object SCloud::GetHighestPoint | ( | SVector | direction | ) |
SCloudIterator SCloud::GetIterator | ( | ) |
Return an iterator on the current cloud. This iterator is initialized with a point of the cloud.
Object SCloud::GetLowestPoint | ( | SVector | direction | ) |
number SCloud::GetMeanDistance | ( | ) |
Compute the average distance between points of the cloud.
number SCloud::GetNumber | ( | ) |
Return the number of points in the cloud.
number SCloud::GetPointSize | ( | ) |
Return the current point size.
Object SCloud::GetScanningPositions | ( | ) |
Extract the scanning positions of the cloud.
ret.ErrorCode | (number) The error code
|
ret.PointTbl | (Array<SPoint>) The table of points corresponding to the scan positions. |
|
static |
Compute the inspected grid cloud projected onto an inspected SPoly.
poly | (SPoly) The inspected SPoly on which the grid must be projected |
origin | (SPoint) The origin point of the grid |
projectionDir | (SVector) The direction of projection |
horizontalDir | (SVector) The horizontal direction of the grid |
stepHorizontal | (number) The horizontal step of the grid (in project unit) |
stepVertical | (number) The vertical step of the grid (in project unit) |
number SCloud::HasColor | ( | ) |
Check if the cloud has color information.
number SCloud::HasGriddedInformation | ( | ) |
Check if points are organized as a gridded structure.
number SCloud::HasInspection | ( | ) |
Check if the cloud has inspection information.
boolean SCloud::HasScanDir | ( | ) |
Allow the user to know if the cloud contains a scanning direction.
Object SCloud::LoadColorGradient | ( | string | filePath | ) |
Load the color gradient from a file (*.rsi binary file).
filePath | (string) The complete file path to load from |
ret.ErrorCode | (number) The error code.
|
ret.Gradient | (SColorGradient) The color gradient associated to the current SCloud |
Object SCloud::LocalizeValues | ( | number | min, |
number | max | ||
) |
Extract the minimum and maximum threshold values of an inspected cloud.
min | (number) The minimum threshold |
max | (number) The maximum threshold |
ret.ErrorCode | (number) The error code
|
ret.Results | (Array<Object>) A table of result. Each result is a structure with the following members: |
|
static |
Merge an array of clouds into one single cloud.
Object SCloud::NoiseReductionSplit | ( | number | threshold | ) |
Split the cloud in 2 clouds according to a noise reduction threshold:
1) The "good" points.
2) The "bad" (noisy) points.
The technique used in this function supposes that the point density within the cloud is constant or nearly. The function will consider as noisy the points in the zone under a certain density threshold.
threshold | (number) The noise reduction threshold, between [0-100] |
Object SCloud::ProjDir | ( | SPoint | pointToProject, |
SVector | direction, | ||
number | aperture, | ||
boolean | isDirectionUnsigned = false |
||
) |
Compute the projection of a point on a cloud.
pointToProject | (SPoint) The point to project. |
direction | (SVector) The projection normalized vector |
aperture | (number) The distance around the ray that is used to find the point |
isDirectionUnsigned | (boolean) Whether the direction is considered as a signed or unsigned vector
|
ret.ErrorCode | (number) The error code.
|
ret.Point | (SPoint) The projection found: this point of the cloud is the nearest point along the direction |
|
static |
Compute the grid cloud projected onto a SPoly.
poly | (SPoly) The SPoly on which the grid must be projected |
origin | (SPoint) The origin point of the grid |
projectionDir | (SVector) The direction of projection |
horizontalDir | (SVector) The horizontal direction of the grid |
stepHorizontal | (number) The horizontal step of the grid (in project unit) |
stepVertical | (number) The vertical step of the grid (in project unit) |
Object SCloud::ProjectOnPlane | ( | SPlane | plane | ) |
Object SCloud::Reduce | ( | number | numberOfPoints | ) |
Compute a reduced point cloud with points evenly spaced (as much as possible).
numberOfPoints | (number) The number of points to keep in the reduced cloud |
Object SCloud::ReduceBest | ( | number | minAverageDist, |
number | maxAverageDist | ||
) |
Compute a reduced point cloud keeping only the "best" points as much as possible evenly spaced.
minAverageDist | (number) The minimum average distance between points. |
maxAverageDist | (number) The maximum average distance between points, or zero if none. This parameter will reject points in the low density areas, which are suspected to be noisy. If not zero, this value should be at least twice MinAverageDist. |
Object SCloud::RegionGrowFreePolyline | ( | SPoint | seedPoint, |
number | samplingStep | ||
) |
Extract polyline using a seed point on the line and a sampling step that includes the line.
seedPoint | (SPoint) point on the line to extract |
samplingStep | (number) The sampling step of the polyline to extract from the cloud The sampling step must be big enough to include line curvature and to have enough points in the cloud in a step size The sampling step must be small enough to have good accuracy and to avoid merging several lines Typically for electric lines or catenary wires detection a good value is between 0.5 and 2m |
ret.ErrorCode | (number) The error code
|
ret.Multi | (SMultiline) The multiLine found |
Object SCloud::Save | ( | string | filePath, |
string | decimalSeparator = "." , |
||
boolean | exportScanDir = false , |
||
SMatrix | coordinateSystemMatrix = SMatrix() |
||
) |
Save the cloud into a file.
filePath | (string) The complete file path to save into |
decimalSeparator | (string) The decimal separator in number representation |
exportScanDir | (boolean) If .asc or .csv formats and true: will export the scanning directions (in addition to XYZ and IRGB). If false, will only export XYZIRGB Otherwise, this parameter is set automatically, thanks to format compatibility |
coordinateSystemMatrix | (SMatrix) The matrix to define a UCS used for the export (or identity to use the WCS) |
ret.ErrorCode | (number) The error code.
|
ret.IsScanDirAvailable | (string) False if some clouds don't have Scanning directions to export, true otherwise |
ret.isScanDirExported | (string) True if the chosen format is compatible with Scanning directions, false otherwise |
Object SCloud::SaveColorGradient | ( | string | filePath | ) |
Save the color gradient into a file (*.rsi binary file).
filePath | (string) The complete file path to save into |
ret.ErrorCode | (number) The error code.
|
Object SCloud::ScalarSteps | ( | ) |
Split the cloud according to the scalar steps.
ret.ErrorCode | (number) The error code:
|
ret.CloudTbl | (Array<SCloud>) The resulting list of component. |
Object SCloud::SectionPlane | ( | SVector | planesNormalVector, |
SPoint | firstPlanePoint, | ||
number | numberOfParallelPlanes, | ||
number | distanceBetweenPlanes, | ||
number | planeThickness, | ||
number | chainingDistance, | ||
boolean | doNoiseReduction | ||
) |
Intersection of a point cloud by parallel planes.
planesNormalVector | (SVector) The normal vector of the planes |
firstPlanePoint | (SPoint) The point on the first plane |
numberOfParallelPlanes | (number) Number of parallel planes.
|
distanceBetweenPlanes | (number) Distance between planes |
planeThickness | (number) The planes thickness. We consider that all points between two parallel planes belong to the section. Half of the thickness is taken on each side of each plane. |
chainingDistance | (number) If the distance between two neighbor points is less than this value a segment is created. |
doNoiseReduction | (boolean) Should we activate noise reduction? |
ret.ErrorCode | (number) The error code
|
ret.MultiTbl | (Array<SMultiline>) The resulting planar sections |
Object SCloud::Separate | ( | SMultiline | closedContour, |
SVector | direction, | ||
SPoint | pntFirstPlane = SPoint() , |
||
SPoint | pntSecondPlane = SPoint() , |
||
FillCloudEnum | fillCloud = SCloud.FILL_ALL |
||
) |
Make a copy of points found INside and/or OUTside the box and preserve the current cloud.
closedContour | (SMultiline) The closed polygonal contour that cuts the current cloud. |
direction | (SVector) The direction of the extrusion. |
pntFirstPlane | (SPoint) The point on the first plane of the box. The plane is normal to the Direction. If null, the extrusion is considered as unlimited. |
pntSecondPlane | (SPoint) The point on the second plane of the box. The plane is normal to the Direction. If null, the extrusion is considered as unlimited. |
fillCloud | (FillCloudEnum) Which cloud should be filled: both, only one or none
|
ret.ErrorCode | (number) The error code, some information about the result
|
ret.InCloud | (SCloud) The SCloud with points found INside the box |
ret.OutCloud | (SCloud) The SCloud with points found OUTside the box |
Object SCloud::SeparateFeature | ( | SFeature | featureType, |
number | tolerance, | ||
FillCloudEnum | fillCloud = SCloud.FILL_ALL |
||
) |
Get all the points found INside (or OUTside) a feature (circle, cylinder, plane).
featureType | (SFeature) The feature to use when dissociating the points in the cloud |
tolerance | (number) If <= 0, option only valid for Surfacic features (plane, sphere and cylinders). In this case, the surface defines the border which will separate the points. If > 0 the feature is used as a skin and points lying at a distance lower than the Tolerance from the feature are output |
fillCloud | (FillCloudEnum) Which cloud should be filled: both, only one or none
|
Object SCloud::SeparateMultiline | ( | SMultiline | multiline, |
number | tolerance, | ||
FillCloudEnum | fillCloud = SCloud.FILL_ALL |
||
) |
Separate the points in two parts with an offset on both sides of the multiline.
multiline | (SMultiline) The multiline to use when dissociating the points in the cloud |
tolerance | (number) The multiline is used as a skin and points lying at a distance lower than the Tolerance from the multiline are inside |
fillCloud | (FillCloudEnum) Which cloud should be filled: both, only one or none
|
Object SCloud::SeparatePoly | ( | SPoly | polyhedron, |
number | tolerance, | ||
FillCloudEnum | fillCloud = SCloud.FILL_ALL |
||
) |
Get all the points found INside (or OUTside) a SPoly.
polyhedron | (SPoly) The SPoly to use when dissociating the points in the cloud |
tolerance | (number) If <= 0, the surface defines the border which will separate the points. If > 0 the surface is used as a skin and points lying at a distance lower than the Tolerance from the surface are output |
fillCloud | (FillCloudEnum) Which cloud should be filled: both, only one or none
|
|
static |
Separate cloud(s) according to active clipping objects.
cloudOfPoints | (Array<SCloud>) The table of clouds to filter |
outputCloudsType | (OutputCloudsTypeClippPlanesEnum) Output type:
|
ret.ErrorCode | (number) The error code
|
ret.CloudTbl | (Array<SCloud>) This function returns a table of clouds |
|
static |
Separate cloud(s) into 2 clouds according to real colors.
User has to define a RGB value, then, points with similar color will be separated.
cloudOfPoints | (Array<SCloud>) The table of clouds to filter |
colorR | (number) The red value of reference color to separate the clouds [0-255] |
colorG | (number) The green value of reference color to separate the clouds [0-255] |
colorB | (number) The blue value of reference color to separate the clouds [0-255] |
tolerance | (number) The tolerance to determine close and distant colors
|
ret.ErrorCode | (number) The error code
|
ret.CloudTbl | (Array<SCloud>) The table of separated SClouds (even: inClouds; odd: outClouds) |
|
static |
Separate cloud(s) into many clouds according to their scanning positions.
clouds | (Array<SCloud>) The table of clouds to filter |
createCloudWithoutScanningPositions | (boolean) Should we create a cloud containing all points without scanning position? |
ret.ErrorCode | (number) The error code
|
ret.CloudTbl | (Array<SCloud>) The table of separated SClouds |
|
static |
Separate cloud(s) into many clouds according to scan patches.
clouds | (Array<SCloud>) The table of clouds to filter |
createCloudWithoutScanPatches | (boolean) Should we create a cloud containing all points without scanning patch? |
ret.ErrorCode | (number) The error code
|
ret.CloudTbl | (Array<SCloud>) The table of separated SClouds |
SCloud::SetCloudRepresentation | ( | CloudRepresentationTypeEnum | representation | ) |
Modify the representation of the component.
representation | (CloudRepresentationTypeEnum) The new SCloud representation type
|
SCloud::SetPointSize | ( | number | pointSize | ) |
Modify the point size.
pointSize | (number) The new point size |
boolean SCloud::ShowInspectionQuotations | ( | boolean | showQuotations, |
Object | options = {} |
||
) |
Manage inspection quotations appearance.
User can set every display properties of the quotation. If you hide the quotations, options will be ignored.
showQuotations | (boolean) True to show quotations |
options | (Object) Customize appearance of quotations
|
string SCloud::toString | ( | ) |
Get the type of the variable.
string SCloud::ValuesToString | ( | ) |
Get a debug string representation of the cloud.