Functions
Element Intersection

Functions

int mdlIntersect_allBetweenElms (DPoint3dP isPnt1, DPoint3dP isPnt2, int isPntSize, MSElementDescrP edP1, MSElementDescrP edP2, RotMatrixP rotMatrix, double tolerance)
 Gets all intersections between two elements. More...
 
int mdlIntersect_allBetweenElms2 (DPoint3dP isPnt1, DPoint3dP isPnt2, int isPntSize, MSElementDescrP edP1, MSElementDescrP edP2, RotMatrixP rotMatrix, double tolerance)
 Gets all intersections between two elements including cells. More...
 
int mdlIntersect_allBetweenExtendedElms (DPoint3dP isPnt1, DPoint3dP isPnt2, int isPntSize, MSElementDescrP edP1, MSElementDescrP edP2, RotMatrixP rotMatrix, double tolerance, DPoint3dP idPnt1P, DPoint3dP idPnt2P)
 Gets all intersection between two elements, extending linear elements to infinity. More...
 
int mdlIntersect_betweenElmsByIndex (DPoint3dP isPnt1, DPoint3dP isPnt2, int index, MSElementDescrP edP1, MSElementDescrP edP2, RotMatrixP rotMatrix, double tolerance)
 Gets the nth intersection between two elements. More...
 
int mdlIntersect_closestBetweenElms (DPoint3dP isPnt1, DPoint3dP isPnt2, int *index, MSElementDescrP edP1, MSElementDescrP edP2, RotMatrixP rotMatrix, DPoint3dP closePoint, double tolerance)
 Gets the intersection between two elements that is closest to a given point. More...
 

Detailed Description

Function Documentation

int mdlIntersect_allBetweenElms ( DPoint3dP  isPnt1,
DPoint3dP  isPnt2,
int  isPntSize,
MSElementDescrP  edP1,
MSElementDescrP  edP2,
RotMatrixP  rotMatrix,
double  tolerance 
)

Gets all intersections between two elements.

There can be multiple such intersections.

Parameters
[out]isPnt1pointer to the location for the intersection points on the first element
[out]isPnt2pointer to the location for the intersection points on the second element
[in]isPntSizenumber of DPoint3d's that isPnt1 & isPnt2 arrays can hold.
[in]edP1element descriptor for the first element.
[in]edP2element descriptor for the second element.
[in]rotMatrixpointer to the rotation matrix describing the coordinate system in which the apparent intersections are calculated. Because all rotation matrices will produce the same result when working in two dimensions, rotMatrixP has no meaning in such cases and NULL should be specified. If NULL is specified in 3D, the world coordinate system is used.
[in]tolerancethe maximum allowable error. The intersection calculation for certain curved elements is an iterative process that requires additional processing to converge to small tolerances. Setting a small tolerance value will, therefore, cause a more accurate solution at the expense of increased processing time.
Returns
The number of intersections found.
Remarks
Valid element types include lines, line strings, shapes, curves, arcs, ellipses, text, and B-spline curves. For three dimensional elements, the mdlIntersect_... routines return apparent intersections, ignoring differences along the Z-axis.
See also
mdlIntersect_closestBetweenElms mdlIntersect_betweenElmsByIndex mdlElmdscr_allBetweenExtendedElms
int mdlIntersect_allBetweenElms2 ( DPoint3dP  isPnt1,
DPoint3dP  isPnt2,
int  isPntSize,
MSElementDescrP  edP1,
MSElementDescrP  edP2,
RotMatrixP  rotMatrix,
double  tolerance 
)

Gets all intersections between two elements including cells.

There can be multiple such intersections.

Parameters
[out]isPnt1pointer to the location for the intersection points on the first element
[out]isPnt2pointer to the location for the intersection points on the second element
[in]isPntSizenumber of DPoint3d's that isPnt1 & isPnt2 arrays can hold.
[in]edP1element descriptor for the first element.
[in]edP2element descriptor for the second element.
[in]rotMatrixpointer to the rotation matrix describing the coordinate system in which the apparent intersections are calculated. Because all rotation matrices will produce the same result when working in two dimensions, rotMatrixP has no meaning in such cases and NULL should be specified. If NULL is specified in 3D, the world coordinate system is used.
[in]tolerancethe maximum allowable error. The intersection calculation for certain curved elements is an iterative process that requires additional processing to converge to small tolerances. Setting a small tolerance value will, therefore, cause a more accurate solution at the expense of increased processing time.
Returns
The number of intersections found.
Remarks
Valid element types include lines, line strings, shapes, curves, arcs, ellipses, text, B-spline curves and cells. For three dimensional elements, the mdlIntersect_... routines return apparent intersections, ignoring differences along the Z-axis.
See also
mdlIntersect_closestBetweenElms mdlIntersect_betweenElmsByIndex mdlElmdscr_allBetweenExtendedElms
int mdlIntersect_allBetweenExtendedElms ( DPoint3dP  isPnt1,
DPoint3dP  isPnt2,
int  isPntSize,
MSElementDescrP  edP1,
MSElementDescrP  edP2,
RotMatrixP  rotMatrix,
double  tolerance,
DPoint3dP  idPnt1P,
DPoint3dP  idPnt2P 
)

