|
|
|
@ -565,8 +565,6 @@ export class FilletUtils
|
|
|
|
|
if (isParallelTo(vec, l1Derv))
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
let planeNormal = vec.cross(l1Derv).normalize();
|
|
|
|
|
|
|
|
|
|
let par1 = l2.GetClosestAtPoint(l1.StartPoint, true).param;
|
|
|
|
|
let par2 = l2.GetClosestAtPoint(l1.EndPoint, true).param;
|
|
|
|
|
if (!isIntersect2(0, 1, par1, par2))
|
|
|
|
@ -609,8 +607,12 @@ export class FilletUtils
|
|
|
|
|
//平面矩阵
|
|
|
|
|
let xVec = new Vector3();
|
|
|
|
|
let yVec = new Vector3();
|
|
|
|
|
Orbit.ComputUpDirection(planeNormal, yVec, xVec);
|
|
|
|
|
let mtx = new Matrix4().makeBasis(xVec, yVec, planeNormal.negate());
|
|
|
|
|
let zVec = vec.cross(l1Derv).normalize();
|
|
|
|
|
let l1Normal = l1.Normal;
|
|
|
|
|
if (isParallelTo(zVec, l1Normal)) zVec = l1Normal;
|
|
|
|
|
|
|
|
|
|
Orbit.ComputUpDirection(zVec, yVec, xVec);
|
|
|
|
|
let mtx = new Matrix4().makeBasis(xVec, yVec, zVec);
|
|
|
|
|
let mtxInv = new Matrix4().getInverse(mtx);
|
|
|
|
|
//变换
|
|
|
|
|
sv.applyMatrix4(mtxInv);
|
|
|
|
|