Functions | |
StatusInt | mdlMline_joinTee (MSElementP line1, int segNo1, DPoint3dP locatePoint, MSElementP line2, int segNo2, int type) |
Creates open, closed or merged "tee joints" in precisely the same manner as the Tee Joint tools described in the Multi-line joints section of the MicroStation Reference Guide. More... | |
StatusInt | mdlMline_joinCross (MSElementP line1, int segNo1, MSElementP line2, int segNo2, int type) |
Creates open, closed or merged "cross joints" in precisely the same manner as the Cross Joint tools described in the Multi-line joints section of the MicroStation Reference Guide. More... | |
StatusInt | mdlMline_joinCorner (MSElementP line1, int segNo1, DPoint3dP point1, MSElementP line2, int segNo2, DPoint3dP point2) |
Creates "corner joints" in precisely the same manner as the Corner Joint tool described in the Multi-line joints section of the MicroStation Reference Guide. More... | |
int | mdlMline_deletePoint (MSElementP mline, int pointNo) |
Delete the vertex at pointNo from the multi-line element. More... | |
int | mdlMline_deleteBreak (MSElementP mline, int segNo, int breakNo) |
Delete a break from the specified multi-line segment. More... | |
int | mdlMline_getElementDescr (MSElementDescrH edP, MSElementP mline, DgnModelRefP modelRef, int grphGrp) |
Converts a MicroStation multi-line element to primitive elements, which are then stored in an element descriptor. More... | |
int | mdlMline_getBoundaryDescr (MSElementDescrH edPP, MSElementP mlineP, int minLine, int maxLine, DgnModelRefP modelRef) |
Create an element descriptor in edPP containing one or more elements that represent the boundary of the multi-line element mlineP. More... | |
int | mdlMline_getCapDef (UInt32 *capColor, long *capStyle, UInt32 *capWeight, UInt32 *capLevel, int *conClass, int *capOption, double *capAngle, MSElementP mline, int capNo) |
Retrieve the definition of one of three possible caps in a multi-line. More... | |
int | mdlMline_setCapDef (MSElementP mline, int capNo, UInt32 *capColor, long *capStyle, UInt32 *capWeight, UInt32 *capLevel, int conClass, int capOption, double capAngle) |
Change the definition of capNo in mline to the values of color, style, weight, cap options (line, inner arc, outer arc) and cap angle. More... | |
int | mdlMline_insertBreak (MSElementP mline, int segNo, double offset, double length, UInt32 lineMask, UInt32 breakFlags) |
Insert a break in mline starting at a distance of offset from the origin of the segment indicated by segNo. More... | |
int | mdlMline_create (MSElementP outEl, MSElementCP inEl, DPoint3dCP normal, DPoint3dCP points, int nPoints) |
Create a multi-line element in mline. More... | |
int | mdlMline_insertPoint (MSElementP mlineP, Dpoint3d *newPointP, DgnPlatform::AssocPoint *assocPointP, int pointNo, int pointType, DgnModelRefP modelRef) |
Insert a point at the specified position in the multi-line element mlineP. More... | |
int | mdlMline_modifyPoint (MSElementP mline, int pointNo, DPoint3dCP newPoint, DgnPlatform::MlineModifyPoint option) |
Replaces the multi-line vertex at pointNo in mline with the point data in newPoint. More... | |
StatusInt | mdlMline_getStyleName (WCharP pName, int bufferLen, MSElementP mline, DgnModelRefP modelRef) |
Get the style name from the multi-line style. More... | |
void | mdlMline_getInfo (int *nPoints, int *nLines, double *dist1, double *dist2, DPoint3dP zVector, MSElementCP mline) |
Retrieve general information from a multi-line. More... | |
int | mdlMline_extractPoints (DPoint3dP outPoints, MSElementP mline, DgnModelRefP modelRef, int pointNo, int nPoints) |
Extract nPoints vertices of the work line from the multi-line starting at vertex pointNo. More... | |
int | mdlMline_getBreak (int *nBreaks, double *offset, double *length, int *lineMask, int *breakFlags, MSElementP mline, int segNo, int breakNo) |
Return information about a requested break or the number of breaks on a segment. More... | |
int | mdlMline_getLineDef (UInt32 *color, Int32 *style, UInt32 *weight, UInt32 *level, int *conClass, double *offset, MSElementP mlineP, int lineNo) |
Retrieve the definition of 1 of the 16 possible lines in a multi-line. More... | |
int | mdlMline_setLineDef (MSElementP mlineP, int lineNo, UInt32 *color, long *style, UInt32 *weight, UInt32 *level, int conClass, double offset) |
Change the definition of a single line in a multi-line to new values of color, style, weight level, class, and offset. More... | |
int | mdlMline_setClosure (MSElementP mline, int close) |
Set the closure status of a multi-line element. More... | |
StatusInt | mdlMline_getClosure (int *closed, MSElementP mline) |
Get the closure status of a multi-line element. More... | |
int | mdlMline_validate (MSElementP mline) |
Set the multi-line range block and checks for invalid points and/or settings. More... | |
StatusInt | mdlMline_applyStyle (MSElementDescrH mlineEdPP, MlineStyleConstP mlineStyle, DgnModelRefP modelRef) |
Apply a multi-line style to the multi-line element. More... | |
StatusInt | mdlMline_applyOffset (MSElementP elP, DgnPlatform::MlineOffsetMode offsetMode) |
Set the offset mode for a multi-line element. More... | |
StatusInt mdlMline_applyOffset | ( | MSElementP | elP, |
DgnPlatform::MlineOffsetMode | offsetMode | ||
) |
Set the offset mode for a multi-line element.
Generally the offset mode is stored so that modifying the multi-line element by reapplying a style will not shift the multi-line.
[in] | elP | The element to modify. |
[in] | offsetMode | The new offset mode. |
StatusInt mdlMline_applyStyle | ( | MSElementDescrH | mlineEdPP, |
MlineStyleConstP | mlineStyle, | ||
DgnModelRefP | modelRef | ||
) |
Apply a multi-line style to the multi-line element.
This will copy all the data from the style to the element.
[in,out] | mlineEdPP | The element to modify. |
[in] | mlineStyle | The multi-line style to apply. |
[in] | modelRef | The modelRef for the element. This is used to set the offsets to the correct scale. |
int mdlMline_create | ( | MSElementP | outEl, |
MSElementCP | inEl, | ||
DPoint3dCP | normal, | ||
DPoint3dCP | points, | ||
int | nPoints | ||
) |
Create a multi-line element in mline.
If seed is not NULL, the multi-line definition is extracted from seed. Otherwise, the active multi- line definition is used.
[out] | outEl | The new multi-line element. The memory pointed to by mline should be a full size MSElement. |
[in] | inEl | Seed multi-line element or NULL to use active settings. |
[in] | normal | The plane of the multi-line is defined by the unit vector in normal. If normal is NULL or the current file is 2D, the vector [0,0,1] is used. |
[in] | points | The vertices for the multi-line. |
[in] | nPoints | The number of vertices in the points array. |
int mdlMline_deleteBreak | ( | MSElementP | mline, |
int | segNo, | ||
int | breakNo | ||
) |
Delete a break from the specified multi-line segment.
[in,out] | mline | The multi-line element to be changed. |
[in] | segNo | The multi-line segment number (zero-based) containing the break. |
[in] | breakNo | The index of the break within the segment segNo. |
int mdlMline_deletePoint | ( | MSElementP | mline, |
int | pointNo | ||
) |
Delete the vertex at pointNo from the multi-line element.
[in,out] | mline | The multi-line element. |
[in] | pointNo | The point number (zero-based) to delete. |
int mdlMline_extractPoints | ( | DPoint3dP | outPoints, |
MSElementP | mline, | ||
DgnModelRefP | modelRef, | ||
int | pointNo, | ||
int | nPoints | ||
) |
Extract nPoints vertices of the work line from the multi-line starting at vertex pointNo.
[out] | outPoints | must be at least nPoints long. If a multi-line vertex is represented by an associative point, the association is resolved before the point is added to outPoints. |
[in] | mline | The multi-line element. |
[in] | modelRef | Source model for element (ACTIVEMODEL for the active model). |
[in] | pointNo | First point to extract. |
[in] | nPoints | Number of points to extract. |
int mdlMline_getBoundaryDescr | ( | MSElementDescrH | edPP, |
MSElementP | mlineP, | ||
int | minLine, | ||
int | maxLine, | ||
DgnModelRefP | modelRef | ||
) |
Create an element descriptor in edPP containing one or more elements that represent the boundary of the multi-line element mlineP.
If the boundary requires fewer than MAX_VERTICES segments the boundary is represented by a primitive shape element. Otherwise a complex shape is created.
[out] | edPP | Shape representing boundary |
[in] | mlineP | Multi-line element |
[in] | minLine | Index of minimum profile line (-1 for limit) |
[in] | maxLine | Index of maximum profile line (-1 for limit) |
[in] | modelRef | Indicates the model that contains the multi-line mlineP. |
int mdlMline_getBreak | ( | int * | nBreaks, |
double * | offset, | ||
double * | length, | ||
int * | lineMask, | ||
int * | breakFlags, | ||
MSElementP | mline, | ||
int | segNo, | ||
int | breakNo | ||
) |
Return information about a requested break or the number of breaks on a segment.
[out] | nBreaks | Number of breaks in this segment; can be NULL. |
[out] | offset | Offset value of requested break; can be NULL. |
[out] | length | Length value of requested break; can be NULL. |
[out] | lineMask | Line mask - lines cut by break; can be NULL. |
[out] | breakFlags | Break flags; can be NULL. |
[in] | mline | Multi-line element. |
[in] | segNo | Segment number to search. |
[in] | breakNo | Break number in segment. |
int mdlMline_getCapDef | ( | UInt32 * | capColor, |
long * | capStyle, | ||
UInt32 * | capWeight, | ||
UInt32 * | capLevel, | ||
int * | conClass, | ||
int * | capOption, | ||
double * | capAngle, | ||
MSElementP | mline, | ||
int | capNo | ||
) |
Retrieve the definition of one of three possible caps in a multi-line.
A NULL pointer can be passed for any output arguments. In this case, the argument is ignored.
[out] | capColor | Cap Color; INVALID_COLOR means that it uses the value from the multi-line element. This parameter can be NULL. |
[out] | capStyle | Cap Style; INVALID_STYLE means that it uses the value from the multi-line element. This parameter can be NULL. |
[out] | capWeight | Cap Weight; INVALID_WEIGHT means that it uses the value from the multi-line element. This parameter can be NULL. |
[out] | capLevel | Cap level number; INVALID_LEVEL or 0 means that it uses the value from the multi-line element. This parameter can be NULL. |
[out] | conClass | If conClass is true the line will be treated as construction class. Otherwise, it will be treated as primary class. This parameter can be NULL. |
[out] | capOption | Cap option is a combination of the flags MLCAP_LINE, MLCAP_INNER_ARCS, and MLCAP_OUTER_ARCS; see table. This parameter can be NULL. |
[out] | capAngle | Cap angle, in radians. If the requested cap is an end cap, the counter-clockwise angle in radians from the work line to the cap line is returned in capAngle. It is not set for a mid cap. This parameter can be NULL. |
[in] | mline | Multi-line element |
[in] | capNo | The value of capNo must be 0 (origin cap), 1 (joint cap), or 2 (end cap). |
Value | Description |
---|---|
MLCAP_NONE | Use no end caps. |
MLCAP_LINE | Display a line connecting the two outermost lines. |
MLCAP_INNER_ARCS | Display circular arcs connecting all but the two outermost lines. (Not used for joint cap). |
MLCAP_OUTER_ARC | Display a circular arc connecting the two outermost lines (Not used for joint cap). |
StatusInt mdlMline_getClosure | ( | int * | closed, |
MSElementP | mline | ||
) |
Get the closure status of a multi-line element.
If close is true, the multi-line is closed. If close is false, the multi-line is not closed.
[out] | closed | true if multi-line is closed; false if not closed. |
[in] | mline | multi-line element |
int mdlMline_getElementDescr | ( | MSElementDescrH | edP, |
MSElementP | mline, | ||
DgnModelRefP | modelRef, | ||
int | grphGrp | ||
) |
Converts a MicroStation multi-line element to primitive elements, which are then stored in an element descriptor.
The address of the element descriptor is returned in edP.
[out] | edP | Element descriptor containing dropped multi-line. |
[in] | mline | Multi-line element |
[in] | modelRef | ModelRef that contains multi-line. |
[in] | grphGrp | If not 0, then the elements will be put into this graphic group. |
void mdlMline_getInfo | ( | int * | nPoints, |
int * | nLines, | ||
double * | dist1, | ||
double * | dist2, | ||
DPoint3dP | zVector, | ||
MSElementCP | mline | ||
) |
Retrieve general information from a multi-line.
If NULL is passed for any of the output arguments, it is ignored.
[out] | nPoints | The value returned in nPoints is the number of vertices in the multi-line work line. |
[out] | nLines | The number of line definitions in the multi-line profile. |
[out] | dist1 | The line definition offset of the outermost line 1. |
[out] | dist2 | The line definition offset of the outermost line 2. |
[out] | zVector | Multi-line Z axis direction. |
[in] | mline | The multi-line normal vector is returned in mline. |
int mdlMline_getLineDef | ( | UInt32 * | color, |
Int32 * | style, | ||
UInt32 * | weight, | ||
UInt32 * | level, | ||
int * | conClass, | ||
double * | offset, | ||
MSElementP | mlineP, | ||
int | lineNo | ||
) |
Retrieve the definition of 1 of the 16 possible lines in a multi-line.
If NULL is passed for an output argument, that argument is ignored.
[out] | color | Line color; INVALID_COLOR means that it uses the value from the multi-line element. This parameter can be NULL. |
[out] | style | Line style; INVALID_STYLE means that it uses the value from the multi-line element. This parameter can be NULL. |
[out] | weight | Line weight; INVALID_WEIGHT means that it uses the value from the multi-line element. This parameter can be NULL. |
[out] | level | Line level; 0 means that it uses the value from the multi-line element. This parameter can be NULL. |
[out] | conClass | If conClass is true, the line will be treated as construction class. Otherwise it will be treated as primary class. This parameter can be NULL. |
[out] | offset | The value returned in offset is the distance of lineNo from the multi-line work line. This parameter can be NULL. |
[in] | mlineP | Multi-line element to extract parameters from. |
[in] | lineNo | profile index in the multi-line of the line of interest. |
StatusInt mdlMline_getStyleName | ( | WCharP | pName, |
int | bufferLen, | ||
MSElementP | mline, | ||
DgnModelRefP | modelRef | ||
) |
Get the style name from the multi-line style.
[in,out] | pName | A buffer to hold the style name. |
[in] | bufferLen | The number of wide characters in pName. |
[in] | mline | The multi-line element which may have a style. |
[in] | modelRef | The model ref that mline comes from.. |
int mdlMline_insertBreak | ( | MSElementP | mline, |
int | segNo, | ||
double | offset, | ||
double | length, | ||
UInt32 | lineMask, | ||
UInt32 | breakFlags | ||
) |
Insert a break in mline starting at a distance of offset from the origin of the segment indicated by segNo.
[in,out] | mline | multi-line to modify |
[in] | segNo | segment to contain break |
[in] | offset | break offset |
[in] | length | break length |
[in] | lineMask | mask of lines cut by break; The low order word of lineMask determines which of the 16 possible lines are cut by the break. |
[in] | breakFlags | length and offset options |
[in] | length | The length of the break is specified by length. |
Value | Description |
---|---|
MLBREAK_FROM_JOINT | The break starts at the joint line at the specified segment's origin, and the value of offset is ignored. |
MLBREAK_TO_JOINT | The break ends at the joint line at the specified segment's end, and the value of length is ignored. |
MLBREAK_STD | Use offset and length. |
int mdlMline_insertPoint | ( | MSElementP | mlineP, |
Dpoint3d * | newPointP, | ||
DgnPlatform::AssocPoint * | assocPointP, | ||
int | pointNo, | ||
int | pointType, | ||
DgnModelRefP | modelRef | ||
) |
Insert a point at the specified position in the multi-line element mlineP.
[in,out] | mlineP | Multi-line to modify. |
[in] | newPointP | Point to add; NULL when inserting an associative point. |
[in] | assocPointP | An DgnPlatform::AssocPoint from one of the mdlAssoc_* functions. Pass NULL when inserting a non-associative point. |
[in] | pointNo | The vertex number (zero-based) for the new point. Pass -1 to insert the point as the last vertex in the multi-line. |
[in] | pointType | The type of the point, which determines whether newPointP or assocPointP is used. It must be either POINT_STD to use newPointP or POINT_ASSOC to use assocPointP. |
[in] | modelRef | The model for the multi-line which is used to evaluate the association. |
StatusInt mdlMline_joinCorner | ( | MSElementP | line1, |
int | segNo1, | ||
DPoint3dP | point1, | ||
MSElementP | line2, | ||
int | segNo2, | ||
DPoint3dP | point2 | ||
) |
Creates "corner joints" in precisely the same manner as the Corner Joint tool described in the Multi-line joints section of the MicroStation Reference Guide.
[in,out] | line1 | is the first of the two multi-line elements that will be joined. |
[in] | segNo1 | is the zero based segment number of line1 that will be modified by the join operation. |
[in] | point1 | is an arbitrary point that identifies the portion of the Multi-line line1 that will be kept if line1 is shortened by the join operation. |
[in,out] | line2 | is the second of the two multi-line elements that will be joined. |
[in] | segNo2 | is the zero based segment number of line2 that will be modified by the join operation. |
[in] | point2 | is an arbitrary point that identifies the portion of the Multi-line line2 that will be kept if line2 is shortened by the join operation. |
StatusInt mdlMline_joinCross | ( | MSElementP | line1, |
int | segNo1, | ||
MSElementP | line2, | ||
int | segNo2, | ||
int | type | ||
) |
Creates open, closed or merged "cross joints" in precisely the same manner as the Cross Joint tools described in the Multi-line joints section of the MicroStation Reference Guide.
[in,out] | line1 | the first of the two multi-line elements that will be joined. |
[in] | segNo1 | the zero based segment number of line1 that will be modified by the join operation. |
[in,out] | line2 | the second of the two multi-line elements that will be joined. |
[in] | segNo2 | the zero based segment number of line2 that will be modified by the join operation. |
[in] | type | determines the cross join type and must be one of the following three constants: MLJOIN_CLOSE Creates a closed cross join. MLJOIN_OPEN Creates an open cross join. MLJOIN_MERGE Creates a merged cross join. |
StatusInt mdlMline_joinTee | ( | MSElementP | line1, |
int | segNo1, | ||
DPoint3dP | locatePoint, | ||
MSElementP | line2, | ||
int | segNo2, | ||
int | type | ||
) |
Creates open, closed or merged "tee joints" in precisely the same manner as the Tee Joint tools described in the Multi-line joints section of the MicroStation Reference Guide.
[in,out] | line1 | a Multi-line element that will be extended or shortened to create a tee joint with Multi-line element line2. |
[in] | segNo1 | the zero based segment number of line1 that will be modified by the join operation. |
[in] | locatePoint | is an arbitrary point that identifies the portion of the Multi-line line1 that will be kept if line1 is shortened by the join operation. |
[in,out] | line2 | a Multi-line element that will be extended or shortened to create a tee joint with Multi-line element line1. |
[in] | segNo2 | the zero based segment number of line2 that will be modified by the join operation. |
[in] | type | determines the tee joint type and must be one of the following three constants: MLJOIN_CLOSE Creates a closed tee joint. MLJOIN_OPEN Creates an open tee joint. MLJOIN_MERGE Creates a merged tee joint. |
int mdlMline_modifyPoint | ( | MSElementP | mline, |
int | pointNo, | ||
DPoint3dCP | newPoint, | ||
DgnPlatform::MlineModifyPoint | option | ||
) |
Replaces the multi-line vertex at pointNo in mline with the point data in newPoint.
[in,out] | mline | Multi-line to modify. |
[in] | pointNo | Index of vertex to modify (zero-based). |
[in] | newPoint | New point to add. |
[in] | option | The modification option. Use MlineModifyPoint::ShiftBreaks to move any breaks following the point so that they appear as close as possible to their current location. Use MlineModifyPoint::RemoveAssociations to make a point non-associative. Pass 0 if not special handling of breaks is required. |
int mdlMline_setCapDef | ( | MSElementP | mline, |
int | capNo, | ||
UInt32 * | capColor, | ||
long * | capStyle, | ||
UInt32 * | capWeight, | ||
UInt32 * | capLevel, | ||
int | conClass, | ||
int | capOption, | ||
double | capAngle | ||
) |
Change the definition of capNo in mline to the values of color, style, weight, cap options (line, inner arc, outer arc) and cap angle.
[in,out] | mline | Multi-line element | ||||||||||
[in] | capNo | The value of capNo must be 0 (origin cap), 1 (joint cap) or 2 (end cap). | ||||||||||
[in] | capColor | the color for the cap; NULL or VALID_COLOR means to use the value from the multi-line element. | ||||||||||
[in] | capStyle | the line style for the cap; NULL or VALID_STYLE means to use the value from the multi-line element. | ||||||||||
[in] | capWeight | the weight for the cap; NULL or VALID_WEIGHT means to use the value from the multi-line element. | ||||||||||
[in] | capLevel | the level for the cap; NULL or VALID_LEVEL or 0 means to use the value from the multi-line element. | ||||||||||
[in] | conClass | If conClass is true, the line will be treated as construction class. Otherwise it will be treated as primary class. | ||||||||||
[in] | capOption | The value of capOption must be set to one or more of the following constants combined with the bitwise OR (|) operator:
| ||||||||||
[in] | capAngle | capAngle is the counter-clockwise angle in radians from the work line to the cap line. This value is used only for end caps (0 and 2). |
int mdlMline_setClosure | ( | MSElementP | mline, |
int | close | ||
) |
Set the closure status of a multi-line element.
If close is true, the multi-line is closed. If close is false, the multi-line is not closed.
[in,out] | mline | multi-line element |
[in] | close | true to close multi-line; false for not closed. |
int mdlMline_setLineDef | ( | MSElementP | mlineP, |
int | lineNo, | ||
UInt32 * | color, | ||
long * | style, | ||
UInt32 * | weight, | ||
UInt32 * | level, | ||
int | conClass, | ||
double | offset | ||
) |
Change the definition of a single line in a multi-line to new values of color, style, weight level, class, and offset.
[in] | mlineP | OUT Multi-line element to modify |
[in] | lineNo | Line number or profile index to change (zero-based). |
[in] | color | Line color; NULL or VALID_COLOR means to use the value from the element header. |
[in] | style | Line style; NULL or VALID_STYLE means to use the value from the element header. |
[in] | weight | Line weight; NULL or VALID_WEIGHT means to use the value from the element header. Valid values are 0 to 31, WEIGHT_BYLEVEL, and WEIGHT_BYCELL. |
[in] | level | Line level, NULL or 0 or VALID_LEVEL means to use the value from the element header. |
[in] | conClass | If conClass is true, the line will be treated as construction class. Otherwise it will be treated as primary class. |
[in] | offset | The value of offset is the new distance of lineNo from the multi-line work line. |
int mdlMline_validate | ( | MSElementP | mline | ) |
Set the multi-line range block and checks for invalid points and/or settings.
If mdlMline_insertPoint, mdlMline_deletePoint, or mdlMline_modifyPoint has modified mline, mdlMline_validate must be called before the element is written to the file.
[in,out] | mline | Multi-line element to validate. |