bug修复,代码清理

pull/68/head
Zoe 6 years ago
parent 7457f5a732
commit 45a60be7ff

@ -123,6 +123,11 @@ export class Command_TestOffset implements Command
} }
} }
lastpls = cu.GetOffsetCurves(p.distanceTo(cu.GetClosestPointTo(p, !cu.IsClose)) * dir); lastpls = cu.GetOffsetCurves(p.distanceTo(cu.GetClosestPointTo(p, !cu.IsClose)) * dir);
// let a = cu.GetOffsetCurves(p.distanceTo(cu.GetClosestPointTo(p, !cu.IsClose)) * -dir);
// a.forEach(c => c.ColorIndex = 2);
// lastpls.push(...a);
lastpls.forEach((offCur) => lastpls.forEach((offCur) =>
{ {
app.m_Database.ModelSpace.Append(offCur); app.m_Database.ModelSpace.Append(offCur);

@ -9,7 +9,7 @@ import { FixIndex } from '../Common/Utils';
import { equal, equaln, rotatePoint, updateGeometry } from '../Geometry/GeUtils'; import { equal, equaln, rotatePoint, updateGeometry } from '../Geometry/GeUtils';
import { RenderType } from '../GraphicsSystem/Enum'; import { RenderType } from '../GraphicsSystem/Enum';
import { IntersectOption, IntersectPolylineAndCurve } from '../GraphicsSystem/IntersectWith'; import { IntersectOption, IntersectPolylineAndCurve } from '../GraphicsSystem/IntersectWith';
import { PolyOffestUtil3 } from '../GraphicsSystem/OffestPolyline'; import { PolyOffestUtil } from '../GraphicsSystem/OffestPolyline';
import { Arc } from './Arc'; import { Arc } from './Arc';
import { Factory } from './CADFactory'; import { Factory } from './CADFactory';
import { CADFile } from './CADFile'; import { CADFile } from './CADFile';
@ -746,7 +746,7 @@ export class Polyline extends Curve
//偏移 //偏移
GetOffsetCurves(offsetDist: number): Array<Curve> GetOffsetCurves(offsetDist: number): Array<Curve>
{ {
let polyOffestUtil = new PolyOffestUtil3(this, offsetDist); let polyOffestUtil = new PolyOffestUtil(this, offsetDist);
return polyOffestUtil.GetOffsetCurves(); return polyOffestUtil.GetOffsetCurves();
} }
/** /**

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save