!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 { ModalPosition, ModalState } from '../UI/Components/Modal/ModalsManage';
import { AppToaster } from '../UI/Components/Toaster';
import { IBaseOption } from '../UI/Store/BoardInterface';
export enum ArrayType
{
@ -38,7 +39,7 @@ export enum Pick
fillAngle = 5,
betweenAngle = 6
}
export interface ArrayOptioins
export interface ArrayOptioins extends IBaseOption
{
row: number;
col: number;

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

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

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

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

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

@ -12,6 +12,7 @@ import { DefaultBoardFindOption } from "../../Editor/DefaultConfig";
export class BoardFindStore extends BoardStore
{
@observable m_Option: IBoardFindOption = {
version: 1,
condition: {
layer: false,
height: false,
@ -82,6 +83,8 @@ export class BoardFindStore extends BoardStore
highDrill: [],
upDownDrill: [true, true],
isClose: false,
isRemoveModeling: false,
isRemoveSpecialShape: false,
};
@observable isSelectAllSealed = false;
@observable isSelectAllDrill = false;
@ -96,7 +99,7 @@ export class BoardFindStore extends BoardStore
private SetDrillType()
{
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]));
this.m_Option.upDownDrill[0] = true;

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

@ -15,45 +15,7 @@ openDirTitle[DoorOpenDir.None] = "无";
export class DoorStore extends DoorDrawerStore
{
title = "门板";
@observable m_Option: IDoorConfigOption = {
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,
}
@observable m_Option: IDoorConfigOption = Object.assign({}, DefaultDoorOption);
doorPosition = new Vector3(); // 第一块门板起始位置点
@observable doorDrawersInfo: IDoorInfo[] = [];
InitInfos()

@ -6,36 +6,7 @@ import { DefaultDrawerOption } from "../../../Editor/DefaultConfig";
export class DrawerStore extends DoorDrawerStore
{
title = "抽屉";
@observable m_Option: IDrawerConfigOption = {
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,
}
@observable m_Option: IDrawerConfigOption = Object.assign({}, DefaultDrawerOption);
InitInfos()
{

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

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

Loading…
Cancel
Save