批量添加模型间距限制

This commit is contained in:
2025-08-26 14:57:54 +08:00
parent 9289d08f24
commit 7f3b04eb08

View File

@ -38,7 +38,7 @@ class BatchModel extends Base {
this.options.name = options.name || '批量模型'
this.options.type = options.type || '面'
this.options.url = options.url || ''
this.options.spacing = options.spacing || 50
this.options.spacing = options.spacing * 1 || 50
this.options.positions = options.positions || []
this.options.show = (options.show || options.show === false) ? options.show : true
this.callback = callback
@ -50,6 +50,10 @@ class BatchModel extends Base {
let tools = new Tools(sdk)
// BatchModel.computeDis(this)
// if (this.options.positions.length > 0 || this.options.positions.lng) {
if (this.options.spacing < 0 || options.spacing * 1 === 0) {
tools.message({ type: 'warning', text: '请输入正确的间距!' })
return;
}
if ((options.type && options.spacing != undefined) || options.type == '点') {
// BatchModel.computeDis(this)