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
package/src/main.d.ts
ADDED
|
File without changes
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
2
|
+
containerRef: HTMLDivElement;
|
|
3
|
+
}, HTMLDivElement>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {
|
|
2
|
+
src: string;
|
|
3
|
+
$props: {
|
|
4
|
+
readonly src?: string | undefined;
|
|
5
|
+
};
|
|
6
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
7
|
+
container: HTMLDivElement;
|
|
8
|
+
}, HTMLDivElement>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Manager } from 'split-window';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
manager: Manager;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
6
|
+
dom: HTMLDivElement;
|
|
7
|
+
}, HTMLDivElement>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {
|
|
2
|
+
src?: string | undefined;
|
|
3
|
+
$props: {
|
|
4
|
+
readonly src?: string | undefined;
|
|
5
|
+
};
|
|
6
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
7
|
+
imageRef: HTMLImageElement;
|
|
8
|
+
}, HTMLDivElement>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {
|
|
2
|
+
url: string;
|
|
3
|
+
type?: string | undefined;
|
|
4
|
+
$props: {
|
|
5
|
+
readonly url?: string | undefined;
|
|
6
|
+
readonly type?: string | undefined;
|
|
7
|
+
};
|
|
8
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
9
|
+
container: HTMLDivElement;
|
|
10
|
+
}, HTMLDivElement>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TabPageEventPanel } from 'split-window';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
eventPanel: TabPageEventPanel;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {
|
|
2
|
+
url?: Record<string, any> | undefined;
|
|
3
|
+
$props: {
|
|
4
|
+
readonly url?: Record<string, any> | undefined;
|
|
5
|
+
};
|
|
6
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
7
|
+
elRef: HTMLDivElement;
|
|
8
|
+
}, any>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
2
|
+
dom: HTMLDivElement;
|
|
3
|
+
}, any>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
2
|
+
elRef: HTMLDivElement;
|
|
3
|
+
}, HTMLDivElement>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EventDispatcher as ED, EventListener } from 'three';
|
|
2
|
+
export declare class EventDispatcher<TEventMap extends {} = {}> extends ED<TEventMap> {
|
|
3
|
+
uuid: string;
|
|
4
|
+
addEventListener<T extends Extract<keyof TEventMap, string>>(type: T, listener: EventListener<TEventMap[T], T, this>, option?: {
|
|
5
|
+
once: boolean;
|
|
6
|
+
}): () => void;
|
|
7
|
+
private eventRecordStack;
|
|
8
|
+
addEventRecord(name: string | string[], ...cancels: (() => void)[]): {
|
|
9
|
+
add: (cancel: () => void) => {
|
|
10
|
+
add: /*elided*/ any;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
/** 取消事件记录
|
|
14
|
+
* @param name
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
cancelEventRecord(name: string | string[]): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { LineSegment } from './LineSegment';
|
|
2
|
+
type OnGroupFun = (group: LineSegment[], projValues: number[], axis: LineSegment) => void;
|
|
3
|
+
export interface AlignDescriptor {
|
|
4
|
+
esp?: number;
|
|
5
|
+
gap?: number;
|
|
6
|
+
onMergeLine?: (target: LineSegment, source: LineSegment) => void;
|
|
7
|
+
onGroup?: OnGroupFun;
|
|
8
|
+
onSegmentClippedAway?: (target: LineSegment, clipLines: LineSegment[]) => void;
|
|
9
|
+
onLayoutDesign?: (lines: LineSegment[], DELETE_SYMBOL: symbol) => void;
|
|
10
|
+
}
|
|
11
|
+
/** 通过平行轴和垂直轴分组对齐线段,搭配垂直纠正使用
|
|
12
|
+
*/
|
|
13
|
+
export declare class AlignToParallelSegments {
|
|
14
|
+
/** 拟合并对齐线段
|
|
15
|
+
* @param groups
|
|
16
|
+
* @param verticalLines
|
|
17
|
+
*/
|
|
18
|
+
static fittingAlignment(groups: LineSegment[][], verticalLines: LineSegment[], opt?: AlignDescriptor): LineSegment<Record<string, any>>[];
|
|
19
|
+
/** 对齐到平行线段, 请在垂直纠正(AxisAlignCorr)后使用
|
|
20
|
+
* @param lines
|
|
21
|
+
* @returns
|
|
22
|
+
*/
|
|
23
|
+
static align(lines: LineSegment[], opt?: AlignDescriptor): LineSegment<Record<string, any>>[];
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { LineSegment } from './LineSegment';
|
|
2
|
+
import { Point } from './Point';
|
|
3
|
+
export declare class AxisAlignCorr {
|
|
4
|
+
static start(lines: LineSegment[], targettLine: LineSegment, excludeLines?: LineSegment[]): LineSegment<any>[];
|
|
5
|
+
private lines;
|
|
6
|
+
private baseline;
|
|
7
|
+
private excludeLines;
|
|
8
|
+
private grid;
|
|
9
|
+
constructor(lines: LineSegment[], baseline: LineSegment, excludeLines?: LineSegment[]);
|
|
10
|
+
private visited;
|
|
11
|
+
private newLines;
|
|
12
|
+
private start;
|
|
13
|
+
/** 添加
|
|
14
|
+
* @param lines
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
private addVisited;
|
|
18
|
+
private queryPoint;
|
|
19
|
+
/** 纠正
|
|
20
|
+
* @param line
|
|
21
|
+
* @param targettLine
|
|
22
|
+
*/
|
|
23
|
+
private correction;
|
|
24
|
+
/** 递归执行
|
|
25
|
+
* @param line
|
|
26
|
+
* @param enterPoint
|
|
27
|
+
*/
|
|
28
|
+
private recursion;
|
|
29
|
+
/** 构建连接
|
|
30
|
+
*/
|
|
31
|
+
private establishConnection;
|
|
32
|
+
point: Point<Record<string, any>>;
|
|
33
|
+
/** 旋转
|
|
34
|
+
* @param line
|
|
35
|
+
* @param errAngle
|
|
36
|
+
*/
|
|
37
|
+
private rotate;
|
|
38
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { LineSegment } from './LineSegment';
|
|
2
|
+
import { Point } from './Point';
|
|
3
|
+
import { Rectangle } from './Rectangle';
|
|
4
|
+
export declare class Box2 {
|
|
5
|
+
minX: number;
|
|
6
|
+
maxX: number;
|
|
7
|
+
minY: number;
|
|
8
|
+
maxY: number;
|
|
9
|
+
get points(): Point<Record<string, any>>[];
|
|
10
|
+
get width(): number;
|
|
11
|
+
get height(): number;
|
|
12
|
+
get center(): Point<Record<string, any>>;
|
|
13
|
+
constructor(minX?: number, maxX?: number, minY?: number, maxY?: number);
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @param z
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
getPaths3D(z?: number): number[];
|
|
20
|
+
/**
|
|
21
|
+
* 判断线段是与包围盒相交
|
|
22
|
+
* @description Liang-Barsky算法的变种
|
|
23
|
+
* @param line
|
|
24
|
+
*/
|
|
25
|
+
intersectLineSegment(line: LineSegment): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* 判断线段是在包围盒内
|
|
28
|
+
* @param line
|
|
29
|
+
*/
|
|
30
|
+
containsLineSegment(line: LineSegment): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* 判断矩形与包围盒相交
|
|
33
|
+
* @param rectangle
|
|
34
|
+
*/
|
|
35
|
+
intersectRectangle(rectangle: Rectangle): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* 判断矩形是在包围盒内
|
|
38
|
+
* @param rectangle
|
|
39
|
+
*/
|
|
40
|
+
containsRectangle(rectangle: Rectangle): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* 判断包围盒与包围盒相交
|
|
43
|
+
* @param box
|
|
44
|
+
*/
|
|
45
|
+
intersectBox(box: Box2): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* 判断包围盒是在包围盒内
|
|
48
|
+
* @param box
|
|
49
|
+
*/
|
|
50
|
+
containsBox(box: Box2): boolean;
|
|
51
|
+
/** 判断点是在包围盒内
|
|
52
|
+
* @param point
|
|
53
|
+
*/
|
|
54
|
+
containsPoint(point: Point): boolean;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @param minX
|
|
58
|
+
* @param minY
|
|
59
|
+
* @param maxX
|
|
60
|
+
* @param maxY
|
|
61
|
+
* @returns
|
|
62
|
+
*/
|
|
63
|
+
set(minX: number, minY: number, maxX: number, maxY: number): this;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @param maxWidth
|
|
67
|
+
* @param maxHeight
|
|
68
|
+
* @param mode
|
|
69
|
+
* @returns
|
|
70
|
+
*/
|
|
71
|
+
scaleSize(maxWidth: number, maxHeight: number, mode?: 'min' | 'max'): number;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @param scalar
|
|
75
|
+
* @returns
|
|
76
|
+
*/
|
|
77
|
+
multiplyScalar(scalar: number): this;
|
|
78
|
+
expansion(w: number): this;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @returns
|
|
82
|
+
*/
|
|
83
|
+
clone(): Box2;
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @param points
|
|
87
|
+
* @returns
|
|
88
|
+
*/
|
|
89
|
+
static fromByPoints(...points: Point[]): Box2;
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* @param points
|
|
93
|
+
* @returns
|
|
94
|
+
*/
|
|
95
|
+
static fromByLineSegment<T = any>(...lines: LineSegment<T>[]): Box2;
|
|
96
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Vector3 } from 'three';
|
|
2
|
+
type Point3D = {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
z: number;
|
|
6
|
+
};
|
|
7
|
+
type LineSegmentType = {
|
|
8
|
+
start: {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
z?: number;
|
|
12
|
+
};
|
|
13
|
+
end: {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
z?: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* 检测点云在分部轴上的连续性,z朝上
|
|
21
|
+
*/
|
|
22
|
+
export declare class CheckPointCloudContinuity {
|
|
23
|
+
static continuity(ts: number[], len: number, gridSize?: number, ratio?: number): boolean;
|
|
24
|
+
/** 多轴投影连续性检测
|
|
25
|
+
* @param points
|
|
26
|
+
*/
|
|
27
|
+
static checkByProjectionContinuity(points: Point3D[], opt?: {
|
|
28
|
+
ratio?: number;
|
|
29
|
+
gridSize?: number;
|
|
30
|
+
axisLine?: LineSegmentType;
|
|
31
|
+
}): boolean;
|
|
32
|
+
/** 通过区域投影面积占比检测
|
|
33
|
+
* @param points
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
36
|
+
static checkByVoxelDensity(points: Point3D[], opt?: {
|
|
37
|
+
/**
|
|
38
|
+
* 体素大小
|
|
39
|
+
*/
|
|
40
|
+
gridSize?: number;
|
|
41
|
+
/**
|
|
42
|
+
* 竖直轴占比比例
|
|
43
|
+
*/
|
|
44
|
+
xRatio?: number;
|
|
45
|
+
/**
|
|
46
|
+
* 水平轴占比比例
|
|
47
|
+
*/
|
|
48
|
+
yRatio?: number;
|
|
49
|
+
/**
|
|
50
|
+
* 总占比比例
|
|
51
|
+
*/
|
|
52
|
+
overallRatio?: number;
|
|
53
|
+
axisLine?: LineSegmentType;
|
|
54
|
+
}): boolean;
|
|
55
|
+
/** 获取投影值
|
|
56
|
+
* @param points
|
|
57
|
+
* @param start
|
|
58
|
+
* @param end
|
|
59
|
+
* @returns
|
|
60
|
+
*/
|
|
61
|
+
static projectPoint(points: Point3D[], start: Vector3, end: Vector3): number[];
|
|
62
|
+
}
|
|
63
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare class Variable {
|
|
2
|
+
value: number;
|
|
3
|
+
fixed: boolean;
|
|
4
|
+
constructor(value: number, fixed?: boolean);
|
|
5
|
+
}
|
|
6
|
+
export interface Constraint {
|
|
7
|
+
evaluate(): number[];
|
|
8
|
+
}
|
|
9
|
+
export declare class ConstraintSystem {
|
|
10
|
+
constraints: Constraint[];
|
|
11
|
+
variables: Variable[];
|
|
12
|
+
addConstraint(c: Constraint): void;
|
|
13
|
+
addVariable(v: Variable): void;
|
|
14
|
+
residuals(): number[];
|
|
15
|
+
jacobian(eps?: number): number[][];
|
|
16
|
+
solve(iterations?: number): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface Point {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
}
|
|
5
|
+
export declare class ConvexHullAndrew {
|
|
6
|
+
private static cross;
|
|
7
|
+
/**
|
|
8
|
+
* Andrew 单调链算法计算凸包
|
|
9
|
+
* @param points 输入点集
|
|
10
|
+
* @param includeCollinear 是否保留共线点
|
|
11
|
+
* false(默认):严格凸包,只保留顶点
|
|
12
|
+
* true:边上共线点也保留
|
|
13
|
+
*/
|
|
14
|
+
static convexHull(points: Point[], includeCollinear?: boolean): Point[];
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LineSegment } from './LineSegment';
|
|
2
|
+
export declare class LineIndexGenerator {
|
|
3
|
+
private index;
|
|
4
|
+
get size(): number;
|
|
5
|
+
constructor(lines?: LineSegment[]);
|
|
6
|
+
private next;
|
|
7
|
+
reset(): void;
|
|
8
|
+
map: Map<LineSegment<Record<string, any>>, number>;
|
|
9
|
+
lineMap: Map<number, LineSegment<Record<string, any>>>;
|
|
10
|
+
getIndex(key: LineSegment): number;
|
|
11
|
+
getLine(index: number): LineSegment | undefined;
|
|
12
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { LineSegment } from './LineSegment';
|
|
2
|
+
import { LineSegmentSpatialHash } from './LineSegmentSpatialHash';
|
|
3
|
+
import { Point } from './Point';
|
|
4
|
+
import { PointSpatialHash } from './PointSpatialHash';
|
|
5
|
+
export declare class LineQueryer {
|
|
6
|
+
pointVirtualGrid: PointSpatialHash<LineSegment>;
|
|
7
|
+
lsh: LineSegmentSpatialHash;
|
|
8
|
+
constructor(lines: LineSegment[]);
|
|
9
|
+
update(lines: LineSegment[]): void;
|
|
10
|
+
clear(): void;
|
|
11
|
+
/**
|
|
12
|
+
* @param point
|
|
13
|
+
* @param radius
|
|
14
|
+
* @param opt
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
queryNearestPoint(point: Point, opt?: {
|
|
18
|
+
resultIndex?: number;
|
|
19
|
+
radius?: number;
|
|
20
|
+
condition?: (node: {
|
|
21
|
+
point: Point<Record<string, any>>;
|
|
22
|
+
userData?: LineSegment<Record<string, any>> | undefined;
|
|
23
|
+
}) => boolean;
|
|
24
|
+
}): {
|
|
25
|
+
point: Point<Record<string, any>>;
|
|
26
|
+
line: LineSegment;
|
|
27
|
+
} | null;
|
|
28
|
+
/**
|
|
29
|
+
* @param point
|
|
30
|
+
* @param radius
|
|
31
|
+
* @param opt
|
|
32
|
+
* @returns
|
|
33
|
+
*/
|
|
34
|
+
queryNearestLine(point: Point, opt?: {
|
|
35
|
+
resultIndex?: number;
|
|
36
|
+
radius?: number;
|
|
37
|
+
condition?: (target_line: LineSegment, point: Point) => boolean;
|
|
38
|
+
}): {
|
|
39
|
+
point: Point<Record<string, any>>;
|
|
40
|
+
line: LineSegment<Record<string, any>>;
|
|
41
|
+
} | null;
|
|
42
|
+
}
|