|
|
|
@ -9,6 +9,7 @@ import { Board } from "../../DatabaseServices/Entity/Board";
|
|
|
|
|
import { BoardOpenDir, ComposingType, LinesType } from "../../DatabaseServices/Entity/BoardInterface";
|
|
|
|
|
import { Line } from "../../DatabaseServices/Entity/Line";
|
|
|
|
|
import { Polyline } from "../../DatabaseServices/Entity/Polyline";
|
|
|
|
|
import { GroupRecord } from "../../DatabaseServices/GroupTableRecord";
|
|
|
|
|
import { ObjectId } from "../../DatabaseServices/ObjectId";
|
|
|
|
|
import { ProcessingGroupRecord } from "../../DatabaseServices/ProcessingGroup/ProcessingGroupRecord";
|
|
|
|
|
import { TemplateLatticeRecord } from "../../DatabaseServices/Template/ProgramTempate/TemplateLatticeRecord";
|
|
|
|
@ -26,7 +27,6 @@ import { FaceDirection } from "../DrawDrilling/DrillType";
|
|
|
|
|
import { BoardInfoDimModal } from "./BoardInfoDimPanel";
|
|
|
|
|
import { BoardInfoDimLists, boardInfoDimStore } from "./BoardInfoDimStore";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export class Command_BoardInfoDimTool implements Command
|
|
|
|
|
{
|
|
|
|
|
async exec()
|
|
|
|
@ -41,7 +41,7 @@ export class Command_BoardInfoDimTool implements Command
|
|
|
|
|
|
|
|
|
|
let board = enRes.Entity as Board;
|
|
|
|
|
let jpgEnt: Text[] = [];
|
|
|
|
|
let textEnts = [];
|
|
|
|
|
let textEnts: Text[] = [];
|
|
|
|
|
let backUCS = app.Editor.UCSMatrix.setPosition(0, 0, 0);
|
|
|
|
|
|
|
|
|
|
const DrawText = (textString: string) =>
|
|
|
|
@ -264,6 +264,7 @@ export class Command_BoardInfoDimTool implements Command
|
|
|
|
|
let ptRes = await app.Editor.GetPoint({
|
|
|
|
|
Msg: "请选择文字的位置",
|
|
|
|
|
KeyWordList: [{ msg: "设置文字大小输入:", key: "H" }],
|
|
|
|
|
BasePoint: ptRes2.Point,
|
|
|
|
|
Callback: (p: Vector3) =>
|
|
|
|
|
{
|
|
|
|
|
line2.EndPoint = p;
|
|
|
|
@ -331,12 +332,25 @@ export class Command_BoardInfoDimTool implements Command
|
|
|
|
|
}
|
|
|
|
|
else if (ptRes.Status === PromptStatus.OK)
|
|
|
|
|
{
|
|
|
|
|
let group = new GroupRecord();
|
|
|
|
|
app.Database.GroupTable.Append(group);
|
|
|
|
|
|
|
|
|
|
for (let t of textEnts)
|
|
|
|
|
{
|
|
|
|
|
app.Database.ModelSpace.Append(t);
|
|
|
|
|
group.Entitys.push(t.Id);
|
|
|
|
|
t.GroupId = group.Id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
app.Database.ModelSpace.Append(line1);
|
|
|
|
|
app.Database.ModelSpace.Append(line2);
|
|
|
|
|
app.Database.ModelSpace.Append(boxPolyline);
|
|
|
|
|
|
|
|
|
|
line1.GroupId = group.Id;
|
|
|
|
|
line2.GroupId = group.Id;
|
|
|
|
|
boxPolyline.GroupId = group.Id;
|
|
|
|
|
|
|
|
|
|
group.Entitys.push(line1.Id, line2.Id, boxPolyline.Id);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|