|
|
|
@ -9,6 +9,7 @@ import { Box3Ext } from '../../Geometry/Box';
|
|
|
|
|
import { BufferGeometryUtils } from '../../Geometry/BufferGeometryUtils';
|
|
|
|
|
import { AsVector2, equaln, equalv3, isParallelTo, MoveMatrix, updateGeometry } from '../../Geometry/GeUtils';
|
|
|
|
|
import { PlaneExt } from '../../Geometry/Plane';
|
|
|
|
|
import { ROTATE_MTX2 } from '../../Geometry/RotateUV';
|
|
|
|
|
import { IntersectEllipseAndLine, IntersectLineAndArc, IntersectLineAndCircle, IntersectLineAndLine, IntersectOption, IntersectPolylineAndCurve, IntersectResult, reverseIntersectOption } from '../../GraphicsSystem/IntersectWith';
|
|
|
|
|
import { RenderType } from '../../GraphicsSystem/RenderType';
|
|
|
|
|
import { Factory } from '../CADFactory';
|
|
|
|
@ -403,13 +404,12 @@ export class Line extends Curve
|
|
|
|
|
|
|
|
|
|
GetOffsetCurves(offsetDist: number): Array<Curve>
|
|
|
|
|
{
|
|
|
|
|
let derv = this.GetFistDeriv(0).normalize().multiplyScalar(offsetDist);
|
|
|
|
|
derv.applyMatrix4(new Matrix4().makeRotationAxis(this.Normal, -Math.PI / 2));
|
|
|
|
|
let offset = this._EndPoint.clone().sub(this._StartPoint).normalize().multiplyScalar(offsetDist);
|
|
|
|
|
ROTATE_MTX2.applyVector(offset);
|
|
|
|
|
let newLine = this.Clone() as Line;
|
|
|
|
|
newLine.SetStartEndPoint(
|
|
|
|
|
this.StartPoint.add(derv),
|
|
|
|
|
this.EndPoint.add(derv)
|
|
|
|
|
);
|
|
|
|
|
newLine.ClearDraw();
|
|
|
|
|
newLine._StartPoint.add(offset);
|
|
|
|
|
newLine._EndPoint.add(offset);
|
|
|
|
|
return [newLine];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|