!706 弧形地脚拆单处理

pull/706/MERGE
cf-erp 5 years ago committed by ChenX
parent 4251841af1
commit 2921ccd4db

@ -41,10 +41,6 @@ export class ErpParseData
block.BoardName = entity.Name; //板名称
block.BoardType = entity.BoardType; // 板类型 0:层板 1:立板 2:背板
block.GoodsID = 0;
//板大小
block.Width = this.GetNumberBit(entity.Width, 3); // 宽
block.Height = this.GetNumberBit(entity.Height, 3); // 高
block.Thickness = this.GetNumberBit(entity.Thickness, 3); // 厚
//封边
block.SealedUp = this.GetNumberBit(Number(entity.BoardProcessOption.sealedUp), 3); //封边上
block.SealedDown = this.GetNumberBit(Number(entity.BoardProcessOption.sealedDown), 3); //封边下
@ -67,12 +63,34 @@ export class ErpParseData
baseposition.YVec = `${yVec.x},${yVec.y},${yVec.z}`;
baseposition.ZVec = `${zVec.x},${zVec.y},${zVec.z}`;
let boardData = Production.GetBoardSplitOrderData(entity);
let spliteWidth = boardData.info.spliteWidth.length < 1 ? block.Width : Number(boardData.info.spliteWidth); //拆单宽
let spliteWidth = boardData.info.spliteWidth.length < 1 ? 0 : Number(boardData.info.spliteWidth); //拆单宽
block.SpliteWidth = this.GetNumberBit(spliteWidth, 3);
let spliteHeight = boardData.info.spliteHeight.length < 1 ? block.Height : Number(boardData.info.spliteHeight); //拆单高
let spliteHeight = boardData.info.spliteHeight.length < 1 ? 0 : Number(boardData.info.spliteHeight); //拆单高
block.SpliteHeight = this.GetNumberBit(spliteHeight, 3);
let spliteThickness = boardData.info.spliteThickness.length < 1 ? block.Thickness : Number(boardData.info.spliteThickness); //拆单厚
let spliteThickness = boardData.info.spliteThickness.length < 1 ? 0 : Number(boardData.info.spliteThickness); //拆单厚
block.SpliteThickness = this.GetNumberBit(spliteThickness, 3);
//板大小
if (spliteWidth > 0)
{
block.Width = this.GetNumberBit(spliteWidth, 3);
} else
{
block.Width = this.GetNumberBit(entity.Width, 3);
}
if (spliteHeight > 0)
{
block.Height = this.GetNumberBit(spliteHeight, 3);
} else
{
block.Height = this.GetNumberBit(entity.Height, 3);
}
if (spliteThickness > 0)
{
block.Thickness = this.GetNumberBit(spliteThickness, 3);
} else
{
block.Thickness = this.GetNumberBit(entity.Thickness, 3);
}
//材料,颜色
block.Color = boardData.info.color;
block.Material = boardData.info.material;

@ -10,6 +10,7 @@ import { IntersectOption } from "./IntersectWith";
import { IHighSealedItem } from "../UI/Store/BoardInterface";
import { Production } from "../Production/Product";
import { ExtureContourCurve } from "../DatabaseServices/Entity/Extrude";
import { safeEval } from "../Common/eval";
/**
*线
@ -342,7 +343,12 @@ export function HandleRectBoardSealingData(br: Board, edges: IHighSealedItem[],
let dir = Math.sign(br.ContourCurve.Area2);
if (!cus)
cus = br.ContourCurve.Explode() as Curve[];
if (!br.IsSpecialShape && cus.length == 4)
let spliteHeight = safeEval(br.BoardProcessOption.spliteHeight);
let spliteWidth = safeEval(br.BoardProcessOption.spliteWidth);
let spliteThickness = safeEval(br.BoardProcessOption.spliteThickness);
if ((spliteHeight && spliteWidth && spliteThickness) || !br.IsSpecialShape && cus.length == 4)
{
for (let i = 0; i < 4; i++)
{

@ -136,6 +136,11 @@ export namespace Production
export function GetBoardInfo(br: Board, size: Vector3): IBoardProdInfo
{
let data = br.BoardProcessOption;
let spliteHeight = safeEval(data.spliteHeight);
let spliteWidth = safeEval(data.spliteWidth);
let spliteThickness = safeEval(data.spliteThickness);
let isRect = (!isNaN(spliteHeight) && !isNaN(spliteWidth) && !isNaN(spliteThickness)) || !br.IsSpecialShape;
return {
id: br.Id.Index,
name: br.Name,
@ -146,10 +151,10 @@ export namespace Production
[EBoardKeyList.Color]: data[EBoardKeyList.Color],
[EBoardKeyList.Lines]: data[EBoardKeyList.Lines],
[EBoardKeyList.DrillType]: data[EBoardKeyList.DrillType],
spliteHeight: data.spliteHeight ? safeEval(data.spliteHeight).toString() : "",
spliteThickness: data.spliteThickness ? safeEval(data.spliteThickness).toString() : "",
spliteWidth: data.spliteWidth ? safeEval(data.spliteWidth).toString() : "",
isRect: !br.IsSpecialShape,
spliteHeight: spliteHeight ? spliteHeight.toString() : "",
spliteThickness: spliteThickness ? spliteThickness.toString() : "",
spliteWidth: spliteWidth ? spliteWidth.toString() : "",
isRect,
reamarks: [],
kaiLiaoWidth: size.x,
kaiLiaoHeight: size.y,

Loading…
Cancel
Save