diff --git a/__test__/Winerack/winerack.test.ts b/__test__/Winerack/winerack.test.ts
index c837af544..083a3b1a4 100644
--- a/__test__/Winerack/winerack.test.ts
+++ b/__test__/Winerack/winerack.test.ts
@@ -1,5 +1,5 @@
import { Vector3 } from "three";
-import { DrawBlisWineRackTool } from "../../src/Add-on/DrawWineRack/DrawBlisWineRackTool";
+import { DrawObliqueWineRackTool } from "../../src/Add-on/DrawWineRack/DrawObliqueWineRackTool";
import { DrawUprightWineRackTool } from "../../src/Add-on/DrawWineRack/DrawUprightWineRackTool";
import { Board } from "../../src/DatabaseServices/Entity/Board";
import { Box3Ext } from "../../src/Geometry/Box";
@@ -7,10 +7,10 @@ import { ISpaceParse } from "../../src/Geometry/SpaceParse/ISpaceParse";
import { EFullDir, EFullType, EWineRackType, EWRackArrayType, IWineRackOption } from "../../src/UI/Store/WineRackInterface";
import { LoadEntityFromFileData } from "../Utils/LoadEntity.util";
const UprightTool = DrawUprightWineRackTool.GetInstance() as DrawUprightWineRackTool;
-const blisTool = DrawBlisWineRackTool.GetInstance() as DrawBlisWineRackTool;
+const ObliqueTool = DrawObliqueWineRackTool.GetInstance() as DrawObliqueWineRackTool;
const option: IWineRackOption = {
- type: EWineRackType.Bias,
+ type: EWineRackType.Oblique,
arrayType: EWRackArrayType.ByWidth,
fullType: EFullType.ByWidth,
isFull: false,
@@ -50,8 +50,8 @@ describe("酒格功能测试", () =>
spaceParse.SpaceBox = new Box3Ext(new Vector3(), new Vector3(1200, 600, 2000));
spaceParse.Parse();
UprightTool.Parse(spaceParse, option);
- blisTool.Parse(spaceParse, option);
+ ObliqueTool.Parse(spaceParse, option);
expect(UprightTool.boardlist.length).toMatchSnapshot();
- expect(blisTool.boardlist.length).toMatchSnapshot();
+ expect(ObliqueTool.boardlist.length).toMatchSnapshot();
})
})
diff --git a/src/Add-on/DrawWineRack/DrawBlisWineRackTool.ts b/src/Add-on/DrawWineRack/DrawObliqueWineRackTool.ts
similarity index 99%
rename from src/Add-on/DrawWineRack/DrawBlisWineRackTool.ts
rename to src/Add-on/DrawWineRack/DrawObliqueWineRackTool.ts
index c7e069f55..64d1289dc 100644
--- a/src/Add-on/DrawWineRack/DrawBlisWineRackTool.ts
+++ b/src/Add-on/DrawWineRack/DrawObliqueWineRackTool.ts
@@ -26,7 +26,11 @@ export interface IParsePlRes
basePt?: Vector3;
}
-export class DrawBlisWineRackTool extends DrawWineRackTool
+
+/**
+ * 斜酒格
+ */
+export class DrawObliqueWineRackTool extends DrawWineRackTool
{
Parse(space: ISpaceParse, config: IWineRackOption)
{
diff --git a/src/Add-on/DrawWineRack/DrawUprightWineRackTool.ts b/src/Add-on/DrawWineRack/DrawUprightWineRackTool.ts
index e4348f0c6..a90b03ce7 100644
--- a/src/Add-on/DrawWineRack/DrawUprightWineRackTool.ts
+++ b/src/Add-on/DrawWineRack/DrawUprightWineRackTool.ts
@@ -5,6 +5,10 @@ import { MoveMatrix, AsVector2 } from "../../Geometry/GeUtils";
import { ISpaceParse } from "../../Geometry/SpaceParse/ISpaceParse";
import { EWRackArrayType, IWineRackOption } from "../../UI/Store/WineRackInterface";
import { DrawWineRackTool } from "./DrawWinRackTool";
+
+/**
+ * 正酒格
+ */
export class DrawUprightWineRackTool extends DrawWineRackTool
{
Parse(space: ISpaceParse, config: IWineRackOption)
diff --git a/src/Add-on/DrawWineRack/DrawWineRack.ts b/src/Add-on/DrawWineRack/DrawWineRack.ts
index 1bbe93dc9..2124aa8af 100644
--- a/src/Add-on/DrawWineRack/DrawWineRack.ts
+++ b/src/Add-on/DrawWineRack/DrawWineRack.ts
@@ -1,6 +1,6 @@
import { Command } from "../../Editor/CommandMachine";
import { PointSelectSpaceClamp } from "../../Geometry/SpaceParse/PointSelectSpaceClamp";
-import { DrawBlisWineRackTool } from "./DrawBlisWineRackTool";
+import { DrawObliqueWineRackTool } from "./DrawObliqueWineRackTool";
import { DrawUprightWineRackTool } from "./DrawUprightWineRackTool";
import { app } from "../../ApplicationServices/Application";
import { userConfig } from "../../Editor/UserConfig";
@@ -34,7 +34,7 @@ export class DrawWineRack2 implements Command
if (!userConfig.winerackConfig)
await userConfigStore.InitWinerackConfig();
let space = selectSpace.SpaceParse;
- const tool = DrawBlisWineRackTool.GetInstance() as DrawBlisWineRackTool;
+ const tool = DrawObliqueWineRackTool.GetInstance() as DrawObliqueWineRackTool;
tool.Parse(space, userConfig.winerackConfig);
tool.boardlist.forEach(b => app.Database.ModelSpace.Append(b));
}
diff --git a/src/DatabaseServices/Template/TemplateWineRackRecord.ts b/src/DatabaseServices/Template/TemplateWineRackRecord.ts
index 0aab3ca93..ee7f13702 100644
--- a/src/DatabaseServices/Template/TemplateWineRackRecord.ts
+++ b/src/DatabaseServices/Template/TemplateWineRackRecord.ts
@@ -1,5 +1,5 @@
import { Vector3 } from "three";
-import { DrawBlisWineRackTool } from "../../Add-on/DrawWineRack/DrawBlisWineRackTool";
+import { DrawObliqueWineRackTool } from "../../Add-on/DrawWineRack/DrawObliqueWineRackTool";
import { app } from "../../ApplicationServices/Application";
import { Box3Ext } from "../../Geometry/Box";
import { ISpaceParse } from "../../Geometry/SpaceParse/ISpaceParse";
@@ -23,7 +23,7 @@ export class TemplateWineRackRecord extends TemplateRecord
{
super.InitBaseParams();
this.option = {
- type: EWineRackType.Bias,
+ type: EWineRackType.Oblique,
arrayType: EWRackArrayType.ByWidth,
fullType: EFullType.ByWidth,
isFull: false,
@@ -58,7 +58,7 @@ export class TemplateWineRackRecord extends TemplateRecord
{
await super.Update();
- let wineRack = DrawBlisWineRackTool.GetInstance() as DrawBlisWineRackTool;
+ let wineRack = DrawObliqueWineRackTool.GetInstance() as DrawObliqueWineRackTool;
let brs: Board[] = [];
if (this.Positioning && this.Positioning instanceof PositioningClampSpace)
diff --git a/src/Editor/SnapServices.ts b/src/Editor/SnapServices.ts
index f7edb92e4..3437973f9 100644
--- a/src/Editor/SnapServices.ts
+++ b/src/Editor/SnapServices.ts
@@ -90,8 +90,8 @@ export class SnapServices
this.InitDynPrompt();
this.InitCrossCursor();
this.InitSquareCursor();
- this.InitBiasCrossCursor();
- this.InitBiasOutline();
+ this.InitObliqueCrossCursor();
+ this.InitObliqueOutline();
this.InitSupportExtLine();
if (prompt.BasePoint)
@@ -167,8 +167,8 @@ export class SnapServices
{
this.UpdateSquareCursor();
this.UpdateCrossCursor();
- this.UpdateBiasCrossCursor();
- this.UpdateBiasOutline();
+ this.UpdateObliqueCrossCursor();
+ this.UpdateObliqueOutline();
this.UpdateDynPrompt();
this.UpdateSupportExtLine();
@@ -788,7 +788,7 @@ export class SnapServices
pts = PointShapeUtils.PerPts(this.SnapSize);
break;
case ObjectSnapMode.Int:
- pts = PointShapeUtils.BiasCrossLinePts(this.SnapSize);
+ pts = PointShapeUtils.ObliqueCrossLinePts(this.SnapSize);
break;
default:
break;
@@ -801,34 +801,34 @@ export class SnapServices
}
}
- private m_BiasCrossCursor: Line;
+ private m_ObliqueCrossCursor: Line;
//×光标,用于捕捉轴线
- private InitBiasCrossCursor()
+ private InitObliqueCrossCursor()
{
- if (!this.m_BiasCrossCursor)
+ if (!this.m_ObliqueCrossCursor)
{
- this.m_BiasCrossCursor = app.Viewer.PreViewer.Draw(
- DrawMode.BaisCross,
+ this.m_ObliqueCrossCursor = app.Viewer.PreViewer.Draw(
+ DrawMode.ObliqueCross,
8,
new Vector3(),
ColorMaterial.GetLineMaterial(7)
);
}
}
- private UpdateBiasCrossCursor()
+ private UpdateObliqueCrossCursor()
{
this.UpdateObjectPosition(
- this.m_BiasCrossCursor,
+ this.m_ObliqueCrossCursor,
this.m_SupportExtLinePts.length > 0
);
}
- private m_BiasOutline: Line;
+ private m_ObliqueOutline: Line;
//初始化X光标外包围框(虚线),用户显示光标交叉
- private InitBiasOutline()
+ private InitObliqueOutline()
{
- if (!this.m_BiasOutline)
- this.m_BiasOutline = app.Viewer.PreViewer.Draw(
+ if (!this.m_ObliqueOutline)
+ this.m_ObliqueOutline = app.Viewer.PreViewer.Draw(
DrawMode.Square,
this.SnapSize,
new Vector3(),
@@ -836,10 +836,10 @@ export class SnapServices
);
}
- private UpdateBiasOutline()
+ private UpdateObliqueOutline()
{
this.UpdateObjectPosition(
- this.m_BiasOutline,
+ this.m_ObliqueOutline,
this.m_SupportExtLinePts.length > 2
);
}
diff --git a/src/Geometry/PointShapeUtils.ts b/src/Geometry/PointShapeUtils.ts
index e6ea7d0f2..c5c7323cc 100644
--- a/src/Geometry/PointShapeUtils.ts
+++ b/src/Geometry/PointShapeUtils.ts
@@ -74,11 +74,11 @@ export class PointShapeUtils
return pts;
}
- static BiasCrossPts(size)
+ static ObliqueCrossPts(size: number)
{
return [new Vector3(-size, size), new Vector3(size, -size), new Vector3(-size, -size), new Vector3(size, size)];
}
- static BiasCrossLinePts(size)
+ static ObliqueCrossLinePts(size: number)
{
return [new Vector3(-size, size), new Vector3(size, -size), new Vector3(), new Vector3(-size, -size), new Vector3(size, size)];
}
diff --git a/src/GraphicsSystem/PreViewer.ts b/src/GraphicsSystem/PreViewer.ts
index b9dfbdfea..93bea2a61 100644
--- a/src/GraphicsSystem/PreViewer.ts
+++ b/src/GraphicsSystem/PreViewer.ts
@@ -10,7 +10,7 @@ export enum DrawMode
{
Square = 0,
Cross = 1,
- BaisCross = 2,
+ ObliqueCross = 2,
}
@@ -160,8 +160,8 @@ export class PreViewer
PF = PointShapeUtils.CrossLinePts;
DrawType = LineSegments;
break;
- case DrawMode.BaisCross:
- PF = PointShapeUtils.BiasCrossPts;
+ case DrawMode.ObliqueCross:
+ PF = PointShapeUtils.ObliqueCrossPts;
DrawType = LineSegments;
break;
default:
diff --git a/src/UI/Components/Board/WineRack.tsx b/src/UI/Components/Board/WineRack.tsx
index d11673519..2d62cfb75 100644
--- a/src/UI/Components/Board/WineRack.tsx
+++ b/src/UI/Components/Board/WineRack.tsx
@@ -239,7 +239,7 @@ export class WineRackModal extends React.Component<{ store?: WineRackStore }, {}
store.m_Option.type = parseInt(e.currentTarget.value);
}}
>
-