Open CASCADE Technology 7.8.0
|
This tool is intended to get points from shape with specified distance from shape along normal. Can be used to simulation of points obtained in result of laser scan of shape. There are 2 ways for generation points by shape: More...
#include <BRepLib_PointCloudShape.hxx>
Public Member Functions | |
BRepLib_PointCloudShape (const TopoDS_Shape &theShape=TopoDS_Shape(), const Standard_Real theTol=Precision::Confusion()) | |
Constructor initialized by shape. | |
virtual | ~BRepLib_PointCloudShape () |
Virtual destructor. | |
const TopoDS_Shape & | Shape () const |
Return loaded shape. | |
void | SetShape (const TopoDS_Shape &theShape) |
Set shape. | |
Standard_Real | Tolerance () const |
Return tolerance. | |
void | SetTolerance (Standard_Real theTol) |
Set tolerance. | |
Standard_Real | GetDistance () const |
Returns value of the distance to define deflection of points from shape along normal to shape; 0.0 by default. | |
void | SetDistance (const Standard_Real theDist) |
Sets value of the distance to define deflection of points from shape along normal to shape. Negative values of theDist parameter are ignored. | |
Standard_Integer | NbPointsByDensity (const Standard_Real theDensity=0.0) |
Returns size of the point cloud for specified density. | |
Standard_Integer | NbPointsByTriangulation () const |
Returns size of the point cloud for using triangulation. | |
Standard_Boolean | GeneratePointsByDensity (const Standard_Real theDensity=0.0) |
Computes points with specified density for initial shape. If parameter Density is equal to 0 then density will be computed automatically by criterion: | |
Standard_Boolean | GeneratePointsByTriangulation () |
Get points from triangulation existing in the shape. | |
Protected Member Functions | |
Standard_Real | faceArea (const TopoDS_Shape &theShape) |
Compute area of the specified face. | |
Standard_Real | computeDensity () |
Computes default density points per face. | |
Standard_Boolean | addDensityPoints (const TopoDS_Shape &theFace) |
Adds points to face in accordance with the specified density randomly in the specified range [0, Dist]. | |
Standard_Boolean | addTriangulationPoints (const TopoDS_Shape &theFace) |
Adds points to face by nodes of the existing triangulation randomly in the specified range [0, Dist]. | |
virtual void | clear () |
Method to clear maps. | |
virtual void | addPoint (const gp_Pnt &thePoint, const gp_Vec &theNorm, const gp_Pnt2d &theUV, const TopoDS_Shape &theFace)=0 |
Method to add point, normal to surface in this point and face for which point computed. | |
Protected Attributes | |
TopoDS_Shape | myShape |
Standard_Real | myDist |
Standard_Real | myTol |
TopTools_DataMapOfShapeReal | myFaceArea |
TopTools_DataMapOfShapeInteger | myFacePoints |
Standard_Integer | myNbPoints |
This tool is intended to get points from shape with specified distance from shape along normal. Can be used to simulation of points obtained in result of laser scan of shape. There are 2 ways for generation points by shape:
BRepLib_PointCloudShape::BRepLib_PointCloudShape | ( | const TopoDS_Shape & | theShape = TopoDS_Shape() , |
const Standard_Real | theTol = Precision::Confusion() |
||
) |
Constructor initialized by shape.
|
virtual |
Virtual destructor.
|
protected |
Adds points to face in accordance with the specified density randomly in the specified range [0, Dist].
|
protectedpure virtual |
Method to add point, normal to surface in this point and face for which point computed.
[in] | thePoint | 3D point on the surface |
[in] | theNorm | surface normal at this point |
[in] | theUV | surface UV parameters |
[in] | theFace | surface (face) definition |
|
protected |
Adds points to face by nodes of the existing triangulation randomly in the specified range [0, Dist].
|
protectedvirtual |
Method to clear maps.
|
protected |
Computes default density points per face.
|
protected |
Compute area of the specified face.
Standard_Boolean BRepLib_PointCloudShape::GeneratePointsByDensity | ( | const Standard_Real | theDensity = 0.0 | ) |
Computes points with specified density for initial shape. If parameter Density is equal to 0 then density will be computed automatically by criterion:
Note: this function should not be called from concurrent threads without external lock.
Standard_Boolean BRepLib_PointCloudShape::GeneratePointsByTriangulation | ( | ) |
Get points from triangulation existing in the shape.
|
inline |
Returns value of the distance to define deflection of points from shape along normal to shape; 0.0 by default.
Standard_Integer BRepLib_PointCloudShape::NbPointsByDensity | ( | const Standard_Real | theDensity = 0.0 | ) |
Returns size of the point cloud for specified density.
Standard_Integer BRepLib_PointCloudShape::NbPointsByTriangulation | ( | ) | const |
Returns size of the point cloud for using triangulation.
|
inline |
Sets value of the distance to define deflection of points from shape along normal to shape. Negative values of theDist parameter are ignored.
|
inline |
Set shape.
|
inline |
Set tolerance.
|
inline |
Return loaded shape.
|
inline |
Return tolerance.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |