修正酒格没有应用变换的问题

pull/457/MERGE
ChenX 5 years ago
parent 353a2f2b2f
commit 96950c42d9

@ -1,4 +1,5 @@
import { app } from "../../ApplicationServices/Application";
import { Board } from "../../DatabaseServices/Entity/Board";
import { PositioningClampSpace } from "../../DatabaseServices/Template/Positioning/PositioningClampSpace";
import { GetDeepestTemplate } from "../../DatabaseServices/Template/TempateUtils";
import { TemplateRecord } from "../../DatabaseServices/Template/TemplateRecord";
@ -45,6 +46,13 @@ export class DrawWineRack implements Command
wineRack.HParam.expr = space.Size.z;
await wineRack.UpdateTemplateTree();
let brs = wineRack.Objects.map(id => id.Object as Board);
let dcs = space.DrawCS;
for (let br of brs)
{
br.ApplyMatrix(dcs);
}
}
}
}

@ -71,6 +71,15 @@ export class ISpaceParse
return new Vector3();
}
get DrawCS(): Matrix4
{
if (!this.ParseOK) return new Matrix4();
let scs = this.SpaceOCS.clone();
let p = this.SpaceBox.min.clone().applyMatrix4(scs);
scs.setPosition(p);
return scs;
}
/**
* Map
*/

Loading…
Cancel
Save