!578 修复类型错误和板件查找数据

pull/578/MERGE
ZoeLeeFZ 5 years ago committed by ChenX
parent dea5909574
commit 86c1d144f1

@ -15,6 +15,7 @@ import { MoveMatrix, rotatePoint, AsVector2 } from '../Geometry/GeUtils';
import { ArrayModal } from '../UI/Components/Modal/ArrayModal'; import { ArrayModal } from '../UI/Components/Modal/ArrayModal';
import { ModalPosition, ModalState } from '../UI/Components/Modal/ModalsManage'; import { ModalPosition, ModalState } from '../UI/Components/Modal/ModalsManage';
import { AppToaster } from '../UI/Components/Toaster'; import { AppToaster } from '../UI/Components/Toaster';
import { IBaseOption } from '../UI/Store/BoardInterface';
export enum ArrayType export enum ArrayType
{ {
@ -38,7 +39,7 @@ export enum Pick
fillAngle = 5, fillAngle = 5,
betweenAngle = 6 betweenAngle = 6
} }
export interface ArrayOptioins export interface ArrayOptioins extends IBaseOption
{ {
row: number; row: number;
col: number; col: number;

@ -12,6 +12,7 @@ import { Singleton } from "../../Common/Singleton";
import { BoardType } from "../../DatabaseServices/Entity/Board"; import { BoardType } from "../../DatabaseServices/Entity/Board";
import { ModalState } from "../../UI/Components/Modal/ModalsManage"; import { ModalState } from "../../UI/Components/Modal/ModalsManage";
import { AppToaster, ToasterInput } from "../../UI/Components/Toaster"; import { AppToaster, ToasterInput } from "../../UI/Components/Toaster";
import { IBaseOption } from "../../UI/Store/BoardInterface";
export enum CuttingOffset export enum CuttingOffset
{ {
@ -24,7 +25,7 @@ interface OffsetKeyWord
Front: string; Front: string;
Back: string; Back: string;
} }
export interface ReferenceCuttingOptioins export interface ReferenceCuttingOptioins extends IBaseOption
{ {
boardType: BoardType; boardType: BoardType;
offset: number; offset: number;

@ -333,6 +333,11 @@ export namespace Production
break; break;
} }
} }
if (!endPt)
{
console.warn("排钻位置有问题");
continue;
}
holes = data.sideHoles; holes = data.sideHoles;
face = Math.floor(outline.GetParamAtPoint(pt)); face = Math.floor(outline.GetParamAtPoint(pt));
isPush = true; isPush = true;

