C3D Kernel  104598
Classes | Enumerations | Functions
Operations with Points
Geometric Construction Methods
Collaboration diagram for Operations with Points:

Classes

class  MbSpaceParamPnt
 A space-parametric point. More...
class  MbPointOnCurve< Curve >
 Point on a curve. More...
class  MbCrossPoint
 Intersection point of two curves. More...

Enumerations

enum  MbeIntersectionType { ipt_Simple = 0, ipt_Tangent = 1 }
 Types of intersection points. More...

Functions

MbResultType PointsOnSurface (const MbSurface &surface, MbeStepType stepType, double uValue, double vValue, bool truncateByBounds, RPArray< SArray< MbLocPnt > > &result)
 Create points on a surface.
MbResultType PointsOnSurface (const MbSurface &surface, MbeItemGridType &gridType, const MbCartPoint &uv0, double angle, MbeStepType stepType, double step1, double step2, bool truncateByBounds, RPArray< SArray< MbLocPnt > > &result, size_t maxPntsCnt=c3d::ARRAY_MAX_COUNT)
 Create points on a surface.
void DefinePointsOnSurfaceCounts (const MbSurface &surface, size_t &uPntsCnt, size_t &vPntsCnt)
 Define the default sampling of a surface.
MbeNewtonResult IntersectionPoint (const MbSurface &surf0, bool ext0, const MbSurface &surf1, bool ext1, const MbSurface &surf2, bool ext2, MbCartPoint &uv0, MbCartPoint &uv1, MbCartPoint &uv2)
 Calculate the intersection point of three surfaces.
void IntersectionPoints (const MbSurface &surf, bool surfExt, const MbCurve3D &curv, bool curveExt, SArray< MbCartPoint > &uv, SArray< double > &tt, bool touchInclude=false)
 Calculate all the points of intersection of a surface and a curve.
void FastLineLine (const MbLine &line1, const MbLine &line2, MbCartPoint &result)
 Calculate the point of two lines intersection.
int LineLine (const MbLine &line1, const MbLine &line2, MbCartPoint &result)
 Calculate the point of two lines intersection.
int LineLine (const MbLine &line1, const MbLine &line2, MbCrossPoint &result)
 Calculate the point of two lines intersection.
int LineLineSeg (const MbLine &line, const MbLineSegment &lseg, MbCrossPoint &result)
 Calculate the intersection point of a line and a line segment.
int LineCircle (const MbLine &line, const MbCartPoint &centre, double radius, MbCrossPoint *result)
 Calculate intersection points of a line and a circle.
ptrdiff_t IntersectTwoCurves (const MbCurve &pCurve1, const MbCurve &pCurve2, SArray< MbCrossPoint > &result, bool touchInclude=true, double epsilon=Math::LengthEps *c3d::METRIC_DELTA, bool allowInaccuracy=true)
 Calculate intersection points of two curves.
ptrdiff_t CurveCurveIntersection (const MbCurve &curve1, const MbCurve &curve2, SArray< double > &result1, SArray< double > &result2, double xEpsilon, double yEpsilon, bool touchInclude, bool allowInaccuracy=true)
 Calculate intersection points of two curves.
void CurveSelfIntersect (const MbCurve &curve, double xEpsilon, double yEpsilon, SArray< double > &result1, SArray< double > &result2, VERSION version=Math::DefaultMathVersion())
 Calculate the points of curve self-intersection.
void RemoveAllTouchParams (const MbCurve &curve1, const MbCurve &curve2, SArray< MbCrossPoint > &result, double eps=PARAM_NEAR)
 Remove touch points.
ptrdiff_t CurveCurveIntersection (const MbCurve3D &curve1, const MbCurve3D &curve2, SArray< double > &result1, SArray< double > &result2, double mEps=Math::metricRegion)
 Calculate intersection points of two curves.
bool IsSelfIntersect (const MbCurve3D &curve, double mEps=Math::metricRegion)
 Determine if the curve has self-intersections.
