支持绘制外墙
This commit is contained in:
7
types/Add-on/KJL/Import/KJLImport.d.ts
vendored
Normal file
7
types/Add-on/KJL/Import/KJLImport.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { Command } from "../../../Editor/CommandMachine";
|
||||
import { KJL_JsonFile } from "./KJLInterface";
|
||||
export declare class Command_KJLImport implements Command {
|
||||
exec(): Promise<void>;
|
||||
}
|
||||
export declare function ImportKJLData(fileData: KJL_JsonFile): Promise<void>;
|
||||
//# sourceMappingURL=KJLImport.d.ts.map
|
1
types/Add-on/KJL/Import/KJLImport.d.ts.map
Normal file
1
types/Add-on/KJL/Import/KJLImport.d.ts.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"KJLImport.d.ts","sourceRoot":"","sources":["../../../../../src/Add-on/KJL/Import/KJLImport.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,OAAO,EAAe,MAAM,gCAAgC,CAAC;AAWtE,OAAO,EAAiB,YAAY,EAA+F,MAAM,gBAAgB,CAAC;AAM1J,qBAAa,iBAAkB,YAAW,OAAO;IAEvC,IAAI;CA+Cb;AAED,wBAAsB,aAAa,CAAC,QAAQ,EAAE,YAAY,iBA4DzD"}
|
79
types/Add-on/KJL/Import/KJLInterface.d.ts
vendored
Normal file
79
types/Add-on/KJL/Import/KJLInterface.d.ts
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
import { Vec2 } from "three";
|
||||
import { Vec3 } from "../../../Geometry/IVec3";
|
||||
/** 模型类型 */
|
||||
export declare enum KJL_ModelType {
|
||||
ParamModel = 1,
|
||||
Max3DModel = 2,
|
||||
BaseModel = 3,
|
||||
VirtualModel = 4
|
||||
}
|
||||
export interface KJL_Parameter {
|
||||
name: string;
|
||||
value: string;
|
||||
}
|
||||
/** 参数模型 */
|
||||
export interface KJL_ParamModel {
|
||||
modelTypeId: KJL_ModelType;
|
||||
modelName: string;
|
||||
roomId: string;
|
||||
modelBrandGoodName: string;
|
||||
parameters: KJL_Parameter[];
|
||||
ignoreParameters: KJL_Parameter[];
|
||||
constParameters: KJL_Parameter[];
|
||||
boxSize: Vec3;
|
||||
position: Vec3;
|
||||
center: Vec3;
|
||||
rotate: Vec3;
|
||||
baseTexture: string;
|
||||
textureName: string;
|
||||
textureAngle: number;
|
||||
absPosition: Vec3;
|
||||
absRotation: Vec3;
|
||||
subModels: KJL_ParamModel[];
|
||||
id: string;
|
||||
}
|
||||
/** 曲线类型 */
|
||||
export declare enum KJL_LineType {
|
||||
Line = 0,
|
||||
Arc = 1
|
||||
}
|
||||
export interface KJL_Path {
|
||||
resultPoints: Vec2[];
|
||||
resultLines: {
|
||||
type: KJL_LineType;
|
||||
clockwise: boolean;
|
||||
radius: number;
|
||||
}[];
|
||||
}
|
||||
export interface KJL_ParamModel_Hardware extends KJL_ParamModel {
|
||||
modelProductNumber: string;
|
||||
}
|
||||
/** 板件数据(元件,可能) */
|
||||
export interface KJL_ParamModel_Board extends KJL_ParamModel {
|
||||
thickness: number;
|
||||
points: Vec2[];
|
||||
paramPlankPath: {
|
||||
path: KJL_Path;
|
||||
holes: KJL_Path[];
|
||||
};
|
||||
}
|
||||
export interface KJL_DesignData {
|
||||
roomDataList: {
|
||||
roomId: string;
|
||||
name: string;
|
||||
}[];
|
||||
}
|
||||
export interface KJL_AssemblyModel {
|
||||
name: string;
|
||||
paramModelIds: string[];
|
||||
}
|
||||
export interface KJL_JsonFile {
|
||||
paramModel: KJL_ParamModel[];
|
||||
designData: KJL_DesignData;
|
||||
assemblyModels: KJL_AssemblyModel[];
|
||||
}
|
||||
export interface KJL_DrillData {
|
||||
bigHole: number;
|
||||
drillSides: number[];
|
||||
}
|
||||
//# sourceMappingURL=KJLInterface.d.ts.map
|
1
types/Add-on/KJL/Import/KJLInterface.d.ts.map
Normal file
1
types/Add-on/KJL/Import/KJLInterface.d.ts.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"KJLInterface.d.ts","sourceRoot":"","sources":["../../../../../src/Add-on/KJL/Import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IAE3D,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AAED,kBAAkB;AAClB,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAExD,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,IAAI,EAAE,CAAC;IACf,cAAc,EAAE;QACZ,IAAI,EAAE,QAAQ,CAAC;QACf,KAAK,EAAE,QAAQ,EAAE,CAAC;KACrB,CAAC;CACL;AAED,MAAM,WAAW,cAAc;IAE3B,YAAY,EAAE;QACV,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;KAChB,EAAE,CAAC;CACP;AAED,MAAM,WAAW,iBAAiB;IAE9B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,YAAY;IAEzB,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,UAAU,EAAE,cAAc,CAAC;IAC3B,cAAc,EAAE,iBAAiB,EAAE,CAAC;CACvC;AAED,MAAM,WAAW,aAAa;IAE1B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,EAAE,CAAC;CACxB"}
|
23
types/Add-on/KJL/Import/KJLMaterialLoader.d.ts
vendored
Normal file
23
types/Add-on/KJL/Import/KJLMaterialLoader.d.ts
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import { IResponseData } from "../../../Common/Request";
|
||||
import { PhysicalMaterialRecord } from "../../../DatabaseServices/PhysicalMaterialRecord";
|
||||
import { KJLImportConfigOption } from "../../../UI/Store/BoardInterface";
|
||||
import { KJL_Material } from "./KJL_Material";
|
||||
interface MaterialFetchData extends IResponseData {
|
||||
materials: {
|
||||
name: string;
|
||||
file: string;
|
||||
};
|
||||
}
|
||||
export declare class KJLMaterialLoader {
|
||||
KjlName_Material: Map<string, KJL_Material>;
|
||||
fetchId_MaterialData: Map<string, MaterialFetchData>;
|
||||
fetchId_Material: Map<string, PhysicalMaterialRecord>;
|
||||
constructor();
|
||||
LoadKJLConfigMaterials(config: {
|
||||
[key: string]: KJLImportConfigOption;
|
||||
}): Promise<void>;
|
||||
private LoadMaterial;
|
||||
LoadMaterialFromName(materialName: string): Promise<PhysicalMaterialRecord>;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=KJLMaterialLoader.d.ts.map
|
1
types/Add-on/KJL/Import/KJLMaterialLoader.d.ts.map
Normal file
1
types/Add-on/KJL/Import/KJLMaterialLoader.d.ts.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"KJLMaterialLoader.d.ts","sourceRoot":"","sources":["../../../../../src/Add-on/KJL/Import/KJLMaterialLoader.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAA2B,MAAM,yBAAyB,CAAC;AAGjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,kDAAkD,CAAC;AAE1F,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,UAAU,iBAAkB,SAAQ,aAAa;IAE7C,SAAS,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;KAAE,CAAC;CAC9C;AAGD,qBAAa,iBAAiB;IAG1B,gBAAgB,4BAAmC;IACnD,oBAAoB,iCAAwC;IAG5D,gBAAgB,sCAA6C;;IAKvD,sBAAsB,CAAC,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,qBAAqB,CAAC;KAAE;YAiBhE,YAAY;IAwDpB,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAOpF"}
|
25
types/Add-on/KJL/Import/KJLParse.d.ts
vendored
Normal file
25
types/Add-on/KJL/Import/KJLParse.d.ts
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
import { Vector2 } from "three";
|
||||
import { Polyline } from "../../../api";
|
||||
import { BoardOpenDir } from "../../../UI/Store/BoardInterface";
|
||||
import { KJL_AssemblyModel, KJL_DesignData, KJL_DrillData, KJL_Parameter, KJL_ParamModel, KJL_Path } from "./KJLInterface";
|
||||
export declare function ParseRoomNameMap(d: KJL_DesignData): Map<string, string>;
|
||||
export declare function ParseCabNameMap(data: KJL_AssemblyModel[]): Map<string, string>;
|
||||
export declare function ParseEdgeBanding(model: KJL_ParamModel): number[] | undefined;
|
||||
export declare function ParseBT(params: KJL_Parameter[]): number;
|
||||
export declare function ParseKMFX(params: KJL_Parameter[]): BoardOpenDir;
|
||||
export declare function ParseBCBZ(params: KJL_Parameter[]): string;
|
||||
export declare function ParseDrilling(params: KJL_Parameter[]): KJL_DrillData | undefined;
|
||||
export declare function ParseEdges(params: KJL_Parameter[]): KJL_DrillData | undefined;
|
||||
/**
|
||||
* 分析Path的外轮廓和内网洞
|
||||
* @param path
|
||||
*/
|
||||
export declare function ParsePathOutlineAndHole(path: KJL_Path, edgeBandingAll?: number[], drillData?: KJL_DrillData): [Polyline[], number[][]];
|
||||
/**
|
||||
* 半径转凸度
|
||||
* @param pts
|
||||
* @param radiuss
|
||||
* @returns buls
|
||||
*/
|
||||
export declare function Radius2Buls(pts: Vector2[], radiuss: number[]): number[];
|
||||
//# sourceMappingURL=KJLParse.d.ts.map
|
1
types/Add-on/KJL/Import/KJLParse.d.ts.map
Normal file
1
types/Add-on/KJL/Import/KJLParse.d.ts.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"KJLParse.d.ts","sourceRoot":"","sources":["../../../../../src/Add-on/KJL/Import/KJLParse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAiB,MAAM,cAAc,CAAC;AAKvD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,aAAa,EAAgB,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAIzI,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,cAAc,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAQvE;AAGD,wBAAgB,eAAe,CAAC,IAAI,EAAE,iBAAiB,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAa9E;AAGD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,EAAE,GAAG,SAAS,CA0C5E;AAED,wBAAgB,OAAO,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CASvD;AAGD,wBAAgB,SAAS,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,YAAY,CAa/D;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CASzD;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,aAAa,GAAG,SAAS,CAYhF;AAID,wBAAgB,UAAU,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,aAAa,GAAG,SAAS,CA8B7E;AAcD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,QAAQ,EAAE,cAAc,CAAC,EAAE,MAAM,EAAE,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,CAuGtI;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAkBvE"}
|
7
types/Add-on/KJL/Import/KJLUtils.d.ts
vendored
Normal file
7
types/Add-on/KJL/Import/KJLUtils.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { Entity } from "../../../DatabaseServices/Entity/Entity";
|
||||
import { HardwareCompositeEntity } from "../../../DatabaseServices/Hardware/HardwareCompositeEntity";
|
||||
import { PhysicalMaterialRecord } from "../../../DatabaseServices/PhysicalMaterialRecord";
|
||||
import { KJL_ParamModel_Hardware } from "./KJLInterface";
|
||||
export declare function CreateHardware(hmodel: KJL_ParamModel_Hardware, roomName: string, gName: string): HardwareCompositeEntity;
|
||||
export declare function ApplyMaterial(br: Entity, mtl: PhysicalMaterialRecord): void;
|
||||
//# sourceMappingURL=KJLUtils.d.ts.map
|
1
types/Add-on/KJL/Import/KJLUtils.d.ts.map
Normal file
1
types/Add-on/KJL/Import/KJLUtils.d.ts.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"KJLUtils.d.ts","sourceRoot":"","sources":["../../../../../src/Add-on/KJL/Import/KJLUtils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,yCAAyC,CAAC;AAEjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4DAA4D,CAAC;AACrG,OAAO,EAAE,sBAAsB,EAAE,MAAM,kDAAkD,CAAC;AAG1F,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,wBAAgB,cAAc,CAAC,MAAM,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,uBAAuB,CAgBxH;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,sBAAsB,QAMpE"}
|
5
types/Add-on/KJL/Import/KJL_Material.d.ts
vendored
Normal file
5
types/Add-on/KJL/Import/KJL_Material.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export interface KJL_Material {
|
||||
name: string;
|
||||
id: string;
|
||||
}
|
||||
//# sourceMappingURL=KJL_Material.d.ts.map
|
1
types/Add-on/KJL/Import/KJL_Material.d.ts.map
Normal file
1
types/Add-on/KJL/Import/KJL_Material.d.ts.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"KJL_Material.d.ts","sourceRoot":"","sources":["../../../../../src/Add-on/KJL/Import/KJL_Material.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAEzB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACd"}
|
Reference in New Issue
Block a user