diff --git a/src/GraphicsSystem/LinkSelft.ts b/src/GraphicsSystem/LinkSelft.ts index b7ebe9f85..538afcb89 100644 --- a/src/GraphicsSystem/LinkSelft.ts +++ b/src/GraphicsSystem/LinkSelft.ts @@ -67,7 +67,6 @@ export class LinkSelf //计算闭合的区域 private CalCloseCurve(breakCus: Curve[], cuMap: CurveMap) { - let breakCount = breakCus.length; let selfRoutes: Set[] = []; @@ -137,6 +136,7 @@ export class LinkSelf } linkCurve(originCu: Curve, cuMap: CurveMap, cs: Curve[], isInv: boolean = false) { + //FIXME:两线共线时连接有问题 let cuIndex = this.GetCurveIndex(originCu); while (true) { diff --git a/src/GraphicsSystem/OffestPolyline.ts b/src/GraphicsSystem/OffestPolyline.ts index 9e978dd79..9759f6fff 100644 --- a/src/GraphicsSystem/OffestPolyline.ts +++ b/src/GraphicsSystem/OffestPolyline.ts @@ -58,13 +58,23 @@ export class PolyOffestUtil // c.Outline.ColorIndex = 2; // app.m_Database.ModelSpace.Append(c.Outline); // }) - + // console.time("trim"); let newPls = this.trimAndJointOffestPolyline(offres1, this.m_Polyline); + // console.timeEnd("trim"); + + // console.time("con"); let cus = this.trimByContours(newPls, contours); + // console.timeEnd("con"); + + // return cus; + // console.time("link"); let rets = this.linkSelfingCurves2(cus); + // console.timeEnd('link'); if (!this.IsKeepAllCurves) { + // console.time("op"); rets = this.optimizeCus(rets); + // console.timeEnd("op"); } return rets; } @@ -585,9 +595,8 @@ export class PolyOffestUtil { retPls.push(noSealCus[0]); } - retPls.push(firstLine); + firstLine && retPls.push(firstLine); retPls.push(...sealCus); - return retPls; } closePolyline(pl: Polyline)