void FilterTouchParams (const MbCurve3D &curve1, const MbCurve3D &curve2, SArray< double > &result1, SArray< double > &result2, double mEps=Math::metricRegion)
 Remove the tangent intersection points.
ptrdiff_t CurveCurveCrossing (const MbCurve3D &curve1, const MbCurve3D &curve2, SArray< double > &result1, SArray< double > &result2, double epsilon=Math::metricRegion)
 Calculate the points of two curves crossing.
bool PointProjectionRelativeOuterLoop (const MbSurface &surface, const MbCartPoint3D &pnt, bool byOuterRectOnly, MbCartPoint &result)
 Find the projection of a point on a surface relative to the outer contour of the surface.
bool IsMultipleProjection (const MbSurface &surface, const MbCartPoint3D &result)
 Determine whether the point projection is multiple-valued.

Enumeration Type Documentation

Types of intersection points.

Enumerator:
ipt_Simple 

Ordinary intersection point.

ipt_Tangent 

Tangent of intersection points.


Function Documentation

MbResultType PointsOnSurface ( const MbSurface surface,
MbeStepType  stepType,
double  uValue,
double  vValue,
bool  truncateByBounds,
RPArray< SArray< MbLocPnt > > &  result 
)

Create a group of points on a surface.

Parameters:
[in]surface- The source surface.
[in]stepType- Type of spacing on a surface.
[in]uValue- U-spacing value or number of points in u-direction while sampling by parameter
[in]vValue- V-spacing value or number of points in v-direction while sampling by parameter.
[in]truncateByBounds- Whether to truncate by surface boundary.
[out]result- Indexed space-parametric points.
Returns:
Returns operation result code.
MbResultType PointsOnSurface ( const MbSurface surface,
MbeItemGridType gridType,
const MbCartPoint uv0,
double  angle,
MbeStepType  stepType,
double  step1,
double  step2,
bool  truncateByBounds,
RPArray< SArray< MbLocPnt > > &  result,
size_t  maxPntsCnt = c3d::ARRAY_MAX_COUNT 
)

Create a group of points on a surface.

Parameters:
[in]surface- The source surface.
[in]gridType- A type of a grid on a surface.
[in]uv0- The central point of the grid.
[in]angle- Rotaion angle of the grid relative to U direction (in radians).
[in]stepType- Type of spacing on a surface.
[in]step1- A spacing value in the first direction
[in]step2- A spacing value in the second direction
[in]truncateByBounds- Whether to truncate by surface boundary.
[out]result- Indexed space-parametric points.
[in]maxPntsCnt- The maximal acceptable number of points.
Returns:
Returns operation result code.
void DefinePointsOnSurfaceCounts ( const MbSurface surface,
size_t &  uPntsCnt,
size_t &  vPntsCnt 
)

Define the default sampling of a surface
(an auxillary function for function PointsOnSurface).

Parameters:
[in]surface- The initial surface.
[out]uPntsCnt- The points number in U direction.
[out]vPntsCnt- The points number in V direction.
MbeNewtonResult IntersectionPoint ( const MbSurface surf0,
bool  ext0,
const MbSurface surf1,
bool  ext1,
const MbSurface surf2,
bool  ext2,
MbCartPoint uv0,
MbCartPoint uv1,
MbCartPoint uv2 
)

Calculate the intersection point of three surfaces given the initial estimates.

Parameters:
[in]surf0- The first surface.
[in]ext0- Whether to use the extension of the first surface.
[in]surf1- The second surface.
[in]ext1- Whether to use the extension of the second surface.
[in]surf2- The third surface.
[in]ext2- Whether to use the extension of the third surface.
[in,out]uv0- The initial approximation and the result on surface surf0.
[in,out]uv1- The initial approximation and the result on surface surf1.
[in,out]uv2- The initial approximation and the result on surface surf2.
Returns:
Returns the result code of the intersection point iterative search.
void IntersectionPoints ( const MbSurface surf,
bool  surfExt,
const MbCurve3D curv,
bool  curveExt,
SArray< MbCartPoint > &  uv,
SArray< double > &  tt,
bool  touchInclude = false 
)

