|
|
|
@ -1,10 +1,10 @@
|
|
|
|
|
import { BoardGetFace, GetSideFaceMtx, BoardFaceType, MatrixIsCoplane2 } from "../../Geometry/DrillParse/BoardGetFace";
|
|
|
|
|
import { Curve } from "../../DatabaseServices/Entity/Curve";
|
|
|
|
|
import { equaln } from "../../Geometry/GeUtils";
|
|
|
|
|
import { equaln, equalv3 } from "../../Geometry/GeUtils";
|
|
|
|
|
import { Arc } from "../../DatabaseServices/Entity/Arc";
|
|
|
|
|
import { GetBoardSealingCurves, GetBoardHighSeal, HandleRectBoardSealingData } from "../../GraphicsSystem/CalcEdgeSealing";
|
|
|
|
|
import { Face } from "../../Geometry/DrillParse/Face";
|
|
|
|
|
import { Matrix4 } from "three";
|
|
|
|
|
import { Matrix4, Vector3 } from "three";
|
|
|
|
|
import { Polyline } from "../../DatabaseServices/Entity/Polyline";
|
|
|
|
|
import { Board } from "../../DatabaseServices/Entity/Board";
|
|
|
|
|
import { Box3Ext } from "../../Geometry/Box";
|
|
|
|
@ -13,6 +13,7 @@ import { ISmoothEdgeOption, IHighSealedItem } from "../../UI/Store/BoardInterfac
|
|
|
|
|
class SetSmoothEdgeFaces extends BoardGetFace
|
|
|
|
|
{
|
|
|
|
|
FaceSealingDataMap: Map<Face, number>;
|
|
|
|
|
/**非见光面 */
|
|
|
|
|
SmoothFace = new Set<Face>();
|
|
|
|
|
highSealingData: IHighSealedItem[];
|
|
|
|
|
private sealCus: Curve[];
|
|
|
|
@ -75,9 +76,29 @@ class SetSmoothEdgeFaces extends BoardGetFace
|
|
|
|
|
&& (f1.type === BoardFaceType.NoSide || bg.Board.BoardType !== this.Board.BoardType)
|
|
|
|
|
)
|
|
|
|
|
continue;
|
|
|
|
|
//不共面
|
|
|
|
|
if (!MatrixIsCoplane2(f1.OCS, f2.OCS, 1e-2))
|
|
|
|
|
|
|
|
|
|
let [mtx, mtx2] = (f1.type !== f2.type && f1.type === BoardFaceType.NoSide) ? [f1.OCS, f2.OCS] : [f2.OCS, f1.OCS];
|
|
|
|
|
|
|
|
|
|
let localBoard = (f1.type !== f2.type && f1.type === BoardFaceType.NoSide) ? f1.LocalBoard : f2.LocalBoard;
|
|
|
|
|
|
|
|
|
|
let nor1 = new Vector3().setFromMatrixColumn(mtx, 2);
|
|
|
|
|
let nor2 = new Vector3().setFromMatrixColumn(mtx2, 2);
|
|
|
|
|
|
|
|
|
|
if (!equalv3(nor1, nor2.negate(), 1e-2))
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
let pt = new Vector3().setFromMatrixPosition(mtx2);
|
|
|
|
|
pt.applyMatrix4(new Matrix4().getInverse(mtx));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!equaln(pt.z, 0, 1e-2))
|
|
|
|
|
{
|
|
|
|
|
if (f1.type !== f2.type && pt.z < -1e-2 && pt.z > -localBoard.Thickness + 1e-2)
|
|
|
|
|
{ }
|
|
|
|
|
else
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (f1.IsIntersect(f2, scale))
|
|
|
|
|
{
|
|
|
|
|
if (f1.type === BoardFaceType.Side)
|
|
|
|
|