|
|
|
@ -18,7 +18,7 @@ import { NormalMatrix } from "../../../Common/Matrix4Utils";
|
|
|
|
|
import { PostJson, RequestStatus } from "../../../Common/Request";
|
|
|
|
|
import { toplineFileIn } from "../../../Common/SerializeMaterial";
|
|
|
|
|
import { FixedNotZero, GetEntity } from "../../../Common/Utils";
|
|
|
|
|
import { safeEval } from "../../../Common/eval";
|
|
|
|
|
import { CheckExpr, safeEval } from "../../../Common/eval";
|
|
|
|
|
import { inflateBase64 } from "../../../Common/inflate";
|
|
|
|
|
import { CADFiler } from "../../../DatabaseServices/CADFiler";
|
|
|
|
|
import { Contour } from "../../../DatabaseServices/Contour";
|
|
|
|
@ -565,10 +565,11 @@ export class BoardConfigModal extends React.Component<BoardConfigProps, {}>
|
|
|
|
|
for (let c of g)
|
|
|
|
|
{
|
|
|
|
|
let cd = rightStore.modeling2Store.modelingItems[c.ColorIndex - 1];//cd可能为空,因为颜色不受控制
|
|
|
|
|
if (!cd || cd.items.every(item => item.depth === 0) || cd.items.every(item => item.knife.id === ""))
|
|
|
|
|
if (!cd || cd.items.every(item => CheckExpr(item.depth as string, { BH: br.Thickness }).res <= 0)
|
|
|
|
|
|| cd.items.every(item => item.knife.id === ""))
|
|
|
|
|
{
|
|
|
|
|
AppToaster.show({
|
|
|
|
|
message: "部分颜色未设置深度或者刀具!",
|
|
|
|
|
message: "部分颜色未设置深度或者刀具或者设置的值无效!",
|
|
|
|
|
timeout: 5000,
|
|
|
|
|
intent: Intent.WARNING,
|
|
|
|
|
}, "unSetDepthKnife");
|
|
|
|
@ -1068,12 +1069,14 @@ export class BoardConfigModal extends React.Component<BoardConfigProps, {}>
|
|
|
|
|
path,
|
|
|
|
|
dir: cd.dir,
|
|
|
|
|
items: cd.items
|
|
|
|
|
.filter(item => item.depth > 0 && item.knife.id)
|
|
|
|
|
.filter(item => CheckExpr(item.depth as string, { BH: br.Thickness }).res > 0 && item.knife.id)
|
|
|
|
|
.map(
|
|
|
|
|
item =>
|
|
|
|
|
{
|
|
|
|
|
let result = CheckExpr(item.depth as string, { BH: br.Thickness });
|
|
|
|
|
return {
|
|
|
|
|
depth: item.depth,
|
|
|
|
|
depth: result.res,
|
|
|
|
|
depthExpr: item.depth.toString(),
|
|
|
|
|
offset: item.offset,
|
|
|
|
|
knife: {
|
|
|
|
|
angle: MathUtils.degToRad(item.knife.props.angle),
|
|
|
|
|