Calculate all the points of intersection of a surface and a curve.

Parameters:
[in]surf- A surface.
[in]surfExt- Use the surface extension.
[in]curv- The curve.
[in]curveExt- Use the curve extension.
[out]uv- Parameters of the intersection points on the surface.
[out]tt- Parameters of the intersection points on the curve.
[in]touchInclude- Consider tangencies as intersections.
void FastLineLine ( const MbLine line1,
const MbLine line2,
MbCartPoint result 
) [inline]

Calculate the intersection point of two exactly intersecting lines without check.

Parameters:
[in]line1- The first line.
[in]line2- The second line.
[out]result- The intersection point.
int LineLine ( const MbLine line1,
const MbLine line2,
MbCartPoint result 
)

Calculate the point of two lines intersection.
The curves can be parallel or coincident.

Parameters:
[in]line1- The first line.
[in]line2- The second line.
[out]result- The intersection point.
Returns:
Returns the result of intersection:
1 - The lines intersect at a point.
0 - The lines are parallel or coincident.
int LineLine ( const MbLine line1,
const MbLine line2,
MbCrossPoint result 
)

Calculate the point of two lines intersection.
The curves can be parallel or coincident.

Parameters:
[in]line1- The first line.
[in]line2- The second line.
[out]result- The intersection point.
Returns:
Returns the result of intersection:
1 : the curves intersect at a point;
0 : the curves are parallel;
1 : the curves are coincident - the tangent intersection point.
int LineLineSeg ( const MbLine line,
const MbLineSegment lseg,
MbCrossPoint result 
)

Calculate the intersection point of a line and a line segment.
The line segment can be parallel to the curve or lie on it.

Parameters:
[in]line- The line.
[in]lseg- The segment.
[out]result- The intersection point.
Returns:
Returns the result of intersection:
1 : the line and the line segment intersect at a point;
0 : the line and a line segment are parallel;
1 : the segment lies on the curve - a tangent intersection point.
int LineCircle ( const MbLine line,
const MbCartPoint centre,
double  radius,
MbCrossPoint result 
)

Calculate the parameters of intersection points of a line and a circle.

Parameters:
[in]line- The line.
[in]centre- The circle center.
[in]radius- The circle radius.
[out]result- The intersection points (a pointer to the array of two (!) elements).
Returns:
Returns the number of intersections.
ptrdiff_t IntersectTwoCurves ( const MbCurve pCurve1,
const MbCurve pCurve2,
SArray< MbCrossPoint > &  result,
bool  touchInclude = true,
double  epsilon = Math::LengthEps *c3d::METRIC_DELTA,
bool  allowInaccuracy = true 
)

Calculate the parameters of intersection points of two arbitrary curves.
The general method is used if there is no special function for intersection.

Parameters:
[in]pCurve1- The first curve.
[in]pCurve2- The second curve.
[out]result- The array of intersection points.
[in]touchInclude- Consider tangencies as intersections.
[in]epsilon- The accuracy of coincidence points of intersection.
[in]allowInaccuracy- Allow lowering input accuracy.
Returns:
The number of intersections.
Warning:
Used for two-dimensional constructions, the analogue of CurveCurveIntersection.
ptrdiff_t CurveCurveIntersection ( const MbCurve curve1,
const MbCurve curve2,
SArray< double > &  result1,
SArray< double > &  result2,
double  xEpsilon,
double  yEpsilon,
bool  touchInclude,
bool  allowInaccuracy = true 
)

Calculate the parameters of intersection points of two arbitrary curves.
The general method is used if there is no special function for intersection.

