乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 33|回复: 1

样条曲线的绘制方法?

[复制链接]

1

主题

1

帖子

1

银币

初来乍到

Rank: 1

铜币
5
发表于 2010-1-6 09:26:00 | 显示全部楼层 |阅读模式
我从cad另存的dxf文件中获取到了
样条曲线的 控制点、节点、阶数
我需要再C#中把样条曲线绘制出来
dxf文件里这个节点指的是什么啊?
怎么把这些参数转换成控制点和权因子???
另外有没有高手给个程序,通过控制点、节点、阶数绘制样条曲线
回复

使用道具 举报

72

主题

2726

帖子

9

银币

社区元老

Rank: 75Rank: 75Rank: 75

铜币
3014
发表于 2010-1-6 16:49:00 | 显示全部楼层
public
                Spline(
    int
                degree,
    [MarshalAs(UnmanagedType.U1)] bool
                rational,
    [MarshalAs(UnmanagedType.U1)] bool
                closed,
    [MarshalAs(UnmanagedType.U1)] bool
                periodic,
    Point3dCollection controlPoints,
    DoubleCollection knots,
    DoubleCollection weights,
    double
                controlPointTolerance,
    double
                knotTolerance
);Creates a spline using the parameters passed in.
If the spline is to be rational, then isRational should be true.
If the spline is to be closed (that is, a closed loop), then isClosed should be true.
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.
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.
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.
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).
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.
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).
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.
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-6-28 23:05 , Processed in 2.251837 second(s), 57 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表