build-dxf 0.0.20-23 → 0.0.20-4
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 +3 -2
- package/src/index.css +9 -1
- package/src/index3.js +20 -19
- package/src/utils/DxfSystem/components/Dxf.d.ts +1 -0
- package/src/utils/Quadtree/Point.d.ts +2 -1
package/package.json
CHANGED
package/src/build.js
CHANGED
package/src/index.css
CHANGED
|
@@ -104,6 +104,10 @@
|
|
|
104
104
|
z-index: 11;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
.z-\[20\] {
|
|
108
|
+
z-index: 20;
|
|
109
|
+
}
|
|
110
|
+
|
|
107
111
|
.z-\[1000\] {
|
|
108
112
|
z-index: 1000;
|
|
109
113
|
}
|
|
@@ -238,6 +242,10 @@
|
|
|
238
242
|
width: 200px;
|
|
239
243
|
}
|
|
240
244
|
|
|
245
|
+
.w-fit {
|
|
246
|
+
width: fit-content;
|
|
247
|
+
}
|
|
248
|
+
|
|
241
249
|
.w-full {
|
|
242
250
|
width: 100%;
|
|
243
251
|
}
|
|
@@ -612,7 +620,7 @@
|
|
|
612
620
|
inherits: false
|
|
613
621
|
}
|
|
614
622
|
|
|
615
|
-
[data-v-
|
|
623
|
+
[data-v-a95f67da] {
|
|
616
624
|
font-family: 宋体;
|
|
617
625
|
}
|
|
618
626
|
|
package/src/index3.js
CHANGED
|
@@ -1498,11 +1498,12 @@ class RenderManager extends Component {
|
|
|
1498
1498
|
const drawDoorData = userData.drawDoorData;
|
|
1499
1499
|
const insetionArr = this.quadtree.queryLineSegment(line2).filter((r) => r.line !== line2 && !r.userData?.isDoor).map((r) => ({ index: this.lines.indexOf(r.line) }));
|
|
1500
1500
|
return {
|
|
1501
|
-
start: line2.start.toJson(),
|
|
1502
|
-
end: line2.end.toJson(),
|
|
1501
|
+
start: line2.start.toJson(this.dxf.originalZAverage),
|
|
1502
|
+
end: line2.end.toJson(this.dxf.originalZAverage),
|
|
1503
1503
|
insetionArr,
|
|
1504
1504
|
isDoor: userData.isDoor,
|
|
1505
1505
|
doorDirectConnection: userData.isDoor,
|
|
1506
|
+
length: line2.length(),
|
|
1506
1507
|
isWindow: userData.isWindow,
|
|
1507
1508
|
drawDoorData: drawDoorData && drawDoorData.map((w) => ({
|
|
1508
1509
|
p: { x: w.p.x, y: w.p.y, z: w.p.z },
|
|
@@ -1735,7 +1736,7 @@ const _hoisted_11 = {
|
|
|
1735
1736
|
};
|
|
1736
1737
|
const _hoisted_12 = {
|
|
1737
1738
|
key: 0,
|
|
1738
|
-
class: "flex flex-row items-center
|
|
1739
|
+
class: "flex flex-row items-center justify-between gap-[10px] mt-[10px] text-[10px]"
|
|
1739
1740
|
};
|
|
1740
1741
|
const _hoisted_13 = { class: "border-t-1 border-t-[#eee] mt-[5px] pt-[5px] h-[20px] flex items-center gap-[10px]" };
|
|
1741
1742
|
const _hoisted_14 = {
|
|
@@ -1885,7 +1886,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1885
1886
|
} else {
|
|
1886
1887
|
nextTick(() => resizeObserver.observe(elRef.value));
|
|
1887
1888
|
}
|
|
1888
|
-
},
|
|
1889
|
+
}, 100);
|
|
1889
1890
|
defaultComponent.addEventListener("selectLineChange", () => {
|
|
1890
1891
|
selectLineCount.value = defaultComponent.selectLines.length;
|
|
1891
1892
|
hasWindowLine.value = defaultComponent.selectLines.some((l) => l.userData.isWindow);
|
|
@@ -1900,13 +1901,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1900
1901
|
return openBlock(), createElementBlock("div", {
|
|
1901
1902
|
ref_key: "elRef",
|
|
1902
1903
|
ref: elRef,
|
|
1903
|
-
class: "editorTool pointer-events-none overflow-hidden absolute left-0 top-0 w-full h-full z-[
|
|
1904
|
+
class: "editorTool pointer-events-none overflow-hidden absolute left-0 top-0 w-full h-full z-[20] flex flex-row justify-between p-[5px] box-border select-none pointer-events-[all]"
|
|
1904
1905
|
}, [
|
|
1905
1906
|
createVNode(Transition, null, {
|
|
1906
1907
|
default: withCtx(() => [
|
|
1907
1908
|
showShortcutKey.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
1908
1909
|
(openBlock(), createElementBlock(Fragment, null, renderList(shortcutKeys, (item) => {
|
|
1909
|
-
return createElementVNode("
|
|
1910
|
+
return createElementVNode("div", {
|
|
1910
1911
|
class: "p-[4px_0px] flex justify-between text-right border-b-1 border-b-[rgba(255,255,255,0.1)] last-of-type:border-b-0",
|
|
1911
1912
|
key: item.name
|
|
1912
1913
|
}, [
|
|
@@ -1922,14 +1923,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1922
1923
|
ref_key: "toolBarRef",
|
|
1923
1924
|
ref: toolBarRef,
|
|
1924
1925
|
style: normalizeStyle({ left: toolBarPosition.value.left + "px", top: toolBarPosition.value.top + "px" }),
|
|
1925
|
-
class: normalizeClass(["pointer-events-auto max-w-[260px] transition-[border-radius] text-[#333] absolute z-[11] bg-white select-none", { "rounded-[8px] ": toolBarExpand.value }]),
|
|
1926
|
+
class: normalizeClass(["pointer-events-auto w-fit max-w-[260px] transition-[border-radius] text-[#333] absolute z-[11] bg-white select-none", { "rounded-[8px] ": toolBarExpand.value }]),
|
|
1926
1927
|
onMousedown: _cache[13] || (_cache[13] = (e) => e.stopPropagation())
|
|
1927
1928
|
}, [
|
|
1928
1929
|
createElementVNode("div", {
|
|
1929
1930
|
onMousedown: dragMoveHelper,
|
|
1930
1931
|
class: normalizeClass([{ "border-b-[#eee]": toolBarExpand.value }, "flex flex-row justify-between header text-[14px] font-bold p-[10px 0px] border-b-1"])
|
|
1931
1932
|
}, [
|
|
1932
|
-
_cache[15] || (_cache[15] = createStaticVNode('<div class="flex flex-row" data-v-
|
|
1933
|
+
_cache[15] || (_cache[15] = createStaticVNode('<div class="flex flex-row" data-v-a95f67da><div class="p-[2px_5px] flex items-center pointer-events-none" data-v-a95f67da><svg fill="#aaa" width="20" height="20" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" data-v-a95f67da><path d="M341.333333 298.666667a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z m0 298.666666a85.333333 85.333333 0 1 0 0-170.666666 85.333333 85.333333 0 0 0 0 170.666666z m85.333334 213.333334a85.333333 85.333333 0 1 1-170.666667 0 85.333333 85.333333 0 0 1 170.666667 0z m256-512a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z m85.333333 213.333333a85.333333 85.333333 0 1 1-170.666667 0 85.333333 85.333333 0 0 1 170.666667 0z m-85.333333 384a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z" data-v-a95f67da></path></svg></div><h5 class="flex text-[12px] items-center pointer-events-none" data-v-a95f67da>绘制工具</h5></div>', 1)),
|
|
1933
1934
|
createElementVNode("div", {
|
|
1934
1935
|
onMousedown: _cache[0] || (_cache[0] = (e) => e.stopPropagation()),
|
|
1935
1936
|
onClick: _cache[1] || (_cache[1] = ($event) => toolBarExpand.value = !toolBarExpand.value),
|
|
@@ -2008,7 +2009,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2008
2009
|
]),
|
|
2009
2010
|
_ctx.permission === "admin" ? (openBlock(), createElementBlock("div", _hoisted_12, [
|
|
2010
2011
|
createVNode(unref(ElButton), {
|
|
2011
|
-
style: { "padding": "
|
|
2012
|
+
style: { "padding": "0px", "font-size": "10px" },
|
|
2012
2013
|
size: "small",
|
|
2013
2014
|
type: "success",
|
|
2014
2015
|
onClick: selectLocalFile
|
|
@@ -2020,37 +2021,37 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2020
2021
|
__: [17]
|
|
2021
2022
|
}),
|
|
2022
2023
|
createVNode(unref(ElButton), {
|
|
2023
|
-
style: { "padding": "
|
|
2024
|
+
style: { "padding": "0px", "font-size": "10px" },
|
|
2024
2025
|
size: "small",
|
|
2025
2026
|
type: "primary",
|
|
2026
|
-
onClick: _cache[5] || (_cache[5] = ($event) => unref(dxfSystem).Dxf.
|
|
2027
|
+
onClick: _cache[5] || (_cache[5] = ($event) => console.log(unref(dxfSystem).Dxf.originalData))
|
|
2027
2028
|
}, {
|
|
2028
2029
|
default: withCtx(() => _cache[18] || (_cache[18] = [
|
|
2029
|
-
createTextVNode("
|
|
2030
|
+
createTextVNode(" 打印Json ", -1)
|
|
2030
2031
|
])),
|
|
2031
2032
|
_: 1,
|
|
2032
2033
|
__: [18]
|
|
2033
2034
|
}),
|
|
2034
2035
|
createVNode(unref(ElButton), {
|
|
2035
|
-
style: { "padding": "
|
|
2036
|
+
style: { "padding": "0px", "font-size": "10px" },
|
|
2036
2037
|
size: "small",
|
|
2037
2038
|
type: "primary",
|
|
2038
|
-
onClick: _cache[6] || (_cache[6] = ($event) => unref(
|
|
2039
|
+
onClick: _cache[6] || (_cache[6] = ($event) => unref(dxfSystem).Dxf.download("test.dxf"))
|
|
2039
2040
|
}, {
|
|
2040
2041
|
default: withCtx(() => _cache[19] || (_cache[19] = [
|
|
2041
|
-
createTextVNode(" 下载
|
|
2042
|
+
createTextVNode(" 下载DXF ", -1)
|
|
2042
2043
|
])),
|
|
2043
2044
|
_: 1,
|
|
2044
2045
|
__: [19]
|
|
2045
2046
|
}),
|
|
2046
2047
|
createVNode(unref(ElButton), {
|
|
2047
|
-
style: { "padding": "
|
|
2048
|
+
style: { "padding": "0px", "font-size": "10px" },
|
|
2048
2049
|
size: "small",
|
|
2049
2050
|
type: "primary",
|
|
2050
|
-
onClick: _cache[7] || (_cache[7] = ($event) =>
|
|
2051
|
+
onClick: _cache[7] || (_cache[7] = ($event) => unref(whiteModel).downloadGltf("test.glb", true))
|
|
2051
2052
|
}, {
|
|
2052
2053
|
default: withCtx(() => _cache[20] || (_cache[20] = [
|
|
2053
|
-
createTextVNode("
|
|
2054
|
+
createTextVNode(" 下载白膜 ", -1)
|
|
2054
2055
|
])),
|
|
2055
2056
|
_: 1,
|
|
2056
2057
|
__: [20]
|
|
@@ -2165,7 +2166,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
2165
2166
|
}
|
|
2166
2167
|
return target;
|
|
2167
2168
|
};
|
|
2168
|
-
const EditorTool = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
2169
|
+
const EditorTool = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a95f67da"]]);
|
|
2169
2170
|
let Editor$1 = class Editor extends Component {
|
|
2170
2171
|
static name = "Editor";
|
|
2171
2172
|
container = new THREE.Group();
|
|
@@ -125,9 +125,10 @@ export declare class Point<T = Record<string, any>> {
|
|
|
125
125
|
x: number;
|
|
126
126
|
y: number;
|
|
127
127
|
}): void;
|
|
128
|
-
toJson(): {
|
|
128
|
+
toJson(z?: number): {
|
|
129
129
|
x: number;
|
|
130
130
|
y: number;
|
|
131
|
+
z: number;
|
|
131
132
|
};
|
|
132
133
|
static from(arr: any): Point<Record<string, any>>;
|
|
133
134
|
static zero(): Point<Record<string, any>>;
|