Parameters |
Description |
OdDbCurve*& pCurve |
[out] Pointer to newly created polyline entity. |
int precision = 10 |
[in] Target precision value. |
int* maxSuggestedPrecision = NULL |
[out] (When not NULL) suggested precision value. |
unsigned int numOfVerticesThreshold = kPlineVerticesThrehold |
[in] Vertices threshold value. |
Returns OdResult::eOk if successful; OdResult::eInvalidInput if numOfVerticesThreshold is too small; OdResult::eNoDatabase if unable to access database or system variable.
Generates a polyline to approximate a spline.
Depending on the value of the PLINETYPE system variable and the spline itself, the resulting curve can be OdDbPolyline, OdDb2dPolyline or OdDb3dPolyline. OdDb3dPolyline will always have line segments. Otherwise, the resulting polyline has line segments when the PLINECONVERTMODE system variable is 0, and the arc segments, if PLINECONVERTMODE is 1.
It is expected that the target precision will be from 0 to 99, but higher values are also acceptable. Negative precision means that maxSuggestedPrecision will be used to create a polyline.
In the case where precision < 0, maxSuggestedPrecision will be used to create a polyline. In the case when the number of points of the generated curve is greater than numOfVerticesThreshold and maxSuggestedPrecision is not NULL, the maxSuggestedPrecision value will be calculated. If the precision value is good, then maxSuggestedPrecision will be -1.
Copyright © 2002–2020. Open Design Alliance. All rights reserved.
|