build-dxf 0.1.161 → 0.1.163
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/package.json +1 -1
- package/src/build.js +6 -2
- package/src/dxf-system/plugins/editor/Command/ClippingLine.d.ts +2 -0
- package/src/dxf-system/plugins/editor/Command/DrawBalconyRailing.d.ts +12 -0
- package/src/dxf-system/plugins/editor/Command/DrawHole.d.ts +2 -0
- package/src/dxf-system/plugins/editor/Command/DrawLine.d.ts +1 -1
- package/src/dxf-system/plugins/editor/us-service/PointerFollowMove.d.ts +3 -2
- package/src/index.css +4 -4
- package/src/index3.js +70 -17
package/package.json
CHANGED
package/src/build.js
CHANGED
|
@@ -8864,6 +8864,11 @@ class WallHole {
|
|
|
8864
8864
|
return center.expandAsLine(direct, width).translate(-width * 0.5, direct);
|
|
8865
8865
|
})();
|
|
8866
8866
|
if (projClip) line.projectLineSegment(holeLine, holeLine);
|
|
8867
|
+
if (insertObject.type === "beam") {
|
|
8868
|
+
let eps = 0.2;
|
|
8869
|
+
if (line.start.distance(holeLine.start) < eps) holeLine.start.copy(line.start);
|
|
8870
|
+
if (line.end.distance(holeLine.end) < eps) holeLine.end.copy(line.end);
|
|
8871
|
+
}
|
|
8867
8872
|
holeLine.userData = insertObject;
|
|
8868
8873
|
return holeLine;
|
|
8869
8874
|
}
|
|
@@ -23440,9 +23445,7 @@ class Dxf extends Component {
|
|
|
23440
23445
|
lines = lines.filter((line) => !line.userData.isDoor);
|
|
23441
23446
|
lines = BuildGroup.doubleWall(lines);
|
|
23442
23447
|
lines.push(...doors);
|
|
23443
|
-
TEST = true;
|
|
23444
23448
|
this.cad = new CAD().usePlugin(new DxfDataPlugin(lines)).usePlugin(new DxfDrawPlugin());
|
|
23445
|
-
TEST = false;
|
|
23446
23449
|
this.dispatchEvent({
|
|
23447
23450
|
type: "cadChange",
|
|
23448
23451
|
cad: this.cad,
|
|
@@ -24032,6 +24035,7 @@ if (typeof window !== "undefined") {
|
|
|
24032
24035
|
}
|
|
24033
24036
|
if (typeof globalThis !== "undefined") {
|
|
24034
24037
|
globalThis.Log = Log;
|
|
24038
|
+
globalThis.TEST = false;
|
|
24035
24039
|
}
|
|
24036
24040
|
async function createEditor(dom, camera, orbitControls = false, viewPermission) {
|
|
24037
24041
|
const mp = await Promise.resolve().then(() => index);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DrawHole, DrawHoleData } from './DrawHole';
|
|
2
2
|
import { LineSegment, NextFn } from '../../../../utils';
|
|
3
|
+
import { LineType } from '../us-service/PointerFollowMove';
|
|
3
4
|
import * as THREE from "three";
|
|
4
5
|
export type ClippingLineData = {
|
|
5
6
|
target: LineSegment;
|
|
@@ -12,6 +13,7 @@ export declare class ClippingLine extends DrawHole {
|
|
|
12
13
|
static commandName: string;
|
|
13
14
|
showEditHeight: boolean;
|
|
14
15
|
showEditGroundClearance: boolean;
|
|
16
|
+
lineSelectorType: LineType;
|
|
15
17
|
end(next: NextFn<ClippingLineData>, data: DrawHoleData): void;
|
|
16
18
|
/** 执行完成
|
|
17
19
|
*/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Point } from '../../../../utils/algorithms/Point';
|
|
2
|
+
import { DrawLine } from './DrawLine.tsx';
|
|
3
|
+
export declare class DrawBalconyRailing extends DrawLine {
|
|
4
|
+
static name: string;
|
|
5
|
+
static withdrawalKeys: string[];
|
|
6
|
+
static shortcutKeys: string[];
|
|
7
|
+
static commandName: string;
|
|
8
|
+
/** 结束, 汇总结果
|
|
9
|
+
* @param points
|
|
10
|
+
*/
|
|
11
|
+
protected end(next: any, points: Point[]): void;
|
|
12
|
+
}
|
|
@@ -3,6 +3,7 @@ import { LineSegment } from '../../../../utils/algorithms/LineSegment';
|
|
|
3
3
|
import { ComponentContainer } from '../../../../utils/ecs';
|
|
4
4
|
import { HoleData, HoleStorageType, HoleType, LineUserData } from '../../../type';
|
|
5
5
|
import { Point } from '../../../../utils';
|
|
6
|
+
import { LineType } from '../us-service/PointerFollowMove.ts';
|
|
6
7
|
import * as THREE from "three";
|
|
7
8
|
export interface DrawHoleData {
|
|
8
9
|
line: LineSegment<LineUserData>;
|
|
@@ -26,6 +27,7 @@ export declare class DrawHole extends Command<{
|
|
|
26
27
|
defaultGroundClearance: number;
|
|
27
28
|
holeType?: HoleType;
|
|
28
29
|
holeKey: HoleStorageType;
|
|
30
|
+
lineSelectorType: LineType;
|
|
29
31
|
showEditWidth: boolean;
|
|
30
32
|
showEditHeight: boolean;
|
|
31
33
|
showEditGroundClearance: boolean;
|
|
@@ -5,7 +5,7 @@ import { DragControlPoint } from './DragControlPoint';
|
|
|
5
5
|
import { SnapController } from './SnapController';
|
|
6
6
|
import { Quadtree } from '../../../../utils';
|
|
7
7
|
/** 吸附线段类型:全部 / 墙体 / 洞口 / 通道入口 / 门 / 窗 */
|
|
8
|
-
export type LineType = "
|
|
8
|
+
export type LineType = ("wall" | "balconyRailing" | "hole" | "passageEntrance" | "door" | "window")[] | "all" | "none";
|
|
9
9
|
export type MobileTrigger = "dragControlPoint" | "pointerdown";
|
|
10
10
|
export declare class PointerFollowMove {
|
|
11
11
|
snapController: SnapController;
|
|
@@ -51,6 +51,7 @@ export declare class PointerFollowMove {
|
|
|
51
51
|
* @returns 如果线段的 userData.isDoor 为真,则返回该线段本身;否则返回 null
|
|
52
52
|
*/
|
|
53
53
|
private getBalconyRailing;
|
|
54
|
+
hasSnapType(keys: string[]): boolean;
|
|
54
55
|
/**
|
|
55
56
|
* 鼠标位置变化时的处理函数
|
|
56
57
|
* 根据吸附结果和当前类型筛选,更新 currentSelectLine,并触发 onPointerMove 回调
|
|
@@ -67,7 +68,7 @@ export declare class PointerFollowMove {
|
|
|
67
68
|
* @param type 线段类型
|
|
68
69
|
* @returns this,支持链式调用
|
|
69
70
|
*/
|
|
70
|
-
setType(
|
|
71
|
+
setType(snapType: LineType): this;
|
|
71
72
|
/**
|
|
72
73
|
* 设置吸附半径
|
|
73
74
|
* @param adsorptRadius 半径(世界单位)
|
package/src/index.css
CHANGED
|
@@ -1257,17 +1257,17 @@ button[data-v-7a78abcb]:active {
|
|
|
1257
1257
|
}
|
|
1258
1258
|
}
|
|
1259
1259
|
|
|
1260
|
-
[data-v-
|
|
1260
|
+
[data-v-9af99455] {
|
|
1261
1261
|
font-family: 微软雅黑;
|
|
1262
1262
|
}
|
|
1263
|
-
.number[data-v-
|
|
1263
|
+
.number[data-v-9af99455] {
|
|
1264
1264
|
color: #a7a7a7
|
|
1265
1265
|
}
|
|
1266
1266
|
|
|
1267
|
-
[data-v-
|
|
1267
|
+
[data-v-a092e898] {
|
|
1268
1268
|
font-family: 宋体;
|
|
1269
1269
|
}
|
|
1270
|
-
.button[data-v-
|
|
1270
|
+
.button[data-v-a092e898] {
|
|
1271
1271
|
padding: 5px 10px;
|
|
1272
1272
|
border: none;
|
|
1273
1273
|
background: var(--primary-color);
|
package/src/index3.js
CHANGED
|
@@ -267,18 +267,23 @@ const __vite_glob_0_18 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
267
267
|
__proto__: null,
|
|
268
268
|
default: window$1
|
|
269
269
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
270
|
-
const __ = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1779330751027'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='10579'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='16'%20height='16'%3e%3cpath%20d='M80%20448h160v128h-160v-128zM784%20448h160v128h-160v-128z'%20fill='%23D9D9D9'%20p-id='10580'%3e%3c/path%3e%3cpath%20d='M880%20672v-48H736V576h-80v-48H736v-32h-80V448H736v-48h144V352h-704v48H288V448h80v48H288v32h80V576H288v48H176V672h704zM128%20624H32v-224h96v-96h800v96h64v224h-64v54.4l-1.6%2041.6H128v-96zM240%20448h-160v128h160v-128z%20m704%200h-160v128h160v-128z%20m-544%200h96v48h-96V448z%20m224%200h-96v48h96V448z%20m-224%2080h96V576h-96v-48z%20m224%200h-96V576h96v-48z'%20fill='%23262626'%20p-id='10581'%3e%3c/path%3e%3c/svg%3e";
|
|
270
|
+
const __$1 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1779330751027'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='10579'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='16'%20height='16'%3e%3cpath%20d='M80%20448h160v128h-160v-128zM784%20448h160v128h-160v-128z'%20fill='%23D9D9D9'%20p-id='10580'%3e%3c/path%3e%3cpath%20d='M880%20672v-48H736V576h-80v-48H736v-32h-80V448H736v-48h144V352h-704v48H288V448h80v48H288v32h80V576H288v48H176V672h704zM128%20624H32v-224h96v-96h800v96h64v224h-64v54.4l-1.6%2041.6H128v-96zM240%20448h-160v128h160v-128z%20m704%200h-160v128h160v-128z%20m-544%200h96v48h-96V448z%20m224%200h-96v48h96V448z%20m-224%2080h96V576h-96v-48z%20m224%200h-96V576h96v-48z'%20fill='%23262626'%20p-id='10581'%3e%3c/path%3e%3c/svg%3e";
|
|
271
271
|
const __vite_glob_0_19 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
272
272
|
__proto__: null,
|
|
273
|
-
default: __
|
|
273
|
+
default: __$1
|
|
274
274
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
275
275
|
const ____$1 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1769079533165'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='4803'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M352%20128a134.4%20134.4%200%200%201%20128.832%2096H921.6a38.4%2038.4%200%200%201%200%2076.8H480.832a134.4%20134.4%200%200%201-257.664%200H102.4a38.4%2038.4%200%201%201%200-76.8h120.768A134.4%20134.4%200%200%201%20352%20128z%20m0%2076.8a57.6%2057.6%200%201%200%200%20115.2%2057.6%2057.6%200%200%200%200-115.2z'%20fill='%23666666'%20p-id='4804'%3e%3c/path%3e%3cpath%20d='M64%20467.2m38.4%200l819.2%200q38.4%200%2038.4%2038.4l0%200q0%2038.4-38.4%2038.4l-819.2%200q-38.4%200-38.4-38.4l0%200q0-38.4%2038.4-38.4Z'%20fill='%23666666'%20p-id='4805'%3e%3c/path%3e%3cpath%20d='M672%20614.4a134.4%20134.4%200%200%201%20128.832%2096H921.6a38.4%2038.4%200%200%201%200%2076.8h-120.768a134.4%20134.4%200%200%201-257.664%200H102.4a38.4%2038.4%200%200%201%200-76.8h440.768A134.4%20134.4%200%200%201%20672%20614.4z%20m0%2076.8a57.6%2057.6%200%201%200%200%20115.2%2057.6%2057.6%200%200%200%200-115.2z'%20fill='%23666666'%20p-id='4806'%3e%3c/path%3e%3c/svg%3e";
|
|
276
276
|
const __vite_glob_0_20 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
277
277
|
__proto__: null,
|
|
278
278
|
default: ____$1
|
|
279
279
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
280
|
-
const
|
|
280
|
+
const __ = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1782447219271'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1817'%20width='16'%20height='16'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M904.17152%2081.92a49.01888%2049.01888%200%200%201%2029.40928%2088.23808v642.16064a63.744%2063.744%200%200%201-24.50432%20122.5728%2063.72352%2063.72352%200%200%201-33.98656-117.6576h-0.32768l-0.01024-49.01888H139.43808v44.10368a63.744%2063.744%200%200%201-24.51456%20122.5728%2063.72352%2063.72352%200%200%201-33.97632-117.6576h-0.33792v-647.0656a49.01888%2049.01888%200%201%201%2058.83904%200l-0.01024%2068.61824h735.31392v-68.62848A48.9472%2048.9472%200%200%201%20855.1936%20133.12l-0.04096-2.18112A49.01888%2049.01888%200%200%201%20904.17152%2081.92zM114.92352%20846.6432a24.51456%2024.51456%200%201%200%200%2049.02912%2024.51456%2024.51456%200%200%200%200-49.01888z%20m794.15296%200a24.51456%2024.51456%200%201%200%200%2049.02912%2024.51456%2024.51456%200%200%200%200-49.01888zM266.88512%20376.05376H139.43808v333.34272h127.44704V376.04352z%20m205.89568%200H325.71392v333.34272H472.7808V376.04352z%20m205.88544%200H531.59936v333.34272h147.06688V376.04352z%20m196.08576%200H737.49504v333.34272h137.25696V376.04352z%20m0-78.4384H139.43808v19.6096h735.31392v-19.6096z'%20fill='%23050505'%20p-id='1818'%3e%3c/path%3e%3c/svg%3e";
|
|
281
281
|
const __vite_glob_0_21 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
282
|
+
__proto__: null,
|
|
283
|
+
default: __
|
|
284
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
285
|
+
const ____ = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1769568667919'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='11114'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M512%20617.386667c17.749333%200%2032.213333%2014.250667%2032.213333%2031.829333v182.954667a32%2032%200%200%201-32.213333%2031.829333%2032%2032%200%200%201-32.170667-31.829333v-182.954667A32%2032%200%200%201%20512%20617.386667zM96.170667%20297.216c17.749333%200%2032.213333%2014.250667%2032.213333%2031.829333v365.909334a32%2032%200%200%201-32.213333%2031.829333%2032%2032%200%200%201-32.170667-31.829333V329.045333a32%2032%200%200%201%2032.170667-31.829333zM927.829333%20297.216c17.792%200%2032.213333%2014.250667%2032.213334%2031.829333v365.909334a32%2032%200%200%201-32.213334%2031.829333%2032%2032%200%200%201-32.170666-31.829333V329.045333a32%2032%200%200%201%2032.170666-31.829333zM396.8%20580.992a32.426667%2032.426667%200%200%201%2045.525333%200%2031.658667%2031.658667%200%200%201%200%2045.056l-46.208%2045.696a32.426667%2032.426667%200%200%201-45.482666%200%2031.616%2031.616%200%200%201%200-45.056l46.208-45.653333zM581.674667%20580.949333a32.426667%2032.426667%200%200%201%2045.482666%200l46.208%2045.738667a31.658667%2031.658667%200%200%201%200%2045.056%2032.426667%2032.426667%200%200%201-45.482666%200l-46.208-45.738667a31.616%2031.616%200%200%201%200-45.056zM214.485333%20441.6a32.426667%2032.426667%200%200%201%2043.093334%202.133333c9.941333%209.898667%2011.904%2024.576%206.058666%2036.437334h109.781334a32%2032%200%200%201%2032.170666%2031.829333%2032%2032%200%200%201-32.170666%2031.872H263.637333a31.573333%2031.573333%200%200%201-6.101333%2036.437333%2032.426667%2032.426667%200%200%201-43.050667%202.133334l-2.432-2.133334-46.208-45.781333a31.616%2031.616%200%200%201%200-45.013333L212.053333%20443.733333l2.432-2.133333zM766.464%20443.733333a32.426667%2032.426667%200%200%201%2045.482667%200l46.208%2045.781334%202.218666%202.389333a31.616%2031.616%200%200%201-2.218666%2042.666667L811.946667%20580.266667l-2.432%202.133333a32.426667%2032.426667%200%200%201-43.093334-2.133333%2031.573333%2031.573333%200%200%201-6.101333-36.437334H650.666667a32%2032%200%200%201-32.170667-31.872%2032%2032%200%200%201%2032.170667-31.829333h109.781333a31.488%2031.488%200%200%201%206.058667-36.437333zM512%20466.304c25.514667%200%2046.208%2020.48%2046.208%2045.738667%200%2025.258667-20.693333%2045.696-46.208%2045.696s-46.208-20.48-46.208-45.696c0-25.258667%2020.693333-45.738667%2046.208-45.738667zM350.848%20352.256a32.426667%2032.426667%200%200%201%2045.482667%200.085333l46.08%2045.696a31.658667%2031.658667%200%200%201-0.128%2045.098667%2032.426667%2032.426667%200%200%201-45.482667-0.085333L350.72%20397.312a31.616%2031.616%200%200%201%200.128-45.056zM627.882667%20352.298667a32.426667%2032.426667%200%200%201%2045.482666%200%2031.616%2031.616%200%200%201%200%2045.056l-46.208%2045.653333a32.426667%2032.426667%200%200%201-45.482666%200%2031.616%2031.616%200%200%201%200-45.013333l46.208-45.696zM512%20160c17.749333%200%2032.213333%2014.250667%2032.213333%2031.829333v182.954667A32%2032%200%200%201%20512%20406.613333a32%2032%200%200%201-32.170667-31.829333V191.829333A32%2032%200%200%201%20512%20160z'%20p-id='11115'%3e%3c/path%3e%3c/svg%3e";
|
|
286
|
+
const __vite_glob_0_22 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
282
287
|
__proto__: null,
|
|
283
288
|
default: ____
|
|
284
289
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -13206,7 +13211,7 @@ class PointerFollowMove {
|
|
|
13206
13211
|
// 当前高亮/选中的线段
|
|
13207
13212
|
pos = null;
|
|
13208
13213
|
// 当前高亮/选中的线段
|
|
13209
|
-
snapType = "
|
|
13214
|
+
snapType = ["wall"];
|
|
13210
13215
|
// 当前筛选的线段类型
|
|
13211
13216
|
snapRadius = 0.08;
|
|
13212
13217
|
// 吸附半径(世界单位)
|
|
@@ -13275,7 +13280,7 @@ class PointerFollowMove {
|
|
|
13275
13280
|
if ((p2?.distance(p) ?? Infinity) < 0.08) {
|
|
13276
13281
|
hole.currentData.insertObject = insertObject;
|
|
13277
13282
|
hole.currentData.line = line2;
|
|
13278
|
-
if (insertObject.type
|
|
13283
|
+
if (this.hasSnapType([insertObject.type, "hole", "passageEntrance"])) return hole;
|
|
13279
13284
|
}
|
|
13280
13285
|
}
|
|
13281
13286
|
return null;
|
|
@@ -13298,6 +13303,15 @@ class PointerFollowMove {
|
|
|
13298
13303
|
if (line2.userData.isBalconyRailing) return line2;
|
|
13299
13304
|
return null;
|
|
13300
13305
|
}
|
|
13306
|
+
hasSnapType(keys2) {
|
|
13307
|
+
const snapType = this.snapType;
|
|
13308
|
+
if (snapType === "none") return false;
|
|
13309
|
+
if (snapType === "all") return true;
|
|
13310
|
+
if (Array.isArray(snapType)) {
|
|
13311
|
+
return keys2.some((key) => snapType.includes(key));
|
|
13312
|
+
}
|
|
13313
|
+
return false;
|
|
13314
|
+
}
|
|
13301
13315
|
/**
|
|
13302
13316
|
* 鼠标位置变化时的处理函数
|
|
13303
13317
|
* 根据吸附结果和当前类型筛选,更新 currentSelectLine,并触发 onPointerMove 回调
|
|
@@ -13308,19 +13322,19 @@ class PointerFollowMove {
|
|
|
13308
13322
|
if (this.snapType !== "none") {
|
|
13309
13323
|
const { point, line: line2 } = this.snapController.snap(pos, this.snapRadius);
|
|
13310
13324
|
if (line2) {
|
|
13311
|
-
if (this.
|
|
13325
|
+
if (this.hasSnapType(["window", "door", "passageEntrance", "hole"])) {
|
|
13312
13326
|
const holeLine = this.getHole(line2, point);
|
|
13313
13327
|
if (holeLine) this.currentSelectLine = holeLine;
|
|
13314
13328
|
}
|
|
13315
|
-
if (!this.currentSelectLine &&
|
|
13329
|
+
if (!this.currentSelectLine && this.hasSnapType(["door"])) {
|
|
13316
13330
|
const doorLine = this.getDoor(line2);
|
|
13317
13331
|
if (doorLine) this.currentSelectLine = doorLine;
|
|
13318
13332
|
}
|
|
13319
|
-
if (!this.currentSelectLine &&
|
|
13333
|
+
if (!this.currentSelectLine && this.hasSnapType(["balconyRailing"])) {
|
|
13320
13334
|
const brline = this.getBalconyRailing(line2);
|
|
13321
13335
|
if (brline) this.currentSelectLine = brline;
|
|
13322
13336
|
}
|
|
13323
|
-
if (!this.currentSelectLine &&
|
|
13337
|
+
if (!this.currentSelectLine && this.hasSnapType(["wall"])) {
|
|
13324
13338
|
if (!line2.userData.isDoor && !line2.userData.isBalconyRailing) this.currentSelectLine = line2;
|
|
13325
13339
|
}
|
|
13326
13340
|
if (this.currentSelectLine) pos = point;
|
|
@@ -13345,8 +13359,8 @@ class PointerFollowMove {
|
|
|
13345
13359
|
* @param type 线段类型
|
|
13346
13360
|
* @returns this,支持链式调用
|
|
13347
13361
|
*/
|
|
13348
|
-
setType(
|
|
13349
|
-
this.snapType =
|
|
13362
|
+
setType(snapType) {
|
|
13363
|
+
this.snapType = snapType;
|
|
13350
13364
|
return this;
|
|
13351
13365
|
}
|
|
13352
13366
|
/**
|
|
@@ -14916,6 +14930,7 @@ class DrawHole extends Command {
|
|
|
14916
14930
|
defaultHeight = 1;
|
|
14917
14931
|
defaultGroundClearance = 0;
|
|
14918
14932
|
holeKey = "passageEntrance";
|
|
14933
|
+
lineSelectorType = ["wall"];
|
|
14919
14934
|
showEditWidth = true;
|
|
14920
14935
|
showEditHeight = true;
|
|
14921
14936
|
showEditGroundClearance = true;
|
|
@@ -14987,7 +15002,7 @@ class DrawHole extends Command {
|
|
|
14987
15002
|
holeLine.setLength(this.defaultWidth);
|
|
14988
15003
|
wall.setLine(holeLine);
|
|
14989
15004
|
}), this.showEditHeight && this.editHeight.bind(this), this.showEditGroundClearance && this.editGroundClearance.bind(this));
|
|
14990
|
-
const lineSelector = new LineSelector(this.editor, point).setType(
|
|
15005
|
+
const lineSelector = new LineSelector(this.editor, point).setType(this.lineSelectorType);
|
|
14991
15006
|
lineSelector.onPointerMove = (p, line3) => {
|
|
14992
15007
|
const point2 = p ?? Point.from(this.editor.pointerPosition);
|
|
14993
15008
|
this.domElement.style.cursor = line3 ? "move" : "no-drop";
|
|
@@ -15091,6 +15106,7 @@ class ClippingLine extends DrawHole {
|
|
|
15091
15106
|
static commandName = "clippingLine";
|
|
15092
15107
|
showEditHeight = false;
|
|
15093
15108
|
showEditGroundClearance = false;
|
|
15109
|
+
lineSelectorType = ["balconyRailing", "door", "wall"];
|
|
15094
15110
|
end(next, data) {
|
|
15095
15111
|
const clippingLine = WallHole.holeDataToLine(data.line, data.holeData);
|
|
15096
15112
|
next({
|
|
@@ -18797,7 +18813,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18797
18813
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
18798
18814
|
])) : createCommentVNode("", true),
|
|
18799
18815
|
createElementVNode("p", _hoisted_16$1, [
|
|
18800
|
-
createElementVNode("span", _hoisted_17$1, toDisplayString(line2.userData.isSelectWindow ? "孔洞" : "墙体") + "高度", 1),
|
|
18816
|
+
createElementVNode("span", _hoisted_17$1, toDisplayString(line2.userData.isSelectWindow ? "孔洞" : line2.userData.isBalconyRailing ? "栏杆" : "墙体") + "高度", 1),
|
|
18801
18817
|
createVNode(_sfc_main$3, {
|
|
18802
18818
|
onBlur: _cache[1] || (_cache[1] = ($event) => emits("update")),
|
|
18803
18819
|
modelValue: userDataList.value[i].height,
|
|
@@ -18815,7 +18831,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18815
18831
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
18816
18832
|
])) : createCommentVNode("", true),
|
|
18817
18833
|
userDataList.value[i].isSelectWindow ? (openBlock(), createElementBlock("p", _hoisted_19$1, [
|
|
18818
|
-
_cache[11] || (_cache[11] = createElementVNode("span", { class: "mr-[5px] w-[50px]" }, "
|
|
18834
|
+
_cache[11] || (_cache[11] = createElementVNode("span", { class: "mr-[5px] w-[50px]" }, "离地高", -1)),
|
|
18819
18835
|
createVNode(_sfc_main$3, {
|
|
18820
18836
|
onBlur: _cache[3] || (_cache[3] = ($event) => emits("update")),
|
|
18821
18837
|
modelValue: userDataList.value[i].groundClearance,
|
|
@@ -18836,7 +18852,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18836
18852
|
};
|
|
18837
18853
|
}
|
|
18838
18854
|
});
|
|
18839
|
-
const PropertiesPanelView = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
18855
|
+
const PropertiesPanelView = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-9af99455"]]);
|
|
18840
18856
|
class PropertiesPanel extends Command {
|
|
18841
18857
|
static name = "PropertiesPanel";
|
|
18842
18858
|
container = new THREE.Group();
|
|
@@ -18949,6 +18965,34 @@ class PropertiesPanel extends Command {
|
|
|
18949
18965
|
return data;
|
|
18950
18966
|
}
|
|
18951
18967
|
}
|
|
18968
|
+
class DrawBalconyRailing extends DrawLine {
|
|
18969
|
+
static name = "DrawBalconyRailing";
|
|
18970
|
+
static withdrawalKeys = ["Control", "Z"];
|
|
18971
|
+
static shortcutKeys = ["B"];
|
|
18972
|
+
static commandName = "DrawBalconyRailing";
|
|
18973
|
+
/** 结束, 汇总结果
|
|
18974
|
+
* @param points
|
|
18975
|
+
*/
|
|
18976
|
+
end(next, points) {
|
|
18977
|
+
const lines = [];
|
|
18978
|
+
for (let i = 0; i < points.length; i += 2) {
|
|
18979
|
+
lines.push(new LineSegment(Point.from(points[i]), Point.from(points[i + 1])));
|
|
18980
|
+
}
|
|
18981
|
+
lines.forEach((line2) => {
|
|
18982
|
+
if (this.renderManager.dxf.options.publicInfo?.rootTopContourInfo) {
|
|
18983
|
+
const rooftopPz = HeightQuery.query(line2, this.renderManager.dxf.options.publicInfo?.rootTopContourInfo);
|
|
18984
|
+
line2.userData.rooftopPz = rooftopPz;
|
|
18985
|
+
line2.userData.isBalconyRailing = true;
|
|
18986
|
+
line2.userData.height = 1;
|
|
18987
|
+
}
|
|
18988
|
+
});
|
|
18989
|
+
ElMessage({
|
|
18990
|
+
message: "绘制完成",
|
|
18991
|
+
type: "success"
|
|
18992
|
+
});
|
|
18993
|
+
next(lines);
|
|
18994
|
+
}
|
|
18995
|
+
}
|
|
18952
18996
|
const _hoisted_1$1 = {
|
|
18953
18997
|
key: 0,
|
|
18954
18998
|
class: "max-w-[150px] min-w-[150px p-[5px] editorToolContent"
|
|
@@ -19065,7 +19109,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
19065
19109
|
queueMicrotask(() => variable.set("currentKeyUp", "enter"));
|
|
19066
19110
|
}
|
|
19067
19111
|
const props = __props;
|
|
19068
|
-
const dxfVisible = ref(true), currentCommand = ref(""), dxfSystem = toRaw(props.dxfSystem), isPc = computed(() => !isMobileRef.value), domEventRegister = dxfSystem.findComponentByType(DomEventRegister), domContainer = dxfSystem.findComponentByType(DomContainer), editor = dxfSystem.findComponentByType(Editor), defaultComponent = dxfSystem.findComponentByType(DefaultCommand), whiteModel = dxfSystem.findComponentByType(WhiteModel), threeVJia = dxfSystem.findComponentByType(ThreeVJia), variable = dxfSystem.findComponentByType(Variable), drawLine = dxfSystem.findComponentByType(DrawLine), rollbackCount = ref(0), revokeRollbackCount = ref(0), drawLineCount = ref(0), images = /* @__PURE__ */ Object.assign({ "../assets/images/VerticalCorr.svg": __vite_glob_0_0, "../assets/images/VerticalCorrContinue.svg": __vite_glob_0_1, "../assets/images/angle.svg": __vite_glob_0_2, "../assets/images/close.svg": __vite_glob_0_3, "../assets/images/connection.svg": __vite_glob_0_4, "../assets/images/cutLine.svg": __vite_glob_0_5, "../assets/images/deleteSelectLine.svg": __vite_glob_0_6, "../assets/images/deleteSelectWindow.svg": __vite_glob_0_7, "../assets/images/door.svg": __vite_glob_0_8, "../assets/images/dxf.svg": __vite_glob_0_9, "../assets/images/intersectionConnection.svg": __vite_glob_0_10, "../assets/images/line.svg": __vite_glob_0_11, "../assets/images/mergeLine.svg": __vite_glob_0_12, "../assets/images/revokeRollback.svg": __vite_glob_0_13, "../assets/images/rollback.svg": __vite_glob_0_14, "../assets/images/selectAll.svg": __vite_glob_0_15, "../assets/images/selectPoint.svg": __vite_glob_0_16, "../assets/images/verticalLine.svg": __vite_glob_0_17, "../assets/images/window.svg": __vite_glob_0_18, "../assets/images/垭口.svg": __vite_glob_0_19, "../assets/images/属性面板.svg": __vite_glob_0_20, "../assets/images
|
|
19112
|
+
const dxfVisible = ref(true), currentCommand = ref(""), dxfSystem = toRaw(props.dxfSystem), isPc = computed(() => !isMobileRef.value), domEventRegister = dxfSystem.findComponentByType(DomEventRegister), domContainer = dxfSystem.findComponentByType(DomContainer), editor = dxfSystem.findComponentByType(Editor), defaultComponent = dxfSystem.findComponentByType(DefaultCommand), whiteModel = dxfSystem.findComponentByType(WhiteModel), threeVJia = dxfSystem.findComponentByType(ThreeVJia), variable = dxfSystem.findComponentByType(Variable), drawLine = dxfSystem.findComponentByType(DrawLine), rollbackCount = ref(0), revokeRollbackCount = ref(0), drawLineCount = ref(0), images = /* @__PURE__ */ Object.assign({ "../assets/images/VerticalCorr.svg": __vite_glob_0_0, "../assets/images/VerticalCorrContinue.svg": __vite_glob_0_1, "../assets/images/angle.svg": __vite_glob_0_2, "../assets/images/close.svg": __vite_glob_0_3, "../assets/images/connection.svg": __vite_glob_0_4, "../assets/images/cutLine.svg": __vite_glob_0_5, "../assets/images/deleteSelectLine.svg": __vite_glob_0_6, "../assets/images/deleteSelectWindow.svg": __vite_glob_0_7, "../assets/images/door.svg": __vite_glob_0_8, "../assets/images/dxf.svg": __vite_glob_0_9, "../assets/images/intersectionConnection.svg": __vite_glob_0_10, "../assets/images/line.svg": __vite_glob_0_11, "../assets/images/mergeLine.svg": __vite_glob_0_12, "../assets/images/revokeRollback.svg": __vite_glob_0_13, "../assets/images/rollback.svg": __vite_glob_0_14, "../assets/images/selectAll.svg": __vite_glob_0_15, "../assets/images/selectPoint.svg": __vite_glob_0_16, "../assets/images/verticalLine.svg": __vite_glob_0_17, "../assets/images/window.svg": __vite_glob_0_18, "../assets/images/垭口.svg": __vite_glob_0_19, "../assets/images/属性面板.svg": __vite_glob_0_20, "../assets/images/栏杆.svg": __vite_glob_0_21, "../assets/images/激光测距.svg": __vite_glob_0_22 }), selectLineCount = ref(0), selectWinLineCount = ref(0), hasWindowLine = ref(false), commandList = [
|
|
19069
19113
|
{
|
|
19070
19114
|
command: "default",
|
|
19071
19115
|
name: "默认",
|
|
@@ -19101,6 +19145,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
19101
19145
|
src: images["../assets/images/垭口.svg"].default,
|
|
19102
19146
|
shortcut: DrawHole.shortcutKeys.join(" + ")
|
|
19103
19147
|
},
|
|
19148
|
+
{
|
|
19149
|
+
command: DrawBalconyRailing.commandName,
|
|
19150
|
+
name: "绘制栏杆",
|
|
19151
|
+
src: images["../assets/images/栏杆.svg"].default,
|
|
19152
|
+
show: true,
|
|
19153
|
+
shortcut: DrawBalconyRailing.shortcutKeys.join(" + "),
|
|
19154
|
+
confirm: computed(() => drawLineCount.value > 0)
|
|
19155
|
+
},
|
|
19104
19156
|
{
|
|
19105
19157
|
command: "point",
|
|
19106
19158
|
name: "修改模式",
|
|
@@ -19696,7 +19748,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
19696
19748
|
};
|
|
19697
19749
|
}
|
|
19698
19750
|
});
|
|
19699
|
-
const EditorToolContent = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
19751
|
+
const EditorToolContent = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-a092e898"]]);
|
|
19700
19752
|
class StorageHelper {
|
|
19701
19753
|
static get(key, defaultValue = void 0) {
|
|
19702
19754
|
const value = localStorage.getItem(key);
|
|
@@ -19977,6 +20029,7 @@ function Editor_(dxfSystem, option = {}) {
|
|
|
19977
20029
|
dxfSystem.addComponent(new RayDistance());
|
|
19978
20030
|
dxfSystem.addComponent(new ManualDistance());
|
|
19979
20031
|
dxfSystem.addComponent(new DrawHole());
|
|
20032
|
+
dxfSystem.addComponent(new DrawBalconyRailing());
|
|
19980
20033
|
}
|
|
19981
20034
|
const EditorPlugin = Object.assign(Editor_, {
|
|
19982
20035
|
create(option = {}) {
|