diff --git a/src/Common/CurveUtils.ts b/src/Common/CurveUtils.ts index d9651bf1e..6a4ffc9ac 100644 --- a/src/Common/CurveUtils.ts +++ b/src/Common/CurveUtils.ts @@ -177,7 +177,7 @@ export function curveLinkGroup(cus: Curve[]): Array> return groupCus; } -export function equalCurveAndCurve(cu1: Curve, cu2: Curve) +export function equalCurve(cu1: Curve, cu2: Curve) { if ((cu1 instanceof Polyline) && (cu2 instanceof Polyline)) { diff --git a/src/DatabaseServices/Contour.ts b/src/DatabaseServices/Contour.ts index 605e58843..bcd642153 100644 --- a/src/DatabaseServices/Contour.ts +++ b/src/DatabaseServices/Contour.ts @@ -1,6 +1,6 @@ import * as THREE from "three"; import { Vector3 } from "three"; -import { curveLinkGroup, equalCurveAndCurve, Vec3DTo2D } from "../Common/CurveUtils"; +import { curveLinkGroup, equalCurve, Vec3DTo2D } from "../Common/CurveUtils"; import { FixIndex } from "../Common/Utils"; import { equaln, rotatePoint } from "../Geometry/GeUtils"; import { RegionParse, Route } from "../Geometry/RegionParse"; @@ -134,7 +134,7 @@ export class Contour for (let r of routes) cs.push(r.curve); let c = Contour.Combine(cs, false); - if (!equalCurveAndCurve(c, this.Curve) && !equalCurveAndCurve(c, target.Curve)) + if (!equalCurve(c, this.Curve) && !equalCurve(c, target.Curve)) cuGroups.push(cs); } } @@ -194,7 +194,7 @@ export class Contour { //在目标分离曲线数组从若有相等的曲线,且相等的线段不连接2区域,则直接加入合并和相交集合中 //在目标数组中就直接跳过不在添加,在2轮廓有共线部分时需此判断 - hasEqualCus = targetCus.some(l => equalCurveAndCurve(pl, l)); + hasEqualCus = targetCus.some(l => equalCurve(pl, l)); if (hasEqualCus) { //获得共有线段中点2侧的点,判断是否有存在2区域外的点 @@ -222,7 +222,7 @@ export class Contour for (let pl of targetCus) { - let hasEqualCus = sourceCus.some(l => equalCurveAndCurve(pl, l)); + let hasEqualCus = sourceCus.some(l => equalCurve(pl, l)); if (hasEqualCus && disLink) { continue; @@ -280,7 +280,7 @@ export class Contour //有一样的曲线直接跳过 hasEqualCus = targetCus.some(l => { - if (equalCurveAndCurve(pl, l)) + if (equalCurve(pl, l)) { equalCus.add(l); return true; @@ -375,6 +375,6 @@ export class Contour } Equal(tar: Contour) { - return equalCurveAndCurve(this.m_Curve, tar.m_Curve); + return equalCurve(this.m_Curve, tar.m_Curve); } }