修复:右键编辑模块参数后,板的拉槽未进行更新校验

pull/1990/MERGE
ChenX 2 years ago
parent d0bf75fa5b
commit 43a5235f77

@ -11,8 +11,14 @@ export function EntityUpdateWrap(ent: Entity, exec: Function)
export function EntitysUpdateWrap(ens: Entity[], exec: Function)
{
let baks = ens.map(e => e.AutoUpdate);
let baks = ens.map(e =>
{
e.AutoUpdate = false;
return e.AutoUpdate;
});
exec();
for (let i = 0; i < ens.length; i++)
{
let en = ens[i];

@ -1573,9 +1573,9 @@ export class ExtrudeSolid extends Entity
LazyGrooveCheckAll()
{
this.IsLazyGrooveCheck = false;
if (this.IsNeedGrooveCheck)
this.GrooveCheckAllAutoSplit();
this.IsLazyGrooveCheck = false;
}
//#endregion

@ -1,4 +1,5 @@
import { Vector3 } from "three";
import { EntitysUpdateWrap } from "../../../Common/EntityUpdateWrap";
import { Factory } from "../../CADFactory";
import { CADFiler } from "../../CADFiler";
import { Board } from "../../Entity/Board";
@ -49,23 +50,26 @@ export class TemplateLeftRightBoardRecord extends TemplateRecord
let zs = this.GetParam("ZS")?.value as number ?? 0;//左缩
let ys = this.GetParam("YS")?.value as number ?? 0;//右缩
lBr.Thickness = thickness;
rBr.Thickness = thickness;
if (!this._CacheSpaceSize)
EntitysUpdateWrap([lBr, rBr], () =>
{
console.warn("左右侧板模板数据错误无法更新");
return;
}
lBr.Thickness = thickness;
rBr.Thickness = thickness;
if (!this._CacheSpaceSize)
{
console.warn("左右侧板模板数据错误无法更新");
return;
}
lBr.Height = this._CacheSpaceSize.z;
rBr.Height = this._CacheSpaceSize.z;
lBr.Height = this._CacheSpaceSize.z;
rBr.Height = this._CacheSpaceSize.z;
lBr.Width = this._CacheSpaceSize.y - zs;
rBr.Width = this._CacheSpaceSize.y - ys;
lBr.Width = this._CacheSpaceSize.y - zs;//似乎用拉伸来做比较好,这样能保持住背板对他的拉槽.
rBr.Width = this._CacheSpaceSize.y - ys;
lBr.Position = new Vector3(0, zs, 0);
rBr.Position = new Vector3(this._CacheSpaceSize.x - rBr.Thickness, ys, 0);
lBr.Position = new Vector3(0, zs, 0);
rBr.Position = new Vector3(this._CacheSpaceSize.x - rBr.Thickness, ys, 0);
});
}
ReadFile(file: CADFiler)

Loading…
Cancel
Save