Functions
Element Information

Functions

int mdlArc_extract (DPoint3dP startEndPts, double *start, double *sweep, double *axis1, double *axis2, RotMatrixP rotMatrix, DPoint3dP center, MSElementCP in)
 
Extracts information from a MicroStation arc or

ellipse element, in. More...

 
int mdlCone_extract (double *topRadius, double *bottomRadius, DPoint3dP topCenter, DPoint3dP bottomCenter, RotMatrixP rotMatrix, MSElementCP in)
 Extracts the information from a cone element, cone. More...
 
int mdlCone_extractDEllipse3ds (DEllipse3d *pTop, DEllipse3d *pBottom, MSElementP pElement)
 Extracts ellipse elements that represent the top and bottom of the specified cone element. More...
 
int mdlLinear_extract (DPoint3dP points, int *numVerts, MSElementCP linearElm, DgnModelRefP modelRef)
 Extracts an array of coordinates from a linear element. More...
 
int mdlLinear_getPointCount (MSElementCP linearElm)
 Gets the number of vertices in the specified element. More...
 
int mdlLinear_getClosestSegment (DSegment3d *segment, DPoint3dP point, MSElementP linearElm)
 Gets the closest line segment in the given linear element. More...
 

Detailed Description

Function Documentation

int mdlArc_extract ( DPoint3dP  startEndPts,
double *  start,
double *  sweep,
double *  axis1,
double *  axis2,
RotMatrixP  rotMatrix,
DPoint3dP  center,
MSElementCP  in 
)

Extracts information from a MicroStation arc or

ellipse element, in.

The coordinates and rotation matrix are transformed into the current coordinate system.

Parameters
[out]startEndPtspoints to an array of two Dpoint3ds to receive the coordinates of the arc's starting and ending points. If in is an ellipse, the two coordinates are the same. If these coordinates are not needed, pass NULL for startEndPts.
[out]startpoints to a double to receive the sweep angle in radians.
[out]sweeppoints to a double to receive the sweep angle in radians. The sweep will be 2*PI for ellipses.
[out]axis1points to a double to receive the arc or ellipse's primary axis
[out]axis2points to a double to receive the arc or ellipse's secondary axis
[out]rotMatrixpoints to a rotation matrix describing the arc or ellipse's rotation.
[out]centerpoints to a DPoint3d structure to receive the coordinates of the arc or ellipse's center.
[in]inthe arc element to extract.
Remarks
MicroStation always creates arcs with a start angle of 0 and uses the rotation matrix to rotate the arc if it does not start at 0 degrees in the world coordinate system.
Returns
Returns SUCCESS if a valid MicroStation element of type ARC_ELM or ELLIPSE_ELM is passed in in. Otherwise, it returns MDLERR_BADELEMENT.
See also
mdlArc_create mdlArc_createByPoints mdlEllipse_create mdlCircle_createBy3Pts
Remarks
Required Library: mdlbltin.lib
int mdlCone_extract ( double *  topRadius,
double *  bottomRadius,
DPoint3dP  topCenter,
DPoint3dP  bottomCenter,
RotMatrixP  rotMatrix,
MSElementCP  in 
)

Extracts the information from a cone element, cone.

If any parameters are NULL, this function does not attempt to fill them in.

Parameters
[out]topRadiusthe radius for the cone's top
[out]bottomRadiusthe radius for the cone's bottom
[out]topCenterthe cone's top center coordinates
[out]bottomCenterthe cone's bottom center coordinates
[out]rotMatrixis the orientation of the cone's top and bottom.
[in]inthe cone element to extract.
Returns
Returns SUCCESS if cone is a valid MicroStation element of type CONE_ELM. Otherwise, it returns MDLERR_BADELEMENT.
See also
mdlCone_create
int mdlCone_extractDEllipse3ds ( DEllipse3d pTop,
DEllipse3d pBottom,
MSElementP  pElement 
)

Extracts ellipse elements that represent the top and bottom of the specified cone element.

Parameters
[out]pTopa pointer to the ellipse at the top of the cone element
[out]pBottoma pointer to the ellipse at the bottom of the cone element
[in]pElementthe cone element to extract the ellipses from
Returns
SUCCESS if element is successfully extracted.
int mdlLinear_extract ( DPoint3dP  points,
int *  numVerts,
MSElementCP  linearElm,
DgnModelRefP  modelRef 
)

Extracts an array of coordinates from a linear element.

The coordinates are transformed into the current coordinate system if one exists.

Parameters
[out]pointsvertices, NULL can be passed to return only the vertex count.
[out]numVertsthe number of vertices in points. Sufficient memory should be allocated in points to receive MAX_VERTICES vertices.
[in]linearElmlinear element
[in]modelRefsource modelRef for the element.
Remarks
mdlLinear_extract does copy hidden points in a curve element into the points array. Be aware that the hidden points consist of two points at the beginning and two points at the end of the curve that are used only as curve definition data and are not displayed.
Returns
mdlLinear_extract returns SUCCESS if a valid MicroStation element of type LINE_ELM, LINE_STRING_ELM, SHAPE_ELM, CONIC_ELM, CURVE_ELM, MULTILINE_ELM, TEXT_ELM, POINT_STRING_ELM or BSPLINE_POLE_ELM is passed in in. Otherwise, it returns MDLERR_BADELEMENT.
See also
mdlLine_create mdlLineString_create mdlShape_create mdlCurve_create
int mdlLinear_getClosestSegment ( DSegment3d segment,
DPoint3dP  point,
MSElementP  linearElm 
)

Gets the closest line segment in the given linear element.

Parameters
[out]segmentendpoints of segment closest to point
[in,out]pointon input, point to test. On output, the closest point.
[in]linearElmlinear element
Returns
the segment number (relative to 0) from which segment was derived.
Remarks
Only elements of type LINE_ELM, LINE_STRING_ELM, SHAPE_ELM, TEXT_ELM or CURVE_ELM are valid.
int mdlLinear_getPointCount ( MSElementCP  linearElm)

Gets the number of vertices in the specified element.

Parameters
[in]linearElmlinear element
Returns
The number of vertices in the element.

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