|
|
|
@ -10,7 +10,6 @@ import { Command } from '../../Editor/CommandMachine';
|
|
|
|
|
import { JigUtils } from '../../Editor/JigUtils';
|
|
|
|
|
import { PromptStatus } from '../../Editor/PromptResult';
|
|
|
|
|
import { ContinueDrawDimension } from './Command_DimContinue';
|
|
|
|
|
import { equaln } from '../../Geometry/GeUtils';
|
|
|
|
|
|
|
|
|
|
export enum DimensionType
|
|
|
|
|
{
|
|
|
|
@ -31,7 +30,7 @@ export class DrawAlignedDimension implements Command
|
|
|
|
|
await this.PickUpDim();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
private async SelectPointDim(footPt1: Vector3)
|
|
|
|
|
protected async SelectPointDim(footPt1: Vector3)
|
|
|
|
|
{
|
|
|
|
|
let ptRes = await app.Editor.GetPoint({
|
|
|
|
|
Msg: "请输入第二条尺寸线原点:",
|
|
|
|
@ -39,7 +38,7 @@ export class DrawAlignedDimension implements Command
|
|
|
|
|
AllowDrawRubberBand: true,
|
|
|
|
|
});
|
|
|
|
|
let footPt2 = ptRes.Point;
|
|
|
|
|
if (ptRes.Status != PromptStatus.OK)
|
|
|
|
|
if (ptRes.Status !== PromptStatus.OK)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
await this.BuildDim(footPt1, footPt2);
|
|
|
|
@ -77,7 +76,7 @@ export class DrawAlignedDimension implements Command
|
|
|
|
|
footPt2 = en.EndPoint;
|
|
|
|
|
await this.BuildDim(footPt1, footPt2);
|
|
|
|
|
}
|
|
|
|
|
private async BuildDim(footPt1: Vector3, footPt2: Vector3)
|
|
|
|
|
protected async BuildDim(footPt1: Vector3, footPt2: Vector3)
|
|
|
|
|
{
|
|
|
|
|
let alDim: AlignedDimension | LinearDimension;
|
|
|
|
|
if (this.DimType === DimensionType.Align)
|
|
|
|
|