|
|
@ -908,11 +908,11 @@ export class Polyline extends Curve
|
|
|
|
let d2 = this.m_LineData[FixIndex(i + 1, this.m_LineData)];
|
|
|
|
let d2 = this.m_LineData[FixIndex(i + 1, this.m_LineData)];
|
|
|
|
if (d1.bul == 0)
|
|
|
|
if (d1.bul == 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return new Line(Vec2DTo3D(d1.pt), Vec2DTo3D(d2.pt));
|
|
|
|
return new Line(Vec2DTo3D(d1.pt), Vec2DTo3D(d2.pt)).ApplyMatrix(this.OCS);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return new Arc().ParseFromBul(d1.pt, d2.pt, d1.bul);
|
|
|
|
return new Arc().ParseFromBul(d1.pt, d2.pt, d1.bul).ApplyMatrix(this.OCS);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 组合多段线数组组合为一多段线
|
|
|
|
// 组合多段线数组组合为一多段线
|
|
|
@ -1364,17 +1364,7 @@ export class Polyline extends Curve
|
|
|
|
geo.setFromPoints(curve.getPoints(50));
|
|
|
|
geo.setFromPoints(curve.getPoints(50));
|
|
|
|
updateGeometry(plObj, geo);
|
|
|
|
updateGeometry(plObj, geo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ApplyMatrix(m: THREE.Matrix4)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
let pt: Vector3;
|
|
|
|
|
|
|
|
this.m_LineData.forEach(data =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
pt = Vec2DTo3D(data.pt)
|
|
|
|
|
|
|
|
pt.applyMatrix4(m);
|
|
|
|
|
|
|
|
data.pt = new Vector2(pt.x, pt.y);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
this.Update();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
GetSnapPoints(): Array<THREE.Vector3>
|
|
|
|
GetSnapPoints(): Array<THREE.Vector3>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
let plList: Vector3[] = [];
|
|
|
|
let plList: Vector3[] = [];
|
|
|
@ -1389,6 +1379,7 @@ export class Polyline extends Curve
|
|
|
|
}
|
|
|
|
}
|
|
|
|
MoveSnapPoints(index: number, moveVec: Vector3)
|
|
|
|
MoveSnapPoints(index: number, moveVec: Vector3)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
this.WriteAllObjectRecord();
|
|
|
|
if (index % 2 === 0)
|
|
|
|
if (index % 2 === 0)
|
|
|
|
this.MoveStretchPoints([index], moveVec);
|
|
|
|
this.MoveStretchPoints([index], moveVec);
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -1412,10 +1403,11 @@ export class Polyline extends Curve
|
|
|
|
}
|
|
|
|
}
|
|
|
|
GetStretchPoints(): Array<Vector3>
|
|
|
|
GetStretchPoints(): Array<Vector3>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
let ocs = this.OCS;
|
|
|
|
let plList: Vector3[] = [];
|
|
|
|
let plList: Vector3[] = [];
|
|
|
|
for (let data of this.m_LineData)
|
|
|
|
for (let data of this.m_LineData)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
plList.push(Vec2DTo3D(data.pt));
|
|
|
|
plList.push(Vec2DTo3D(data.pt).applyMatrix4(ocs));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return plList;
|
|
|
|
return plList;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1430,6 +1422,7 @@ export class Polyline extends Curve
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
MoveStretchPoints(indexList: Array<number>, vec: Vector3)
|
|
|
|
MoveStretchPoints(indexList: Array<number>, vec: Vector3)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
this.WriteAllObjectRecord();
|
|
|
|
let moveVc = new Vector2(vec.x, vec.y);
|
|
|
|
let moveVc = new Vector2(vec.x, vec.y);
|
|
|
|
|
|
|
|
|
|
|
|
let ptCout = this.m_LineData.length;
|
|
|
|
let ptCout = this.m_LineData.length;
|
|
|
|