build-dxf 0.0.37 → 0.0.39
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 +11 -1
- package/package.json +1 -1
- package/src/build.js +1679 -1507
- package/src/index.css +1 -1
- package/src/index3.js +504 -498
- package/src/utils/DxfSystem/DxfSystem.d.ts +1 -0
- package/src/utils/DxfSystem/plugin/Editor/components/RenderManager.d.ts +2 -1
- package/src/utils/DxfSystem/plugin/RenderPlugin/pages/Dxf.vue.d.ts +1 -1
- package/src/utils/DxfSystem/type.d.ts +22 -5
- package/src/utils/DxfSystem/utils/findVerticalReference.d.ts +2 -0
- package/src/utils/DxfSystem/utils/lineSegmentClipping.d.ts +3 -2
- package/src/utils/Quadtree/LineSegment.d.ts +13 -2
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { LineSegment } from '../../../../Quadtree/LineSegment';
|
|
2
2
|
import { Component } from '../../../../ComponentManager';
|
|
3
|
-
import { Dxf, LineUserData } from '../../../components/Dxf';
|
|
4
3
|
import { Variable } from '../../../components/Variable';
|
|
5
4
|
import { EventInput, Renderer } from '../../RenderPlugin/components';
|
|
6
5
|
import { PointVirtualGrid } from '../../../../PointVirtualGrid';
|
|
7
6
|
import { Editor } from './Editor';
|
|
8
7
|
import { Quadtree } from '../../../../Quadtree/Quadtree';
|
|
9
8
|
import { DxfLineModel } from '../../ModelDataPlugin/components';
|
|
9
|
+
import { LineUserData, OriginalDataItem } from '../../../type';
|
|
10
|
+
import { Dxf } from '../../../components/Dxf';
|
|
10
11
|
import * as THREE from "three";
|
|
11
12
|
export declare class RenderManager extends Component<{}> {
|
|
12
13
|
static name: string;
|
|
@@ -38,7 +38,7 @@ export interface OriginalDataItem {
|
|
|
38
38
|
};
|
|
39
39
|
wallWidth?: number;
|
|
40
40
|
isWindow?: boolean;
|
|
41
|
-
rooftopPz
|
|
41
|
+
rooftopPz?: number;
|
|
42
42
|
isVerticalReferenceLine?: boolean;
|
|
43
43
|
drawWindow?: {
|
|
44
44
|
p: {
|
|
@@ -56,7 +56,7 @@ export type LineUserData = {
|
|
|
56
56
|
isWindow?: boolean;
|
|
57
57
|
isVerticalReferenceLine?: boolean;
|
|
58
58
|
wallWidth?: number;
|
|
59
|
-
rooftopPz
|
|
59
|
+
rooftopPz?: number;
|
|
60
60
|
drawWindow?: {
|
|
61
61
|
p: THREE.Vector3;
|
|
62
62
|
width: number;
|
|
@@ -82,20 +82,37 @@ export type DrawData = {
|
|
|
82
82
|
height: number;
|
|
83
83
|
scale: number;
|
|
84
84
|
};
|
|
85
|
+
export type FittingMethodType = "average" | "max";
|
|
85
86
|
export type AxisAlignmentCorrectionOption = {
|
|
86
87
|
/**
|
|
87
|
-
* 主轴阈值,默认 0.3
|
|
88
|
+
* 主轴阈值,默认 0.3 groupMethod是precision时生效
|
|
88
89
|
*/
|
|
89
90
|
principalAxisThreshold?: number;
|
|
90
91
|
/**
|
|
91
|
-
* 交叉轴阈值,默认 0.
|
|
92
|
+
* 交叉轴阈值,默认 0.06
|
|
92
93
|
*/
|
|
93
94
|
crossAxistThreshold?: number;
|
|
94
95
|
/**
|
|
95
96
|
* 吸附阈值,默认 0.2
|
|
96
97
|
*/
|
|
97
98
|
snapThreshold?: number;
|
|
98
|
-
|
|
99
|
+
/**
|
|
100
|
+
* 拟合方式, 默认 max
|
|
101
|
+
* @description average 以分组线段平均数作为拟合位置
|
|
102
|
+
* @description max 以分组线段中最长线段作为拟合位置
|
|
103
|
+
*/
|
|
104
|
+
fittingMethod?: FittingMethodType;
|
|
105
|
+
/**
|
|
106
|
+
* 分组方式, 默认 default
|
|
107
|
+
* @description cross 以交叉轴辅助分组
|
|
108
|
+
* @description principalAndCross 以主轴和交叉轴辅助分组
|
|
109
|
+
* @description originalInterPoint 通过原始交点计算分组,把原来平行的放到分组里
|
|
110
|
+
*/
|
|
111
|
+
groupMethod?: "cross" | "principalAndCross" | "originalInterPoint";
|
|
112
|
+
/**
|
|
113
|
+
* 吸附方式, 默认 adsorption
|
|
114
|
+
*/
|
|
115
|
+
adsorptionMethod?: "originalInterPoint" | "adsorption";
|
|
99
116
|
};
|
|
100
117
|
/**
|
|
101
118
|
*
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { LineSegment } from '../../Quadtree/LineSegment';
|
|
2
2
|
import { LineUserData } from '../type';
|
|
3
3
|
/** 根据交点,对线段进行裁剪
|
|
4
|
-
* @param this
|
|
5
4
|
* @param lines
|
|
5
|
+
* @param minLen
|
|
6
|
+
* @returns
|
|
6
7
|
*/
|
|
7
|
-
export declare function lineSegmentClipping(lines: LineSegment<LineUserData>[]): LineSegment<LineUserData>[];
|
|
8
|
+
export declare function lineSegmentClipping(lines: LineSegment<LineUserData>[], minLen?: number): LineSegment<LineUserData>[];
|
|
@@ -130,10 +130,16 @@ export declare class LineSegment<T = Record<string, any>> {
|
|
|
130
130
|
*/
|
|
131
131
|
directionEqual(line: LineSegment, errAngle?: number): boolean;
|
|
132
132
|
/**
|
|
133
|
-
*
|
|
133
|
+
* 两条线段或角度是否平行
|
|
134
134
|
* @param line
|
|
135
135
|
*/
|
|
136
|
-
parallel(
|
|
136
|
+
parallel(angle: LineSegment | number, errAngle?: number): boolean;
|
|
137
|
+
/** 两条线段或角度是否 垂直
|
|
138
|
+
* @param line
|
|
139
|
+
* @param errAngle
|
|
140
|
+
* @returns
|
|
141
|
+
*/
|
|
142
|
+
vertical(angle: LineSegment | number, errAngle?: number): boolean;
|
|
137
143
|
/**
|
|
138
144
|
* 两条线段方向相反否一致
|
|
139
145
|
* @param line
|
|
@@ -179,6 +185,11 @@ export declare class LineSegment<T = Record<string, any>> {
|
|
|
179
185
|
* @param selectLines
|
|
180
186
|
*/
|
|
181
187
|
static groupBySamePointAndParallel(selectLines: LineSegment[]): LineSegment<Record<string, any>>[][];
|
|
188
|
+
/** 合并线段到最长线段
|
|
189
|
+
* @param lines
|
|
190
|
+
* @returns
|
|
191
|
+
*/
|
|
192
|
+
static mergeLinesByMaxlength(...lines: LineSegment[]): LineSegment<Record<string, any>>;
|
|
182
193
|
/** 合并平行线段
|
|
183
194
|
* @param lines
|
|
184
195
|
* @returns
|