Parameters:
[in]curve1- The first curve.
[in]curve2- The second curve.
[out]result1- The parameters of intersections for the first curve.
[out]result2- The parameters of intersections for the second curve.
[in]xEpsilon- Tolerance in x direction.
[in]yEpsilon- Tolerance in y direction.
[in]touchInclude- Consider tangencies as intersections.
[in]allowInaccuracy- Allow to find a solution with less precision when we can't get a solution with given precision.
Returns:
The number of intersections.
Warning:
Used for three-dimensional constructions, the analogue of IntersectTwoCurves.
void CurveSelfIntersect ( const MbCurve curve,
double  xEpsilon,
double  yEpsilon,
SArray< double > &  result1,
SArray< double > &  result2,
VERSION  version = Math::DefaultMathVersion() 
)

Calculate the self-intersection points parameters with the given tolerance.

Parameters:
[in]curve- The curve.
[in]xEpsilon- Tolerance in x direction.
[in]yEpsilon- Tolerance in y direction.
[out]result1- The self-intersection parameters array.
[out]result2- The self-intersection parameters array.
[in]version- The version of the operation.
void RemoveAllTouchParams ( const MbCurve curve1,
const MbCurve curve2,
SArray< MbCrossPoint > &  result,
double  eps = PARAM_NEAR 
)

Remove all curves touch points regardless the position on the curve (in the domain or on the borders).

Parameters:
[in]curve1- The first curve.
[in]curve2- The second curve.
[in,out]result- The array of intersection points.
[in]eps- Accuracy for the function RoundColinear of testing the parallelism of tangents.
ptrdiff_t CurveCurveIntersection ( const MbCurve3D curve1,
const MbCurve3D curve2,
SArray< double > &  result1,
SArray< double > &  result2,
double  mEps = Math::metricRegion 
)

Calculate the parameters of intersection points of two arbitrary curves.

Parameters:
[in]curve1- The first curve.
[in]curve2- The second curve.
[out]result1- The intersection points parameters for the first curve.
[out]result2- The intersection points parameters for the second curve.
[in]mEps- The intersection tolerance.
Returns:
The number of intersections.
bool IsSelfIntersect ( const MbCurve3D curve,
double  mEps = Math::metricRegion 
)

Determine if the given curve has self-intersections.

Parameters:
[in]curve- The curve.
[in]mEps- The tolerance of self-intersections.
Returns:
Returns true if the curve has self-intersections.
void FilterTouchParams ( const MbCurve3D curve1,
const MbCurve3D curve2,
SArray< double > &  result1,
SArray< double > &  result2,
double  mEps = Math::metricRegion 
)

Remove the tangent intersection points parameters inside the domains of curves.

Parameters:
[in]curve1- The first curve.
[in]curve2- The second curve.
[out]result1- The intersection points parameters for the first curve.
[out]result2- The intersection points parameters for the second curve.
[in]mEps- The intersection tolerance.
ptrdiff_t CurveCurveCrossing ( const MbCurve3D curve1,
const MbCurve3D curve2,
SArray< double > &  result1,
SArray< double > &  result2,
double  epsilon = Math::metricRegion 
)

Calculate parameters of the points of two curves crossing.

Parameters:
[in]curve1- The first curve.
[in]curve2- The second curve.
[out]result1- Parameters of the points of crossing for the first curve.
[out]result2- Parameters of the points of crossing for the second curve.
Returns:
The points of crossing number.
bool PointProjectionRelativeOuterLoop ( const MbSurface surface,
const MbCartPoint3D pnt,
bool  byOuterRectOnly,
MbCartPoint result 
)

Calculate the projection of a space point on a surface as a two-dimensional point on the surface. relative to the outer contour of the surface.

Parameters:
[in]surface- A surface.
[in]pnt- A space point.
[in]byOuterRectOnly- Whether to classify the projection relative to the outer bounding box only.
[out]result- A two-dimensional parametric point on the surface.
Returns:
Returns true if a normal projection of the point on the surface has been calculated.
bool IsMultipleProjection ( const MbSurface surface,
const MbCartPoint3D result 
)

Determine whether the point projection is multiple-valued while projecting inside the surface domain.

Parameters:
[in]surface- A surface.
[in]result- A space point.
Returns:
Returns true if the point projection is multiple-valued
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines