The SPoly class provides triangular mesh(es) manipulation.
The SPoly creation can be done by calling the static functions:
.
More...
#include <SPoly.h>
Public Slots | |
static Array | All (Number iVisCrit) |
To get all the SComp in the document. More... | |
Array | BooleanAdd (SPoly iPoly) |
To make a boolean addition with the current SPoly. More... | |
Array | BooleanCommon (SPoly iPoly) |
To get the boolean common part between two closed volumes (the current object and a given parameter). More... | |
Array | BooleanCutIn (SPoly iPoly) |
To cut the current SPoly against the parameter SPoly and keep the part of the current SPoly that is INside the parameter SPoly. More... | |
Array | BooleanCutOut (SPoly iPoly) |
To cut the current SPoly against the parameter SPoly and keep the part of the current SPoly that is OUTside the parameter SPoly. More... | |
Array | BooleanOperation (SPoly iPoly, Boolean iIsCutPoly) |
To make a boolean operation between two SPoly. More... | |
Array | BooleanSub (SPoly iPoly) |
To make a boolean subtraction with the current object. More... | |
Clear () | |
To deallocate memory of the object. More... | |
static Array | ColorAlongDir (Array< SPoly > iMeshes, SVector iDirectionVect, SPoint iOrigin={}) |
Color the mesh along a direction with a gradient. More... | |
Array | Compare (SCloud iMeasCloud, Number iDistMax, Number iMappingObject, Boolean iIsIgnoreEdge, SVector iDirection, Number iMaxCosAngle=-2, Boolean iIsCheckForThinParts) |
Calculates the distances between 2 components for further inspection purpose (color mapping) More... | |
Array | Compare (SPoly iMeasPoly, Number iDistMax, Number iMappingObject, Boolean iIsIgnoreEdge, SVector iDirection, Number iMaxCosAngle=0., Boolean iIsCheckThinParts) |
Calculates the distances between 2 components for further inspection purpose (color mapping) More... | |
static Array | ConstraintMesh2D (SCloud iCloudOfPoints, Array< SMultiline > iSetOfMultilines, SVector iMeshDir, Number iTolerance, Number iZoneType) |
Makes a 2D1/2 meshing on a set of multilines and a point cloud; both are optional but at least one is necessary! More... | |
Array | ConstraintMesh3D (SCloud iCloudOfPoints, Array< SMultiline > iSetOfMultilines, Number iTolerance, Number iZoneType) |
Makes a 3D meshing on a mesh (this), a set of multilines and a point cloud; both are optional but at least one is necessary to add points on the mesh! More... | |
Array | Contours (Boolean iIsExportSuspiciousTriangles=false) |
static Array | CreateCompound (Array< SPoly > iTablePoly, Boolean iOptOrient) |
Make a compound SPoly from a table of SPoly. More... | |
Array | Cubature (SPoly iSecondPoly, SVector iProjDir={}) |
Calculate volumes between 2 surfaces to make cubature of embankments and excavations. This function makes the volume computation according the projection direction iProjDir. If the projection direction is null, the function will try to evaluate this direction. 2 volumes are calculated: volume over Poly0 and under Poly1 (side 1), volume under Poly0 and over Poly1 (side 2) More... | |
Array | DestructTrianglesOnHoles (SCloud iCloud, Number iHoleSize, Number iMaxDistToCloud=0.f, Number iOptions, Number iMaxCosAngle=-1) |
Remove triangles which are considered over a hole of a certain diameter regarding iCloud. More... | |
static Array | Direct3DMesh (SCloud iCloudToMesh, Number iDeviationError, Number iMiniAverageDist, HoleOptionEnum iOptionHole, Number iSizeTriHole, Boolean iIsIgnoreScanDir) |
Makes a direct 3D mesh of a point cloud according different strategies (regular, deviation, etc.). More... | |
static Array | DirectionMesh (SCloud iCloudOfPoints, SVector iMeshingDirection, Number iTolerance, Boolean iIsFindCntr) |
Meshes a cloud of points according to a certain tolerance and direction (2D1/2 meshing) More... | |
Array | Explode () |
Explodes a compound mesh into several parts. More... | |
Array | ExplodeColor () |
Explodes a compound mesh into several parts according to the color of the triangles. More... | |
Array | ExplodeWithInspectionSteps () |
Split the mesh according to the inspection steps. More... | |
Array | ExtractCylinder (Array< SPoint > iSeedPoint, Number iTolerance, CylinderEnum iForce, SPoint iCenter={}, SVector iDirectionVector={}, Number iRadius) |
Extract the cylindrical region on the current polyhedron starting from a seed point. More... | |
Array | ExtractFeatureLines (Number iSmoothingIntensity=0.0) |
Extract all the feature lines on the mesh. More... | |
Array | ExtractPlane (SPoint iSeedPoint, Number iTolerance) |
Extract the planar region on the current cloud starting from seed point(s). More... | |
Array | ExtractSphere (Array< SPoint > iSeedPoint, Number iTolerance, SphereEnum iForce, SPoint Center={}, Number iRadius) |
Extract the spherical region on the current polyhedron starting from seed point(s). More... | |
static Array | Extrusion (SMultiline iProfile, SMultiline iPath, Boolean iTurnWithPath, Boolean iPerpendicularToPath, SMultiline iSecondPath, RotateEnum iOption, SPoint iRotatePt) |
Create a mesh from a path and a profile, the profile is extracted along the path. More... | |
Array | FillContours (Array< SMultiline > iContourTable, Number iTension=0.732f, Number iWallThickness=-1, Boolean iIsForceNonSmoothShape) |
3D Hole filling. The function creates triangles on the edges of the holes to fill the concave parts. More... | |
Array | FillHoles (Array< SPoint > iPointTable, Number iTension, Number iWallThickness=-1) |
3D Hole filling. The function creates triangles on the edges of the holes to fill the concave parts. The contours to be treated are selected with a point on the contour. More... | |
Array | FillHolesDirection (SVector iDirection, Array< SPoint > iPointTable, Number iTension) |
To fill the holes that have at least one point listed in the table of points. More... | |
static Array | FromClick () |
Launches a click interaction to select a SComp in the scene. More... | |
static Array | FromFile (String iFileName) |
static Array | FromName (String iName) |
Search all the component with the given name. More... | |
static Array | FromSel () |
To get all the selected SComp. More... | |
static Array | Fusion (Array< SPoly > iPolyTable, FusionOptionEnum iOption, Number iAccuracyPoint=1.E-5, Number iAccuracyBorders=0.001) |
Sew common edges of a SPoly list, or rebuild topology of existing Polyhedron(s). More... | |
Array | GetColorGradient () |
To get the color gradient of the SPoly. More... | |
Array | GetContours () |
Extract free contour(s) from the current SPoly. Returns a table of SMultilines containing all the free edges of a SPoly. More... | |
Array | GetHighestPoint (SVector iDirection) |
Get the highest point according to the Direction. More... | |
Array | GetInertiaMatrix (Boolean iIsOnlyIfClosed) |
Calculates the solid's inertia matrix. More... | |
Array | GetLowestPoint (SVector iDirection) |
Get the lowest point according to the Direction. More... | |
Number | GetNbPieces () |
Number | GetNumberOfTextureMaps () |
Returns the number of dynamic textures (texture maps) applied to the mesh. More... | |
Array | GetNumberOfTextures () |
Returns the number of textures applied to the mesh. More... | |
Array | GetSilhouette (SVector iViewDirection, Number iDraftAngle, Number iMinClosedLine, Number iMinUnclosedLine, Number iResultType) |
Calculates the silhouette or external contour of a SPoly according to a direction and possibly a draft angle. More... | |
Array | GetSurface () |
To retrieve the polyhedron's surface. More... | |
Array | GetTextureName (Number iTextureIdx) |
Returns the original name of a dynamic texture (texture map) applied to the mesh. More... | |
Array | GetTriangleSize () |
To retrieve the triangle size of current SPoly. More... | |
Number | GetTrianglesNumber () |
Array | GetVolume (Boolean iIsOnlyIfClosed) |
To retrieve the polyhedron's volume. More... | |
Array | ImproveBorders (Array< SSetMultiline > iSetMultiTbl, Number iRemeshDistance, Number iCleaningDistance) |
Create a new SPoly by updating the input one in order to make it fit the input border. More... | |
Array | InterInfLine (SPoint iPoint, SVector iVect) |
Calculates the intersection with an infinite line. More... | |
Array | Intersect (SPoly iPoly, Number iOption) |
To make an intersection between two objects (the current object and a given parameter). More... | |
static Array | JoinContour (Array< SMultiline > iMultiLines, Array< SPoly > iPolyhedrons, Number iTangency1, Number iTangency2, Number iTension=0.732, Boolean iReorganize, Number iNbPoint) |
Create a meshed surface from two contours or mesh holes, which optionally preserves tangency continuity. More... | |
static Array | LinearExtrusion (Number iLength, SVector iDirection, Boolean iCloseExtremities, Array< SComp > iComps) |
Compute poly(s) corresponding to the extrusion of profile(s) -polyline, linear feature, linear CAD object- along a direction, with a given length. More... | |
Array | LoadColorGradient (String iFilePath) |
Loads the color gradient from a file (*.rsi binary file). More... | |
Array | LocalizeValues (Array< Number > iThresholdList) |
Extract the points or the lines at threshold values of an inspected mesh. More... | |
static Array | MergeCommonBorders (Array< SPoly > iPolyTable, FusionOptionEnum iOption, Number iAccuracyPoint=1.E-5, Number iAccuracyBorders=0.001) |
Sew common edges of a SPoly list, or rebuild topology of existing Polyhedron(s). More... | |
Array | MeshSegmentation (Number iAngleThreshold=15.0, Number iMergeMaxDistance=0., Number iMinRegionArea=0., Number iClassificationMaxDistance=0., SegmentationFeaturesEnum iFeatures) |
Segment a mesh in several regions matching with geometric features (Plane, Sphere, Cylinder and Cone). The algorithm relies on region growing mechanism and works in two steps: 1 - Create small regions from triangles sharing almost the same normals (according to AngleThreshold). 2 - Merge similar regions sharing geometric properties. More... | |
static SPoly | New () |
Default constructor to create an empty new SPoly. More... | |
static SPoly | New (SPoly iOther) |
Constructs an SPoly by copying the SPoly Other. More... | |
Array | Offset (Boolean iIsDirect, Number iDistCoef, OffsetEnum iOptBitMask) |
Calculates and returns a new parallel polyhedron. More... | |
static Array | PipeTubeAlongPath (Number iRadius, Boolean iCloseExtremities, Array< SComp > iComps) |
Compute mesh(es) corresponding to the extrusion of a circle with a given radius along a given path. More... | |
static Array | ProfileAlongPath (SComp iProfile, SComp iPath, Boolean iMakePerpendicular, Boolean iTurnWthCurve, Boolean iUsePathToLeanOn, Boolean iStartAtProfilePosition, Boolean iCloseExtremities, SComp iPathToLeanOn) |
Compute mesh corresponding to the extrusion of a given profile along a given path. More... | |
Array | Proj3D (SMultiline iMultilineToProject, Boolean iHadIntermediatePt) |
Calculates the 3D projection of a SMultiline on an SPoly. More... | |
Array | Proj3D (SPoint iPoint) |
Calculates the 3D projection of a point on an SPoly. This function always returns the nearest point. More... | |
Array | ProjDir (SMultiline iMultilineToProject, SVector iDirection, Boolean iHadIntermediatePt, Boolean iIsSignedProjection) |
Calculates the projection of a SMultiline on an SPoly with a direction. More... | |
Array | ProjDir (SPoint iPoint, SVector iDirection, Boolean iIsSignedProjection) |
Calculates the projection of a point on an SPoly with a direction. The point to project is considered as the origin of the direction. More... | |
Array | Reduce (Number iTargetNbVertex, Number iMinAngle) |
Function to reduce a mesh according to the angle between facets to minimize the visual degradation. More... | |
Array | ReduceDeviation (Number iDeviationError, DeviationOptionEnum iCriteria, Boolean iIsKeepSharpEdge, Number iDeviationOnSharpEdges, Number iSharpEdgeAngleValue, Number iMaxEdgeLength, Number iDeviationOnBorders) |
Reduces the mesh by deleting some vertices and triangles according to a deviation error. More... | |
Array | RemeshRefineDev (Number iDeviation, Number iSizeMin, Number iMaxiTriNumber, BordersEnum iBorderOption, Number iDistanceWrongPoints, Number iReorganize, SCloud iCloud, Number iMaxCosAngle=-1) |
Refines an existing SPoly with deviation error and optionally better fitting on a SCloud. More... | |
Array | RemeshSharpEdge (Array< SMultiline > iLines, SPoint iReferencePoint) |
Modifies locally the existing mesh to recreate sharp edge(s) More... | |
Array | RemoveSpikes (Number iLoopNumber, Number iPropag=-1, Number iIntensity, Boolean iIsRecalculateBorder) |
This function will suppress or correct absurd points (ie spikes) of the current SPoly. More... | |
Array | RemoveTexture () |
Removes all textures applied on the current mesh. More... | |
Array | RemoveTrianglesOnHoles (SCloud iCloud, Number iHoleSize, Number iMaxDistToCloud=-1, Number iMaxAngle=-1) |
Remove triangles which are considered to be over a hole of a certain diameter regarding iCloud. More... | |
Array | Save (String iFilePath, Boolean iIsTextExport, SMatrix iCoordinateSystemMatrix={}) |
Saves the mesh into a file. More... | |
Array | SaveColorGradient (String iFilePath) |
Saves the color gradient into a file (*.rsi binary file). More... | |
static Number | SaveFBX (String FilePath, Array< SPoly > MeshesToExport, Boolean IsExportTexture, EExportVertexColor ExportVertexColor, SMatrix CoordinateSystemMatrix={}) |
Saves the meshes into a FBX file. More... | |
Array | SectionCylindric (SPoint iFirstPointOnAxis, SPoint iSecondPointOnAxis, SPoint iPointOnTheFirstCylinder, Number iNumberOfCylinders, Number iDistanceBeetweenCylinders) |
Intersection of a Polyhedron by parallel cylinders. More... | |
Array | SectionOnMulti (SMultiline iMultiLine, Array< Number > iListDist, Number iMaxDist, Number iOptBitMask) |
Compute the sections of a SPoly (for example a tube or a tunnel) along a SMultiline (normal to the SMultiline). We take points on the neutral axis which are regularly distributed according to a curvilinear distance. More... | |
Array | SectionOnMultiReg (SMultiline iMultiLine, Number iDist, Number iMaxDist, Number iOptBitMask) |
Compute the sections of a SPoly (for example a tube or a tunnel) along a SMultiline (normal to the SMultiline). We take a list of curvilinear distance. More... | |
Array | SectionPlane (SVector iPlaneNormal, SPoint iPtFirstPlane, Number iNbPlanes, Number iDistance) |
Intersection between an SPoly and a parallel plane. More... | |
Array | SectionRadial (SPoint iFirstPointOnAxis, SPoint iSecondPointOnAxis, SPoint iPtFirstPlane, Number iNbSections, Number iMaxAngleInRadian) |
Intersection of a Polyhedron by radial planes. More... | |
Array | SeparateTriangleBox (SPoint iLowerPoint, SPoint iUpperPoint, SeparateTriBoxEnum iSelType, SeparateTriBoxSelectEnum iWhichPartToKeep) |
Separate triangles of a mesh according to a box. Depending of iWhichPartToKeep, the current poly is updated and Array.Poly can be fill also (case of SEPARATETRIBOX_KEEP_BOTH). More... | |
Array | SeparateTriangleInPrism (SMultiline iProfil, Number iDistance, SeparateTriBoxEnum iSelType, SeparateTriBoxSelectEnum iWhichPartToKeep) |
Separate triangles of a mesh according to a prism. Depending of iWhichPartToKeep, the current poly is updated and Array.Poly can be fill also (case of SEPARATETRIBOX_KEEP_BOTH). The prism is created by a given planar profile and is extruded on both sides by iDistance/2. More... | |
Array | SeparateTriangleSize (Number iSmallestSize, Number iBiggestSize) |
Separate a mesh into parts according to the triangle size. More... | |
Array | SeparateTriangleWithActivatedClippingPlanes (Array< SClippingPlane > iClippingPlanes, SeparateTriBoxEnum iSelType) |
Separate triangles of a mesh according to clipping planes. Depending of iWhichPartToKeep, the current poly is updated and Array.Poly can be fill also (case of SEPARATETRIBOX_KEEP_BOTH). More... | |
Array | SetBorders (Array< SMultiline > iMultiTbl, Number iRemeshDistance) |
Create a new SPoly by updating the input one in order to make it fit the input border. More... | |
SetPolyRepresentation (PolyRepresentationTypeEnum Representation) | |
The representation of the component is modified. More... | |
Array | Smooth (Number iLoopNumber, SmoothEnum iOptionMask, Number iMaxiDeviation, Boolean iIsReorganise, Number iMinAngleReorg, Number iRefineDistProj=-1.0, Number iRefineVrtxAngle=-1.0, Number iAngleSharpEdge=-1.0, Number iNbTriMax=-1) |
Smooth the surface of the current SPoly. More... | |
Array | SmoothBorders (Array< SPoint > iPointTable, Number iMaxEdgeLength) |
3D smoothing of free borders. The function creates triangles on the edges of the holes to create smooth edges. The contours to be treated are selected with a point on the contour. More... | |
static Array | SphericalMesh (Array< SCloud > iCloudOfPoints, SPoint iScanPos, Number iRegularSampling, Number iDeviationErr, Number iMaxiNbTriangle, Number iAlphaShapeThreshold, Number iMaxSizeThreshold, Number iMinSizeThreshold, Number iDeleteSmall) |
Makes a spherical 3D mesh from point cloud(s) More... | |
Array | StitchOverlap (SPoly iMeshToStitch, Number iTolDist, StitchOverlapEnum iOptions) |
Stitch a SPoly (meshToStitch) with the current SPoly. More... | |
Array | SubdivideTriangles (Number iMaxEdgeLength, Boolean iIgnoreFreeEdges, Number iLimitCos=0., Boolean iPreserveGeometry) |
Subdivide triangles when at least one of its edges is longer than the maximum allowed edge length. More... | |
Array | TakeColorFromClouds (Array< SCloud > iCloudsTbl, Number iIgnoreOver, Number iResetColor, Number iDefaultRed, Number iDefaultGreen, Number iDefaultBlue) |
Uses the color (or the color of inspection) of point clouds to color the vertices on the current mesh. More... | |
Array | TextureAddRepetitive (String iFilePathName, Number iNbRepWidth, Number iNbRepHeight, SVector iDirXScreen, SVector iDirYScreen, SPoint iImageOrigin) |
Adds repetitive texture to a mesh. More... | |
Array | Tolerance3DMesh (SCloud iCloud, Number iDeviation, Number iDistanceWrongPoints, Number iSizeTriMax, Boolean iIsReorganize, Number iExtension, Boolean iIsNoiseReduct) |
Upgrade the current SPoly by using its topology. More... | |
String | toString () |
Get the type of the variable. More... | |
static String | toString () |
Get the type of the variable. More... | |
Array | VolumeFromElevation (Array< Number > iElevations, SVector iProjDir={ 0., 0., 1. }) |
Calculate the Polyhedron volume above and below the given elevation. More... | |
Array | WriteOnMesh (String iTextToWrite, SVector iTextNormal, SVector iTextHorizontalNormal, SPoint iTextPosition, Number iTextDepth, Number iPlaneDepth, Number iScale, String iFont="Arial", Boolean isBold, Boolean isItalic, Number iWritingStyle) |
Write a text on a mesh. The mesh will be engraved. More... | |
Public Slots inherited from SComp | |
AddToDoc () | |
To add the object to the document. More... | |
static Array | All (Number VisCrit) |
To get all the SComp in the document. More... | |
ApplyTransformation (SMatrix iMatrix) | |
To apply a geometric transformation to the current object by making a product with the given matrix. More... | |
Clear () | |
To deallocate object memory. More... | |
static Array | FromClick () |
Launches a click interaction to select a SComp in the scene. More... | |
static Array | FromName (String Name) |
Search all the component with the given name. More... | |
static Array | FromSel () |
To get all the selected SComp. More... | |
Array | GetBoundingBox () |
Calculates the bounding box of the component. More... | |
Array | GetColors () |
To get the colors of the component. More... | |
String | GetFolderName () |
The component containing folder's name. More... | |
String | GetName () |
The component's name. More... | |
String | GetPath () |
To get the full path of a comp in the tree. More... | |
Invert () | |
Normal of the component is inverted. More... | |
Boolean | IsInDoc () |
Return if the component is in the document or not. More... | |
Boolean | IsVisible () |
MoveToGroup (String GroupPath, Boolean MoveInsideTopParent) | |
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 () | |
To remove the object from the document. More... | |
SetClippable (Boolean clipping) | |
Set clippable or not. More... | |
SetColors (Number Red, Number Green, Number Blue) | |
Sets the colors of the component. More... | |
SetName (String ComponentName) | |
To set the component's name. More... | |
SetRepresentationType (RepresentationTypeEnum Representation) | |
The shading type of the component is modified. More... | |
SetTransparency (Number Alpha) | |
Sets the transparency of the component. More... | |
SetVisibility (Boolean Visible) | |
Sets the component to be visible, or not visible. More... | |
String | toString () |
Get the type of the variable. More... | |
String | toString () |
Get the type of the variable. More... | |
Translate (SVector Vector) | |
To make a translation of the current object with an SVector. More... | |
Public Slots inherited from SObject | |
Clear () | |
To deallocate memory of the object. More... | |
String | toString () |
Get the type of the variable. More... | |
The SPoly class provides triangular mesh(es) manipulation.
The SPoly creation can be done by calling the static functions:
.
enum SPoly::BordersEnum |
enum SPoly::CylinderEnum |
enum SPoly::OffsetEnum |
The different representation types for polyhedrons.
Use SPoly.SMOOTH.
Enumerator | |
---|---|
POLY_SMOOTH | |
POLY_FLAT | |
POLY_WIRE | |
POLY_SMOOTH_WIRE | |
POLY_FLAT_WIRE | |
POLY_SMOOTH_REALTIME | |
POLY_TEXTURE | |
POLY_COLORED | |
POLY_INSPECTION | |
POLY_FLAT_TEXTURE_COLOR | |
POLY_TEXTURE_ASYNC |
enum SPoly::RotateEnum |
enum SPoly::SmoothEnum |
enum SPoly::SphereEnum |
|
inlinestaticslot |
|
slot |
To make a boolean addition with the current SPoly.
Array.ErrorCode | The error code.
|
Array.PolyTbl | An SPoly Array, the boolean operation's result. |
|
slot |
To get the boolean common part between two closed volumes (the current object and a given parameter).
Array.ErrorCode | The error code.
|
Array.PolyTbl | An SPoly Array, the boolean operation's result. |
[in] | iPoly | Second object |
|
slot |
To cut the current SPoly against the parameter SPoly and keep the part of the current SPoly that is INside the parameter SPoly.
Array.ErrorCode | The error code.
|
Array.PolyTbl | An SPoly Array, the boolean operation's result. |
[in] | iPoly | Second object |
|
slot |
To cut the current SPoly against the parameter SPoly and keep the part of the current SPoly that is OUTside the parameter SPoly.
Array.ErrorCode | The error code.
|
Array.PolyTbl | An SPoly Array, the boolean operation's result. |
[in] | iPoly | Second object |
|
slot |
To make a boolean operation between two SPoly.
Array.ErrorCode | The error code.
|
Array.PolyTbl | An SPoly Array, the boolean operation's result. |
[in] | iPoly | Second object |
[in] | iIsCutPoly | if true, make a cut of this against Poly (No facet of Poly is output in result). |
|
slot |
To make a boolean subtraction with the current object.
Array.ErrorCode | The error code.
|
Array.PolyTbl | An SPoly Array, the boolean operation's result. |
|
slot |
To deallocate memory of the object.
|
staticslot |
Color the mesh along a direction with a gradient.
Array.ErrorCode | The error code:
|
Array.PolyTbl | The resulting colored meshes This table contains the same number of meshes as the input table |
iMeshes | Meshes to color | |
iDirectionVect | Direction to use for coloring | |
[in] | iOrigin | the origin (the point at which the value should be zero) |
|
slot |
Calculates the distances between 2 components for further inspection purpose (color mapping)
Array.ErrorCode | The error code.
|
Array.Cloud | The new SCloud, which is the result of the comparison, if MappingObject is set to 2. else Array.Cloud is Undefined |
Array.Poly | The new SPoly, which is the result of the comparison, if MappingObject is set to 1. else Array.Poly is Undefined |
Array.ReportData | The new SReportData, which contains the view set with the inspected component. |
[in] | iMeasCloud | SCloud considered as the measured object to project on this |
[in] | iDistMax | ignore point having a distance greater than this one. |
[in] | iMappingObject | 1 means color mapping is done on 'this', else 2 the color mapping is done on MeasCloud. |
[in] | iIsIgnoreEdge | What should be done with points on edges.
|
[in] | iDirection | The direction of the inspection
|
[in] | iMaxCosAngle | max cos value for the angle between the triangle and the scanning dir if the cloud contains scanning direction, this parameter can be used to reject points which scanning direction is not valid according to this threshold. For a value lower than -1, the scanning direction will never invalidate a point For a value equal to 0, the scanning direction and the triangle must be oriented in the same way |
[in] | iIsCheckForThinParts | does the cloud contains thin parts scanned from two sides?
|
|
slot |
Calculates the distances between 2 components for further inspection purpose (color mapping)
Array.ErrorCode | The error code.
|
Array.Poly | The new SPoly, which is the result of the comparison. |
Array.ReportData | The new SReportData, which contains the view set with the inspected component. |
[in] | iMeasPoly | SPoly considered as the measured object to project on this |
[in] | iDistMax | ignore point having a distance greater than this one. |
[in] | iMappingObject | 1 means color mapping is done on 'this', else 2 the color mapping is done on MeasPoly. |
[in] | iIsIgnoreEdge | What should be done with points on edges.
|
[in] | iDirection | The direction of the inspection
|
[in] | iMaxCosAngle | max cos value for the angle between the triangle and the scanning dir if the cloud contains scanning direction, this parameter can be used to reject points which scanning direction is not valid according to this threshold. For a value lower than -1, the scanning direction will never invalidate a point For a value equal to 0, the scanning direction and the triangle must be oriented in the same way |
[in] | iIsCheckThinParts | does the cloud contains thin parts scanned from two sides?
|
|
staticslot |
Makes a 2D1/2 meshing on a set of multilines and a point cloud; both are optional but at least one is necessary!
Array.ErrorCode | The error code:
|
Array.PolyTbl | A table of polyhedron with one or many polyhedron according to the input option. |
[in] | iCloudOfPoints | The cloud of points to mesh or 0 |
[in] | iSetOfMultilines | Set of contours to merge and mesh with the cloud or an empty table if no contour to insert in the constrain meshing. |
[in] | iMeshDir | This vector defines the meshing direction for which all the points, triangles and contours are visible. |
[in] | iTolerance | Tolerance to respect ; deviation error (for the points of the cloud only). |
[in] | iZoneType | Defines which type of result must be output.
|
|
slot |
Makes a 3D meshing on a mesh (this), a set of multilines and a point cloud; both are optional but at least one is necessary to add points on the mesh!
Array.ErrorCode | The error code:
|
Array.PolyTbl | A table of polyhedron with one or many polyhedron according to the input option. |
[in] | iCloudOfPoints | The cloud of points to mesh or 0 |
[in] | iSetOfMultilines | Set of contours to merge and mesh with the cloud or an empty table if no contour to insert in the constrain meshing. |
[in] | iTolerance | Tolerance to respect ; deviation error (for the points of the cloud only). |
[in] | iZoneType | Defines which type of result must be output.
|
|
slot |
|
staticslot |
Make a compound SPoly from a table of SPoly.
Array.ErrorCode | The error code.
|
Array.Poly | The compound SPoly. |
[in,out] | iTablePoly | Table of SPoly to proceed. All the mesh are cleared when returning from this function. |
[in] | iOptOrient | Should we have the same normal orientation for all parts ?
|
Calculate volumes between 2 surfaces to make cubature of embankments and excavations. This function makes the volume computation according the projection direction iProjDir. If the projection direction is null, the function will try to evaluate this direction. 2 volumes are calculated: volume over Poly0 and under Poly1 (side 1), volume under Poly0 and over Poly1 (side 2)
Array.ErrorCode | The error code:
|
Array.ValueTbl | [0] Volume over current mesh and under iSecondPoly (side 1) |
Array.ValueTbl | [1] Volume under current mesh and over iSecondPoly (side 2) |
[in] | iSecondPoly | the second polyhedron |
iProjDir | [in/out] Projection direction or nullptr if none |
|
slot |
Remove triangles which are considered over a hole of a certain diameter regarding iCloud.
A triangle is considered over a hole if it's possible to find a point on the triangle which can be the center of a sphere of diameter iHoleSize in which there is no point from the cloud. Using option flag 'iOptions', it's possible to keep triangle which have point of cloud that can be projected inside the triangle.
Array.ErrorCode | The error code:
|
[in] | iCloud | The cloud with the corresponding points |
[in] | iHoleSize | The minimal size of a hole (diameter) |
[in] | iMaxDistToCloud | The maximal distance of points of cloud which are projected on kept triangles. This value is used only if bit 0 (1) of 'iOptions' is set. |
[in] | iOptions | Options flag Bit 0 (1): if set, keep triangles if at least one point of the cloud can be projected inside the triangle. Point to project must be nearer than distance 'iMaxDistToCloud'. Bit 1 (2): if true, consider only selected triangle. |
[in] | iMaxCosAngle | Max cosine value for the angle between the triangle and the scanning direction. If 0 <= 'MaxCosAngle' < 1 AND if 'iCloud' have scanning direction information, then for each triangle it looks only for points with compatible scanning direction This parameter is useful when you try to refine a very thin piece. In such case, you don't want the triangles to be attracted by the other side of the piece. A good value to avoid meshing the other side is 0.1 (~85 degrees). |
|
staticslot |
Makes a direct 3D mesh of a point cloud according different strategies (regular, deviation, etc.).
Array.ErrorCode | The error code:
|
Array.Poly | This function returns a polyhedron or a compound polyhedron found (in the case where the cloud is made of several parts). Especially check "SizeTriHole": if this value is too small, no SPoly will be created |
[in] | iCloudToMesh | The cloud of points to mesh |
[in] | iDeviationError | Deviation error ( tolerance ) to respect. |
[in] | iMiniAverageDist | Noise reduction strategy
|
[in] | iOptionHole | How holes should be treated ?
|
[in] | iSizeTriHole | maxi length of triangle to fill holes; -1 if no limit. |
[in] | iIsIgnoreScanDir | To ignore scan directions when meshing |
|
staticslot |
Meshes a cloud of points according to a certain tolerance and direction (2D1/2 meshing)
Array.ErrorCode | The error code:
|
Array.Poly | The computed mesh. |
iCloudOfPoints | The cloud of points to mesh |
iMeshingDirection | Direction for which all the points are visible. It is the 2D meshing direction. |
iTolerance | Tolerance to respect (for the points of the cloud only). |
iIsFindCntr | If true, find the best contour according to the point density. |
|
slot |
Explodes a compound mesh into several parts.
Array.ErrorCode | The error code.
|
Array.PolyTbl | The exploded polyhedron list. The list returned is sorted by size. |
|
slot |
Explodes a compound mesh into several parts according to the color of the triangles.
Array.ErrorCode | The error code.
|
Array.PolyTbl | The exploded polyhedron list. The list returned is sorted by size. |
|
slot |
Split the mesh according to the inspection steps.
Array.ErrorCode | The error code:
|
Array.PolyTbl | The resulting list of component. |
|
slot |
Extract the cylindrical region on the current polyhedron starting from a seed point.
Array.ErrorCode | The error code:
|
Array.Cylinder | The resulting best SCylinder |
Array.StdDeviation | The standard deviation |
[in] | iSeedPoint | Seed points around which the cylindrical region should be extracted. |
[in] | iTolerance | Extract only the region that is inside the tolerance that is: only the vertices whose distance with the ideal cylinder is less than this threshold. |
[in] | iForce | Bit mask to know which parameter(s) is forced or initialized (initializing the computation provides a more rapid computation. CYL_FORCE_RADIUS (Force & CYL_FORCE_RADIUS) Radius is forced CYL_INIT_RADIUS (Force & CYL_INIT_RADIUS) Radius is initialized (near from its good value) CYL_FORCE_CENTER (Force & CYL_FORCE_CENTER) Center is forced (an axis passing through Center should be found) CYL_INIT_CENTER (Force & CYL_INIT_CENTER) Center is initialized (near from its good position) CYL_FORCE_DIRECTION (Force & CYL_FORCE_DIRECTION) Direction is forced (DirectionVector exactly) CYL_INIT_DIRECTION (Force & CYL_INIT_DIRECTION) Direction is approximately (DirectionVector nearly) |
[in] | iCenter | First point of the center line. |
[out] | iDirectionVector | Normed Normal vector of the cylinder. |
[in] | iRadius | Radius of the cylinder to force |
|
slot |
Extract all the feature lines on the mesh.
Array.ErrorCode | The error code:
|
Array.SetMultiTbl | A table of SSetMultiline containing successively the convex (item 0) and concave lines (item 1). |
[in] | iSmoothingIntensity | Between 0 and 1, this parameter allows to limit smoothing intensity (0 = no smoothing) |
|
slot |
Extract the planar region on the current cloud starting from seed point(s).
Array.ErrorCode | The error code:
|
Array.Plane | The resulting extracted SPlane |
Array.StdDeviation | The standard deviation |
[in] | iSeedPoint | Seed point around which the planar region should be extracted. |
[in] | iTolerance | 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. |
|
slot |
Extract the spherical region on the current polyhedron starting from seed point(s).
Array.ErrorCode | The error code:
|
Array.Sphere | The resulting best SSphere |
Array.StdDeviation | The standard deviation |
[in] | iSeedPoint | Seed points around which the spherical region should be extracted. |
[in] | iTolerance | 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. |
[in] | iForce | Bit mask to know which parameter(s) is forced SPHERE_FORCE_RADIUS (Force & SPHERE_FORCE_RADIUS) Radius is forced SPHERE_FORCE_CENTER (Force & SPHERE_FORCE_CENTER) Center is forced |
[in] | Center | The center of the sphere to force |
[in] | iRadius | Radius of the sphere to force |
|
staticslot |
Create a mesh from a path and a profile, the profile is extracted along the path.
Array.ErrorCode | The error code:
|
Array.Poly | The extruded SPoly. |
[in] | iProfile | a shape composed can be closed or not |
[in] | iPath | the path to follow, the path must have at minimum 2 points |
[in] | iTurnWithPath | true : the shape turn with the path |
[in] | iPerpendicularToPath | if the profile will be computed perpendicular to the path |
[in] | iSecondPath | the second path to follow, profile orientation will be attracted by this second path This option is not compatible with "TurnWithPath = false" |
[in] | iOption | How the extrusion rotate point is compute ROTATE_CENTROID // Use centroid of the profile ROTATE_USER_DEFINE // You must defined your rotate point |
[in] | iRotatePt | If ROTATE_USER_DEFINE is used: the profile rotate point. Take a look on the picture below |
|
slot |
3D Hole filling. The function creates triangles on the edges of the holes to fill the concave parts.
Array.ErrorCode | The error code.
|
Array.MultiTbl | A table of contours not filled (empty if no error). |
[in] | iContourTable | a table of contours to process |
[in] | iTension | Tension of the surface to generate
|
[in] | iWallThickness | wall thickness to allow better filling of horseshoe holes going on two sides of a wall; -1 if no wall thickness. |
iIsForceNonSmoothShape | fill unconditionally even if the shape is not smooth and there is a risk to create an absurd shape |
|
slot |
3D Hole filling. The function creates triangles on the edges of the holes to fill the concave parts. The contours to be treated are selected with a point on the contour.
Array.ErrorCode | The error code.
|
[in] | iPointTable | a table of points to identify each contour to process |
[in] | iTension | Tension of the surface to generate
|
[in] | iWallThickness | wall thickness to allow better filling of horseshoe holes going on two sides of a wall; -1 if no wall thickness. |
|
slot |
To fill the holes that have at least one point listed in the table of points.
Array.ErrorCode | The error code.
|
[in] | iDirection | Direction defining the view of the hole. If nullptr, the Reshaper will approximate this direction. |
[in] | iPointTable | a table of points to identify one of the points of each hole to fill. If empty, all the holes are treated. |
[in] | iTension | Tension of the surface to generate in the case of complete hole filling
|
|
inlinestaticslot |
Launches a click interaction to select a SComp in the scene.
|
staticslot |
Function to import a mesh, and create a new SPolyhedron from a file. File extension authorized: .stl, .off, .msh, .ply, .obj, .poly, .pbi, .msd, .glb, .gltf
Array.ErrorCode | The error code:
|
Array.String | A string character to notify some information about the file loading. |
Array.PolyTbl | The array of SPoly returned is sorted by number of triangles. The biggest polyhedron is the first. |
[in] | iFileName | The file name path |
|
inlinestaticslot |
Search all the component with the given name.
Array | all the SPoly with the given name |
|
staticslot |
|
staticslot |
Sew common edges of a SPoly list, or rebuild topology of existing Polyhedron(s).
Array.ErrorCode | The error code:
|
Array.PolyTbl | The resulting fused SPoly table. |
iPolyTable | The SPoly table to fusion. | |
[in] | iOption | Option for the fusion
|
iAccuracyPoint | Accuracy beetween vertices (distance under which two points are considered identical); Most often 1.E-5 | |
iAccuracyBorders | Accuracy beetween parallel borders (distance under which two free borders are sewed) |
|
inlineslot |
To get the color gradient of the SPoly.
Array.ErrorCode | The error code.
|
Array.Gradient | the SColorGradient associated to the current SPoly |
|
slot |
Extract free contour(s) from the current SPoly.
Returns a table of SMultilines containing all the free edges of a SPoly.
Array.ErrorCode | The error code:
|
Array.MultiTbl | A table of Multiline sorted by size (number of points) biggest first; smallest end. Or an empty table if there is no hole and (or) free contour (closed surface). |
|
slot |
Get the highest point according to the Direction.
Array.ErrorCode | The error code.
|
Array.Point | The highest point found. |
[in] | iDirection | Direction in which the highest point must be found. |
|
slot |
Calculates the solid's inertia matrix.
Array.Matrix | The solid's inertia matrix |
Array.Volume | The solid's volume |
Array.Point | The volume's centroid (center of mass or barycenter). We suppose that we have a uniform mass distribution throughout the volume. |
[in] | iIsOnlyIfClosed | Should we stop volume calculation if the surface is not closed?
|
|
slot |
Get the lowest point according to the Direction.
Array.ErrorCode | The error code.
|
Array.Point | The lowest point found. |
[in] | iDirection | Direction in which the lowest point must be found. |
|
slot |
|
slot |
Returns the number of dynamic textures (texture maps) applied to the mesh.
The | number of textures |
|
slot |
Returns the number of textures applied to the mesh.
Array.Value | The number of textures |
|
slot |
Calculates the silhouette or external contour of a SPoly according to a direction and possibly a draft angle.
Array.ErrorCode | The error code:
|
Array.MultiTbl | A table of SMultiline with the silhouette, external contour of the SPoly. |
[in] | iViewDirection | View direction. |
[in] | iDraftAngle | Draft Angle in radian. If zero, the contour seen is output. |
[in] | iMinClosedLine | delete closed lines whose number of segment is less than this value. |
[in] | iMinUnclosedLine | delete unclosed lines whose number of segment is less than this value. |
[in] | iResultType | Result type.
|
|
slot |
To retrieve the polyhedron's surface.
Array.Surface | The polyhedron's surface |
Array.Point | The volume's centroid (center of mass or barycenter). We suppose that we have a uniform mass distribution throughout the volume. |
|
slot |
Returns the original name of a dynamic texture (texture map) applied to the mesh.
Array.ErrorCode | The error code.
|
Array.String | The original texture name |
[in] | iTextureIdx | the texture index |
|
slot |
To retrieve the triangle size of current SPoly.
Array.ErrorCode | The error code.
|
Array.Minimum | The minimum triangle size. |
Array.Maximum | The maximum triangle size. |
|
slot |
The | number of triangles. |
|
slot |
To retrieve the polyhedron's volume.
Array.Volume | The SPoly's volume :
|
Array.Point | The volume's centroid (center of mass or barycenter). We suppose that we have a uniform mass distribution throughout the volume. |
[in] | iIsOnlyIfClosed | Should we stop volume calculation if the surface is not closed?
|
|
slot |
Create a new SPoly by updating the input one in order to make it fit the input border.
Array.ErrorCode | The error code.
|
Array.Poly | The resulting mesh. |
Array.ErrorMessage | A string containing the details of errors (when ErrorCode == 1). |
Array.PointTbl | A list of points showing where the errors occurred. |
iSetMultiTbl | The input table of SSetMultiline borders Each set multilines can have:
|
iRemeshDistance | The distance from the borders used for the remeshing |
iCleaningDistance | Cleaning distance around the border line |
Calculates the intersection with an infinite line.
Array.ErrorCode | the error code
|
Array.PointTbl | the table in which will be stored the created points |
[in] | iPoint | A point on the infinite line |
[in] | iVect | The normalized vector of the infinite line direction |
|
slot |
To make an intersection between two objects (the current object and a given parameter).
Array.ErrorCode | The error code.
|
Array.MultiTbl | A table with all intersection SMultilines. |
[in] | iPoly | Second object. |
[in] | iOption | Do we include tangent contacts ?
|
|
staticslot |
Create a meshed surface from two contours or mesh holes, which optionally preserves tangency continuity.
Array.ErrorCode | The error code:
|
Array.Poly | The resulting SPoly |
[in] | iMultiLines | The two SMultilines defining the 2 contours to join. |
[in] | iPolyhedrons | The two SPolyhedron(s) which can be used to preserve tangency The length of this table can be 0 if no tangency with a polyhedron must be set The length of this table can be 1 if only the first SMultiline should preserve tangency with this SPolyhedron The length of this table can be 2 if both SMultiline should preserve tangency |
[in] | iTangency1 | Tangency option for the first multiline - NOT USED IF THE POLYHEDRON IS DEFINED (length of iPolyhedrons>=1)
|
[in] | iTangency2 | Tangency option for the second multiline - NOT USED IF THE POLYHEDRON IS DEFINED (length of iPolyhedrons==2)
|
[in] | iTension | Tension of the junction to generate. This parameter must be greater than zero. A good value is between 0.732 and 1. The more this value is high, the more the junction become acute and sharp. |
[in] | iReorganize | should the mesh be reorganized to follow the local curvature. |
[in] | iNbPoint | Number of points in the direction perpendicular to contours or holes
|
|
staticslot |
Compute poly(s) corresponding to the extrusion of profile(s) -polyline, linear feature, linear CAD object- along a direction, with a given length.
[in] | iLength | The length of the extrusion. |
[in] | iDirection | The direction of the extrusion. |
[in] | iCloseExtremities | True if extremities of the extruded comp have to be closed. |
[in] | iComps | All the profiles to extrude. |
Array.ErrorCode | The generated error code:
|
Array.CompTbl | Extruded comps. |
|
inlineslot |
Loads the color gradient from a file (*.rsi binary file).
Array.ErrorCode | The error code.
|
Array.Gradient | The color gradient associated to the current SPoly |
iFilePath | The complete file path to load from |
|
slot |
Extract the points or the lines at threshold values of an inspected mesh.
Array.ErrorCode | The error code
|
Array.Results | A table of result. Each result is a structure with the following members: |
[in] | iThresholdList | List of threshold to extract |
|
staticslot |
Sew common edges of a SPoly list, or rebuild topology of existing Polyhedron(s).
Array.ErrorCode | The error code:
|
Array.PolyTbl | The resulting fused SPoly table. |
iPolyTable | The SPoly table to fusion. | |
[in] | iOption | Option for the fusion
|
iAccuracyPoint | Accuracy beetween vertices (distance under which two points are considered identical); Most often 1.E-5 | |
iAccuracyBorders | Accuracy beetween parallel borders (distance under which two free borders are sewed) |
|
slot |
Segment a mesh in several regions matching with geometric features (Plane, Sphere, Cylinder and Cone). The algorithm relies on region growing mechanism and works in two steps: 1 - Create small regions from triangles sharing almost the same normals (according to AngleThreshold). 2 - Merge similar regions sharing geometric properties.
Array.ErrorCode | The error code:
|
Array.PlaneTbl | An array of all the SPlane detected in the Poly |
Array.SphereTbl | An array of all the SSphere detected in the Poly |
Array.CylinderTbl | An array of all the SCylinder detected in the Poly |
Array.ConeTbl | An array of all the SCone detected in the Poly |
Array.PlanePolyTbl | An array of all the independent SPoly detected as planes in the Poly (same length as PlaneTbl) |
Array.SpherePolyTbl | An array of all the independent SPoly detected spheres as in the Poly (same length as SphereTbl) |
Array.CylinderPolyTbl | An array of all the independent SPoly detected as cylinders in the Poly (same length as CylinderTbl) |
Array.ConePolyTbl | An array of all the independent SPoly detected as cones in the Poly (same length as ConeTbl) |
Array.UndefinedPolyTbl | An array of all the independent SPoly that are not detected as an independent geometrical shape |
[in] | iAngleThreshold | Angle threshold in degree used during the region creation step (15 degrees by default) |
[in] | iMergeMaxDistance | Maximum distance threshold used during the merging step. If this parameter is non-positive, the value will correspond to 5% of the largest object dimension. |
[in] | iMinRegionArea | Minimum area of regions to keep in the output. If 0, nothing will be removed. |
[in] | iClassificationMaxDistance | Maximum distance authorized to fit feature during classification. If negative, no classification will be performed. |
[in] | iFeatures | Bit mask to tell which features must be extracted: SEGMENTATION_PLANE (iFeatures & SEGMENTATION_PLANE) : extract planes SEGMENTATION_SPHERE (iFeatures & SEGMENTATION_SPHERE) : extract spheres SEGMENTATION_CONE (iFeatures & SEGMENTATION_CONE) : extract cones SEGMENTATION_CYLINDER (iFeatures & SEGMENTATION_CYLINDER) : extract cylinders SEGMENTATION_All (default) : extract all the features. |
|
slot |
Calculates and returns a new parallel polyhedron.
Array.ErrorCode | The error code.
|
Array.Poly | The new parallel (or deformed) polyhedron. |
[in] | iIsDirect | 1 to offset in the way of the normal, else 0. |
[in] | iDistCoef | Distance or coefficient to apply |
[in] | iOptBitMask | Bit mask option
|
|
staticslot |
Compute mesh(es) corresponding to the extrusion of a circle with a given radius along a given path.
[in] | iRadius | The radius of the circle to extrude. |
[in] | iCloseExtremities | True if extremities of the extruded comp have to be closed. |
[in] | iComps | All the paths to follow. |
Array.ErrorCode | The generated error code:
|
Array.CompTbl | Extruded comps. |
|
staticslot |
Compute mesh corresponding to the extrusion of a given profile along a given path.
Array.ErrorCode | The generated error code:
|
Array.Comp | Extruded comp |
[in] | iProfile | the profile |
[in] | iPath | the path |
[in] | iMakePerpendicular | true if the profile to extrude has to be perpendicular to the first vector of the path |
[in] | iTurnWthCurve | true if the shape has to be oriented according to the curve all along the path |
[in] | iUsePathToLeanOn | true if a 2nd path -iPathToLeanOn- has to be used to determine the profile orientation |
[in] | iStartAtProfilePosition | true if the extrusion has to begin at profile and not at path position |
[in] | iCloseExtremities | true if extremities of the extruded comp have to be closed |
[in] | iPathToLeanOn | The path to lean on, used only if iUsePathToLeanOn is true |
|
slot |
Calculates the 3D projection of a SMultiline on an SPoly.
Array.ErrorCode | The error code.
|
Array.MultiTbl | Several disconnected pieces can be found during the projection of a SMultiline on an SPoly. It is the reason why the result(s) is returned inside a table. |
[in] | iMultilineToProject | The multiline to project. |
iHadIntermediatePt | Should we add intermediate points? If true, intermediate points are added every time the line crosses a triangle edge. |
|
slot |
Calculates the 3D projection of a point on an SPoly.
This function always returns the nearest point.
Array.ErrorCode | The error code.
|
Array.Point | The projected SPoint. |
[in] | iPoint | The point to project. |
|
slot |
Calculates the projection of a SMultiline on an SPoly with a direction.
Array.ErrorCode | The error code.
|
Array.MultiTbl | Several disconnected pieces can be found during the projection of a SMultiline on an SPoly. It is the reason why the result(s) is returned inside a table. |
[in] | iMultilineToProject | The multiline to project. |
[in] | iDirection | projection direction |
iHadIntermediatePt | Should we add intermediate points? If true, intermediate points are added every time the line crosses a triangle edge. | |
iIsSignedProjection | Should we search only in front of each point of current SMultiLine ? if false, research is made in both direction. |
Calculates the projection of a point on an SPoly with a direction.
The point to project is considered as the origin of the direction.
Array.ErrorCode | The error code.
|
Array.Point | The projected SPoint. |
[in] | iPoint | The point to project. |
[in] | iDirection | projection direction |
iIsSignedProjection | Should we search only in front of each point of current SPoint ? if false, research is made in both direction. |
|
slot |
Function to reduce a mesh according to the angle between facets to minimize the visual degradation.
Array.ErrorCode | The error code.
|
Array.NbVert | The number of suppressed vertices. |
[in] | iTargetNbVertex | number of vertices to keep inside the polyhedron. |
iMinAngle | Angle of the thinest triangle authorized to be created. This angle is in degrees. |
|
slot |
Reduces the mesh by deleting some vertices and triangles according to a deviation error.
Array.ErrorCode | The error code.
|
iDeviationError | Maximum deviation error. All vertices of the mesh before the reduction must have a distance lower than this value with the mesh after reduction. | |
[in] | iCriteria | Option bit mask :
|
iIsKeepSharpEdge | if false there is no restriction on sharp edges else if true DeviationOnSharpEdges and SharpEdgeAngleValue must be defined | |
[in] | iDeviationOnSharpEdges | if KeepSharpEdge, Deviation Value authorized on sharp edges. All vertices on sharp edge of the mesh before the reduction must have a distance lower than this value with the mesh after reduction. If 0 it means that moving/removing points on Sharp Edge is NOT allowed |
[in] | iSharpEdgeAngleValue | if KeepSharpEdge, Angle in degrees between two neighbor triangles to consider that we are on a sharp edge. |
iMaxEdgeLength | If 0, there is no control on the length of edges | |
[in] | iDeviationOnBorders | if ON_BORDERS is used, Deviation Value authorized on borders. If 0, use the deviation error. |
|
slot |
Refines an existing SPoly with deviation error and optionally better fitting on a SCloud.
Array.ErrorCode | The error code.
|
Array.Poly | The resulting refined mesh |
[in] | iDeviation | Tolerance to respect (deviation error) |
[in] | iSizeMin | Minimum size of triangles. It is not authorized to create new triangles with a size below this value. |
[in] | iMaxiTriNumber | Maximum number of triangle in the polyhedron to return. Note that the input polyhedron is not reduced if its number of triangles is already bigger when calling this function. |
[in] | iBorderOption | What should be done with free borders ? NO_CHANGE Don't change free edges (borders) REFINE Refine free edges. EXTEND_REFINE Extend (if some points of the cloud are outside free borders) and refine free edges. The extension value is DistanceWrongPoints, if not zero or the average triangle size of the current SPoly. |
[in] | iDistanceWrongPoints | If a point of the cloud has a distance to the PolyToUpgrade over this value, it is considered as wrong (aberrant) and the point is rejected. If this value is zero, taking a default value, which is the average triangle size of the current SPoly. |
[in] | iReorganize | [in] Option bit mask.
|
[in] | iCloud | The cloud of points, which should be fitted on the new mesh or 0 if none |
[in] | iMaxCosAngle | Max cosine value for the angle between the triangle and the scanning direction. If 0 <= 'MaxCosAngle' < 1 AND if 'TheCloud' have scanning direction information, then the triangles are attracted only by points whose have scanning direction which make an angle with triangle's normal less than this value. This parameter is useful when you try to refine a very thin piece. In such case, you don't want the triangles to be attracted by the other side of the piece. If MaxCosAngle is set to -1 no selection is made and thus the scanning directions are effectively ignored. A good value to avoid meshing the other side is 0.1 (~85 degrees). |
|
slot |
Modifies locally the existing mesh to recreate sharp edge(s)
Array.ErrorCode | The error code.
|
Array.Poly | The resulting mesh. |
[in] | iLines | Table of polylines representing the sharp edges(s) to recreate. |
[in] | iReferencePoint | The reference point which indicates the part of the mesh, whose distance is lower than this value, is authorized to move. |
|
slot |
This function will suppress or correct absurd points (ie spikes) of the current SPoly.
Array.ErrorCode | The error code:
|
Array.NbVert | The number of suppressed vertices is returned. |
[in] | iLoopNumber | Number of loops (iteration of the treatment) |
[in] | iPropag | Neighbor level propagation of the treatment
|
[in] | iIntensity | Suppression criterion.
|
[in] | iIsRecalculateBorder | Allow to also modify free borders |
|
slot |
Removes all textures applied on the current mesh.
Array.ErrorCode | The error code.
|
Array.Value | The number of textures removed. |
|
slot |
Remove triangles which are considered to be over a hole of a certain diameter regarding iCloud.
A triangle is considered to be over a hole if it's possible to find a point on the triangle which can be the center of a sphere of diameter iHoleSize in which there is no point from the cloud.
Array.ErrorCode | The error code:
|
[in] | iCloud | The cloud with the corresponding points |
[in] | iHoleSize | The minimal size of a hole (diameter) |
[in] | iMaxDistToCloud | If positive, keep triangles if at least one point of the cloud can be projected inside the triangle. Point to project must be closer than this distance. |
[in] | iMaxAngle | If positive, Max angle value (in degree) between the triangle and the scanning direction. For each triangle it looks only for points with compatible scanning direction. This parameter is useful when you try to refine a very thin piece. In such case, you don't want the triangles to be attracted by the other side of the piece. A good value to avoid meshing the other side is 85 degree. |
|
slot |
Saves the mesh into a file.
Supported extensions :
Array.ErrorCode | The error code.
|
Array.IsDemoVersion | Indicates if this is a demonstration version or not |
iFilePath | The complete file path to save into |
iIsTextExport | Should the mesh be exported as text or binary data ?
|
iCoordinateSystemMatrix | the matrix to define a UCS used for the export (or identity to use the WCS) |
|
inlineslot |
Saves the color gradient into a file (*.rsi binary file).
Array.ErrorCode | The error code.
|
Array.IsDemoVersion | Indicates if this is a demonstration version or not |
iFilePath | The complete file path to save into |
|
staticslot |
Saves the meshes into a FBX file.
The | error code:
|
[in] | FilePath | The complete file path to save into |
[in] | MeshesToExport | List of meshes to export |
[in] | IsExportTexture | Should the texture be exported ? |
[in] | ExportVertexColor | Color information to export |
[in] | CoordinateSystemMatrix | The matrix to define a UCS used for the export (or identity to use the WCS) |
|
slot |
Intersection of a Polyhedron by parallel cylinders.
Array.ErrorCode | The error code:
|
Array.MultiTbl | An Array of SMultiline, cylindrical sections of the SPoly If no sections are available returns an empty Array |
[in] | iFirstPointOnAxis | first point determining axis |
[in] | iSecondPointOnAxis | second point determining axis |
[in] | iPointOnTheFirstCylinder | point on the first cylinder |
iNumberOfCylinders | if > 0 the sections are done only in the way of the vector. If < 0, an infinity of parallel planes is assumed. | |
[in] | iDistanceBeetweenCylinders | distance between cylinders |
|
slot |
Compute the sections of a SPoly (for example a tube or a tunnel) along a SMultiline (normal to the SMultiline). We take points on the neutral axis which are regularly distributed according to a curvilinear distance.
Array.ErrorCode | The error code:
|
Array.SetMultiTbl | The sections computed. A SetMultiline table. |
[in] | iMultiLine | The reference SMultiline. The sections will be computed along this SMultiline with perpendicular planes. |
[in] | iListDist | the list of curvilinear distances. In this case, we will compute as many sections as ListDist.length. If Dist is not null, ListDist is the offset from the first point. |
[in] | iMaxDist | The max distance between the sections and the SMultiline. Zero means no limit. The section parts, which are too far away from the MultiLine are deleted. |
[in] | iOptBitMask | Bit mask option
|
|
slot |
Compute the sections of a SPoly (for example a tube or a tunnel) along a SMultiline (normal to the SMultiline). We take a list of curvilinear distance.
Array.ErrorCode | The error code:
|
Array.SetMultiTbl | The sections computed. A SetMultiline table. |
[in] | iMultiLine | The reference SMultiline. The sections will be computed along this SMultiline with perpendicular planes. |
[in] | iDist | the curvilinear and regular distance between two sections. |
[in] | iMaxDist | The max distance between the sections and the SMultiline. Zero means no limit. The section parts, which are too far away from the SMultiline are deleted. |
[in] | iOptBitMask | Bit mask option
|
|
slot |
Intersection between an SPoly and a parallel plane.
Array.ErrorCode | The error code:
|
Array.MultiTbl | An Array of SMultiline, planar sections of the SPoly If no sections are available returns an empty Array |
[in] | iPlaneNormal | Normal vector to the plane |
[in] | iPtFirstPlane | Point on the first plane |
[in] | iNbPlanes | Parallel planes number
|
[in] | iDistance | Distance between planes |
|
slot |
Intersection of a Polyhedron by radial planes.
Array.ErrorCode | The error code:
|
Array.MultiTbl | An Array of SMultiline, radial sections of the SPoly If no sections are available returns an empty Array |
[in] | iFirstPointOnAxis | First point on axis |
[in] | iSecondPointOnAxis | Second point on axis |
[in] | iPtFirstPlane | Point on first plane or 0 if indifferent |
[in] | iNbSections | number of sections within the MaxAngleInRadian. |
[in] | iMaxAngleInRadian | Max angle in radian 2*PI means complete circle. |
|
slot |
Separate triangles of a mesh according to a box. Depending of iWhichPartToKeep, the current poly is updated and Array.Poly can be fill also (case of SEPARATETRIBOX_KEEP_BOTH).
Array.ErrorCode | The error code.
|
Array.Poly | The mesh or compound mesh containing the triangles removed by the operation. |
[in] | iLowerPoint | Lower point of the box |
[in] | iUpperPoint | Upper point of the box |
[in] | iSelType | Option for the selection |
[in] | iWhichPartToKeep | Option to know which part has to be kept. |
|
slot |
Separate triangles of a mesh according to a prism. Depending of iWhichPartToKeep, the current poly is updated and Array.Poly can be fill also (case of SEPARATETRIBOX_KEEP_BOTH). The prism is created by a given planar profile and is extruded on both sides by iDistance/2.
Array.ErrorCode | The error code.
|
Array.Poly | The mesh or compound mesh containing the triangles removed by the operation. |
Array.TopContour | The multiline representing the top contour of the prism calculated from iProfil. |
Array.BottomContour | The multiline representing the bottom contour of the prism calculated from iProfil. |
Array.ConvexHull | The multiline representing the convex hull contour of the prism calculated from iProfil for debug purpose. |
[in] | iProfil | the base Multiline of the prism (median plane) |
[in] | iDistance | the distance between the two main faces of the prism |
[in] | iSelType | Option for the selection |
[in] | iWhichPartToKeep | Option to know which part has to be kept. |
|
slot |
Separate a mesh into parts according to the triangle size.
Array.ErrorCode | The error code.
|
Array.PolySmallTriangle | The mesh or compound mesh with the small triangles. |
Array.Poly | The mesh or compound mesh without small and big triangles. |
Array.PolyBigTriangle | The mesh or compound mesh with the big triangles. |
[in] | iSmallestSize | minimum size of triangle |
[in] | iBiggestSize | maximum size of triangle |
|
slot |
Separate triangles of a mesh according to clipping planes. Depending of iWhichPartToKeep, the current poly is updated and Array.Poly can be fill also (case of SEPARATETRIBOX_KEEP_BOTH).
Array.ErrorCode | The error code.
|
Array.Poly | The mesh or compound mesh containing the triangles removed by the operation. |
[in] | iClippingPlanes | the base Multiline of the prism (median plane) |
[in] | iSelType | Option for the selection |
|
slot |
Create a new SPoly by updating the input one in order to make it fit the input border.
Array.ErrorCode | The error code.
|
Array.Poly | The resulting mesh. |
iMultiTbl | The input table of SMultiline borders |
iRemeshDistance | The distance from the borders used for the remeshing |
|
slot |
The representation of the component is modified.
[in] | Representation | The polyhedron representation type |
|
slot |
Smooth the surface of the current SPoly.
Array.ErrorCode | The error code.
|
[in] | iLoopNumber | The Number of loop of the smoothing calculation. This parameter will determine the smoothing intensity. If zero, the vertices will not move at all. |
[in] | iOptionMask | Option bit mask
|
[in] | iMaxiDeviation | Maximum distance authorized to determine the new position of the vertices. If this value is <0, no limitation is done. The interpretation of this parameter should be done with the bit mask. |
iIsReorganise | If true the function Reorganise is called at each loop. | |
iMinAngleReorg | angle of the thinest triangle authorized to be created if a reorganization is ordered between all the smoothing loops a good value is
| |
[in] | iRefineDistProj | Refinement parameters or nullptr if no refinement is required. If a refinement is asked, the function will consider each triangle of the input mesh as a complex piece of surface. Some new vertices are added in the mesh lying on this complex surface so that the triangles are becoming smaller and smaller and also smoother and smoother. If >0, new vertices are added when the deviation from the complex surface to the plane of the triangle is over this value. |
iRefineVrtxAngle | If >0, new vertices are added when the angle between 2 neighbour vertices is over this value (in degrees) | |
iAngleSharpEdge | If >0, over this value (in degrees) an angle between triangles is considered as a sharp edge without relevant complex surface | |
[in] | iNbTriMax | if not -1, define here max number of triangles of the mesh (triangles are added when refine is made) if only smoothing, no points are added |
|
slot |
3D smoothing of free borders. The function creates triangles on the edges of the holes to create smooth edges. The contours to be treated are selected with a point on the contour.
Array.ErrorCode | The error code.
|
[in] | iPointTable | a table of points to identify each contour to process |
[in] | iMaxEdgeLength | the maximum length of the edges to generate <=0: no limit |
|
staticslot |
Makes a spherical 3D mesh from point cloud(s)
Array.PolyTbl | This function returns a table of polyhedrons (1 per scanning position or 1 per input clouds if no scanning position containing in clouds) |
Array.ErrorCode | The error code:
|
[in] | iCloudOfPoints | The table of clouds to mesh |
[in] | iScanPos | Scanning position If, find scan positions in cloud informations. If none, retrieve the centroid of the global cloud as scanning position |
[in] | iRegularSampling | First filter to make a noise reduction taking in the cloud only points evenly spaced
|
[in] | iDeviationErr | Second filter applied after the first filter. Points are kept in the mesh only if they are needed to have distance with the cloud lower than a certain value. Note however that this distance criterion is statistic and does not means that all the points of the cloud will have a distance with the resulting mesh lower than this value. |
[in] | iMaxiNbTriangle | Maxi number of triangles in the resulting mesh |
[in] | iAlphaShapeThreshold | Parameter for the algorithm of contour detection to delete the triangles that are not part of the surface Recommended value is -3.
|
[in] | iMaxSizeThreshold | Always delete triangles having a size greater than this value. If <=0, this filter will be disabled. |
[in] | iMinSizeThreshold | Never delete triangles having a size less than this value. If <=0, this filter will be disabled. |
[in] | iDeleteSmall | During the cleaning process to retrieve holes and contours, we may obtain several disconnected pieces. Each piece with a number of triangles lower than this value is deleted. Note that you can retrieve the number of pieces with the function SPoly::GetNumberOfPieces and you can also retrieve each individual piece with the function SPoly::Explode |
|
slot |
Stitch a SPoly (meshToStitch) with the current SPoly.
var meshToStitch = ....; var meshToRepair = ....; var retVal = meshToRepair.StitchOverlap( meshToStitch,0.56, SPoly.STITCHOVERLAP_MAKE_SEWING_ZONE_INVISIBLE + SPoly.STITCHOVERLAP_MODIFY_OVERLAP_IN_MIDDLE_ZONE);
Array.ErrorCode | The error code:
|
[in] | iMeshToStitch | the mesh to stitch |
[in] | iTolDist | Tolerance. The zones to merge must overlap with a distance lower than this value. |
[in] | iOptions | a combination of SPoly.STITCHOVERLAP_... flags |
|
slot |
Subdivide triangles when at least one of its edges is longer than the maximum allowed edge length.
Array.ErrorCode |
|
Poly | subdivided Mesh. |
[in] | iMaxEdgeLength | Maximum allowed edge length. |
[in] | iIgnoreFreeEdges | If true does not split free nor selection boundary edges. By default these edges can be split. |
[in] | iLimitCos | Limit cosines for remeshing. |
[in] | iPreserveGeometry | If true, forces the resulting mesh to fit exactly to the original surface (slower). |
|
slot |
Uses the color (or the color of inspection) of point clouds to color the vertices on the current mesh.
Array.ErrorCode | The error code.
|
Array.Poly | The colored mesh. |
[in] | iCloudsTbl | Table of clouds containing the colors. Each of the cloud must have a colored information, else the cloud is not taken into account |
[in] | iIgnoreOver | If a point of the cloud has a distance to the current mesh greater than this value, it is ignored. The color of a point moves to a vertex only if the distance to the mesh is less than this value. If this value is zero or less, takes 1% of the mesh size. |
[in] | iResetColor | When should we use the default color ?
|
[in] | iDefaultRed | Red color between [0-1] to be used for the non colored vertices |
[in] | iDefaultGreen | Green color between [0-1] to be used for the non colored vertices |
[in] | iDefaultBlue | Blue color between [0-1] to be used for the non colored vertices |
|
slot |
Adds repetitive texture to a mesh.
Array.ErrorCode | The error code:
|
Array.Poly | The mesh with the repetitive texture |
[in] | iFilePathName | Path to the texture |
[in] | iNbRepWidth | Number of repetition in width of the screen |
[in] | iNbRepHeight | Number of repetition in height of the screen |
[in] | iDirXScreen | Direction X of the projection plane |
[in] | iDirYScreen | Direction Y of the projection plane |
[in] | iImageOrigin | Origin of the image |
|
slot |
Upgrade the current SPoly by using its topology.
Array.ErrorCode | The error code:
|
[in] | iCloud | The cloud of points to mesh |
[in] | iDeviation | Tolerance to respect (deviation error) |
[in] | iDistanceWrongPoints | If a point of the cloud has a distance to the PolyToUpgrade over this value, it is considered as wrong (aberrant) and the point is rejected. |
[in] | iSizeTriMax | Maxi triangle size for triangle created on frees contours, if an extension of the existing polyhedron is requested. |
[in] | iIsReorganize | If one, try to reorganise locally sharp edges or small radii. |
[in] | iExtension | What must be done on free borders If not null, the borders can be smoothed and the small holes can be filled. |
[in] | iIsNoiseReduct | Should we keep only best points to make noise reduction ?
|
|
slot |
Get the type of the variable.
|
staticslot |
Get the type of the variable.
|
slot |
Calculate the Polyhedron volume above and below the given elevation.
Array.ErrorCode | The error code:
|
Array.ValueTbl | Array of structured value: |
Array.ValueTbl: [ { VolumeUnder: number, Contains the volume below the plane at the n-th elevation VolumeOver: number // Contains the volume above the plane at the n-th elevation } ]
[in] | iElevations | The list of elevations |
[in] | iProjDir | Normal direction of the planes |
|
slot |
Write a text on a mesh. The mesh will be engraved.
Array.ErrorCode | The error code:
|
[in] | iTextToWrite | the text to write |
[in] | iTextNormal | the normal direction of the text |
[in] | iTextHorizontalNormal | the direction of the writing |
iTextPosition | top left corner of the displayed text | |
[in] | iTextDepth | depth of the engraved text |
[in] | iPlaneDepth | if>0, Choose to write your text on a plane added to the mesh. By default the text is writing on the mesh directly |
iScale | the scale of the text : choose between 0 and 1 | |
[in] | iFont | the font of the text. "Arial" by default |
[in] | isBold | Bold . By default , the text isn't bold |
[in] | isItalic | Italic . By default the text isn't italic |
[in] | iWritingStyle | the engraving mode: hollow (0) or embossed (1). Embossed by default |