|
|
|
@ -12,7 +12,6 @@ import { equal, equaln } from "../Geometry/GeUtils";
|
|
|
|
|
import { EBox, SortEntityByBox } from "../Geometry/SortEntityByBox";
|
|
|
|
|
import { IsPtsAllOutOrOnReg } from "./BoolOperateUtils";
|
|
|
|
|
import { IntersectOption } from "./IntersectWith";
|
|
|
|
|
import { testContours, testCurve } from "../Add-on/testEntity/TestCurve";
|
|
|
|
|
|
|
|
|
|
interface offestRes
|
|
|
|
|
{
|
|
|
|
@ -42,21 +41,16 @@ export class PolyOffestUtil
|
|
|
|
|
let expCus = this.m_Polyline.Explode();
|
|
|
|
|
let offres = this.OffestCurve(expCus, this.m_OffestDist);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// console.time("join")
|
|
|
|
|
this.TrimAndBuildContour(offres);
|
|
|
|
|
|
|
|
|
|
for (let i = 0, count = this.m_Polyline.EndParam; i <= count; i++)
|
|
|
|
|
{
|
|
|
|
|
if (i === count && this.m_Polyline.IsClose)
|
|
|
|
|
{
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
let center = Vec2DTo3D(this.m_Polyline.GetPoint2dAt(i)).applyMatrix4(this.m_Polyline.OCS);
|
|
|
|
|
let cir = new Circle(center, this.m_AbsDist);
|
|
|
|
|
let cir = new Circle(this.m_Polyline.GetPointAtParam(i), this.m_AbsDist);
|
|
|
|
|
this.m_Contours.push(Contour.CreateContour([cir]));
|
|
|
|
|
}
|
|
|
|
|
// testContours(this.m_Contours);
|
|
|
|
|
// console.timeEnd("join")
|
|
|
|
|
//裁剪
|
|
|
|
|
let { boxCurves, outputCus } = this.trimByContours(this.m_RetCurves);
|
|
|
|
|