Fx构造函数
# new Smooth(option)
Zondy.Service.Smooth 插值方式:可取值0、1、2、3
参数:
名称 | 类型 | 属性 | 默认值 | 描述 |
---|---|---|---|---|
option |
Object | 属性键值对 |
||
type |
Number |
<optional> |
0 | 0为二次样条、1为三次样条、2为三次Beizer样条、3为三次B样条 |
step |
Number |
<optional> |
1 | 步长,插值时的间隔步长 |
Example
//设置原始线坐标数组
var dataObject = [
{
"x": 64.3026761440958,
"y": -13.3927768273516
}, {
"x": 81.3250355929193,
"y": -8.44081771496663
}, {
"x": 72.9827194,
"y": 7.0129852
}, {
"x": 93.7049333738818,
"y": -2.86986371353349
}, {
"x": 90,
"y": 13.6363636363636
}, {
"x": 105.213348388672,
"y": 8.70024061203003
}
];
//创建光滑线分析服务
var smooth = new Zondy.Service.Smooth({
//插值方式,可取值0、1、2、3,0为二次样条、1为三次样条、2为三次Beizer样条、3为三次B样条
type: 2,
//插值时的间隔步长
step: 1,
//IGServer服务器地址
ip: "develop.smaryun.com",
//IGServer服务器端口
port: "6163"
}
);
//执行光滑线功能服务,并返回结果信息,onSuccess为回调函数
smooth.execute(dataObject, function (res) {
console.log(res);
}, function (error) {
console.log(error);
});
继承关系
- Zondy.Service.GeometryAnalysisBase