开发:清理代码

pull/2238/MERGE
ChenX 1 year ago
parent 671544ec6d
commit ab454b5428

@ -16,6 +16,14 @@ import { INailRule, IShinkOption, LayerNailOption } from "../../UI/Store/BoardIn
class ActivityLayerBoardTool
{
NailRules: INailRule[];
/**
*
* @param face
* @param objects
* @param br
* @returns ( )
*/
private GetBoardIntersection(face: Face, objects: Object3D[], br: Board)
{
for (let s of [0.5, 0.1, 0.9])
@ -205,19 +213,18 @@ class ActivityLayerBoardTool
if (face.type === BoardFaceType.Side)
{
let shrink = 0;
if (option)
if (option)//求内缩值
{
shrink = this.GetShrinkDist(face, br, option);
this.GetShrinkBoardIndexesMap(face, br, shrink, vecIndexMap);
}
//#region 画层板钉
if (!nailOption.isDraw) continue;
if (!nailOption.isInBack && isParallelTo(face.Normal, xVec)) continue;
let intersection = this.GetBoardIntersection(face, objects, br);
if (intersection)
{
//防止板件悬空 #I1DPHR
if (intersection.distance - 1 + shrink >= refDist)
let intersection = this.GetBoardIntersection(face, objects, br);//射线求交 得到板和交点
if (!intersection || (intersection.distance - 1 + shrink >= refDist)) //防止板件悬空 #I1DPHR
continue;
let otherBoard = GetEntity(intersection.object) as Board;
@ -266,7 +273,8 @@ class ActivityLayerBoardTool
for (let nail of nails)
nailBoardMap.set(nail, otherBoard);
allNails.push(...nails);
}
//#endregion
}
}
this.AppendBoard(br, nailBoardMap, allNails);

Loading…
Cancel
Save