样条曲线的绘制方法?
<p>我从cad另存的dxf文件中获取到了</p><p>样条曲线的 控制点、节点、阶数</p><p>我需要再C#中把样条曲线绘制出来</p><p><font color="#ff0033">dxf文件里这个节点指的是什么啊?</font></p><p>怎么把这些参数转换成控制点和权因子???</p><p></p><p>另外有没有高手给个程序,通过控制点、节点、阶数绘制样条曲线</p> <pre class="Element100"><strong>public</strong><strong>Spline</strong>(
<strong>int</strong>
<strong>degree</strong>,
<strong>bool</strong>
<strong>rational</strong>,
<strong>bool</strong>
<strong>closed</strong>,
<strong>bool</strong>
<strong>periodic</strong>,
Point3dCollection <strong>controlPoints</strong>,
DoubleCollection <strong>knots</strong>,
DoubleCollection <strong>weights</strong>,
<strong>double</strong>
<strong>controlPointTolerance</strong>,
<strong>double</strong>
<strong>knotTolerance</strong>
);</pre><p></p><p>Creates a spline using the parameters passed in. </p><p class="Element10">If the spline is to be rational, then isRational should be true. </p><p class="Element10">If the spline is to be closed (that is, a closed loop), then isClosed should be true. </p><p class="Element10">If the spline is to be periodic, then isPeriodic should be true. This parameter should only be set to true if the spline is closed. A periodic spline is a spline with period T such that the point at parameter value t + T is the same as the point at parameter t for any value of t. </p><p class="Element10">The weights array is only used when isRational == true. If used, it must have the same number of entries as the controlPoints collection. All weight values must be greater than 0.0. </p><p class="Element10">The knots collection must have ((number of controlPoints) + degree + 1) entries and each knot must have a value greater than or equal to the value of its predecessor in the collection. </p><p class="Element10">The knotTolerance value is used to determine which knot values are to be treated as the same. If the difference between two knot values is less than knotTolerance, then the two values will be treated as the same (and the first of the two values will be used for both). </p><p class="Element10">The controlPointTolerance value is used to determine if two control points are to be treated as the same point. If the distance (in drawing units) between two control points is less than controlPointTolerance, then those two control points will be treated as the same point. If the first and last control points are within controlPointTolerance of each other, the spline will be closed regardless of the isClosed value. </p><p class="Element10">If any of the parameters are not acceptable, then the gelib object for the spline is not created and this constructor behaves like the default constructor (that is, the passed in values will not be used and the data query methods on the spline returns invalid values). </p><p class="Element10">Use Spline.IsNull to determine if this constructor succeeded in initializing the spline to the values passed in. If Spline.IsNull returns false, then the initialization succeeded.</p>
页:
[1]