|
|
|
@ -258,7 +258,17 @@ export class Polyline extends Curve
|
|
|
|
|
{
|
|
|
|
|
return this._LineData[index].bul;
|
|
|
|
|
}
|
|
|
|
|
Create2Pt(p1: Vector3, p2: Vector3)
|
|
|
|
|
Rectangle(length: number, height: number): this
|
|
|
|
|
{
|
|
|
|
|
this.LineData = [
|
|
|
|
|
{ pt: new Vector2(), bul: 0 },
|
|
|
|
|
{ pt: new Vector2(length), bul: 0 },
|
|
|
|
|
{ pt: new Vector2(length, height), bul: 0 },
|
|
|
|
|
{ pt: new Vector2(0, height), bul: 0 }];
|
|
|
|
|
this.CloseMark = true;
|
|
|
|
|
return this;
|
|
|
|
|
}
|
|
|
|
|
RectangleFrom2Pt(p1: Vector3, p2: Vector3): this
|
|
|
|
|
{
|
|
|
|
|
let box = new Box3();
|
|
|
|
|
box.setFromPoints([p2, p1].map((p: Vector3) => p.clone().applyMatrix4(this.OCSInv)));
|
|
|
|
@ -1436,3 +1446,5 @@ export class Polyline extends Curve
|
|
|
|
|
file.Write(this._ClosedMark);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const TempPolyline = new Polyline();
|
|
|
|
|