Gets all intersection between two elements, extending linear elements to infinity.

There can be multiple such intersections.

Parameters
[out]isPnt1pointer to the location for the intersection points on the first element
[out]isPnt2pointer to the location for the intersection points on the second element
[in]isPntSizenumber of DPoint3d's that isPnt1 & isPnt2 arrays can hold.
[in]edP1element descriptor for the first element.
[in]edP2element descriptor for the second element.
[in]rotMatrixpointer to the rotation matrix describing the coordinate system in which the apparent intersections are calculated. Because all rotation matrices will produce the same result when working in two dimensions, rotMatrixP has no meaning in such cases and NULL should be specified. If NULL is specified in 3D, the world coordinate system is used.
[in]tolerancethe maximum allowable error. The intersection calculation for certain curved elements is an iterative process that requires additional processing to converge to small tolerances. Setting a small tolerance value will, therefore, cause a more accurate solution at the expense of increased processing time.
[in]idPnt1Pidentification Point 1
[in]idPnt2Pidentification Point 2
Remarks
Valid element types include lines, line strings, shapes, curves, arcs, ellipses and B-spline curves. For three dimensional elements, the mdlIntersect_... routines return apparent intersections, ignoring differences along the Z-axis.
The mdlIntersect_allBetweenExtendedElms differs from mdlIntersect_allBetweenElms in its handling of linear (line, line string and shape) elements. For these elements, the intersection between a the infinite extension of single line segment is computed rather than the actual element. If a linear element contains more than one segment (linestrings and shapes), the closest segments to idPnt1 and idPnt2 are used (for edP1 and edP2 respectively).
Returns
the number of intersections found.
See also
mdlIntersect_closestBetweenElms mdlIntersect_betweenElmsByIndex mdlIntersect_allBetweenElements
int mdlIntersect_betweenElmsByIndex ( DPoint3dP  isPnt1,
DPoint3dP  isPnt2,
int  index,
MSElementDescrP  edP1,
MSElementDescrP  edP2,
RotMatrixP  rotMatrix,
double  tolerance 
)

Gets the nth intersection between two elements.

Parameters
[out]isPnt1intersection point on the first element
[out]isPnt2intersection point on the second element
[in]indexindex of desired intersection
[in]edP1element descriptor for the first element.
[in]edP2element descriptor for the second element.
[in]rotMatrixpointer to the rotation matrix describing the coordinate system in which the apparent intersections are calculated. Because all rotation matrices will produce the same result when working in two dimensions, rotMatrixP has no meaning in such cases and NULL should be specified. If NULL is specified in 3D, the world coordinate system is used.
[in]tolerancethe maximum allowable error. The intersection calculation for certain curved elements is an iterative process that requires additional processing to converge to small tolerances. Setting a small tolerance value will, therefore, cause a more accurate solution at the expense of increased processing time.
Returns
SUCCESS if the index'th intersection is found, and a non- zero error status otherwise.
Remarks
Valid element types include lines, line strings, shapes, curves, arcs, ellipses, text, and B-spline curves. For three dimensional elements, the mdlIntersect_... routines return apparent intersections, ignoring differences along the Z-axis.
See also
mdlIntersect_allBetweenElms
int mdlIntersect_closestBetweenElms ( DPoint3dP  isPnt1,
DPoint3dP  isPnt2,
int *  index,
MSElementDescrP  edP1,
MSElementDescrP  edP2,
RotMatrixP  rotMatrix,
DPoint3dP  closePoint,
double  tolerance 
)

Gets the intersection between two elements that is closest to a given point.

The index returned can be used as input to the mdlAssoc_createIntersection function.

Parameters
[out]isPnt1intersection point on the first element
[out]isPnt2intersection point on the second element
[out]indexindex of intersection
[in]edP1element descriptor for the first element.
[in]edP2element descriptor for the second element.
[in]rotMatrixpointer to the rotation matrix describing the coordinate system in which the apparent intersections are calculated. Because all rotation matrices will produce the same result when working in two dimensions, rotMatrixP has no meaning in such cases and NULL should be specified. If NULL is specified in 3D, the world coordinate system is used.
[in]tolerancethe maximum allowable error. The intersection calculation for certain curved elements is an iterative process that requires additional processing to converge to small tolerances. Setting a small tolerance value will, therefore, cause a more accurate solution at the expense of increased processing time.
[in]closePointpoint close to intersection
Returns
SUCCESS if an intersection is found, a non-zero error status otherwise.
Remarks
Valid element types include lines, line strings, shapes, curves, arcs, ellipses, text, and B-spline curves. For three dimensional elements, the mdlIntersect_... routines return apparent intersections, ignoring differences along the Z-axis.
See also
mdlIntersect_allBetweenElms

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.