build-dxf 0.1.15 → 0.1.16

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.
Files changed (58) hide show
  1. package/package.json +1 -1
  2. package/src/DomEventRegister.js +472 -0
  3. package/src/build.js +3064 -3359
  4. package/src/index.css +1 -131
  5. package/src/index.js +10 -10
  6. package/src/index2.js +2 -155
  7. package/src/index3.js +6295 -2640
  8. package/src/utils/DxfSystem/DxfSystem.d.ts +0 -3
  9. package/src/utils/DxfSystem/components/CorrectionDxf.d.ts +26 -2
  10. package/src/utils/DxfSystem/components/Dxf.d.ts +3 -2
  11. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/ClippingLine.d.ts +1 -2
  12. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/CommandFlowComponent.d.ts +7 -2
  13. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/DeleteSelectLine.d.ts +1 -1
  14. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/DrawDoorLine.d.ts +2 -3
  15. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/DrawLine.d.ts +3 -5
  16. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/DrawWindow.d.ts +2 -3
  17. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/MergeLine.d.ts +1 -1
  18. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/PointDrag.d.ts +2 -3
  19. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/SelectAll.d.ts +1 -1
  20. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/{IntersectionConnectionLine.d.ts → TwoLineConnectionLine.d.ts} +3 -3
  21. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/{ConnectionLine.d.ts → TwoPointConnection.d.ts} +3 -3
  22. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/{VerticalCorrection.d.ts → VerticalCorr.d.ts} +2 -12
  23. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/{DeleteSelectWindow.d.ts → VerticalCorrContinue.d.ts} +10 -8
  24. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/VerticalReferenceLine.d.ts +1 -1
  25. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/ViewAngle.d.ts +1 -1
  26. package/src/utils/DxfSystem/plugin/Editor/components/index.d.ts +1 -1
  27. package/src/utils/DxfSystem/plugin/RenderPlugin/components/Renderer.d.ts +1 -0
  28. package/src/utils/DxfSystem/plugin/RenderPlugin/index.d.ts +1 -2
  29. package/src/utils/DxfSystem/type.d.ts +2 -0
  30. package/src/utils/DxfSystem/utils/DoorFind.d.ts +36 -0
  31. package/src/utils/{modelScenario → DxfSystem/utils}/SceneAutoGenerat.d.ts +3 -1
  32. package/src/utils/DxfSystem/utils/index.d.ts +1 -5
  33. package/src/utils/LineSegment.d.ts +9 -0
  34. package/src/utils/Map.d.ts +1 -0
  35. package/src/utils/MaxiCircles.d.ts +13 -0
  36. package/src/utils/MiniCircles.d.ts +33 -0
  37. package/src/utils/Point.d.ts +1 -1
  38. package/src/utils/{PointVirtualGrid/index.d.ts → PointVirtualGrid.d.ts} +5 -5
  39. package/src/utils/Polygon.d.ts +11 -0
  40. package/src/utils/UndirectedGraph.d.ts +4 -0
  41. package/src/utils/index.d.ts +4 -2
  42. package/src/bin/Main.js +0 -269
  43. package/src/bin/mini_cycles.js +0 -15
  44. package/src/bin/mini_cycles.wasm +0 -0
  45. package/src/bin/mini_cycles.wasm.map +0 -1
  46. package/src/bin/wasm_mini_cycles.js +0 -296
  47. package/src/index4.js +0 -4261
  48. package/src/utils/DxfSystem/components/DoorsAnalysis.d.ts +0 -115
  49. package/src/utils/DxfSystem/plugin/RenderPlugin/pages/Dxf.vue.d.ts +0 -21
  50. package/src/utils/DxfSystem/utils/closedPathArea.d.ts +0 -2
  51. package/src/utils/DxfSystem/utils/findClosedPolygons.d.ts +0 -14
  52. package/src/utils/DxfSystem/utils/findLargestCircle.d.ts +0 -14
  53. package/src/utils/DxfSystem/utils/mergeSmallestCircle.d.ts +0 -14
  54. package/src/utils/DxfSystem/utils/smallestCircle.d.ts +0 -6
  55. package/src/utils/deepClone.d.ts +0 -6
  56. package/src/utils/drawLinePathToPng.d.ts +0 -7
  57. /package/src/utils/{Lines.d.ts → DxfSystem/utils/Lines.d.ts} +0 -0
  58. /package/src/utils/{LoadModel.d.ts → DxfSystem/utils/LoadModel.d.ts} +0 -0
