diff --git a/__test__/Geometry/ellipse.test.ts b/__test__/Geometry/ellipse.test.ts index 33cf03120..532ceb650 100644 --- a/__test__/Geometry/ellipse.test.ts +++ b/__test__/Geometry/ellipse.test.ts @@ -58,7 +58,7 @@ describe('完整椭圆', () => { expect(el.GetParamAtDist(el.Length * 0.5)).toBeCloseTo(0.5); }); - test("GetFistDeriv", () => + test("GetFirstDeriv", () => { expect(equalv3(el.GetFirstDeriv(0), new Vector3(0, 1))).toBeTruthy(); expect(equalv3(el.GetFirstDeriv(0.5), new Vector3(0, -1))).toBeTruthy(); @@ -238,7 +238,7 @@ describe("非完整椭圆", () => expect(el2.GetDistAtParam(0.5)).toMatchSnapshot(); expect(el2.GetDistAtParam(0.8)).toMatchSnapshot(); }); - test("GetFistDeriv", () => + test("GetFirstDeriv", () => { let p = new Vector3(3245.070906808509, -20.406490193093504); let data = { "file": [1, "Ellipse", 3, 2, 131, false, 1, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 2910.330625096328, 62.245373351688414, 0, 1], 1, 418.15520838547974, 225.54490978414745, -0.69713252541264, 3.934994981148553, 1.3332220725861395], "basePt": { "x": 3893.631897322025, "y": -235.90267753572692, "z": 0 } }; diff --git a/src/Add-on/polytest.ts b/src/Add-on/polytest.ts index f1dd925c8..f7bea86fa 100644 --- a/src/Add-on/polytest.ts +++ b/src/Add-on/polytest.ts @@ -175,7 +175,7 @@ export class Command_PLTest implements Command // c++; // cir.ColorIndex = c % 7 + 1; // app.m_Database.ModelSpace.Append(cir); - // let d = pl.GetFistDeriv(p); + // let d = pl.GetFirstDeriv(p); // let line = new Line(pt, pt.clone().add(d)); // line.ColorIndex = c % 7 + 1; diff --git a/src/DatabaseServices/Dimension/2LineAngularDimension.ts b/src/DatabaseServices/Dimension/2LineAngularDimension.ts index f3c2fa5e9..9ff201338 100644 --- a/src/DatabaseServices/Dimension/2LineAngularDimension.ts +++ b/src/DatabaseServices/Dimension/2LineAngularDimension.ts @@ -1,11 +1,11 @@ -import { BufferGeometry, Line as TLine, Material, MathUtils, Matrix3, Matrix4, Mesh, Object3D, Vector3 } from "three"; +import { BufferGeometry, Material, MathUtils, Matrix3, Matrix4, Mesh, Object3D, Line as TLine, Vector3 } from "three"; import { Line2 } from "three/examples/jsm/lines/Line2"; import { HostApplicationServices } from "../../ApplicationServices/HostApplicationServices"; import { AddEntityDrawObject } from "../../Common/AddEntityDrawObject"; import { arrayRemoveDuplicateBySort, arraySortByNumber } from "../../Common/ArrayExt"; import { ColorMaterial } from "../../Common/ColorPalette"; import { reviseMirrorMatrix } from "../../Common/Matrix4Utils"; -import { FixedNotZero, FixIndex } from "../../Common/Utils"; +import { FixIndex, FixedNotZero } from "../../Common/Utils"; import { ObjectSnapMode } from "../../Editor/ObjectSnapMode"; import { BufferGeometryUtils } from "../../Geometry/BufferGeometryUtils"; import { angle, equaln, equalv3, polar } from "../../Geometry/GeUtils"; @@ -317,11 +317,11 @@ export class LineAngularDimension extends Dimension AddEntityDrawObject(obj, this._Arc, renderType); arrow1.position.copy(this._Arc.StartPoint); - arrow1.rotation.z = this._Arc.GetFistDerivAngle(0) + Math.PI / 2; + arrow1.rotation.z = this._Arc.GetFirstDerivAngle(0) + Math.PI / 2; arrow1.updateMatrix(); arrow2.position.copy(this._Arc.EndPoint); - arrow2.rotation.z = this._Arc.GetFistDerivAngle(1) - Math.PI / 2; + arrow2.rotation.z = this._Arc.GetFirstDerivAngle(1) - Math.PI / 2; arrow2.updateMatrix(); this._Text.AutoUpdate = false;//更新标记 diff --git a/src/DatabaseServices/Dimension/ArcDimension.ts b/src/DatabaseServices/Dimension/ArcDimension.ts index 2fb518e12..c14f4a850 100644 --- a/src/DatabaseServices/Dimension/ArcDimension.ts +++ b/src/DatabaseServices/Dimension/ArcDimension.ts @@ -175,11 +175,11 @@ export class ArcDimension extends Dimension //更新箭头的位置和旋转角度 arrow1.position.copy(this._Arc.StartPoint); - arrow1.rotation.z = this._Arc.GetFistDerivAngle(0) + Math.PI / 2; + arrow1.rotation.z = this._Arc.GetFirstDerivAngle(0) + Math.PI / 2; arrow1.updateMatrix(); arrow2.position.copy(this._Arc.EndPoint); - arrow2.rotation.z = this._Arc.GetFistDerivAngle(1) - Math.PI / 2; + arrow2.rotation.z = this._Arc.GetFirstDerivAngle(1) - Math.PI / 2; arrow2.updateMatrix(); } diff --git a/src/DatabaseServices/Entity/Curve.ts b/src/DatabaseServices/Entity/Curve.ts index 56897f701..af7d70177 100644 --- a/src/DatabaseServices/Entity/Curve.ts +++ b/src/DatabaseServices/Entity/Curve.ts @@ -95,7 +95,7 @@ export abstract class Curve extends Entity * @param {(number | Vector3)} param */ GetFirstDeriv(param: number | Vector3): Vector3 { return; } - GetFistDerivAngle(param: number | Vector3): number + GetFirstDerivAngle(param: number | Vector3): number { let d = this.GetFirstDeriv(param); return Math.atan2(d.y, d.x); diff --git a/src/DatabaseServices/Room/Entity/Wall/RoomWallBase.ts b/src/DatabaseServices/Room/Entity/Wall/RoomWallBase.ts index aa86ff0b6..02afb46dc 100644 --- a/src/DatabaseServices/Room/Entity/Wall/RoomWallBase.ts +++ b/src/DatabaseServices/Room/Entity/Wall/RoomWallBase.ts @@ -1,4 +1,4 @@ -import { Line as TLine, Mesh, MeshStandardMaterial, Object3D } from "three"; +import { Mesh, MeshStandardMaterial, Object3D, Line as TLine } from "three"; import { HostApplicationServices } from "../../../../ApplicationServices/HostApplicationServices"; import { ColorMaterial } from "../../../../Common/ColorPalette"; import { equaln } from "../../../../Geometry/GeUtils"; @@ -202,8 +202,8 @@ export const CURVE_MESH_NAMES = [ "GetParamAtPoint2", "GetParamAtDist", "GetClosestAtPoint", - "GetFistDeriv", - "GetFistDerivAngle", + "GetFirstDeriv", + "GetFirstDerivAngle", "GetSplitCurves", "GetCurveAtParamRange", "GetSplitCurvesByPts",