build-dxf 0.0.32 → 0.0.33

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.
@@ -143,7 +143,7 @@ export declare class Dxf<TEventMap extends {} = {}> extends Component<{
143
143
  * @param data
144
144
  */
145
145
  preprocessing(data: OriginalDataItem[], axisAlignmentCorrection?: boolean): {
146
- lineSegments: (LineSegment<Record<string, any>> | LineSegment<LineUserData>)[];
146
+ lineSegments: LineSegment<LineUserData>[];
147
147
  data: OriginalDataItem[];
148
148
  };
149
149
  /**
@@ -260,6 +260,17 @@ export declare class Dxf<TEventMap extends {} = {}> extends Component<{
260
260
  * @param targettLine 轴线段
261
261
  * @returns
262
262
  */
263
- static axisAlignmentCorrection(lines: LineSegment[], targettLine: LineSegment): (LineSegment<Record<string, any>> | LineSegment<LineUserData>)[];
263
+ static axisAlignmentCorrection(lines: LineSegment[], targettLine: LineSegment): LineSegment<LineUserData>[];
264
+ /**
265
+ * @param lines
266
+ * @param trajectoryPositions
267
+ * @returns
268
+ */
269
+ static excessLineSegments(lines: LineSegment[], trajectoryPositions: Point[]): LineSegment<Record<string, any>>[];
270
+ /** 边线外扩
271
+ * @param lines
272
+ * @param trajectory
273
+ */
274
+ static boundaryExtension(lines: LineSegment<LineUserData>[], trajectory: Point[]): LineSegment<LineUserData>[];
264
275
  }
265
276
  export {};
@@ -50,7 +50,7 @@ export declare class CommandFlowComponent<TEventMap extends {} = {}> extends Com
50
50
  * @param callBack
51
51
  * @returns
52
52
  */
53
- createPointerMove(callBack: (point: Point, isAdsorb: boolean) => void): {
53
+ createPointerMove(callBack: (point: Point, isAdsorb: boolean, line?: LineSegment) => void): {
54
54
  destroy(): void;
55
55
  setBaseLine(line: LineSegment | null, point: Point | null): void;
56
56
  };
@@ -1,5 +1,6 @@
1
1
  import { CommandFlowComponent } from './CommandFlowComponent';
2
2
  import { ComponentManager } from '../../../../../ComponentManager';
3
+ import { LineSegment } from '../../../../../Quadtree/LineSegment';
3
4
  /**
4
5
  * 合并同向线段
5
6
  */
@@ -12,11 +13,12 @@ export declare class MergeLine extends CommandFlowComponent<{}> {
12
13
  * 进入命令约束
13
14
  */
14
15
  private constraint;
16
+ mergeLine(line1: LineSegment, line2: LineSegment): false | LineSegment<Record<string, any>>;
15
17
  /** 开始
16
18
  * @param next
17
19
  * @todo 合并所有
18
20
  */
19
- private mergeLine;
21
+ private mergeLines;
20
22
  /** 执行完成
21
23
  * @param data
22
24
  */
@@ -11,10 +11,8 @@ export declare class VerticalCorrection extends CommandFlowComponent<{}> {
11
11
  static name: string;
12
12
  container: THREE.Group<THREE.Object3DEventMap>;
13
13
  shortcutKeys: string[];
14
- shortcutKeys2: string[];
15
14
  shortcutKeys3: string[];
16
15
  static commandName: string;
17
- recursion: boolean;
18
16
  axisAlignment: boolean;
19
17
  onAddFromParent(parent: ComponentManager): void;
20
18
  /**
@@ -55,13 +53,18 @@ export declare class VerticalCorrection extends CommandFlowComponent<{}> {
55
53
  * @returns
56
54
  */
57
55
  axisAlignmentCorrection(targettLine: LineSegment): {
58
- newLines: (LineSegment<Record<string, any>> | LineSegment<LineUserData>)[];
56
+ newLines: LineSegment<LineUserData>[];
59
57
  oldLines: LineSegment<LineUserData>[];
60
58
  };
61
59
  /** 开始
62
60
  * @param next
63
61
  */
64
62
  verticalCorrection(next: any, selectLines: LineSegment[]): void;
63
+ /**
64
+ * 窗户恢复
65
+ * @param doorLines
66
+ */
67
+ windowRecover(doorLines: LineSegment<LineUserData>[]): void;
65
68
  /** 执行完成
66
69
  * @param data
67
70
  */
@@ -1,12 +1,17 @@
1
1
  import { Box2 } from '../Quadtree/Box2';
2
2
  import { Point } from '../Quadtree/Point';
3
3
  import { Rectangle } from '../Quadtree/Rectangle';
4
- type NodeSet<T> = Set<{
4
+ type Target<T> = {
5
5
  point: Point;
6
6
  userData?: T;
7
- }>;
7
+ };
8
+ type NodeSet<T> = Set<Target<T>>;
8
9
  export declare class PointVirtualGrid<T = Record<string, any>> {
9
10
  map: Map<string, NodeSet<T>>;
11
+ targetMap: Map<Point<Record<string, any>>, {
12
+ target: Target<T>;
13
+ set: NodeSet<T>;
14
+ }>;
10
15
  gridSize: number;
11
16
  constructor(gridSize?: number);
12
17
  /**
@@ -1,3 +1,4 @@
1
+ import { LineSegment } from './LineSegment';
1
2
  export declare class Point<T = Record<string, any>> {
2
3
  x: number;
3
4
  y: number;
@@ -85,6 +86,11 @@ export declare class Point<T = Record<string, any>> {
85
86
  * @returns
86
87
  */
87
88
  direction(point: Point): Point<Record<string, any>>;
89
+ /** 展开为线
90
+ * @param direction
91
+ * @param length
92
+ */
93
+ expandAsLine(direction: Point, length: number): LineSegment<Record<string, any>>;
88
94
  /**
89
95
  * 计算模长
90
96
  * @returns
@@ -49,6 +49,12 @@ export declare class Quadtree<T = any> {
49
49
  * @returns 相交的节点数组
50
50
  */
51
51
  queryCircle(pos: Point, radius: number): QuadtreeNode<T>[];
52
+ /**
53
+ * 查询与点相交的线段节点
54
+ * @param point 圆心
55
+ * @returns 相交的节点数组
56
+ */
57
+ queryPoint(point: Point): QuadtreeNode<T>[];
52
58
  /**
53
59
  * 查询与矩形相交的线段节点
54
60
  * @param rectangle 矩形