@ -13,14 +13,12 @@ import { GetEntity } from '../../../Common/Utils';
import { safeEval } from '../../../Common/eval'; import { safeEval } from '../../../Common/eval';
import { EBoardKeyList } from '../../../Common/BoardKeyList'; import { EBoardKeyList } from '../../../Common/BoardKeyList';
type OptionType = IBaseOption | DrillingOption;
export interface ISetItemOption export interface ISetItemOption
{ {
type: CheckObjectType; type: CheckObjectType;
optKey: string; optKey: string;
title?: string; title?: string;
option: OptionType; option: IBaseOption;
uiOption?: Object; uiOption?: Object;
isDisabled?: boolean; isDisabled?: boolean;
placeHolder?: string; placeHolder?: string;
@ -38,7 +36,7 @@ interface ISetBlockOption
{ {
type: CheckObjectType; type: CheckObjectType;
pars: Array<Array<string>>; pars: Array<Array<string>>;
option: OptionType; option: IBaseOption;
uiOption?: Object; uiOption?: Object;
className?: string; className?: string;
isInline?: boolean; isInline?: boolean;

@ -6,7 +6,7 @@ import { CheckObjectType } from "../../../Common/CheckoutVaildValue";
import { safeEval } from "../../../Common/eval"; import { safeEval } from "../../../Common/eval";
import { FixedNotZero } from "../../../Common/Utils"; import { FixedNotZero } from "../../../Common/Utils";
import { Board } from "../../../DatabaseServices/Entity/Board"; import { Board } from "../../../DatabaseServices/Entity/Board";
import { LinesType } from "../../Store/BoardInterface"; import { LinesType, IBaseOption } from "../../Store/BoardInterface";
import { ToasterInput } from "../Toaster"; import { ToasterInput } from "../Toaster";
export interface IBoardInfoListProps export interface IBoardInfoListProps
@ -17,7 +17,7 @@ export interface IBoardInfoListProps
ModifyDataRecord: Function; ModifyDataRecord: Function;
isSelected: boolean; isSelected: boolean;
} }
export interface IBoardInfoOptions export interface IBoardInfoOptions extends IBaseOption
{ {
[EBoardKeyList.Height]?: string; [EBoardKeyList.Height]?: string;
[EBoardKeyList.Width]?: string; [EBoardKeyList.Width]?: string;

@ -10,11 +10,12 @@ import { BoardStore } from '../Store/BoardStore';
import { SetBoardDataItem } from './Board/BoardCommon'; import { SetBoardDataItem } from './Board/BoardCommon';
import { ModalState } from './Modal/ModalsManage'; import { ModalState } from './Modal/ModalsManage';
import { AppToaster } from './Toaster'; import { AppToaster } from './Toaster';
import { IBaseOption } from '../Store/BoardInterface';
export interface IRotateLayerBoardProps export interface IRotateLayerBoardProps
{ {
store: RotateLayerBoardStore; store: RotateLayerBoardStore;
} }
interface IRotateLayerBoardOption interface IRotateLayerBoardOption extends IBaseOption
{ {
angle: number; angle: number;
length: number; length: number;

@ -12,6 +12,7 @@ import { DefaultBoardFindOption } from "../../Editor/DefaultConfig";
export class BoardFindStore extends BoardStore export class BoardFindStore extends BoardStore
{ {
@observable m_Option: IBoardFindOption = { @observable m_Option: IBoardFindOption = {
version: 1,
condition: { condition: {
layer: false, layer: false,
height: false, height: false,
@ -82,6 +83,8 @@ export class BoardFindStore extends BoardStore
highDrill: [], highDrill: [],
upDownDrill: [true, true], upDownDrill: [true, true],
isClose: false, isClose: false,
isRemoveModeling: false,
isRemoveSpecialShape: false,
}; };
@observable isSelectAllSealed = false; @observable isSelectAllSealed = false;
@observable isSelectAllDrill = false; @observable isSelectAllDrill = false;
@ -96,7 +99,7 @@ export class BoardFindStore extends BoardStore
private SetDrillType() private SetDrillType()
{ {
let drilltypes = [...userConfig.DrillConfigs.keys()]; let drilltypes = [...userConfig.DrillConfigs.keys()];
if (drilltypes.length > 0) if (drilltypes.length > 0 && !drilltypes.includes(this.m_Option.drillType))
{ {
observable(this.m_Option.highDrill).replace(Array(4).fill(drilltypes[0])); observable(this.m_Option.highDrill).replace(Array(4).fill(drilltypes[0]));
this.m_Option.upDownDrill[0] = true; this.m_Option.upDownDrill[0] = true;

@ -7,7 +7,7 @@ import { BoardType } from "../../DatabaseServices/Entity/Board";
*/ */
export interface IBaseOption export interface IBaseOption
{ {
version: number; version?: number;
} }
//板件数据,配置信息+加工信息 //板件数据,配置信息+加工信息
@ -245,7 +245,7 @@ export interface ClosingStripOption extends BoardConfigOption
frontShrink: number; //前缩 frontShrink: number; //前缩
} }
export interface IGrooveOption export interface IGrooveOption extends IBaseOption
{ {
grooveAddLength: string;//槽加长/宽/高 grooveAddLength: string;//槽加长/宽/高
grooveAddWidth: string; grooveAddWidth: string;

@ -15,45 +15,7 @@ openDirTitle[DoorOpenDir.None] = "无";
export class DoorStore extends DoorDrawerStore export class DoorStore extends DoorDrawerStore
{ {
title = "门板"; title = "门板";
@observable m_Option: IDoorConfigOption = { @observable m_Option: IDoorConfigOption = Object.assign({}, DefaultDoorOption);
col: 1,
row: 1,
isAllSelect: true,
topOffset: 0,
bottomOffset: 0,
doorPosType: DoorPosType.Out,
offset: 0,
topExt: 18,
bottomExt: 18,
leftExt: 18,
rightExt: 18,
topSpace: 2,
bottomSpace: 2,
leftSpace: 2,
rightSpace: 2,
midSpace: 2,
thickness: 18,
depth: 0,
isAuto: true,
boardName: "",
doorThickness: 18,
topBrSeal: 1,
bottomBrSeal: 1,
leftBrSeal: 1,
rightBrSeal: 1,
topDoorSeal: 1,
bottomDoorSeal: 1,
leftDoorSeal: 1,
rightDoorSeal: 1,
handleAngle: 0,
handleHorPos: HandleHorPos.Left,
horSpacing: 10,
handleVePos: HandleVePos.Top,
veSpacing: 10,
hingeCount: 0,
hindeTopDist: 0,
hindeBottomDist: 0,
}
doorPosition = new Vector3(); // 第一块门板起始位置点 doorPosition = new Vector3(); // 第一块门板起始位置点
@observable doorDrawersInfo: IDoorInfo[] = []; @observable doorDrawersInfo: IDoorInfo[] = [];
InitInfos() InitInfos()

@ -6,36 +6,7 @@ import { DefaultDrawerOption } from "../../../Editor/DefaultConfig";
export class DrawerStore extends DoorDrawerStore export class DrawerStore extends DoorDrawerStore
{ {
title = "抽屉"; title = "抽屉";
@observable m_Option: IDrawerConfigOption = { @observable m_Option: IDrawerConfigOption = Object.assign({}, DefaultDrawerOption);
col: 1,
row: 1,
isAllSelect: true,
topOffset: 0,
bottomOffset: 0,
doorPosType: DoorPosType.Out,
offset: 0,
topExt: 18,
bottomExt: 18,
leftExt: 18,
rightExt: 18,
topSpace: 2,
bottomSpace: 2,
leftSpace: 2,
rightSpace: 2,
midSpace: 2,
thickness: 18,
depth: 0,
isAuto: true,
boardName: "",
handleAngle: 0,
handleHorPos: HandleHorPos.Left,
horSpacing: 10,
handleVePos: HandleVePos.Top,
veSpacing: 10,
drawerTotalDepth: 0,
trackDepth: 0,
isAutoSelectTrack: true,
}
InitInfos() InitInfos()
{ {

@ -23,6 +23,7 @@ export class DrillStore extends BoardStore
private GetDefaultOption() private GetDefaultOption()
{ {
let originOption: DrillingOption = { let originOption: DrillingOption = {
version: 1,
startDist: 0, startDist: 0,
endDist: 40, endDist: 40,
//位置参数 //位置参数

@ -1,3 +1,5 @@
import { IBaseOption } from "./BoardInterface";
export enum SpacingType export enum SpacingType
{ {
Multiple32 = "32", Multiple32 = "32",
@ -7,7 +9,7 @@ export enum SpacingType
*,,UIkey *,,UIkey
* *
*/ */
export interface DrillingOption export interface DrillingOption extends IBaseOption
{ {
startDist: number; startDist: number;
endDist: number; endDist: number;

Loading…
Cancel
Save