开发:修复拼写错误

pull/2367/MERGE
ChenX 1 year ago
parent be277b9b6d
commit c573747a9e

@ -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 } };

@ -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;

@ -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;//更新标记

@ -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();
}

@ -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);

@ -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",

Loading…
Cancel
Save