8#include "RshPluginScript/RshPluginScriptDefines.h"
9#include "RshPluginScript/SClass/SCloudIterCPP.h"
10#include "RshPluginScript/SClass/SComp.h"
13namespace rsh::ScriptBinding
174 enum TunnelExtractionStrategyEnum
176 TUNNEL_APPROXIMATION,
177 TUNNEL_QUICK_EXTRACTION,
178 TUNNEL_DENSE_EXTRACTION};
299 FillCloudEnum fillCloud
326 SPoint iAveragePoint = {},
330 FillCloudEnum fillCloud
365 FillCloudEnum fillCloud
400 FillCloudEnum fillCloud
436 FillCloudEnum fillCloud
463 FillCloudEnum fillCloud
492 FillCloudEnum fillCloud
534 Number iSphereRadius,
600 SPoint iAveragePoint = {},
604 FillCloudEnum fillCloud
647 FillCloudEnum fillCloud
667 Number DistanceTolerance,
671 Boolean useEstimatedDirection,
711 Number DistanceTolerance,
715 Boolean useEstimatedDirection,
717 Boolean checkForThinParts,
858 Number MiniAverageDist,
860 Number MaxAverageDist
873 SVector NormalVectorOfThePlanes,
875 SPoint iPointOnTheFirstPlane,
877 Number NumberOfParallelPlanes,
881 Number DistanceBeetweenParallelPlanes,
883 Number PlaneThickness,
889 Boolean NoiseReduction
928 QChar decimalSeparator =
'.',
930 Boolean EXPORT_SCAN_DIR,
933 SMatrix CoordinateSystemMatrix = {}
975 Boolean DirectionUnsigned
1024 return SComp::LoadColorGradient(FilePath);
1048 return SComp::SaveColorGradient(FilePath);
1122 Array ExtractTunnel(
1125 TunnelExtractionStrategyEnum ExtractionStrategy,
1126 SCloud iCoarseCloud =
nullptr) ;
1154 Boolean checkBothDirection,
1156 Number maxCosAngle = -2,
1158 Boolean checkNormals
1327 Number iCylinderLength,
1328 Number iSearchRange,
1329 Boolean iChainOption);
1367 :
public SObjectStatic
1436 static Array
FromName( String Name) {
return SComp::GetFromName<SCloud>(Name); }
1456 return SComp::GetAll<SCloud>(VisCrit);
1490 Boolean ImportScanDir
1535 Boolean iImportScanDir
1553 Array<SComp> TableSComp,
1555 Number SamplingDistance,
1558 Boolean GenerateColor
1573 Array<SCloud> TableSCloud
1587 Array<SCloud> Clouds,
1602 Array<SCloud> iCloudOfPoints,
1624 Array<SCloud> iCloudOfPoints,
1626 Number iLowerThreshold,
1628 Number iUpperThreshold,
1645 Array<SCloud> iCloudOfPoints,
1667 Array<SCloud> iClouds,
1669 Boolean CreateCloudWithoutScanningPositions
1680 Array<SCloud> iClouds,
1682 Boolean CreateCloudWithoutScanPatches
1720 Number iStepHorizontal,
1721 Number iStepVertical);
1735 Array<SCloud> iClouds, String iModelName);
1762Q_DECLARE_METATYPE(SCloud::_SCloudDummy);
1763Q_DECLARE_METATYPE(
SCloud);
1770namespace rsh::Script::ScriptConvert
1775 static char GetClassName() {
return "SCloud"; }
1777 typedef SCloud ScriptClass;
1779 typedef SCloud DCompClass;
1783 return _iCompClass.GetGCloud();
The SCloud class provides point cloud manipulation. The SCloud creation can be done by calling the st...
Definition: SCloud.h:41
Array Save(String FilePath, QChar decimalSeparator='.', Boolean EXPORT_SCAN_DIR, SMatrix CoordinateSystemMatrix={})
Saves the cloud into a file. Supported extensions : .asc, .csv, .igs, .nsd, .pts, ....
BestRectangleForce
How the best square slot is forced.
Definition: SCloud.h:78
static SCloud New(SCloud Other)
Constructs an SCloud by copying the SCloud _iOther.
static Array FromName(String Name)
Search all the component with the given name.
Definition: SCloud.h:1436
Number HasColor()
Check if the cloud has color information.
Array Explode(Number MaxDistance, Number DelNb, Number MaxNb)
Splits a SCloud into a group of point SClouds based on the distance between the points.
PlaneEnum
Bit mask to know which parameter(s) are forced and do not need to be computed.
Definition: SCloud.h:114
@ PLANE_FORCE_NOTHING
Definition: SCloud.h:115
@ PLANE_FORCE_POINT
Definition: SCloud.h:116
Array LocalizeValues(Number iMin, Number iMax)
Extract the minimum and maximum threshold values of an inspected cloud.
static Array GetCategoriesInModel(String iModelName)
Get the categories available in the given model.
static Array Classify(Array< SCloud > iClouds, String iModelName)
Classify the point clouds using a trained model This function is only available if you have the Surve...
static Array Merge(Array< SCloud > TableSCloud)
To merge an array of clouds into one single cloud.
Array CleanFeatureOrientation(SComp FeatureType, Number Angle, Number DistanceTolerance, Boolean useEstimatedDirection, FillCloudEnum fillCloud)
Gets all the points found to be scanned (or estimated) with an angle to the feature normal lower than...
FillCloudEnum
Bit mask to know which cloud(s) should be filled when separated from a feature or calculating a best ...
Definition: SCloud.h:104
@ FILL_ALL
Definition: SCloud.h:105
@ FILL_IN_ONLY
Definition: SCloud.h:106
@ FILL_OUT_ONLY
Definition: SCloud.h:107
Number GetMeanDistance()
Calculate the average distance between points of the cloud.
static Array SeparateWithRealColors(Array< SCloud > iCloudOfPoints, Number iColorR, Number iColorG, Number iColorB, Number iTolerance)
Separate cloud(s) into 2 clouds according to real colors. User has to define a RGB value,...
CloudScriptTypesEnum
The set of possible files to load. The FromFile() function requires to specify extension type for spe...
Definition: SCloud.h:1383
@ GSN_TRANF
Definition: SCloud.h:1390
@ ASC_ESRI
Definition: SCloud.h:1386
@ CSV_ASCII
Definition: SCloud.h:1388
@ _3PI_TRANSF
Definition: SCloud.h:1385
@ CSV_CSLM
Definition: SCloud.h:1389
@ ASC_SCAN
Definition: SCloud.h:1387
@ _3PI
Definition: SCloud.h:1384
Array BestCircle(MethodBestCircleEnum Method, Number NbPointElim, CircleEnum Force, SPoint iCenter={}, SVector Normal={}, Number Radius, FillCloudEnum fillCloud)
Calculates the best circle fitting with the cloud in the mean squares sense. Best fit with all the po...
Array GetHighestPoint(SVector Direction)
Get the highest point according to the Direction.
Array ReduceBest(Number MiniAverageDist, Number MaxAverageDist)
Calculates a reduced point cloud keeping only the "best" points as much as possible evenly spaced.
Array Separate(SMultiline iClosedContour, SVector Direction, SPoint PntFirstPlane, SPoint PntSecondPlane, FillCloudEnum fillCloud)
Makes a copy of points found INside and (or) OUTside the box and preserve the current cloud.
MethodBestSqSlotEnum
method to measure the slot (best, inner, outer)
Definition: SCloud.h:72
static Array FromClick()
Launches a click interaction to select a SComp in the scene.
Array ExplodeByClass()
Explode a classified cloud by class.
Array FilterByNormalDirection(SVector iDirection, Number iMinCosAngle, Boolean isDirectionSigned)
Filter a cloud in function of the direction of the normals. The missing normals will be computed and ...
Array ExtractMultilineFromSeed(SPoint iSeedPoint, Number iTolerance, Number iCylinderLength, Number iSearchRange, Boolean iChainOption)
Extract a polyline inside a section cloud, from a seed point.
SetPointSize(Number pointSize)
New point size.
static Array SeparateWithScanningPositions(Array< SCloud > iClouds, Boolean CreateCloudWithoutScanningPositions)
Separate cloud(s) into many clouds according to their scanning positions.
Array BestLine(Number NbPointElim, LineEnum Force, SPoint iAveragePoint={}, SVector DirectionVector={}, FillCloudEnum fillCloud)
Calculates the best line fitting with the cloud.
Number HasInspection()
Check if the cloud has inspection information.
static Array SeparateWithClippingObjects(Array< SCloud > iCloudOfPoints, OutputCloudsTypeClippPlanesEnum iOutputCloudsType)
Separate cloud(s) according to active clipping objects.
Clear()
To deallocate memory of the object.
Array ExtractCylinder(Array< SPoint > SeedPoint, Number Tolerance, CylinderEnum Force, SPoint iCenter={}, SVector DirectionVector={}, Number Radius, FillCloudEnum fillCloud)
Extract the cylinder region on the current cloud starting from seed point(s).
OutputCloudsTypeInspectionValuesEnum
Definition: SCloud.h:1404
Boolean hasScanDir()
Allows the user to know if the cloud contains a scanning direction.
SphereEnum
Bit mask to know which parameter(s) are forced and do not need to be computed.
Definition: SCloud.h:132
@ SPHERE_FORCE_RADIUS
Definition: SCloud.h:134
@ SPHERE_FORCE_NOTHING
Definition: SCloud.h:133
Array Reduce(Number NumberOfPoints)
Calculates a reduced point cloud with points evenly spaced (as much as possible).
AddPoint(SPoint PointToAdd)
Add a new point to the cloud.
static Array SeparateWithScanPatches(Array< SCloud > iClouds, Boolean CreateCloudWithoutScanPatches)
Separate cloud(s) into many clouds according to scan patches.
Array LoadColorGradient(String FilePath)
Loads the color gradient from a file (*.rsi binary file).
Definition: SCloud.h:1020
Array SaveColorGradient(String FilePath)
Saves the color gradient into a file (*.rsi binary file).
Definition: SCloud.h:1044
Array ClosestPoint(SPoint iInputPt, SPoint CenterPt, Number Distance)
Finds the point in the current cloud that is the closest from an input point and optionally inside a ...
static SCloud New()
Default constructor to create an empty new SCloud.
Array ExplodeColor()
Explodes a SCloud by inspection colors or real colors if no inspection colors.
Array BestPlane(Number NbPointElim, PlaneEnum Force, SPoint iPtToForce={}, SVector DirectionToForce={}, FillCloudEnum fillCloud)
Calculates the best plane fitting with all points from the cloud.
Array BestCone(FillCloudEnum fillCloud, Number nbPointsElim)
Calculates the best cone fitting with the cloud.
static Array ColorAlongDir(Array< SCloud > Clouds, SVector DirectionVect, SPoint iOrigin)
Color the clouds along a direction with a gradient.
Array BestSqSlot(MethodBestSqSlotEnum method, Number NbPointElim, BestRectangleForce Force, SPoint iCenter={}, SVector Normal={}, SVector MainDirection={}, Number Length, Number Width, FillCloudEnum fillCloud)
Calculates the best square slot fitting with the cloud.
Array SeparateMultiline(SMultiline Multiline, Number Tolerance, FillCloudEnum fillCloud)
Separates the points in two parts with an offset on both sides of the multiline.
static Array GetClassName(Number iClassId)
Get the class name for a given class ID.
CircleEnum
Bit mask to know which parameter(s) are forced and do not need to be computed.
Definition: SCloud.h:154
@ CIRCLE_FORCE_CENTER
Definition: SCloud.h:157
@ CIRCLE_FORCE_RADIUS
Definition: SCloud.h:156
@ CIRCLE_FORCE_NOTHING
Definition: SCloud.h:155
Array GetScanningPositions()
Extract the scanning positions of the cloud.
MethodBestCircleEnum
Definition: SCloud.h:162
@ BEST_CIRCULARITY
Definition: SCloud.h:164
@ BEST_CIRCLE
Definition: SCloud.h:163
CylinderEnum
Bit mask to know which parameter(s) are forced and do not need to be computed.
Definition: SCloud.h:141
@ CYL_INIT_RADIUS
Definition: SCloud.h:144
@ CYL_FORCE_CENTER
Definition: SCloud.h:145
@ CYL_FORCE_RADIUS
Definition: SCloud.h:143
@ CYL_INIT_CENTER
Definition: SCloud.h:146
@ CYL_FORCE_NOTHING
Definition: SCloud.h:142
@ CYL_FORCE_DIRECTION
Definition: SCloud.h:147
Array GetConvexContour(SVector ViewDirection, SPoint PointOnPlane, Boolean Is3dContour)
Computes the convex contour of the cloud according to a direction.
Number GetPointSize()
Return the current point size.
static Array FromSel()
To get all the selected SComp.
static Array FilterWithInspectionValues(Array< SCloud > iCloudOfPoints, Number iLowerThreshold, Number iUpperThreshold, OutputCloudsTypeInspectionValuesEnum iOutputCloudsType)
Separate cloud(s) into 2 clouds according to inspection values.
static QStringList GetClassificationModels()
Get a table of the names of all the classification models available.
Array Compare(SCloud MeasuredCloud, Number DistMax, SVector Direction, Boolean checkBothDirection, Number maxCosAngle=-2, Boolean checkNormals)
Calculates the distances between 2 point clouds.
Array ProjDir(SPoint iPointToProject, SVector Direction, Number Aperture, Boolean DirectionUnsigned)
Calculates the projection of a point on a cloud.
static Array All(Number VisCrit)
To get all the SComp in the document.
Definition: SCloud.h:1448
Array BestCylinder(Number NbPointElim, CylinderEnum Force, SPoint iCenter={}, SVector DirectionVector={}, Number Radius, FillCloudEnum fillCloud)
Initialise a slot using the best slot extracted from a cloud (inner, outer...)
Array SeparateFeature(SComp FeatureType, Number Tolerance, FillCloudEnum fillCloud)
Gets all the points found inside (or outside) a feature (circle, cylinder, plane).
Array ComputeFlatAndCurvedAreas(Number iNeighborhoodRadius=0.0, Number iOptionMask=0)
Computes the flat and curved areas on the cloud.
SetCloudRepresentation(CloudRepresentationTypeEnum Representation)
The representation of the component is modified.
static Array ExplodeCloudClassification(SCloud iCloud)
Split a point cloud that has been classified into several clouds according the point classes.
Array ExtractSphere(Array< SPoint > SeedPoint, Number Tolerance, SphereEnum Force, SPoint iCenter={}, Number Radius, FillCloudEnum fillCloud)
Extract the spherical region on the current cloud starting from seed point(s).
Array GetLowestPoint(SVector Direction)
Get the lowest point according to the Direction.
static Array FromAsciiFile(String iFileName, String iFormat, Number iNbPtToKeep, Boolean iImportScanDir)
Reads an ascii point cloud.
Array ConvertInspectionToColor()
Convert the gradient of inspection into color for each point.
Array ExplodeWithInspectionSteps()
Splits the cloud according to the inspection steps.
Array CleanWithLocalNormal(Number Angle, FillCloudEnum FillCloud)
Cleans the cloud according to the angle between: .
Array FlipIntensities()
Turns intensity values upside down.
Array ExtractMedianPointOnWhiteLine(SPoint iSeedPoint, Number iSphereRadius, Number iOptionMask, FillCloudEnum iFillCloud=FILL_NONE)
This function searches a point on the median of the nearest white line of the seed point,...
Number HasGriddedInformation()
Check if points are organized as a gridded structure.
LineEnum
Bit mask to know which parameter(s) are forced and do not need to be computed.
Definition: SCloud.h:123
@ LINE_FORCE_POINT
Definition: SCloud.h:125
@ LINE_FORCE_NOTHING
Definition: SCloud.h:124
Array GetColorGradient()
To get the color gradient of the SCloud.
Definition: SCloud.h:1001
CloudRepresentationTypeEnum
The different representation types for clouds. Use SCloud.FLAT.
Definition: SCloud.h:55
@ CLOUD_DEBUG_SPLATTING_SMOOTH
Definition: SCloud.h:64
@ CLOUD_COLORED
Definition: SCloud.h:61
@ CLOUD_FLAT
Definition: SCloud.h:57
@ CLOUD_SMOOTH
Definition: SCloud.h:58
@ CLOUD_SMOOTH_BACK
Definition: SCloud.h:59
@ CLOUD_INSPECTION
Definition: SCloud.h:62
@ CLOUD_DEBUG_SPLATTING_COLORED
Definition: SCloud.h:65
@ CLOUD_CLASSIFICATION
Definition: SCloud.h:63
Array FilterMovingObjects(Number iResolutionAt10m, Number iThreshold)
Function allowing to separate point cloud into moving and fixed points.
CloudRepresentationTypeEnum GetCloudRepresentation()
Return the current representation.
static Array FromFile(String FileName, CloudScriptTypesEnum IndexType, Number NbPtToKeep, Boolean ImportScanDir)
Imports clouds from a file. Authorized file extensions : .ac, .asc, .csv, .fls, .fws,...
Array ProjectOnPlane(SPlane iPlane)
Projects the point cloud onto a plane.
static String toString()
Get the type of the variable.
Array RegionGrowFreePolyline(SPoint iSeedPoint, Number iSamplingStep)
Extract polyline using a seed point on the line and a sampling step that includes the line.
String toString()
Get the type of the variable.
Array NoiseReductionSplit(Number Threshold)
The goal of noise reduction is to split the cloud in 2 clouds according to a noise reduction threshol...
OutputCloudsTypeClippPlanesEnum
Definition: SCloud.h:1397
Array BestSphere(Number NbPointElim, SphereEnum Force, SPoint iCenter={}, Number Radius, FillCloudEnum fillCloud)
Calculates the best sphere fitting with the cloud.
Array CleanPolyOrientation(SPoly Polyhedron, Number Angle, Number DistanceTolerance, Boolean useEstimatedDirection, Boolean checkForThinParts, FillCloudEnum fillCloud)
Gets all the points found inside (or outside) a SPoly.
Array Chain(Number ChainingDist)
Chains the current point cloud and creates the shortest SMultiline(s).
Array GetCentroid()
To compute the Centroid of a point cloud.
Array SectionPlane(SVector NormalVectorOfThePlanes, SPoint iPointOnTheFirstPlane, Number NumberOfParallelPlanes, Number DistanceBeetweenParallelPlanes, Number PlaneThickness, Number ChainingDist, Boolean NoiseReduction)
Intersection of a point cloud by parallel planes.
Array ScanToMesh(MeshingMode iMeshingMode, Boolean iTextureFromCloud, Boolean iIgnoreScanDir)
Create a mesh from predefined settings.
Array ExtractPlane(Array< SPoint > SeedPoint, Number Tolerance, PlaneEnum Force, SPoint iAveragePoint={}, SVector DirectionVector={}, FillCloudEnum fillCloud)
Extract the planar region on the current cloud starting from seed point(s).
Array SeparatePoly(SPoly Polyhedron, Number Tolerance, FillCloudEnum fillCloud)
Gets all the points found inside (or outside) a SPoly.
SCloudIterator GetIterator()
Array GetConvexHull()
Compute the convex hull of a point cloud.
static Array Extract(Array< SComp > TableSComp, Number SamplingDistance, Boolean GenerateColor)
To extract the cloud from an SComp array.
static Array ProjectGrid(SPoly iPoly, SPoint iOrigin, SVector iProjectionDir, SVector iHorizontalDir, Number iStepHorizontal, Number iStepVertical)
Calculate the grid cloud projected onto a mesh.
MeshingMode
Definition: SCloud.h:168
@ MEDIUM
Definition: SCloud.h:170
@ LOW
Definition: SCloud.h:169
This class allow the user to access to cloud coordinate.
Definition: SCloudIterator.h:26
The SComp class is an abstract class. Use derived classes SCircle, SCylinder, SCloud,...
Definition: SComp.h:32
Matrix with 3 lines and 4 columns to make any transformation. This class should be used in order to a...
Definition: SMatrix.h:21
Class to store a multiline, that is: an ordered list of points. The SMultiline creation can be done b...
Definition: SMultiLine.h:24
Plane manipulation class. The SPlane creation can be done by calling the static functions: .
Definition: SPlane.h:24
3D point manipulation class. The SPoint creation can be done by calling the static functions:
Definition: SPoint.h:23
The SPoly class provides triangular mesh(es) manipulation. The SPoly creation can be done by calling ...
Definition: SPoly.h:39
The mathematical object vector.
Definition: SVector3.h:26