Parameters |
Description |
OdDbCurve*& pCurve |
[out] Pointer to newly created polyline entity. |
bool bConvertAsArcs |
[in] Indicating whether to convert to arcs or lines when spline is planar. |
bool bToLWPolyline |
[in] Indicating whether to convert to OdDbPolyline or OdDb2dPolyline when spline is planar. |
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.
Generates a polyline to approximate a spline without using PLINETYPE and PLINECONVERTMODE.
The resulting curve can be OdDbPolyline, OdDb2dPolyline or OdDb3dPolyline. If at least one of the points of the spline does not lie on the XY plane, then an OdDb3dPolyline will be created from linear segments. If the spline is flat, then if bConvertAsArcs is true, the resulting polyline will be a segment of the arc, otherwise it will be line segments. And, if the spline is flat and bToLWPolyline is true, then the result will be OdDbPolyline, otherwise it will be OdDb2dPolyline.
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–2021. Open Design Alliance. All rights reserved.
|