@@ -1,296 +0,0 @@
1
- import LoadWASM from "./mini_cycles.js";
2
- ;(function ($hx_exports, $global) { "use strict";
3
- $hx_exports["wasm"] = $hx_exports["wasm"] || {};
4
- var $estr = function() { return js_Boot.__string_rec(this,''); },$hxEnums = $hxEnums || {},$_;
5
- Math.__name__ = true;
6
- class haxe_Exception extends Error {
7
- constructor(message,previous,native) {
8
- super(message);
9
- this.message = message;
10
- this.__previousException = previous;
11
- this.__nativeException = native != null ? native : this;
12
- }
13
- get_native() {
14
- return this.__nativeException;
15
- }
16
- static thrown(value) {
17
- if(((value) instanceof haxe_Exception)) {
18
- return value.get_native();
19
- } else if(((value) instanceof Error)) {
20
- return value;
21
- } else {
22
- let e = new haxe_ValueException(value);
23
- return e;
24
- }
25
- }
26
- }
27
- haxe_Exception.__name__ = true;
28
- class haxe_ValueException extends haxe_Exception {
29
- constructor(value,previous,native) {
30
- super(String(value),previous,native);
31
- this.value = value;
32
- }
33
- }
34
- haxe_ValueException.__name__ = true;
35
- var haxe_io_Error = $hxEnums["haxe.io.Error"] = { __ename__:true,__constructs__:null
36
- ,Blocked: {_hx_name:"Blocked",_hx_index:0,__enum__:"haxe.io.Error",toString:$estr}
37
- ,Overflow: {_hx_name:"Overflow",_hx_index:1,__enum__:"haxe.io.Error",toString:$estr}
38
- ,OutsideBounds: {_hx_name:"OutsideBounds",_hx_index:2,__enum__:"haxe.io.Error",toString:$estr}
39
- ,Custom: ($_=function(e) { return {_hx_index:3,e:e,__enum__:"haxe.io.Error",toString:$estr}; },$_._hx_name="Custom",$_.__params__ = ["e"],$_)
40
- };
41
- haxe_io_Error.__constructs__ = [haxe_io_Error.Blocked,haxe_io_Error.Overflow,haxe_io_Error.OutsideBounds,haxe_io_Error.Custom];
42
- class haxe_io_Float32Array {
43
- static fromArray(a,pos,length) {
44
- if(pos == null) {
45
- pos = 0;
46
- }
47
- if(length == null) {
48
- length = a.length - pos;
49
- }
50
- if(pos < 0 || length < 0 || pos + length > a.length) {
51
- throw haxe_Exception.thrown(haxe_io_Error.OutsideBounds);
52
- }
53
- if(pos == 0 && length == a.length) {
54
- return new Float32Array(a);
55
- }
56
- let i = new Float32Array(a.length);
57
- let _g = 0;
58
- let _g1 = length;
59
- while(_g < _g1) {
60
- let idx = _g++;
61
- i[idx] = a[idx + pos];
62
- }
63
- return i;
64
- }
65
- }
66
- class haxe_io_Int32Array {
67
- static fromArray(a,pos,length) {
68
- if(pos == null) {
69
- pos = 0;
70
- }
71
- if(length == null) {
72
- length = a.length - pos;
73
- }
74
- if(pos < 0 || length < 0 || pos + length > a.length) {
75
- throw haxe_Exception.thrown(haxe_io_Error.OutsideBounds);
76
- }
77
- if(pos == 0 && length == a.length) {
78
- return new Int32Array(a);
79
- }
80
- let i = new Int32Array(a.length);
81
- let _g = 0;
82
- let _g1 = length;
83
- while(_g < _g1) {
84
- let idx = _g++;
85
- i[idx] = a[idx + pos];
86
- }
87
- return i;
88
- }
89
- }
90
- class haxe_iterators_ArrayIterator {
91
- constructor(array) {
92
- this.current = 0;
93
- this.array = array;
94
- }
95
- hasNext() {
96
- return this.current < this.array.length;
97
- }
98
- next() {
99
- return this.array[this.current++];
100
- }
101
- }
102
- haxe_iterators_ArrayIterator.__name__ = true;
103
- class js_Boot {
104
- static __string_rec(o,s) {
105
- if(o == null) {
106
- return "null";
107
- }
108
- if(s.length >= 5) {
109
- return "<...>";
110
- }
111
- let t = typeof(o);
112
- if(t == "function" && (o.__name__ || o.__ename__)) {
113
- t = "object";
114
- }
115
- switch(t) {
116
- case "function":
117
- return "<function>";
118
- case "object":
119
- if(o.__enum__) {
120
- let e = $hxEnums[o.__enum__];
121
- let con = e.__constructs__[o._hx_index];
122
- let n = con._hx_name;
123
- if(con.__params__) {
124
- s = s + "\t";
125
- return n + "(" + ((function($this) {
126
- var $r;
127
- let _g = [];
128
- {
129
- let _g1 = 0;
130
- let _g2 = con.__params__;
131
- while(true) {
132
- if(!(_g1 < _g2.length)) {
133
- break;
134
- }
135
- let p = _g2[_g1];
136
- _g1 = _g1 + 1;
137
- _g.push(js_Boot.__string_rec(o[p],s));
138
- }
139
- }
140
- $r = _g;
141
- return $r;
142
- }(this))).join(",") + ")";
143
- } else {
144
- return n;
145
- }
146
- }
147
- if(((o) instanceof Array)) {
148
- let str = "[";
149
- s += "\t";
150
- let _g = 0;
151
- let _g1 = o.length;
152
- while(_g < _g1) {
153
- let i = _g++;
154
- str += (i > 0 ? "," : "") + js_Boot.__string_rec(o[i],s);
155
- }
156
- str += "]";
157
- return str;
158
- }
159
- let tostr;
160
- try {
161
- tostr = o.toString;
162
- } catch( _g ) {
163
- return "???";
164
- }
165
- if(tostr != null && tostr != Object.toString && typeof(tostr) == "function") {
166
- let s2 = o.toString();
167
- if(s2 != "[object Object]") {
168
- return s2;
169
- }
170
- }
171
- let str = "{\n";
172
- s += "\t";
173
- let hasp = o.hasOwnProperty != null;
174
- let k = null;
175
- for( k in o ) {
176
- if(hasp && !o.hasOwnProperty(k)) {
177
- continue;
178
- }
179
- if(k == "prototype" || k == "__class__" || k == "__super__" || k == "__interfaces__" || k == "__properties__") {
180
- continue;
181
- }
182
- if(str.length != 2) {
183
- str += ", \n";
184
- }
185
- str += s + k + " : " + js_Boot.__string_rec(o[k],s);
186
- }
187
- s = s.substring(1);
188
- str += "\n" + s + "}";
189
- return str;
190
- case "string":
191
- return o;
192
- default:
193
- return String(o);
194
- }
195
- }
196
- }
197
- js_Boot.__name__ = true;
198
- class jsasync_JSAsyncTools {
199
- }
200
- jsasync_JSAsyncTools.__name__ = true;
201
- class jsasync_impl_Helper {
202
- }
203
- jsasync_impl_Helper.__name__ = true;
204
- class wasm_ArrayHelper {
205
- static mallocInt2Array(array,module) {
206
- let arr = wasm_ArrayHelper.flattenArray(array);
207
- let inputArray = haxe_io_Int32Array.fromArray(arr);
208
- let arrayBufferPointer = module._malloc(inputArray.length * 4);
209
- module.HEAP32.set(inputArray,arrayBufferPointer / 4 | 0);
210
- return { ptr : arrayBufferPointer, length : arr.length};
211
- }
212
- static mallocFloat2Array(array,module) {
213
- let arr = wasm_ArrayHelper.flattenArray(array);
214
- let inputArray = haxe_io_Float32Array.fromArray(arr);
215
- let arrayBufferPointer = module._malloc(inputArray.length * 4);
216
- module.HEAPF32.set(inputArray,arrayBufferPointer / 4 | 0);
217
- return { ptr : arrayBufferPointer, length : arr.length};
218
- }
219
- static fromPointerToArrayInt2(module,_pointer) {
220
- let real_pointer = _pointer / 4;
221
- let arrayLength = module.HEAP32.subarray(real_pointer,real_pointer + 1);
222
- if(arrayLength == 0) {
223
- return [];
224
- }
225
- return wasm_ArrayHelper.unFlattenArray(module.HEAP32.subarray(real_pointer + 1,(real_pointer | 0) + (arrayLength | 0)));
226
- }
227
- static flattenArray(arr) {
228
- let result = [];
229
- let _g = 0;
230
- while(_g < arr.length) {
231
- let item = arr[_g];
232
- ++_g;
233
- let len = item.length;
234
- result.push(len);
235
- let _g1 = 0;
236
- while(_g1 < len) result.push(item[_g1++]);
237
- }
238
- return result;
239
- }
240
- static unFlattenArray(arr) {
241
- let result = [];
242
- let index = 0;
243
- while(index < arr.length) {
244
- let len = arr[index];
245
- let item = [];
246
- let _g = 0;
247
- while(_g < len) item.push(arr[index + _g++ + 1]);
248
- result.push(item);
249
- index += len + 1;
250
- }
251
- return result;
252
- }
253
- }
254
- wasm_ArrayHelper.__name__ = true;
255
- class wasm_MiniCycles {
256
- static main() {
257
- console.log("src/wasm/MiniCycles.hx:15:","Hello World MiniCycles");
258
- }
259
- static async init() {
260
-
261
- if(wasm_MiniCycles.module == null) {
262
- wasm_MiniCycles.module = (await new LoadWASM());
263
- }
264
- }
265
- static getResult(vertexs,edges) {
266
- let before = new Date().getTime();
267
- let vertexsPtr = wasm_ArrayHelper.mallocFloat2Array(vertexs,wasm_MiniCycles.module);
268
- let edgesPtr = wasm_ArrayHelper.mallocInt2Array(edges,wasm_MiniCycles.module);
269
- let resultPtr = wasm_MiniCycles.module.cwrap("get_minicycles","number",["number","number","number","number"])(vertexsPtr.ptr,vertexsPtr.length,edgesPtr.ptr,edgesPtr.length);
270
- let after = new Date().getTime();
271
- console.log("cpp 计算花费 time:" + (after - before) + "ms");
272
- before = new Date().getTime();
273
- let result = wasm_ArrayHelper.fromPointerToArrayInt2(wasm_MiniCycles.module,resultPtr);
274
- after = new Date().getTime();
275
- console.log("js 转换花费 time:" + (after - before) + "ms");
276
- return result;
277
- }
278
- static test() {
279
- let before = new Date().getTime();
280
- let result = wasm_MiniCycles.getResult([[11825.25,0],[11705.25,120.000244140625],[11585.25,240.000244140625],[0,0],[120,120.000244140625],[240,240.000244140625],[11825.25,7742.31005859375],[11705.25,7622.31005859375],[11585.25,7502.31005859375],[11825.25,4930.5401611328125],[11705.25,4930.5401611328125],[11585.25,5050.5401611328125],[11585.25,4810.5401611328125],[0,4930.5401611328125],[120,4930.5401611328125],[240,4870.5401611328125],[240,4990.5401611328125],[0,7742.31005859375],[120,7622.31005859375],[240,7502.31005859375],[5004.6402587890625,7742.31005859375],[5004.6402587890625,7622.31005859375],[4884.6402587890625,7502.31005859375],[5124.6402587890625,7502.31005859375],[4884.6402587890625,4990.5401611328125],[5004.6402587890625,4930.5401611328125],[5004.6402587890625,4870.5401611328125],[5124.6402587890625,5050.5401611328125],[5004.6402587890625,4810.5401611328125]],[[0,1],[1,2],[0,3],[2,5],[3,4],[4,5],[6,7],[7,8],[6,9],[8,11],[9,10],[10,11],[10,12],[9,0],[12,2],[3,13],[5,15],[13,14],[14,15],[14,16],[13,17],[16,19],[17,18],[18,19],[17,20],[19,22],[20,21],[21,22],[21,23],[20,6],[23,8],[16,24],[15,26],[24,25],[25,26],[27,25],[26,28],[27,11],[28,12],[23,27],[22,24]]);
281
- console.log("src/wasm/MiniCycles.hx:102:","spend time: " + (new Date().getTime() - before) + "ms");
282
- console.log("src/wasm/MiniCycles.hx:104:",result);
283
- }
284
- }
285
- $hx_exports["MiniCycles"] = wasm_MiniCycles;
286
- wasm_MiniCycles.__name__ = true;
287
- {
288
- String.__name__ = true;
289
- Array.__name__ = true;
290
- Date.__name__ = "Date";
291
- }
292
- js_Boot.__toStr = ({ }).toString;
293
- wasm_MiniCycles.main();
294
- })(typeof exports != "undefined" ? exports : typeof window != "undefined" ? window : typeof self != "undefined" ? self : this, {});
295
-
296
- export {}