|
|
|
@ -1,11 +1,13 @@
|
|
|
|
|
import { Matrix4 } from "three";
|
|
|
|
|
import { FrontSide, Matrix4, Mesh } from "three";
|
|
|
|
|
import { app } from "../../../ApplicationServices/Application";
|
|
|
|
|
import { ColorMaterial } from "../../../Common/ColorPalette";
|
|
|
|
|
import { CADFiler } from "../../../DatabaseServices/CADFiler";
|
|
|
|
|
import { Board } from "../../../DatabaseServices/Entity/Board";
|
|
|
|
|
import { Curve } from "../../../DatabaseServices/Entity/Curve";
|
|
|
|
|
import { Entity } from "../../../DatabaseServices/Entity/Entity";
|
|
|
|
|
import { CommandWrap } from "../../../Editor/CommandMachine";
|
|
|
|
|
import { TempEditor } from "../../../Editor/TempEditor";
|
|
|
|
|
import { userConfig } from "../../../Editor/UserConfig";
|
|
|
|
|
|
|
|
|
|
export function ZoomToEntity(en: Entity)
|
|
|
|
|
{
|
|
|
|
@ -67,6 +69,8 @@ export class BoardEdgesEditor
|
|
|
|
|
{
|
|
|
|
|
if (!this._editoring) return;
|
|
|
|
|
|
|
|
|
|
userConfig.ConceptualOpacity = this._OpacityBak;
|
|
|
|
|
|
|
|
|
|
//马上标记为否,避免重入
|
|
|
|
|
this._editoring = false;
|
|
|
|
|
|
|
|
|
@ -83,16 +87,28 @@ export class BoardEdgesEditor
|
|
|
|
|
app.Editor.MaskManage.Clear();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private _OpacityBak: number;
|
|
|
|
|
private Start()
|
|
|
|
|
{
|
|
|
|
|
TempEditor.Start();
|
|
|
|
|
this._OpacityBak = userConfig.ConceptualOpacity;
|
|
|
|
|
userConfig.ConceptualOpacity = 0.2;
|
|
|
|
|
CommandWrap(() =>
|
|
|
|
|
{
|
|
|
|
|
for (let [b, cus] of this._brMap)
|
|
|
|
|
for (let [br, cus] of this._brMap)
|
|
|
|
|
{
|
|
|
|
|
//#region 绘制透明mesh
|
|
|
|
|
let geo = br.MeshGeometry;
|
|
|
|
|
let mesh = new Mesh(geo, ColorMaterial.GetConceptualMaterial(7, FrontSide, true));
|
|
|
|
|
mesh.matrixAutoUpdate = false;
|
|
|
|
|
mesh.matrix = br.OCSNoClone;
|
|
|
|
|
TempEditor.editorScene.add(mesh);
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
for (let cu of cus)
|
|
|
|
|
{
|
|
|
|
|
cu.ApplyMatrix(b.OCSNoClone);
|
|
|
|
|
cu.Move({ x: 0, y: 0, z: br.Thickness * 0.5 });
|
|
|
|
|
cu.ApplyMatrix(br.OCSNoClone);
|
|
|
|
|
app.Database.ModelSpace.Append(cu);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|