AutoCAD 允许将 SPLINE 实体存储在仅由拟合点定义的 DXF 文件中,问题是,这样的样条定义具有无限的数值正确解,而 Autodesk 没有提供必要的信息来根据给定的拟合点计算所需的参数。
tl;dr - 缺失的信息是输入切线的方向和大小的估计起始切线和结束切线到具有末端导数的全局 B 样条插值,有人可以帮助计算这个值吗?
我使用 BricsCAD 进行测试,但“Trueview 2020”显示相同的结果。
只给出拟合点,使用没有任何约束的全局曲线插值得到控制顶点定义的样条:
# First spline defined by control vertices interpolated from given fit points
s = global_bspline_interpolation(points, degree=3)
msp.add_spline(dxfattribs={'color': 4, 'layer': 'Global Interpolation'}).apply_construction_tool(s)
# Second spline defined only by fit points as reference
spline = msp.add_spline(points, degree=3, dxfattribs={'layer': 'BricsCAD B-spline', 'color': 2})
doc.saveas(DIR / 'fit-points-only.dxf')
Run Code Online (Sandbox Code Playgroud)
BricsCAD 从拟合点插值的样条与插值控制顶点定义的样条不匹配:
除了拟合点,我还在 DXF 文件中存储了起点和终点切线值。插值是通过具有末端导数的全局曲线插值完成的(Piegl & Tiller:“The NURBS Book” - 第 9.2.2 章)。
我选择了一个任意角度(100 …