BRL-CAD
Curve and Surface Intersection Routines

Intersection routines for Non-Uniform Rational B-Spline (NURBS) curves and surfaces. More...

Collaboration diagram for Curve and Surface Intersection Routines:

Files

file  intersect.h
 

Data Structures

class  Subcurve
 
class  Subsurface
 
class  ON_PX_EVENT
 

Functions

void DumpSSXEvent (ON_SSX_EVENT &x, ON_TextLog &text_log)
 
bool ON_Intersect (const ON_3dPoint &pointA, const ON_3dPoint &pointB, ON_ClassArray< ON_PX_EVENT > &x, double tolerance=0.0)
 
bool ON_Intersect (const ON_3dPoint &pointA, const ON_Curve &curveB, ON_ClassArray< ON_PX_EVENT > &x, double tolerance=0.0, const ON_Interval *curveB_domain=0, Subcurve *treeB=0)
 
bool ON_Intersect (const ON_3dPoint &pointA, const ON_Surface &surfaceB, ON_ClassArray< ON_PX_EVENT > &x, double tolerance=0.0, const ON_Interval *surfaceB_udomain=0, const ON_Interval *surfaceB_vdomain=0, Subsurface *treeB=0)
 
int ON_Intersect (const ON_Curve *curveA, const ON_Curve *curveB, ON_SimpleArray< ON_X_EVENT > &x, double intersection_tolerance=0.0, double overlap_tolerance=0.0, const ON_Interval *curveA_domain=0, const ON_Interval *curveB_domain=0, Subcurve *treeA=0, Subcurve *treeB=0)
 
int ON_Intersect (const ON_Curve *curveA, const ON_Surface *surfaceB, ON_SimpleArray< ON_X_EVENT > &x, double intersection_tolerance=0.0, double overlap_tolerance=0.0, const ON_Interval *curveA_domain=0, const ON_Interval *surfaceB_udomain=0, const ON_Interval *surfaceB_vdomain=0, ON_CurveArray *overlap2d=0, Subcurve *treeA=0, Subsurface *treeB=0)
 
int ON_Intersect (const ON_Surface *surfA, const ON_Surface *surfB, ON_ClassArray< ON_SSX_EVENT > &x, double intersection_tolerance=0.0, double overlap_tolerance=0.0, double fitting_tolerance=0.0, const ON_Interval *surfaceA_udomain=0, const ON_Interval *surfaceA_vdomain=0, const ON_Interval *surfaceB_udomain=0, const ON_Interval *surfaceB_vdomain=0, Subsurface *treeA=0, Subsurface *treeB=0)
 

Detailed Description

Intersection routines for Non-Uniform Rational B-Spline (NURBS) curves and surfaces.

Function Documentation

◆ DumpSSXEvent()

void DumpSSXEvent ( ON_SSX_EVENT &  x,
ON_TextLog &  text_log 
)

Dump the information of an ON_SSX_EVENT.

◆ ON_Intersect() [1/6]

bool ON_Intersect ( const ON_3dPoint &  pointA,
const ON_3dPoint &  pointB,
ON_ClassArray< ON_PX_EVENT > &  x,
double  tolerance = 0.0 
)

An overload of ON_Intersect for point-point intersection. Intersect pointA with pointB.

Parameters
pointA[in]
pointB[in]
x[out] Intersection events are appended to this array.
tolerance[in] If the input intersection_tolerance <= 0.0, then 0.001 is used.
Returns
True for an intersection. False for no intersection.

◆ ON_Intersect() [2/6]

bool ON_Intersect ( const ON_3dPoint &  pointA,
const ON_Curve &  curveB,
ON_ClassArray< ON_PX_EVENT > &  x,
double  tolerance = 0.0,
const ON_Interval *  curveB_domain = 0,
Subcurve treeB = 0 
)

An overload of ON_Intersect for point-curve intersection. Intersect pointA with curveB.

Parameters
pointA[in] pointA
curveB[in] curveB
x[out] Intersection events are appended to this array.
tolerance[in] If the input intersection_tolerance <= 0.0, then 0.001 is used.
curveB_domain[in] optional restriction on curveB t domain
treeB[in] optional curve tree for curveB, to avoid re-computation
Returns
True for an intersection. False for no intersection.

◆ ON_Intersect() [3/6]

bool ON_Intersect ( const ON_3dPoint &  pointA,
const ON_Surface &  surfaceB,
ON_ClassArray< ON_PX_EVENT > &  x,
double  tolerance = 0.0,
const ON_Interval *  surfaceB_udomain = 0,
const ON_Interval *  surfaceB_vdomain = 0,
Subsurface treeB = 0 
)

An overload of ON_Intersect for point-surface intersection. Intersect pointA with surfaceB.

Parameters
pointA[in]
surfaceB[in]
x[out] Intersection events are appended to this array.
tolerance[in] If the input intersection_tolerance <= 0.0, then 0.001 is used.
surfaceB_udomain[in] optional restriction on surfaceB u domain
surfaceB_vdomain[in] optional restriction on surfaceB v domain
treeB[in] optional surface tree for surfaceB, to avoid re-computation
Returns
True for an intersection. False for no intersection.

