build-dxf 0.0.52 → 0.0.54

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.
@@ -117,7 +117,7 @@ export declare class Dxf<TEventMap extends {} = {}> extends Component<{
117
117
  /** 垂直纠正
118
118
  * @param option
119
119
  */
120
- axisAlignCorr(option?: AxisAlignmentCorrectionOption): void;
120
+ axisAlignCorr(option?: AxisAlignmentCorrectionOption): Promise<void>;
121
121
  /** 完整线段数据
122
122
  * @returns
123
123
  */
@@ -5,7 +5,7 @@ import { Renderer, DomContainer, DomEventRegister, EventInput } from '../../Rend
5
5
  import { RenderManager } from './RenderManager';
6
6
  import { CommandManager } from '../../../../CommandManager';
7
7
  import { App } from 'vue';
8
- import { DxfSystem } from '../../../../../build';
8
+ import { DxfSystem } from '../../..';
9
9
  import * as THREE from "three";
10
10
  export declare class Editor extends Component<{
11
11
  pointerPositionChange: {
@@ -1,7 +1,7 @@
1
- export * from './Editor';
2
1
  export * from './RenderManager';
3
2
  export * from './CommandFlow/Default';
4
3
  export * from './CommandFlow/DrawDoorLine';
5
4
  export * from './CommandFlow/DrawLine';
6
5
  export * from './CommandFlow/DrawWindow';
7
6
  export * from './CommandFlow/VerticalCorrection';
7
+ export * from './Editor';
@@ -0,0 +1,16 @@
1
+ import { LineSegment } from '../../LineSegment';
2
+ import { LineUserData } from '../type';
3
+ type LineSegmentType = LineSegment<LineUserData>;
4
+ export declare class CAD {
5
+ lines: LineSegmentType[];
6
+ /** 添加线段
7
+ * @param arg
8
+ */
9
+ addLine(...arg: LineSegmentType[]): void;
10
+ removeLine(): void;
11
+ /** 添加线偏移
12
+ * @description 使用 ClipperLib 对每个点组进行线偏移处理,生成具有指定宽度的墙体路径
13
+ */
14
+ clear(): void;
15
+ }
16
+ export {};
@@ -220,6 +220,11 @@ export declare class LineSegment<T = Record<string, any>> {
220
220
  * @returns
221
221
  */
222
222
  static groupByPath(lines: LineSegment[]): LineSegment<Record<string, any>>[][];
223
+ /** 通过最大叶子路径,给线段分组,每条路径没有分叉
224
+ * @param lines
225
+ * @returns
226
+ */
227
+ static groupByLeafPath(lines: LineSegment[]): LineSegment<Record<string, any>>[][];
223
228
  /** 分组,通过点
224
229
  * @param lines
225
230
  * @returns
@@ -23,9 +23,19 @@ export declare class Polygon<T = any> extends Array<Point<T>> {
23
23
  * @returns
24
24
  */
25
25
  pointWithin(point: Point): boolean;
26
- /** 通过线段创建
26
+ /** 转为线段
27
+ * @param closed
28
+ * @returns
29
+ */
30
+ toLines(closed?: boolean): LineSegment<Record<string, any>>[];
31
+ /** 通过线段创建, 默认路径只有一条
27
32
  * @param lines
28
33
  * @returns
29
34
  */
30
35
  static fromByLines(lines: LineSegment[]): Polygon<Record<string, any>>;
36
+ /** 通过线段创建,返回所有路径
37
+ * @description 处理线路拓扑,使线路有序链接,形成长路径
38
+ * @param lines
39
+ */
40
+ static multipleFromByLines(lines: LineSegment[]): Polygon<Record<string, any>>[];
31
41
  }