rm-build-dxf 0.1.186
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/package.json +50 -0
- package/src/App.vue.d.ts +2 -0
- package/src/DomEventRegister.js +1 -0
- package/src/api/getSocket.d.ts +1 -0
- package/src/api/index.d.ts +27 -0
- package/src/api/type.d.ts +46 -0
- package/src/build.js +1 -0
- package/src/components/DragContainer.vue.d.ts +48 -0
- package/src/components/NumberEditor.vue.d.ts +33 -0
- package/src/constants.d.ts +11 -0
- package/src/demo.d.ts +1 -0
- package/src/dxf-system/DxfSystem.d.ts +26 -0
- package/src/dxf-system/build.d.ts +94 -0
- package/src/dxf-system/components/CorrectionDxf.d.ts +44 -0
- package/src/dxf-system/components/Dxf.d.ts +96 -0
- package/src/dxf-system/components/ThreeVJia.d.ts +33 -0
- package/src/dxf-system/components/Variable.d.ts +41 -0
- package/src/dxf-system/index.d.ts +2 -0
- package/src/dxf-system/plugins/editor/Command/ClippingLine.d.ts +30 -0
- package/src/dxf-system/plugins/editor/Command/Command.d.ts +346 -0
- package/src/dxf-system/plugins/editor/Command/DefaultCommand.d.ts +56 -0
- package/src/dxf-system/plugins/editor/Command/DeleteSelectLine.d.ts +25 -0
- package/src/dxf-system/plugins/editor/Command/DrawBalconyRailing.d.ts +12 -0
- package/src/dxf-system/plugins/editor/Command/DrawBeam.d.ts +12 -0
- package/src/dxf-system/plugins/editor/Command/DrawDoorLine.d.ts +9 -0
- package/src/dxf-system/plugins/editor/Command/DrawHole.d.ts +67 -0
- package/src/dxf-system/plugins/editor/Command/DrawLine.d.ts +41 -0
- package/src/dxf-system/plugins/editor/Command/DrawPillar.d.ts +12 -0
- package/src/dxf-system/plugins/editor/Command/DrawWindow.d.ts +12 -0
- package/src/dxf-system/plugins/editor/Command/ManualDistance.d.ts +23 -0
- package/src/dxf-system/plugins/editor/Command/MergeLine.d.ts +33 -0
- package/src/dxf-system/plugins/editor/Command/PointDrag/index.d.ts +38 -0
- package/src/dxf-system/plugins/editor/Command/PointDrag/modifyDoor.d.ts +40 -0
- package/src/dxf-system/plugins/editor/Command/PointDrag/modifyLine.d.ts +34 -0
- package/src/dxf-system/plugins/editor/Command/PointDrag/modifyWindow.d.ts +25 -0
- package/src/dxf-system/plugins/editor/Command/PropertiesPanel.d.ts +33 -0
- package/src/dxf-system/plugins/editor/Command/RayDistance.d.ts +23 -0
- package/src/dxf-system/plugins/editor/Command/SelectAll.d.ts +30 -0
- package/src/dxf-system/plugins/editor/Command/TwoLineConnectionLine.d.ts +33 -0
- package/src/dxf-system/plugins/editor/Command/TwoPointConnection.d.ts +33 -0
- package/src/dxf-system/plugins/editor/Command/VerticalCorr.d.ts +66 -0
- package/src/dxf-system/plugins/editor/Command/VerticalCorrContinue.d.ts +35 -0
- package/src/dxf-system/plugins/editor/Command/ViewAngle.d.ts +21 -0
- package/src/dxf-system/plugins/editor/Editor.d.ts +56 -0
- package/src/dxf-system/plugins/editor/RenderManager.d.ts +101 -0
- package/src/dxf-system/plugins/editor/index.d.ts +9 -0
- package/src/dxf-system/plugins/editor/pages/EditorTool/EditorTool.vue.d.ts +7 -0
- package/src/dxf-system/plugins/editor/pages/EditorTool/EditorToolContent.vue.d.ts +7 -0
- package/src/dxf-system/plugins/editor/pages/PropertiesPanel.vue.d.ts +18 -0
- package/src/dxf-system/plugins/editor/pages/components/Button.vue.d.ts +17 -0
- package/src/dxf-system/plugins/editor/pages/components/Input.vue.d.ts +13 -0
- package/src/dxf-system/plugins/editor/pages/components/ToolToggle.vue.d.ts +20 -0
- package/src/dxf-system/plugins/editor/type.d.ts +11 -0
- package/src/dxf-system/plugins/editor/us-service/DragControlPoint.d.ts +48 -0
- package/src/dxf-system/plugins/editor/us-service/LineSelector.d.ts +44 -0
- package/src/dxf-system/plugins/editor/us-service/PointerFollowMove.d.ts +86 -0
- package/src/dxf-system/plugins/editor/us-service/SnapController.d.ts +32 -0
- package/src/dxf-system/plugins/editor/utils/Wall2D.d.ts +10 -0
- package/src/dxf-system/plugins/model3d/components/DxfLineModel.d.ts +14 -0
- package/src/dxf-system/plugins/model3d/components/WhiteModel.d.ts +61 -0
- package/src/dxf-system/plugins/model3d/components/index.d.ts +2 -0
- package/src/dxf-system/plugins/model3d/index.d.ts +11 -0
- package/src/dxf-system/plugins/renderer/components/DomContainer.d.ts +13 -0
- package/src/dxf-system/plugins/renderer/components/DomEventRegister.d.ts +116 -0
- package/src/dxf-system/plugins/renderer/components/EventInput.d.ts +74 -0
- package/src/dxf-system/plugins/renderer/components/ModelDataRender.d.ts +13 -0
- package/src/dxf-system/plugins/renderer/components/Renderer.d.ts +100 -0
- package/src/dxf-system/plugins/renderer/components/index.d.ts +5 -0
- package/src/dxf-system/plugins/renderer/index.d.ts +13 -0
- package/src/dxf-system/type.d.ts +218 -0
- package/src/dxf-system/utils/BayWindowHelper.d.ts +58 -0
- package/src/dxf-system/utils/BoundExt.d.ts +51 -0
- package/src/dxf-system/utils/DoorFind.d.ts +44 -0
- package/src/dxf-system/utils/DoubleWallFinder.d.ts +24 -0
- package/src/dxf-system/utils/HeightQuery.d.ts +12 -0
- package/src/dxf-system/utils/LineGroupType.d.ts +125 -0
- package/src/dxf-system/utils/LoadModel.d.ts +7 -0
- package/src/dxf-system/utils/RunJianPipeline.d.ts +92 -0
- package/src/dxf-system/utils/SceneAutoGenerat.d.ts +42 -0
- package/src/dxf-system/utils/ThreeVJiaPipeline.d.ts +154 -0
- package/src/dxf-system/utils/WallGroupManager.d.ts +27 -0
- package/src/dxf-system/utils/WallHole.d.ts +134 -0
- package/src/dxf-system/utils/WallHoleDrawData.d.ts +31 -0
- package/src/dxf-system/utils/ZHouseMockData.d.ts +127 -0
- package/src/dxf-system/utils/cad/DxfDataPlugin.d.ts +20 -0
- package/src/dxf-system/utils/cad/DxfDrawPlugin.d.ts +13 -0
- package/src/dxf-system/utils/cad/draw-data.d.ts +43 -0
- package/src/dxf-system/utils/cad/draw-dxf-image.d.ts +2 -0
- package/src/dxf-system/utils/cad/draw-dxf-string.d.ts +3 -0
- package/src/dxf-system/utils/cad/index.d.ts +143 -0
- package/src/dxf-system/utils/clipping-double-wall.d.ts +7 -0
- package/src/dxf-system/utils/draw-helper.d.ts +6 -0
- package/src/dxf-system/utils/find-discrete.d.ts +26 -0
- package/src/dxf-system/utils/find-rooms.d.ts +16 -0
- package/src/dxf-system/utils/get-win-draw-data.d.ts +18 -0
- package/src/dxf-system/utils/index.d.ts +8 -0
- package/src/dxf-system/utils/line-pipeline/builtin/axis-align-corr.d.ts +16 -0
- package/src/dxf-system/utils/line-pipeline/builtin/beam-support-line.d.ts +3 -0
- package/src/dxf-system/utils/line-pipeline/builtin/bound-ext.d.ts +8 -0
- package/src/dxf-system/utils/line-pipeline/builtin/build-group/bay-window.d.ts +7 -0
- package/src/dxf-system/utils/line-pipeline/builtin/build-group/double-wall.d.ts +6 -0
- package/src/dxf-system/utils/line-pipeline/builtin/build-group/index.d.ts +7 -0
- package/src/dxf-system/utils/line-pipeline/builtin/door-space-handle.d.ts +5 -0
- package/src/dxf-system/utils/line-pipeline/builtin/door-to-hole.d.ts +9 -0
- package/src/dxf-system/utils/line-pipeline/builtin/double-wall-alignment.d.ts +7 -0
- package/src/dxf-system/utils/line-pipeline/builtin/index.d.ts +39 -0
- package/src/dxf-system/utils/line-pipeline/builtin/init.d.ts +8 -0
- package/src/dxf-system/utils/line-pipeline/builtin/remove-room-sundries.d.ts +3 -0
- package/src/dxf-system/utils/line-pipeline/builtin/remove-short-double-wall.d.ts +6 -0
- package/src/dxf-system/utils/line-pipeline/builtin/wall-height-handle.d.ts +8 -0
- package/src/dxf-system/utils/line-pipeline/index.d.ts +22 -0
- package/src/dxf-system/utils/remove-dangline.d.ts +7 -0
- package/src/dxf-system/utils/tools.d.ts +91 -0
- package/src/index.css +1 -0
- package/src/index.js +1 -0
- package/src/index2.js +1 -0
- package/src/index3.js +1 -0
- package/src/main.d.ts +0 -0
- package/src/pages/CubeView.vue.d.ts +4 -0
- package/src/pages/DxfPreview.vue.d.ts +9 -0
- package/src/pages/Editor.vue.d.ts +8 -0
- package/src/pages/ExportGLB.vue.d.ts +2 -0
- package/src/pages/ImagePreview.vue.d.ts +9 -0
- package/src/pages/ModelView.vue.d.ts +11 -0
- package/src/pages/Setting.vue.d.ts +6 -0
- package/src/pages/Todo.vue.d.ts +2 -0
- package/src/pages/WallView.vue.d.ts +9 -0
- package/src/pages/WindowManager.vue.d.ts +2 -0
- package/src/pages/buildJson.vue.d.ts +4 -0
- package/src/pages/modelCarrier/index.vue.d.ts +4 -0
- package/src/router/index.d.ts +2 -0
- package/src/utils/EventDispatcher.d.ts +18 -0
- package/src/utils/algorithms/AlignToParallelSegments.d.ts +25 -0
- package/src/utils/algorithms/AxisAlignCorr.d.ts +38 -0
- package/src/utils/algorithms/Box2.d.ts +96 -0
- package/src/utils/algorithms/CheckPointCloudContinuity.d.ts +63 -0
- package/src/utils/algorithms/ConstraintSystem.d.ts +17 -0
- package/src/utils/algorithms/ConvexHullGraham.d.ts +16 -0
- package/src/utils/algorithms/Debouncing.d.ts +10 -0
- package/src/utils/algorithms/LineIndexGenerator.d.ts +12 -0
- package/src/utils/algorithms/LineQueryer.d.ts +42 -0
- package/src/utils/algorithms/LineSegment.d.ts +258 -0
- package/src/utils/algorithms/LineSegmentSpatialHash.d.ts +86 -0
- package/src/utils/algorithms/LineSegmentUtils.d.ts +185 -0
- package/src/utils/algorithms/Map.d.ts +38 -0
- package/src/utils/algorithms/MaxiCircles.d.ts +15 -0
- package/src/utils/algorithms/MiniCircles.d.ts +57 -0
- package/src/utils/algorithms/OBB.d.ts +30 -0
- package/src/utils/algorithms/PCSparseOctree.d.ts +56 -0
- package/src/utils/algorithms/Pipeline.d.ts +20 -0
- package/src/utils/algorithms/Point.d.ts +271 -0
- package/src/utils/algorithms/PointSpatialHash.d.ts +149 -0
- package/src/utils/algorithms/PointUtils.d.ts +47 -0
- package/src/utils/algorithms/Polygon.d.ts +164 -0
- package/src/utils/algorithms/PolygonUtils.d.ts +9 -0
- package/src/utils/algorithms/Quadtree.d.ts +89 -0
- package/src/utils/algorithms/Rectangle.d.ts +62 -0
- package/src/utils/algorithms/UndirectedGraph.d.ts +124 -0
- package/src/utils/algorithms/UnionFindSet.d.ts +12 -0
- package/src/utils/algorithms/ccw.d.ts +2 -0
- package/src/utils/algorithms/lazy.d.ts +14 -0
- package/src/utils/algorithms/precision.d.ts +3 -0
- package/src/utils/algorithms/stepElimination.d.ts +6 -0
- package/src/utils/algorithms/uuid.d.ts +1 -0
- package/src/utils/command/CommandFlow.d.ts +45 -0
- package/src/utils/command/CommandSystem.d.ts +96 -0
- package/src/utils/command/index.d.ts +2 -0
- package/src/utils/decorators/measure-time.d.ts +5 -0
- package/src/utils/ecs/Component.d.ts +18 -0
- package/src/utils/ecs/Container.d.ts +47 -0
- package/src/utils/ecs/index.d.ts +4 -0
- package/src/utils/geometry-manager/GeometryManager.d.ts +2 -0
- package/src/utils/index.d.ts +25 -0
- package/src/utils/modelScenario/bayWindow.d.ts +35 -0
- package/src/utils/modelScenario/scenario.d.ts +92 -0
- package/src/utils/three-object-3d/ExtrudeMesh.d.ts +11 -0
- package/src/utils/three-object-3d/LineAlignmentGuide.d.ts +20 -0
- package/src/utils/three-object-3d/Lines.d.ts +25 -0
- package/src/utils/three-object-3d/Lines2.d.ts +22 -0
- package/src/utils/three-object-3d/Shape2D.d.ts +61 -0
- package/src/utils/tools/GCHandle.d.ts +12 -0
- package/src/utils/tools/Gltf.d.ts +7 -0
- package/src/utils/tools/SnapLine.d.ts +19 -0
- package/src/utils/tools/StorageHelper.d.ts +8 -0
- package/src/utils/tools/clone-user-data.d.ts +7 -0
- package/src/utils/tools/create-html.d.ts +9 -0
- package/src/utils/tools/create-promise.d.ts +5 -0
- package/src/utils/tools/createVueApp.d.ts +1 -0
- package/src/utils/tools/download.d.ts +1 -0
- package/src/utils/tools/get-json.d.ts +5 -0
- package/src/utils/tools/include.d.ts +1 -0
- package/src/utils/tools/is-mobile.d.ts +2 -0
- package/src/utils/tools/repetitive-task.d.ts +1 -0
- package/src/utils/tools/selectLocal-file.d.ts +7 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
name?: string;
|
|
3
|
+
title: string;
|
|
4
|
+
position?: {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_defaults: {
|
|
10
|
+
showContent: boolean;
|
|
11
|
+
showTitle: boolean;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_PublicProps = {
|
|
14
|
+
"showContent"?: typeof __VLS_defaults['showContent'];
|
|
15
|
+
"showTitle"?: typeof __VLS_defaults['showTitle'];
|
|
16
|
+
} & __VLS_Props;
|
|
17
|
+
declare function __VLS_template(): {
|
|
18
|
+
attrs: Partial<{}>;
|
|
19
|
+
slots: {
|
|
20
|
+
icon?(_: {}): any;
|
|
21
|
+
default?(_: {}): any;
|
|
22
|
+
};
|
|
23
|
+
refs: {
|
|
24
|
+
elRef: HTMLDivElement;
|
|
25
|
+
toolBarRef: HTMLDivElement;
|
|
26
|
+
};
|
|
27
|
+
rootEl: HTMLDivElement;
|
|
28
|
+
};
|
|
29
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
30
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
31
|
+
clickIcon: (...args: any[]) => void;
|
|
32
|
+
"update:showContent": (value: boolean) => void;
|
|
33
|
+
"update:showTitle": (value: boolean) => void;
|
|
34
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
35
|
+
onClickIcon?: ((...args: any[]) => any) | undefined;
|
|
36
|
+
"onUpdate:showContent"?: ((value: boolean) => any) | undefined;
|
|
37
|
+
"onUpdate:showTitle"?: ((value: boolean) => any) | undefined;
|
|
38
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
39
|
+
elRef: HTMLDivElement;
|
|
40
|
+
toolBarRef: HTMLDivElement;
|
|
41
|
+
}, HTMLDivElement>;
|
|
42
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
43
|
+
export default _default;
|
|
44
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
45
|
+
new (): {
|
|
46
|
+
$slots: S;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
showCancel?: boolean;
|
|
3
|
+
showMax?: boolean;
|
|
4
|
+
showMin?: boolean;
|
|
5
|
+
showConfirm?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_defaults: {
|
|
8
|
+
modelValue: string;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_PublicProps = {
|
|
11
|
+
modelValue?: typeof __VLS_defaults['modelValue'];
|
|
12
|
+
} & __VLS_Props;
|
|
13
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
|
+
min: (...args: any[]) => void;
|
|
15
|
+
max: (...args: any[]) => void;
|
|
16
|
+
cancel: (...args: any[]) => void;
|
|
17
|
+
confirm: (...args: any[]) => void;
|
|
18
|
+
"update:modelValue": (value: string) => void;
|
|
19
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
20
|
+
onMin?: ((...args: any[]) => any) | undefined;
|
|
21
|
+
onMax?: ((...args: any[]) => any) | undefined;
|
|
22
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
|
23
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
24
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
25
|
+
}>, {
|
|
26
|
+
showCancel: boolean;
|
|
27
|
+
showMax: boolean;
|
|
28
|
+
showMin: boolean;
|
|
29
|
+
showConfirm: boolean;
|
|
30
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
31
|
+
inputElRef: HTMLDivElement;
|
|
32
|
+
}, HTMLDivElement>;
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const API_BASE_URL = "";
|
|
2
|
+
export declare const VITE_OSS_BASEURL: any;
|
|
3
|
+
export declare const DEFAULT_WALL_WIDTH = 0.12;
|
|
4
|
+
export declare const MAX_WALL_WIDTH = 0.3;
|
|
5
|
+
export declare const DEFAULT_WALL_HEIGHT = 2.8;
|
|
6
|
+
export declare const DOUBLE_WALL_FIND_WIDTH = 0.4;
|
|
7
|
+
export declare const DEFAULT_DOOR_HEIGHT = 2.1;
|
|
8
|
+
export declare const DOUBLE_DOOR_WIDTH = 1.5;
|
|
9
|
+
export declare const DOOR_GROUND_CLEARANCE_HEIGHT = 0;
|
|
10
|
+
export declare const DEFAULT_WINDOW_HEIGHT = 0.8;
|
|
11
|
+
export declare const WINDOW_GROUND_CLEARANCE_HEIGHT = 0.7;
|
package/src/demo.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ComponentContainer } from '../utils/ecs';
|
|
2
|
+
import { CorrectionDxf } from './components/CorrectionDxf';
|
|
3
|
+
import { Dxf } from './components/Dxf';
|
|
4
|
+
import { ThreeVJia } from './components/ThreeVJia';
|
|
5
|
+
import { Variable } from './components/Variable';
|
|
6
|
+
export declare class DxfSystem extends ComponentContainer {
|
|
7
|
+
Dxf: Dxf;
|
|
8
|
+
Variable: Variable;
|
|
9
|
+
CorrectionDxf: CorrectionDxf;
|
|
10
|
+
wallWidth: number;
|
|
11
|
+
environment: "node" | "browser" | "unknown";
|
|
12
|
+
static finalInstance?: DxfSystem;
|
|
13
|
+
/** 构造函数
|
|
14
|
+
* @param wallWidth 输出墙壁厚度,该墙壁厚度不受缩放影响
|
|
15
|
+
*/
|
|
16
|
+
constructor(wallWidth?: number);
|
|
17
|
+
usePlugin(plugin: (this: DxfSystem, dxfSystem: DxfSystem) => void): this;
|
|
18
|
+
destroy(): void;
|
|
19
|
+
}
|
|
20
|
+
declare const components: {
|
|
21
|
+
ThreeVJia: typeof ThreeVJia;
|
|
22
|
+
Variable: typeof Variable;
|
|
23
|
+
Dxf: typeof Dxf;
|
|
24
|
+
CorrectionDxf: typeof CorrectionDxf;
|
|
25
|
+
};
|
|
26
|
+
export { components };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { DxfSystem } from '.';
|
|
2
|
+
import { LineUserData, OriginalDataItem, SetDataOption } from './type';
|
|
3
|
+
import { WhiteModel } from './plugins/model3d/components/WhiteModel';
|
|
4
|
+
import { LineSegment } from '../utils';
|
|
5
|
+
import * as THREE from "three";
|
|
6
|
+
import * as ModelDataPlugin from "./plugins/model3d";
|
|
7
|
+
import * as utils from "../utils";
|
|
8
|
+
import * as dxfSystem from ".";
|
|
9
|
+
export { ModelDataPlugin, utils, dxfSystem };
|
|
10
|
+
/** 快捷创建编辑器
|
|
11
|
+
* @param dom
|
|
12
|
+
* @param camera
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
export declare function createEditor(dom: HTMLDivElement, camera?: THREE.Camera, orbitControls?: boolean, viewPermission?: 'admin'): Promise<{
|
|
16
|
+
dxfSystem: DxfSystem;
|
|
17
|
+
getFileAll: () => Promise<{
|
|
18
|
+
dxf: File;
|
|
19
|
+
obj: File;
|
|
20
|
+
glb: File;
|
|
21
|
+
gltf: File;
|
|
22
|
+
json: File;
|
|
23
|
+
jpg: File;
|
|
24
|
+
correctionDxf: File;
|
|
25
|
+
}>;
|
|
26
|
+
}>;
|
|
27
|
+
/**
|
|
28
|
+
* @param originData
|
|
29
|
+
* @param trajectory
|
|
30
|
+
* @deprecated 已废弃,请勿使用
|
|
31
|
+
*/
|
|
32
|
+
export declare function getModels(originData: OriginalDataItem[], trajectory: any, itemList: any): Promise<{
|
|
33
|
+
glb: File;
|
|
34
|
+
gltf: File;
|
|
35
|
+
}>;
|
|
36
|
+
type HandleJsonOption = {
|
|
37
|
+
/** json数据或路径 */
|
|
38
|
+
json: string | OriginalDataItem[];
|
|
39
|
+
trajectory?: string | Record<string, any>;
|
|
40
|
+
itemInfo?: string | Record<string, any>;
|
|
41
|
+
axisAlignCorr?: boolean;
|
|
42
|
+
axisAlignCorrOption?: SetDataOption;
|
|
43
|
+
doorFind?: boolean;
|
|
44
|
+
buildGround?: boolean;
|
|
45
|
+
download?: {
|
|
46
|
+
json?: string;
|
|
47
|
+
dxf?: string;
|
|
48
|
+
image?: string;
|
|
49
|
+
correctionJson?: string;
|
|
50
|
+
correctionDxf?: string;
|
|
51
|
+
correctionImage?: string;
|
|
52
|
+
gltf?: string;
|
|
53
|
+
glb?: string;
|
|
54
|
+
obj?: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
/** 快捷构建需要的json文件
|
|
58
|
+
* @param opt
|
|
59
|
+
* @returns
|
|
60
|
+
*/
|
|
61
|
+
export declare function buildJson(opt: HandleJsonOption, dxfSystem?: DxfSystem): Promise<{
|
|
62
|
+
dxfSystem: DxfSystem;
|
|
63
|
+
threeVJia: utils.Component<{}> | null;
|
|
64
|
+
whiteModel: WhiteModel;
|
|
65
|
+
}>;
|
|
66
|
+
/** 获取所有文件数据
|
|
67
|
+
* @param dxfSystem
|
|
68
|
+
*/
|
|
69
|
+
export declare function getFileAll(dxfSystem?: DxfSystem): Promise<{
|
|
70
|
+
dxf: File;
|
|
71
|
+
obj: File;
|
|
72
|
+
glb: File;
|
|
73
|
+
gltf: File;
|
|
74
|
+
json: File;
|
|
75
|
+
jpg: File;
|
|
76
|
+
correctionDxf: File;
|
|
77
|
+
}>;
|
|
78
|
+
/** 获取全局DxfSystem
|
|
79
|
+
* @returns
|
|
80
|
+
*/
|
|
81
|
+
export declare function getGlobalDxfSystem(): DxfSystem | null;
|
|
82
|
+
/** 检测原始数据线段一侧是否属于环
|
|
83
|
+
* @param lineData
|
|
84
|
+
* @param startIndex
|
|
85
|
+
* @param direction
|
|
86
|
+
* @returns
|
|
87
|
+
*/
|
|
88
|
+
export declare function hasCircle(lineData: OriginalDataItem[], startIndex: number, direction?: any): {
|
|
89
|
+
readonly originalIndices: number[];
|
|
90
|
+
readonly indices: number[];
|
|
91
|
+
circle: LineSegment<Record<string, any>>[];
|
|
92
|
+
originalLines: LineSegment<LineUserData>[];
|
|
93
|
+
lines: LineSegment<Record<string, any>>[];
|
|
94
|
+
} | null;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { SetDataOption, OriginalDataItem, Unit } from '../type';
|
|
2
|
+
import { CAD } from '../utils/cad';
|
|
3
|
+
import { DxfSystem } from '../DxfSystem';
|
|
4
|
+
import { Dxf } from './Dxf';
|
|
5
|
+
/**
|
|
6
|
+
* 将点云结构转换为DXF格式
|
|
7
|
+
*/
|
|
8
|
+
export declare class CorrectionDxf<TEventMap extends {} = {}> extends Dxf<{} & TEventMap> {
|
|
9
|
+
static name: string;
|
|
10
|
+
rotateCorrCad?: CAD;
|
|
11
|
+
angle: number;
|
|
12
|
+
constructor();
|
|
13
|
+
onAddFromParent(parent: DxfSystem): void;
|
|
14
|
+
/** 设置
|
|
15
|
+
* @param data 房屋结构数据,node环境可以为路径
|
|
16
|
+
* @param width 墙体宽度
|
|
17
|
+
* @param scale 缩放比例
|
|
18
|
+
* @param axisAlignmentCorrection 需要执行轴对称垂直纠正
|
|
19
|
+
* @param option
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
22
|
+
set(data: OriginalDataItem[], options?: SetDataOption): any;
|
|
23
|
+
/** 获取 dxf 图片 二进制对象
|
|
24
|
+
* @param type
|
|
25
|
+
*/
|
|
26
|
+
toRCDxfImageBlob(unit?: Unit, type?: string, background?: string): Promise<any>;
|
|
27
|
+
/** 下载 dxf 图片
|
|
28
|
+
* @param filename
|
|
29
|
+
*/
|
|
30
|
+
downloadRCDxfImage(filename: string, unit?: Unit, type?: string): Promise<boolean | undefined>;
|
|
31
|
+
/**
|
|
32
|
+
* 将点json结构转换为Dxf 字符串
|
|
33
|
+
*/
|
|
34
|
+
toRCDxfString(unit?: Unit): string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* 将点云结构转换为 DXF 二进制对象
|
|
37
|
+
* @returns
|
|
38
|
+
*/
|
|
39
|
+
toRCDxfBlob(unit?: Unit): Blob | undefined;
|
|
40
|
+
/** 下载Dxf
|
|
41
|
+
* @param filename
|
|
42
|
+
*/
|
|
43
|
+
downloadRCDxf(filename: string, unit?: Unit): Promise<void | undefined>;
|
|
44
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { Component } from '../../utils/ecs';
|
|
2
|
+
import { Box2 } from '../../utils/algorithms/Box2';
|
|
3
|
+
import { LineSegment } from '../../utils/algorithms/LineSegment';
|
|
4
|
+
import { Quadtree } from '../../utils/algorithms/Quadtree';
|
|
5
|
+
import { SetDataOption, DataItem, LineUserData, OriginalDataItem, Unit } from '../type';
|
|
6
|
+
import { CAD } from '../utils/cad';
|
|
7
|
+
import { LinePipeline } from '../utils/line-pipeline';
|
|
8
|
+
/**
|
|
9
|
+
* 将点云结构转换为DXF格式
|
|
10
|
+
*/
|
|
11
|
+
export declare class Dxf<TEventMap extends {} = {}> extends Component<{
|
|
12
|
+
dataChange: {
|
|
13
|
+
originalData: OriginalDataItem[];
|
|
14
|
+
data: DataItem[];
|
|
15
|
+
cad: CAD;
|
|
16
|
+
options: SetDataOption;
|
|
17
|
+
};
|
|
18
|
+
cadChange: {
|
|
19
|
+
cad: CAD;
|
|
20
|
+
options: SetDataOption;
|
|
21
|
+
};
|
|
22
|
+
} & TEventMap> {
|
|
23
|
+
static name: string;
|
|
24
|
+
width: number;
|
|
25
|
+
originalData: OriginalDataItem[];
|
|
26
|
+
data: DataItem[];
|
|
27
|
+
box: Box2;
|
|
28
|
+
cad: CAD | null;
|
|
29
|
+
lineSegments: LineSegment<LineUserData>[];
|
|
30
|
+
doorLineSegment: LineSegment[];
|
|
31
|
+
verticalReferenceLine?: LineSegment<LineUserData>;
|
|
32
|
+
originalZAverage: number;
|
|
33
|
+
linePipeline: LinePipeline<SetDataOption>;
|
|
34
|
+
/** 原始数据组
|
|
35
|
+
*/
|
|
36
|
+
get lines(): LineSegment<LineUserData>[];
|
|
37
|
+
/**初始化
|
|
38
|
+
* @param width 墙体宽度
|
|
39
|
+
*/
|
|
40
|
+
constructor(width?: number);
|
|
41
|
+
/** 完整线段数据
|
|
42
|
+
* @returns
|
|
43
|
+
*/
|
|
44
|
+
getLineSegments(clone?: boolean): LineSegment<LineUserData>[];
|
|
45
|
+
/**
|
|
46
|
+
* 预处理数据
|
|
47
|
+
* @param data
|
|
48
|
+
*/
|
|
49
|
+
protected preprocessing(data: OriginalDataItem[], options: SetDataOption): {
|
|
50
|
+
lineSegments: LineSegment<LineUserData>[];
|
|
51
|
+
data: OriginalDataItem[];
|
|
52
|
+
};
|
|
53
|
+
/** 设置
|
|
54
|
+
* @param data 房屋结构数据,node环境可以为路径
|
|
55
|
+
* @param width 墙体宽度
|
|
56
|
+
* @param scale 缩放比例
|
|
57
|
+
* @param axisAlignmentCorrection 需要执行轴对称垂直纠正
|
|
58
|
+
* @param option
|
|
59
|
+
* @returns
|
|
60
|
+
*/
|
|
61
|
+
options: SetDataOption;
|
|
62
|
+
set(data: OriginalDataItem[] | string, options?: SetDataOption): Promise<any>;
|
|
63
|
+
/**
|
|
64
|
+
* 线段数据转为原始json数据
|
|
65
|
+
*/
|
|
66
|
+
toOriginalData(quadtree?: Quadtree): OriginalDataItem[];
|
|
67
|
+
/**
|
|
68
|
+
* 下载原始json
|
|
69
|
+
* @param filename
|
|
70
|
+
*/
|
|
71
|
+
downloadOriginalData(filename: string): Promise<void>;
|
|
72
|
+
/** 获取绘制数据
|
|
73
|
+
*/
|
|
74
|
+
toDrawData(unit?: Unit): import('../utils/cad/draw-data').DrawData | undefined;
|
|
75
|
+
/** 获取 dxf 图片 二进制对象
|
|
76
|
+
* @param type
|
|
77
|
+
*/
|
|
78
|
+
toDxfImageBlob(unit?: Unit, type?: string, background?: string): Promise<any>;
|
|
79
|
+
/** 下载 dxf 图片
|
|
80
|
+
* @param filename
|
|
81
|
+
*/
|
|
82
|
+
downloadDxfImage(filename: string, unit?: Unit, type?: string): Promise<boolean | undefined>;
|
|
83
|
+
/**
|
|
84
|
+
* 将点json结构转换为Dxf 字符串
|
|
85
|
+
*/
|
|
86
|
+
toDxfString(unit?: Unit): string | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* 将点云结构转换为 DXF 二进制对象
|
|
89
|
+
* @returns
|
|
90
|
+
*/
|
|
91
|
+
toDxfBlob(unit?: Unit): Blob | undefined;
|
|
92
|
+
/** 下载Dxf
|
|
93
|
+
* @param filename
|
|
94
|
+
*/
|
|
95
|
+
downloadDxf(filename: string, unit?: Unit): Promise<void | undefined>;
|
|
96
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Component } from '../../utils/ecs';
|
|
2
|
+
import { LineSegment } from '../../utils/algorithms/LineSegment';
|
|
3
|
+
import { LineUserData } from '../type';
|
|
4
|
+
import { ThreeVJiaJsonObject } from '../utils/ThreeVJiaPipeline';
|
|
5
|
+
/**
|
|
6
|
+
* 转为 三维家 墙体结构
|
|
7
|
+
*/
|
|
8
|
+
export declare class ThreeVJia extends Component<{
|
|
9
|
+
updateData: {};
|
|
10
|
+
}> {
|
|
11
|
+
static name: string;
|
|
12
|
+
lineSegments: LineSegment<LineUserData>[];
|
|
13
|
+
neededUpdate: boolean;
|
|
14
|
+
trajectory?: Record<string, any> | undefined;
|
|
15
|
+
/**
|
|
16
|
+
*/
|
|
17
|
+
onAddFromParent(): void;
|
|
18
|
+
private cacheJson?;
|
|
19
|
+
/** 更新
|
|
20
|
+
*/
|
|
21
|
+
updateData(): void;
|
|
22
|
+
/** 转为json
|
|
23
|
+
* @param name
|
|
24
|
+
* @param communityName
|
|
25
|
+
* @returns
|
|
26
|
+
*/
|
|
27
|
+
toJson(name?: string, communityName?: string): ThreeVJiaJsonObject | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* 下载
|
|
30
|
+
* @param filename
|
|
31
|
+
*/
|
|
32
|
+
download(filename?: string): Promise<void>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Component } from '../../utils/ecs';
|
|
2
|
+
type EventData<T> = {
|
|
3
|
+
value: T;
|
|
4
|
+
oldValue: T;
|
|
5
|
+
};
|
|
6
|
+
interface EventType {
|
|
7
|
+
originalLineVisible: EventData<boolean>;
|
|
8
|
+
dxfVisible: EventData<boolean>;
|
|
9
|
+
whiteModelVisible: EventData<boolean>;
|
|
10
|
+
isLook: EventData<boolean>;
|
|
11
|
+
currentWheel: EventData<number>;
|
|
12
|
+
pointerMove: EventData<{
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
}>;
|
|
16
|
+
currentKeyUp: EventData<string>;
|
|
17
|
+
currentKeyDown: EventData<string>;
|
|
18
|
+
currentMouseUp: EventData<string>;
|
|
19
|
+
currentMouseDown: EventData<string>;
|
|
20
|
+
focus: EventData<boolean>;
|
|
21
|
+
}
|
|
22
|
+
export declare class Variable extends Component<EventType> {
|
|
23
|
+
static name: string;
|
|
24
|
+
originalLineVisible: boolean;
|
|
25
|
+
dxfVisible: boolean;
|
|
26
|
+
whiteModelVisible: boolean;
|
|
27
|
+
isLook: boolean;
|
|
28
|
+
currentWheel: number;
|
|
29
|
+
pointerMove: {
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
};
|
|
33
|
+
currentKeyUp: string;
|
|
34
|
+
currentKeyDown: string;
|
|
35
|
+
currentMouseUp: string;
|
|
36
|
+
currentMouseDown: string;
|
|
37
|
+
focus: boolean;
|
|
38
|
+
set<KeyT extends keyof EventType>(key: KeyT, value: any): void;
|
|
39
|
+
get<KeyT extends keyof EventType>(key: KeyT): this[KeyT] | undefined;
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DrawHole, DrawHoleData } from './DrawHole';
|
|
2
|
+
import { LineSegment, NextFn } from '../../../../utils';
|
|
3
|
+
import { LineType } from '../us-service/PointerFollowMove';
|
|
4
|
+
import * as THREE from "three";
|
|
5
|
+
export type ClippingLineData = {
|
|
6
|
+
target: LineSegment;
|
|
7
|
+
newLines: LineSegment[];
|
|
8
|
+
};
|
|
9
|
+
export declare class ClippingLine extends DrawHole {
|
|
10
|
+
static name: string;
|
|
11
|
+
container: THREE.Group<THREE.Object3DEventMap>;
|
|
12
|
+
static shortcutKeys: string[];
|
|
13
|
+
static commandName: string;
|
|
14
|
+
showEditHeight: boolean;
|
|
15
|
+
showEditGroundClearance: boolean;
|
|
16
|
+
lineSelectorType: LineType;
|
|
17
|
+
end(next: NextFn<ClippingLineData>, data: DrawHoleData): void;
|
|
18
|
+
/** 执行完成
|
|
19
|
+
*/
|
|
20
|
+
onCompleted(data: ClippingLineData): void;
|
|
21
|
+
/** 回滚操作
|
|
22
|
+
* @param data
|
|
23
|
+
*/
|
|
24
|
+
onRollback(data: ClippingLineData): ClippingLineData;
|
|
25
|
+
/** 撤回回滚
|
|
26
|
+
* @param data
|
|
27
|
+
* @returns
|
|
28
|
+
*/
|
|
29
|
+
onRevokeRollback(data: ClippingLineData): ClippingLineData;
|
|
30
|
+
}
|