◆ ON_Intersect() [4/6]

int ON_Intersect ( const ON_Curve *  curveA,
const ON_Curve *  curveB,
ON_SimpleArray< ON_X_EVENT > &  x,
double  intersection_tolerance = 0.0,
double  overlap_tolerance = 0.0,
const ON_Interval *  curveA_domain = 0,
const ON_Interval *  curveB_domain = 0,
Subcurve treeA = 0,
Subcurve treeB = 0 
)

An overload of ON_Intersect for curve-curve intersection. Intersect curveA with curveB.

Parameters:

Parameters
curveA[in]
curveB[in]
x[out] Intersection events are appended to this array.
intersection_tolerance[in] If the distance from a point on curveA to curveB is <= intersection tolerance, then the point will be part of an intersection event. If the input intersection_tolerance <= 0.0, then 0.001 is used.
overlap_tolerance[in] If t1 and t2 are parameters of curveA's intersection events and the distance from curveA(t) to curveB is <= overlap_tolerance for every t1 <= t <= t2, then the event will be returned as an overlap event. If the input overlap_tolerance <= 0.0, then intersection_tolerance * 2.0 is used.
curveA_domain[in] optional restriction on curveA domain
curveB_domain[in] optional restriction on curveB domain
treeA[in] optional curve tree for curveA, to avoid re computation
treeB[in] optional curve tree for curveB, to avoid re computation
Returns
Number of intersection events appended to x.

◆ ON_Intersect() [5/6]

int ON_Intersect ( const ON_Curve *  curveA,
const ON_Surface *  surfaceB,
ON_SimpleArray< ON_X_EVENT > &  x,
double  intersection_tolerance = 0.0,
double  overlap_tolerance = 0.0,
const ON_Interval *  curveA_domain = 0,
const ON_Interval *  surfaceB_udomain = 0,
const ON_Interval *  surfaceB_vdomain = 0,
ON_CurveArray *  overlap2d = 0,
Subcurve treeA = 0,
Subsurface treeB = 0 
)

An overload of ON_Intersect for curve-surface intersection. Intersect curveA with surfaceB.

Parameters
curveA[in]
surfaceB[in]
x[out] Intersection events are appended to this array.
intersection_tolerance[in] If the distance from a point on curveA to the surface is <= intersection tolerance, then the point will be part of an intersection event, or there is an intersection event the point leads to. If the input intersection_tolerance <= 0.0, then 0.001 is used.
overlap_tolerance[in] If the input overlap_tolerance <= 0.0, then 2.0*intersection_tolerance is used. Otherwise, overlap tolerance must be >= intersection_tolerance. In all cases, the intersection calculation is performed with an overlap_tolerance that is >= intersection_tolerance. If t1 and t2 are curve parameters of intersection events and the distance from curve(t) to the surface is <= overlap_tolerance for every t1 <= t <= t2, then the event will be returned as an overlap event.
curveA_domain[in] optional restriction on curveA domain
surfaceB_udomain[in] optional restriction on surfaceB u domain
surfaceB_vdomain[in] optional restriction on surfaceB v domain
overlap2d[out] return the 2D overlap curves on surfaceB. overlap2d[i] is the curve for event x[i].
treeA[in] optional curve tree for curveA, to avoid re-computation
treeB[in] optional surface tree for surfaceB, to avoid re-computation
Returns
Number of intersection events appended to x.

◆ ON_Intersect() [6/6]

int ON_Intersect ( const ON_Surface *  surfA,
const ON_Surface *  surfB,
ON_ClassArray< ON_SSX_EVENT > &  x,
double  intersection_tolerance = 0.0,
double  overlap_tolerance = 0.0,
double  fitting_tolerance = 0.0,
const ON_Interval *  surfaceA_udomain = 0,
const ON_Interval *  surfaceA_vdomain = 0,
const ON_Interval *  surfaceB_udomain = 0,
const ON_Interval *  surfaceB_vdomain = 0,
Subsurface treeA = 0,
Subsurface treeB = 0 
)

An overload of ON_Intersect for surface-surface intersection. Intersect surfaceA with surfaceB.

Parameters
surfA[in]
surfB[in]
x[out] Intersection events are appended to this array.
intersection_tolerance[in] If the input intersection_tolerance <= 0.0, then 0.001 is used.
overlap_tolerance[in] If positive, then overlap_tolerance must be >= intersection_tolerance and is used to test for overlapping regions. If the input overlap_tolerance <= 0.0, then 2*intersection_tolerance is used.
fitting_tolerance[in] If fitting_tolerance is > 0 and >= intersection_tolerance, then the intersection curves are fit to this tolerance. If input fitting_tolerance <= 0.0 or < intersection_tolerance, then intersection_tolerance is used.
surfaceA_udomain[in] optional restriction on surfaceA u domain
surfaceA_vdomain[in] optional restriction on surfaceA v domain
surfaceB_udomain[in] optional restriction on surfaceB u domain
surfaceB_vdomain[in] optional restriction on surfaceB v domain
treeA[in] optional surface tree for surfaceA, to avoid re-computation
treeB[in] optional surface tree for surfaceB, to avoid re-computation
Returns
Number of intersection events appended to x.