opengeometry 2.0.14 → 2.0.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.
- package/README.md +4 -4
- package/index.d.ts +5 -7
- package/index.js +2301 -3312
- package/index.js.map +1 -1
- package/opengeometry/pkg/opengeometry.d.ts +286 -355
- package/opengeometry/pkg/opengeometry.js +826 -1247
- package/opengeometry/pkg/opengeometry_bg.wasm +0 -0
- package/opengeometry/pkg/opengeometry_bg.wasm.d.ts +231 -256
- package/opengeometry_bg.wasm +0 -0
- package/opengeometry_bg.wasm.d.ts +231 -256
- package/package.json +2 -4
- package/src/examples/index.d.ts +1 -1
- package/src/examples/{wall-from-offsets.d.ts → ribbon-from-offsets.d.ts} +6 -6
- package/src/operations/boolean-regions.d.ts +20 -0
- package/src/operations/index.d.ts +1 -0
- package/src/operations/offset-regions.d.ts +11 -12
- package/src/shapes/analytic-solid.d.ts +23 -7
- package/src/world/world-graph.d.ts +112 -0
- package/src/operations/boolean-errors.d.ts +0 -90
- package/src/shapes/boolean-subtract.d.ts +0 -21
|
@@ -38,8 +38,56 @@ function getStringFromWasm0(ptr, len) {
|
|
|
38
38
|
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
let cachedFloat64ArrayMemory0 = null;
|
|
42
|
+
|
|
43
|
+
function getFloat64ArrayMemory0() {
|
|
44
|
+
if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
|
|
45
|
+
cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
|
|
46
|
+
}
|
|
47
|
+
return cachedFloat64ArrayMemory0;
|
|
48
|
+
}
|
|
49
|
+
|
|
41
50
|
let WASM_VECTOR_LEN = 0;
|
|
42
51
|
|
|
52
|
+
function passArrayF64ToWasm0(arg, malloc) {
|
|
53
|
+
const ptr = malloc(arg.length * 8, 8) >>> 0;
|
|
54
|
+
getFloat64ArrayMemory0().set(arg, ptr / 8);
|
|
55
|
+
WASM_VECTOR_LEN = arg.length;
|
|
56
|
+
return ptr;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function takeFromExternrefTable0(idx) {
|
|
60
|
+
const value = wasm.__wbindgen_export_2.get(idx);
|
|
61
|
+
wasm.__externref_table_dealloc(idx);
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Wasm entry point: analyze a flat `[x0,y0,z0,…]` loop, returning the report as
|
|
66
|
+
* JSON (the corrected points are not returned here; use the kernel API).
|
|
67
|
+
* @param {Float64Array} flat_points
|
|
68
|
+
* @returns {string}
|
|
69
|
+
*/
|
|
70
|
+
export function analyzeProfile(flat_points) {
|
|
71
|
+
let deferred3_0;
|
|
72
|
+
let deferred3_1;
|
|
73
|
+
try {
|
|
74
|
+
const ptr0 = passArrayF64ToWasm0(flat_points, wasm.__wbindgen_malloc);
|
|
75
|
+
const len0 = WASM_VECTOR_LEN;
|
|
76
|
+
const ret = wasm.analyzeProfile(ptr0, len0);
|
|
77
|
+
var ptr2 = ret[0];
|
|
78
|
+
var len2 = ret[1];
|
|
79
|
+
if (ret[3]) {
|
|
80
|
+
ptr2 = 0; len2 = 0;
|
|
81
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
82
|
+
}
|
|
83
|
+
deferred3_0 = ptr2;
|
|
84
|
+
deferred3_1 = len2;
|
|
85
|
+
return getStringFromWasm0(ptr2, len2);
|
|
86
|
+
} finally {
|
|
87
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
43
91
|
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
44
92
|
|
|
45
93
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
@@ -94,219 +142,20 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
94
142
|
return ptr;
|
|
95
143
|
}
|
|
96
144
|
|
|
97
|
-
function takeFromExternrefTable0(idx) {
|
|
98
|
-
const value = wasm.__wbindgen_export_2.get(idx);
|
|
99
|
-
wasm.__externref_table_dealloc(idx);
|
|
100
|
-
return value;
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* @param {string} local_brep_serialized
|
|
104
|
-
* @param {number} height
|
|
105
|
-
* @returns {string}
|
|
106
|
-
*/
|
|
107
|
-
export function extrudeBrepFace(local_brep_serialized, height) {
|
|
108
|
-
let deferred3_0;
|
|
109
|
-
let deferred3_1;
|
|
110
|
-
try {
|
|
111
|
-
const ptr0 = passStringToWasm0(local_brep_serialized, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
112
|
-
const len0 = WASM_VECTOR_LEN;
|
|
113
|
-
const ret = wasm.extrudeBrepFace(ptr0, len0, height);
|
|
114
|
-
var ptr2 = ret[0];
|
|
115
|
-
var len2 = ret[1];
|
|
116
|
-
if (ret[3]) {
|
|
117
|
-
ptr2 = 0; len2 = 0;
|
|
118
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
119
|
-
}
|
|
120
|
-
deferred3_0 = ptr2;
|
|
121
|
-
deferred3_1 = len2;
|
|
122
|
-
return getStringFromWasm0(ptr2, len2);
|
|
123
|
-
} finally {
|
|
124
|
-
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
let cachedFloat64ArrayMemory0 = null;
|
|
129
|
-
|
|
130
|
-
function getFloat64ArrayMemory0() {
|
|
131
|
-
if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
|
|
132
|
-
cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
|
|
133
|
-
}
|
|
134
|
-
return cachedFloat64ArrayMemory0;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
function passArrayF64ToWasm0(arg, malloc) {
|
|
138
|
-
const ptr = malloc(arg.length * 8, 8) >>> 0;
|
|
139
|
-
getFloat64ArrayMemory0().set(arg, ptr / 8);
|
|
140
|
-
WASM_VECTOR_LEN = arg.length;
|
|
141
|
-
return ptr;
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Wasm entry point for general extrude. `direction` is `[x,y,z]`; `extent_kind`
|
|
145
|
-
* is `"one_sided" | "symmetric" | "two_sided"`; `d_plus`/`d_minus` are the
|
|
146
|
-
* extent distances (`d_minus` ignored unless two-sided, `d_plus` is the
|
|
147
|
-
* distance for one-sided/symmetric).
|
|
148
|
-
* @param {string} local_brep_serialized
|
|
149
|
-
* @param {Float64Array} direction
|
|
150
|
-
* @param {string} extent_kind
|
|
151
|
-
* @param {number} d_plus
|
|
152
|
-
* @param {number} d_minus
|
|
153
|
-
* @returns {string}
|
|
154
|
-
*/
|
|
155
|
-
export function extrudeBrepFaceDirectional(local_brep_serialized, direction, extent_kind, d_plus, d_minus) {
|
|
156
|
-
let deferred5_0;
|
|
157
|
-
let deferred5_1;
|
|
158
|
-
try {
|
|
159
|
-
const ptr0 = passStringToWasm0(local_brep_serialized, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
160
|
-
const len0 = WASM_VECTOR_LEN;
|
|
161
|
-
const ptr1 = passArrayF64ToWasm0(direction, wasm.__wbindgen_malloc);
|
|
162
|
-
const len1 = WASM_VECTOR_LEN;
|
|
163
|
-
const ptr2 = passStringToWasm0(extent_kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
164
|
-
const len2 = WASM_VECTOR_LEN;
|
|
165
|
-
const ret = wasm.extrudeBrepFaceDirectional(ptr0, len0, ptr1, len1, ptr2, len2, d_plus, d_minus);
|
|
166
|
-
var ptr4 = ret[0];
|
|
167
|
-
var len4 = ret[1];
|
|
168
|
-
if (ret[3]) {
|
|
169
|
-
ptr4 = 0; len4 = 0;
|
|
170
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
171
|
-
}
|
|
172
|
-
deferred5_0 = ptr4;
|
|
173
|
-
deferred5_1 = len4;
|
|
174
|
-
return getStringFromWasm0(ptr4, len4);
|
|
175
|
-
} finally {
|
|
176
|
-
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Wasm entry point: analyze a flat `[x0,y0,z0,…]` loop, returning the report as
|
|
182
|
-
* JSON (the corrected points are not returned here; use the kernel API).
|
|
183
|
-
* @param {Float64Array} flat_points
|
|
184
|
-
* @returns {string}
|
|
185
|
-
*/
|
|
186
|
-
export function analyzeProfile(flat_points) {
|
|
187
|
-
let deferred3_0;
|
|
188
|
-
let deferred3_1;
|
|
189
|
-
try {
|
|
190
|
-
const ptr0 = passArrayF64ToWasm0(flat_points, wasm.__wbindgen_malloc);
|
|
191
|
-
const len0 = WASM_VECTOR_LEN;
|
|
192
|
-
const ret = wasm.analyzeProfile(ptr0, len0);
|
|
193
|
-
var ptr2 = ret[0];
|
|
194
|
-
var len2 = ret[1];
|
|
195
|
-
if (ret[3]) {
|
|
196
|
-
ptr2 = 0; len2 = 0;
|
|
197
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
198
|
-
}
|
|
199
|
-
deferred3_0 = ptr2;
|
|
200
|
-
deferred3_1 = len2;
|
|
201
|
-
return getStringFromWasm0(ptr2, len2);
|
|
202
|
-
} finally {
|
|
203
|
-
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
145
|
function _assertClass(instance, klass) {
|
|
208
146
|
if (!(instance instanceof klass)) {
|
|
209
147
|
throw new Error(`expected instance of ${klass.name}`);
|
|
210
148
|
}
|
|
211
149
|
}
|
|
212
150
|
|
|
213
|
-
function isLikeNone(x) {
|
|
214
|
-
return x === undefined || x === null;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
151
|
function getArrayF64FromWasm0(ptr, len) {
|
|
218
152
|
ptr = ptr >>> 0;
|
|
219
153
|
return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
|
|
220
154
|
}
|
|
221
155
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
function getDataViewMemory0() {
|
|
225
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
226
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
227
|
-
}
|
|
228
|
-
return cachedDataViewMemory0;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
232
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
233
|
-
for (let i = 0; i < array.length; i++) {
|
|
234
|
-
const add = addToExternrefTable0(array[i]);
|
|
235
|
-
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
236
|
-
}
|
|
237
|
-
WASM_VECTOR_LEN = array.length;
|
|
238
|
-
return ptr;
|
|
239
|
-
}
|
|
240
|
-
/**
|
|
241
|
-
* Wasm entry point: offset a centreline by `width` into stroked regions via the
|
|
242
|
-
* deterministic analytic offset. `centreline_flat` is `[x0,y0,z0, …]`. Returns
|
|
243
|
-
* CW-outer / CCW-hole regions, canonicalised; empty (does NOT throw) when degenerate.
|
|
244
|
-
* @param {Float64Array} centreline_flat
|
|
245
|
-
* @param {number} width
|
|
246
|
-
* @param {boolean} closed
|
|
247
|
-
* @param {number} miter_limit
|
|
248
|
-
* @returns {OGOffsetRegionsResult}
|
|
249
|
-
*/
|
|
250
|
-
export function offsetPolylineRegions(centreline_flat, width, closed, miter_limit) {
|
|
251
|
-
const ptr0 = passArrayF64ToWasm0(centreline_flat, wasm.__wbindgen_malloc);
|
|
252
|
-
const len0 = WASM_VECTOR_LEN;
|
|
253
|
-
const ret = wasm.offsetPolylineRegions(ptr0, len0, width, closed, miter_limit);
|
|
254
|
-
if (ret[2]) {
|
|
255
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
256
|
-
}
|
|
257
|
-
return OGOffsetRegionsResult.__wrap(ret[0]);
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* Wasm entry point: merge a GROUP of separate polylines (a crossing T / X / L
|
|
262
|
-
* overlap) into one clean stroked region by nonzero-winding union of their mitered
|
|
263
|
-
* bands. `polylines_json` is `[{centreline:[x,y,z,…], width, closed}, …]`. Returns
|
|
264
|
-
* CW-outer / CCW-hole regions (one or more); empty when nothing is buildable.
|
|
265
|
-
* @param {string} polylines_json
|
|
266
|
-
* @returns {OGOffsetRegionsResult}
|
|
267
|
-
*/
|
|
268
|
-
export function offsetPolylineGroupRegions(polylines_json) {
|
|
269
|
-
const ptr0 = passStringToWasm0(polylines_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
270
|
-
const len0 = WASM_VECTOR_LEN;
|
|
271
|
-
const ret = wasm.offsetPolylineGroupRegions(ptr0, len0);
|
|
272
|
-
if (ret[2]) {
|
|
273
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
274
|
-
}
|
|
275
|
-
return OGOffsetRegionsResult.__wrap(ret[0]);
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* Wasm entry point: inset a CLOSED ring inward with one distance per edge
|
|
280
|
-
* (edge i = ring[i] → ring[i+1]). `ring_flat` is `[x0,y0,z0, …]`;
|
|
281
|
-
* `holes_json` is `[{ring:[x,y,z,…], distances:[…]}, …]` (`"[]"` = none) —
|
|
282
|
-
* excluded interior rings, each grown outward by its own per-edge distances.
|
|
283
|
-
* Returns CW-outer / CCW-hole regions, canonicalised; possibly several when a
|
|
284
|
-
* deep inset (or a hole) splits the ring, and empty (does NOT throw) when the
|
|
285
|
-
* inset collapses or the outer ring is degenerate. THROWS on malformed
|
|
286
|
-
* arguments: a distance count that does not match an edge count, a negative /
|
|
287
|
-
* non-finite distance, a degenerate hole, or unparsable `holes_json`. Corners
|
|
288
|
-
* where distances differ are circumscribed clearance arcs (conservative), so
|
|
289
|
-
* no output point is ever closer to an edge than that edge's distance —
|
|
290
|
-
* there is no miter-limit knob because there are no miters.
|
|
291
|
-
* @param {Float64Array} ring_flat
|
|
292
|
-
* @param {Float64Array} distances
|
|
293
|
-
* @param {string} holes_json
|
|
294
|
-
* @returns {OGOffsetRegionsResult}
|
|
295
|
-
*/
|
|
296
|
-
export function offsetRingVariable(ring_flat, distances, holes_json) {
|
|
297
|
-
const ptr0 = passArrayF64ToWasm0(ring_flat, wasm.__wbindgen_malloc);
|
|
298
|
-
const len0 = WASM_VECTOR_LEN;
|
|
299
|
-
const ptr1 = passArrayF64ToWasm0(distances, wasm.__wbindgen_malloc);
|
|
300
|
-
const len1 = WASM_VECTOR_LEN;
|
|
301
|
-
const ptr2 = passStringToWasm0(holes_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
302
|
-
const len2 = WASM_VECTOR_LEN;
|
|
303
|
-
const ret = wasm.offsetRingVariable(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
304
|
-
if (ret[2]) {
|
|
305
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
306
|
-
}
|
|
307
|
-
return OGOffsetRegionsResult.__wrap(ret[0]);
|
|
156
|
+
function isLikeNone(x) {
|
|
157
|
+
return x === undefined || x === null;
|
|
308
158
|
}
|
|
309
|
-
|
|
310
159
|
/**
|
|
311
160
|
* @param {string} serialized
|
|
312
161
|
* @returns {string}
|
|
@@ -378,12 +227,31 @@ function getArrayU32FromWasm0(ptr, len) {
|
|
|
378
227
|
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
379
228
|
}
|
|
380
229
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
230
|
+
let cachedDataViewMemory0 = null;
|
|
231
|
+
|
|
232
|
+
function getDataViewMemory0() {
|
|
233
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
234
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
235
|
+
}
|
|
236
|
+
return cachedDataViewMemory0;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
240
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
241
|
+
for (let i = 0; i < array.length; i++) {
|
|
242
|
+
const add = addToExternrefTable0(array[i]);
|
|
243
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
244
|
+
}
|
|
245
|
+
WASM_VECTOR_LEN = array.length;
|
|
246
|
+
return ptr;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
250
|
+
ptr = ptr >>> 0;
|
|
251
|
+
const mem = getDataViewMemory0();
|
|
252
|
+
const result = [];
|
|
253
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
254
|
+
result.push(wasm.__wbindgen_export_2.get(mem.getUint32(i, true)));
|
|
387
255
|
}
|
|
388
256
|
wasm.__externref_drop_slice(ptr, len);
|
|
389
257
|
return result;
|
|
@@ -443,6 +311,244 @@ export function healBrep(brep_json, tolerance) {
|
|
|
443
311
|
}
|
|
444
312
|
}
|
|
445
313
|
|
|
314
|
+
/**
|
|
315
|
+
* @param {string} a_json
|
|
316
|
+
* @param {string} b_json
|
|
317
|
+
* @param {string} operation
|
|
318
|
+
* @returns {OGOffsetRegionsResult}
|
|
319
|
+
*/
|
|
320
|
+
export function booleanRegions2D(a_json, b_json, operation) {
|
|
321
|
+
const ptr0 = passStringToWasm0(a_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
322
|
+
const len0 = WASM_VECTOR_LEN;
|
|
323
|
+
const ptr1 = passStringToWasm0(b_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
324
|
+
const len1 = WASM_VECTOR_LEN;
|
|
325
|
+
const ptr2 = passStringToWasm0(operation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
326
|
+
const len2 = WASM_VECTOR_LEN;
|
|
327
|
+
const ret = wasm.booleanRegions2D(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
328
|
+
if (ret[2]) {
|
|
329
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
330
|
+
}
|
|
331
|
+
return OGOffsetRegionsResult.__wrap(ret[0]);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Exact line/arc region Boolean. The JSON rings contain analytic edges rather
|
|
336
|
+
* than vertices, and the result keeps arcs as arcs. As with booleanRegions2D,
|
|
337
|
+
* outer rings are CW in XZ and holes are CCW.
|
|
338
|
+
* @param {string} a_json
|
|
339
|
+
* @param {string} b_json
|
|
340
|
+
* @param {string} operation
|
|
341
|
+
* @returns {string}
|
|
342
|
+
*/
|
|
343
|
+
export function booleanCurvedRegions2D(a_json, b_json, operation) {
|
|
344
|
+
let deferred5_0;
|
|
345
|
+
let deferred5_1;
|
|
346
|
+
try {
|
|
347
|
+
const ptr0 = passStringToWasm0(a_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
348
|
+
const len0 = WASM_VECTOR_LEN;
|
|
349
|
+
const ptr1 = passStringToWasm0(b_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
350
|
+
const len1 = WASM_VECTOR_LEN;
|
|
351
|
+
const ptr2 = passStringToWasm0(operation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
352
|
+
const len2 = WASM_VECTOR_LEN;
|
|
353
|
+
const ret = wasm.booleanCurvedRegions2D(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
354
|
+
var ptr4 = ret[0];
|
|
355
|
+
var len4 = ret[1];
|
|
356
|
+
if (ret[3]) {
|
|
357
|
+
ptr4 = 0; len4 = 0;
|
|
358
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
359
|
+
}
|
|
360
|
+
deferred5_0 = ptr4;
|
|
361
|
+
deferred5_1 = len4;
|
|
362
|
+
return getStringFromWasm0(ptr4, len4);
|
|
363
|
+
} finally {
|
|
364
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Wasm entry point: offset a centreline by `width` into stroked regions via the
|
|
370
|
+
* deterministic analytic offset. `centreline_flat` is `[x0,y0,z0, …]`. Returns
|
|
371
|
+
* CW-outer / CCW-hole regions, canonicalised; empty (does NOT throw) when degenerate.
|
|
372
|
+
* @param {Float64Array} centreline_flat
|
|
373
|
+
* @param {number} width
|
|
374
|
+
* @param {boolean} closed
|
|
375
|
+
* @param {number} miter_limit
|
|
376
|
+
* @returns {OGOffsetRegionsResult}
|
|
377
|
+
*/
|
|
378
|
+
export function offsetPolylineRegions(centreline_flat, width, closed, miter_limit) {
|
|
379
|
+
const ptr0 = passArrayF64ToWasm0(centreline_flat, wasm.__wbindgen_malloc);
|
|
380
|
+
const len0 = WASM_VECTOR_LEN;
|
|
381
|
+
const ret = wasm.offsetPolylineRegions(ptr0, len0, width, closed, miter_limit);
|
|
382
|
+
if (ret[2]) {
|
|
383
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
384
|
+
}
|
|
385
|
+
return OGOffsetRegionsResult.__wrap(ret[0]);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Wasm entry point: merge a GROUP of separate polylines (a crossing T / X / L
|
|
390
|
+
* overlap) into one clean stroked region by nonzero-winding union of their mitered
|
|
391
|
+
* bands. `polylines_json` is `[{centreline:[x,y,z,…], width, closed}, …]`. Returns
|
|
392
|
+
* CW-outer / CCW-hole regions (one or more); empty when no region remains.
|
|
393
|
+
* @param {string} polylines_json
|
|
394
|
+
* @returns {OGOffsetRegionsResult}
|
|
395
|
+
*/
|
|
396
|
+
export function offsetPolylineGroupRegions(polylines_json) {
|
|
397
|
+
const ptr0 = passStringToWasm0(polylines_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
398
|
+
const len0 = WASM_VECTOR_LEN;
|
|
399
|
+
const ret = wasm.offsetPolylineGroupRegions(ptr0, len0);
|
|
400
|
+
if (ret[2]) {
|
|
401
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
402
|
+
}
|
|
403
|
+
return OGOffsetRegionsResult.__wrap(ret[0]);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* Wasm entry point: inset a CLOSED ring inward with one distance per edge
|
|
408
|
+
* (edge i = ring[i] → ring[i+1]). `ring_flat` is `[x0,y0,z0, …]`;
|
|
409
|
+
* `holes_json` is `[{ring:[x,y,z,…], distances:[…]}, …]` (`"[]"` = none) —
|
|
410
|
+
* excluded interior rings, each grown outward by its own per-edge distances.
|
|
411
|
+
* Returns CW-outer / CCW-hole regions, canonicalised; possibly several when a
|
|
412
|
+
* deep inset (or a hole) splits the ring, and empty (does NOT throw) when the
|
|
413
|
+
* inset collapses or the outer ring is degenerate. THROWS on malformed
|
|
414
|
+
* arguments: a distance count that does not match an edge count, a negative /
|
|
415
|
+
* non-finite distance, a degenerate hole, or unparsable `holes_json`. Corners
|
|
416
|
+
* where distances differ are circumscribed clearance arcs (conservative), so
|
|
417
|
+
* no output point is ever closer to an edge than that edge's distance —
|
|
418
|
+
* there is no miter-limit knob because there are no miters.
|
|
419
|
+
* @param {Float64Array} ring_flat
|
|
420
|
+
* @param {Float64Array} distances
|
|
421
|
+
* @param {string} holes_json
|
|
422
|
+
* @returns {OGOffsetRegionsResult}
|
|
423
|
+
*/
|
|
424
|
+
export function offsetRingVariable(ring_flat, distances, holes_json) {
|
|
425
|
+
const ptr0 = passArrayF64ToWasm0(ring_flat, wasm.__wbindgen_malloc);
|
|
426
|
+
const len0 = WASM_VECTOR_LEN;
|
|
427
|
+
const ptr1 = passArrayF64ToWasm0(distances, wasm.__wbindgen_malloc);
|
|
428
|
+
const len1 = WASM_VECTOR_LEN;
|
|
429
|
+
const ptr2 = passStringToWasm0(holes_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
430
|
+
const len2 = WASM_VECTOR_LEN;
|
|
431
|
+
const ret = wasm.offsetRingVariable(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
432
|
+
if (ret[2]) {
|
|
433
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
434
|
+
}
|
|
435
|
+
return OGOffsetRegionsResult.__wrap(ret[0]);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* @param {string} local_brep_serialized
|
|
440
|
+
* @param {number} height
|
|
441
|
+
* @returns {string}
|
|
442
|
+
*/
|
|
443
|
+
export function extrudeBrepFace(local_brep_serialized, height) {
|
|
444
|
+
let deferred3_0;
|
|
445
|
+
let deferred3_1;
|
|
446
|
+
try {
|
|
447
|
+
const ptr0 = passStringToWasm0(local_brep_serialized, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
448
|
+
const len0 = WASM_VECTOR_LEN;
|
|
449
|
+
const ret = wasm.extrudeBrepFace(ptr0, len0, height);
|
|
450
|
+
var ptr2 = ret[0];
|
|
451
|
+
var len2 = ret[1];
|
|
452
|
+
if (ret[3]) {
|
|
453
|
+
ptr2 = 0; len2 = 0;
|
|
454
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
455
|
+
}
|
|
456
|
+
deferred3_0 = ptr2;
|
|
457
|
+
deferred3_1 = len2;
|
|
458
|
+
return getStringFromWasm0(ptr2, len2);
|
|
459
|
+
} finally {
|
|
460
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Wasm entry point for general extrude. `direction` is `[x,y,z]`; `extent_kind`
|
|
466
|
+
* is `"one_sided" | "symmetric" | "two_sided"`; `d_plus`/`d_minus` are the
|
|
467
|
+
* extent distances (`d_minus` ignored unless two-sided, `d_plus` is the
|
|
468
|
+
* distance for one-sided/symmetric).
|
|
469
|
+
* @param {string} local_brep_serialized
|
|
470
|
+
* @param {Float64Array} direction
|
|
471
|
+
* @param {string} extent_kind
|
|
472
|
+
* @param {number} d_plus
|
|
473
|
+
* @param {number} d_minus
|
|
474
|
+
* @returns {string}
|
|
475
|
+
*/
|
|
476
|
+
export function extrudeBrepFaceDirectional(local_brep_serialized, direction, extent_kind, d_plus, d_minus) {
|
|
477
|
+
let deferred5_0;
|
|
478
|
+
let deferred5_1;
|
|
479
|
+
try {
|
|
480
|
+
const ptr0 = passStringToWasm0(local_brep_serialized, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
481
|
+
const len0 = WASM_VECTOR_LEN;
|
|
482
|
+
const ptr1 = passArrayF64ToWasm0(direction, wasm.__wbindgen_malloc);
|
|
483
|
+
const len1 = WASM_VECTOR_LEN;
|
|
484
|
+
const ptr2 = passStringToWasm0(extent_kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
485
|
+
const len2 = WASM_VECTOR_LEN;
|
|
486
|
+
const ret = wasm.extrudeBrepFaceDirectional(ptr0, len0, ptr1, len1, ptr2, len2, d_plus, d_minus);
|
|
487
|
+
var ptr4 = ret[0];
|
|
488
|
+
var len4 = ret[1];
|
|
489
|
+
if (ret[3]) {
|
|
490
|
+
ptr4 = 0; len4 = 0;
|
|
491
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
492
|
+
}
|
|
493
|
+
deferred5_0 = ptr4;
|
|
494
|
+
deferred5_1 = len4;
|
|
495
|
+
return getStringFromWasm0(ptr4, len4);
|
|
496
|
+
} finally {
|
|
497
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* @param {string} brep_serialized
|
|
503
|
+
* @param {string | null} [config_json]
|
|
504
|
+
* @returns {OGStlExportResult}
|
|
505
|
+
*/
|
|
506
|
+
export function exportBrepToStl(brep_serialized, config_json) {
|
|
507
|
+
const ptr0 = passStringToWasm0(brep_serialized, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
508
|
+
const len0 = WASM_VECTOR_LEN;
|
|
509
|
+
var ptr1 = isLikeNone(config_json) ? 0 : passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
510
|
+
var len1 = WASM_VECTOR_LEN;
|
|
511
|
+
const ret = wasm.exportBrepToStl(ptr0, len0, ptr1, len1);
|
|
512
|
+
if (ret[2]) {
|
|
513
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
514
|
+
}
|
|
515
|
+
return OGStlExportResult.__wrap(ret[0]);
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* @param {string} brep_serialized
|
|
520
|
+
* @param {string | null} [config_json]
|
|
521
|
+
* @returns {OGStepExportResult}
|
|
522
|
+
*/
|
|
523
|
+
export function exportBrepToStep(brep_serialized, config_json) {
|
|
524
|
+
const ptr0 = passStringToWasm0(brep_serialized, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
525
|
+
const len0 = WASM_VECTOR_LEN;
|
|
526
|
+
var ptr1 = isLikeNone(config_json) ? 0 : passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
527
|
+
var len1 = WASM_VECTOR_LEN;
|
|
528
|
+
const ret = wasm.exportBrepToStep(ptr0, len0, ptr1, len1);
|
|
529
|
+
if (ret[2]) {
|
|
530
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
531
|
+
}
|
|
532
|
+
return OGStepExportResult.__wrap(ret[0]);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* @param {string} brep_serialized
|
|
537
|
+
* @param {string | null} [config_json]
|
|
538
|
+
* @returns {OGIfcExportResult}
|
|
539
|
+
*/
|
|
540
|
+
export function exportBrepToIfc(brep_serialized, config_json) {
|
|
541
|
+
const ptr0 = passStringToWasm0(brep_serialized, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
542
|
+
const len0 = WASM_VECTOR_LEN;
|
|
543
|
+
var ptr1 = isLikeNone(config_json) ? 0 : passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
544
|
+
var len1 = WASM_VECTOR_LEN;
|
|
545
|
+
const ret = wasm.exportBrepToIfc(ptr0, len0, ptr1, len1);
|
|
546
|
+
if (ret[2]) {
|
|
547
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
548
|
+
}
|
|
549
|
+
return OGIfcExportResult.__wrap(ret[0]);
|
|
550
|
+
}
|
|
551
|
+
|
|
446
552
|
const Matrix3Finalization = (typeof FinalizationRegistry === 'undefined')
|
|
447
553
|
? { register: () => {}, unregister: () => {} }
|
|
448
554
|
: new FinalizationRegistry(ptr => wasm.__wbg_matrix3_free(ptr >>> 0, 1));
|
|
@@ -983,6 +1089,22 @@ export class OGAnalyticBrep {
|
|
|
983
1089
|
}
|
|
984
1090
|
return OGAnalyticBrep.__wrap(ret[0]);
|
|
985
1091
|
}
|
|
1092
|
+
/**
|
|
1093
|
+
* @param {string} cutters_json
|
|
1094
|
+
* @param {string} id
|
|
1095
|
+
* @returns {OGAnalyticBrep}
|
|
1096
|
+
*/
|
|
1097
|
+
subtract_planar_cutters(cutters_json, id) {
|
|
1098
|
+
const ptr0 = passStringToWasm0(cutters_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1099
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1100
|
+
const ptr1 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1101
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1102
|
+
const ret = wasm.oganalyticbrep_subtract_planar_cutters(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1103
|
+
if (ret[2]) {
|
|
1104
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1105
|
+
}
|
|
1106
|
+
return OGAnalyticBrep.__wrap(ret[0]);
|
|
1107
|
+
}
|
|
986
1108
|
/**
|
|
987
1109
|
* @param {number} thickness
|
|
988
1110
|
* @param {string} id
|
|
@@ -2368,131 +2490,37 @@ export class OGEllipticalArc {
|
|
|
2368
2490
|
* @returns {Vector3}
|
|
2369
2491
|
*/
|
|
2370
2492
|
get_anchor() {
|
|
2371
|
-
const ret = wasm.
|
|
2493
|
+
const ret = wasm.ogarc_get_anchor(this.__wbg_ptr);
|
|
2372
2494
|
return Vector3.__wrap(ret);
|
|
2373
2495
|
}
|
|
2374
2496
|
}
|
|
2375
2497
|
|
|
2376
|
-
const
|
|
2498
|
+
const OGFreeformEditorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2377
2499
|
? { register: () => {}, unregister: () => {} }
|
|
2378
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
* Replaces the scene-centric OGSceneManager pattern for export use cases.
|
|
2382
|
-
*/
|
|
2383
|
-
export class OGEntityRegistry {
|
|
2500
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_ogfreeformeditor_free(ptr >>> 0, 1));
|
|
2501
|
+
|
|
2502
|
+
export class OGFreeformEditor {
|
|
2384
2503
|
|
|
2385
2504
|
__destroy_into_raw() {
|
|
2386
2505
|
const ptr = this.__wbg_ptr;
|
|
2387
2506
|
this.__wbg_ptr = 0;
|
|
2388
|
-
|
|
2507
|
+
OGFreeformEditorFinalization.unregister(this);
|
|
2389
2508
|
return ptr;
|
|
2390
2509
|
}
|
|
2391
2510
|
|
|
2392
2511
|
free() {
|
|
2393
2512
|
const ptr = this.__destroy_into_raw();
|
|
2394
|
-
wasm.
|
|
2513
|
+
wasm.__wbg_ogfreeformeditor_free(ptr, 0);
|
|
2395
2514
|
}
|
|
2396
2515
|
constructor() {
|
|
2397
|
-
const ret = wasm.
|
|
2516
|
+
const ret = wasm.ogfreeformeditor_new();
|
|
2398
2517
|
this.__wbg_ptr = ret >>> 0;
|
|
2399
|
-
|
|
2518
|
+
OGFreeformEditorFinalization.register(this, this.__wbg_ptr, this);
|
|
2400
2519
|
return this;
|
|
2401
2520
|
}
|
|
2402
2521
|
/**
|
|
2403
|
-
*
|
|
2404
|
-
* @
|
|
2405
|
-
* @param {string} kind
|
|
2406
|
-
* @param {string} brep_json
|
|
2407
|
-
*/
|
|
2408
|
-
registerEntity(id, kind, brep_json) {
|
|
2409
|
-
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2410
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2411
|
-
const ptr1 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2412
|
-
const len1 = WASM_VECTOR_LEN;
|
|
2413
|
-
const ptr2 = passStringToWasm0(brep_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2414
|
-
const len2 = WASM_VECTOR_LEN;
|
|
2415
|
-
const ret = wasm.ogentityregistry_registerEntity(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
2416
|
-
if (ret[1]) {
|
|
2417
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
2418
|
-
}
|
|
2419
|
-
}
|
|
2420
|
-
/**
|
|
2421
|
-
* Remove a previously registered entity.
|
|
2422
|
-
* @param {string} id
|
|
2423
|
-
* @returns {boolean}
|
|
2424
|
-
*/
|
|
2425
|
-
unregisterEntity(id) {
|
|
2426
|
-
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2427
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2428
|
-
const ret = wasm.ogentityregistry_unregisterEntity(this.__wbg_ptr, ptr0, len0);
|
|
2429
|
-
return ret !== 0;
|
|
2430
|
-
}
|
|
2431
|
-
/**
|
|
2432
|
-
* Remove all registered entities.
|
|
2433
|
-
*/
|
|
2434
|
-
clearEntities() {
|
|
2435
|
-
wasm.ogentityregistry_clearEntities(this.__wbg_ptr);
|
|
2436
|
-
}
|
|
2437
|
-
/**
|
|
2438
|
-
* Batched multi-view projection.
|
|
2439
|
-
*
|
|
2440
|
-
* Input: JSON array of `{ id, camera, hlr?, section_plane? }` (ViewRequest).
|
|
2441
|
-
* Output: JSON map of `{ viewportId: Scene2D }`.
|
|
2442
|
-
*
|
|
2443
|
-
* All viewports are projected in a single WASM call, amortising
|
|
2444
|
-
* serialisation overhead and keeping BRep data in WASM memory.
|
|
2445
|
-
* @param {string} views_json
|
|
2446
|
-
* @returns {string}
|
|
2447
|
-
*/
|
|
2448
|
-
projectCurrentToViews(views_json) {
|
|
2449
|
-
let deferred3_0;
|
|
2450
|
-
let deferred3_1;
|
|
2451
|
-
try {
|
|
2452
|
-
const ptr0 = passStringToWasm0(views_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2453
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2454
|
-
const ret = wasm.ogentityregistry_projectCurrentToViews(this.__wbg_ptr, ptr0, len0);
|
|
2455
|
-
var ptr2 = ret[0];
|
|
2456
|
-
var len2 = ret[1];
|
|
2457
|
-
if (ret[3]) {
|
|
2458
|
-
ptr2 = 0; len2 = 0;
|
|
2459
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
2460
|
-
}
|
|
2461
|
-
deferred3_0 = ptr2;
|
|
2462
|
-
deferred3_1 = len2;
|
|
2463
|
-
return getStringFromWasm0(ptr2, len2);
|
|
2464
|
-
} finally {
|
|
2465
|
-
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
2466
|
-
}
|
|
2467
|
-
}
|
|
2468
|
-
}
|
|
2469
|
-
|
|
2470
|
-
const OGFreeformEditorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2471
|
-
? { register: () => {}, unregister: () => {} }
|
|
2472
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_ogfreeformeditor_free(ptr >>> 0, 1));
|
|
2473
|
-
|
|
2474
|
-
export class OGFreeformEditor {
|
|
2475
|
-
|
|
2476
|
-
__destroy_into_raw() {
|
|
2477
|
-
const ptr = this.__wbg_ptr;
|
|
2478
|
-
this.__wbg_ptr = 0;
|
|
2479
|
-
OGFreeformEditorFinalization.unregister(this);
|
|
2480
|
-
return ptr;
|
|
2481
|
-
}
|
|
2482
|
-
|
|
2483
|
-
free() {
|
|
2484
|
-
const ptr = this.__destroy_into_raw();
|
|
2485
|
-
wasm.__wbg_ogfreeformeditor_free(ptr, 0);
|
|
2486
|
-
}
|
|
2487
|
-
constructor() {
|
|
2488
|
-
const ret = wasm.ogfreeformeditor_new();
|
|
2489
|
-
this.__wbg_ptr = ret >>> 0;
|
|
2490
|
-
OGFreeformEditorFinalization.register(this, this.__wbg_ptr, this);
|
|
2491
|
-
return this;
|
|
2492
|
-
}
|
|
2493
|
-
/**
|
|
2494
|
-
* @param {OGFreeformGeometry} geometry
|
|
2495
|
-
* @returns {string}
|
|
2522
|
+
* @param {OGFreeformGeometry} geometry
|
|
2523
|
+
* @returns {string}
|
|
2496
2524
|
*/
|
|
2497
2525
|
getTopologyRenderData(geometry) {
|
|
2498
2526
|
let deferred2_0;
|
|
@@ -4360,845 +4388,27 @@ export class OGRectangle {
|
|
|
4360
4388
|
/**
|
|
4361
4389
|
* @returns {Vector3}
|
|
4362
4390
|
*/
|
|
4363
|
-
get_anchor() {
|
|
4364
|
-
const ret = wasm.ogrectangle_get_anchor(this.__wbg_ptr);
|
|
4365
|
-
return Vector3.__wrap(ret);
|
|
4366
|
-
}
|
|
4367
|
-
/**
|
|
4368
|
-
* @param {number} distance
|
|
4369
|
-
* @param {number} acute_threshold_degrees
|
|
4370
|
-
* @param {boolean} bevel
|
|
4371
|
-
* @returns {string}
|
|
4372
|
-
*/
|
|
4373
|
-
get_offset_serialized(distance, acute_threshold_degrees, bevel) {
|
|
4374
|
-
let deferred1_0;
|
|
4375
|
-
let deferred1_1;
|
|
4376
|
-
try {
|
|
4377
|
-
const ret = wasm.ogrectangle_get_offset_serialized(this.__wbg_ptr, distance, acute_threshold_degrees, bevel);
|
|
4378
|
-
deferred1_0 = ret[0];
|
|
4379
|
-
deferred1_1 = ret[1];
|
|
4380
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
4381
|
-
} finally {
|
|
4382
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
4383
|
-
}
|
|
4384
|
-
}
|
|
4385
|
-
}
|
|
4386
|
-
|
|
4387
|
-
const OGSceneManagerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4388
|
-
? { register: () => {}, unregister: () => {} }
|
|
4389
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_ogscenemanager_free(ptr >>> 0, 1));
|
|
4390
|
-
|
|
4391
|
-
export class OGSceneManager {
|
|
4392
|
-
|
|
4393
|
-
__destroy_into_raw() {
|
|
4394
|
-
const ptr = this.__wbg_ptr;
|
|
4395
|
-
this.__wbg_ptr = 0;
|
|
4396
|
-
OGSceneManagerFinalization.unregister(this);
|
|
4397
|
-
return ptr;
|
|
4398
|
-
}
|
|
4399
|
-
|
|
4400
|
-
free() {
|
|
4401
|
-
const ptr = this.__destroy_into_raw();
|
|
4402
|
-
wasm.__wbg_ogscenemanager_free(ptr, 0);
|
|
4403
|
-
}
|
|
4404
|
-
constructor() {
|
|
4405
|
-
const ret = wasm.ogscenemanager_new();
|
|
4406
|
-
this.__wbg_ptr = ret >>> 0;
|
|
4407
|
-
OGSceneManagerFinalization.register(this, this.__wbg_ptr, this);
|
|
4408
|
-
return this;
|
|
4409
|
-
}
|
|
4410
|
-
/**
|
|
4411
|
-
* @param {string} name
|
|
4412
|
-
* @returns {string}
|
|
4413
|
-
*/
|
|
4414
|
-
createScene(name) {
|
|
4415
|
-
let deferred2_0;
|
|
4416
|
-
let deferred2_1;
|
|
4417
|
-
try {
|
|
4418
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4419
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4420
|
-
const ret = wasm.ogscenemanager_createScene(this.__wbg_ptr, ptr0, len0);
|
|
4421
|
-
deferred2_0 = ret[0];
|
|
4422
|
-
deferred2_1 = ret[1];
|
|
4423
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
4424
|
-
} finally {
|
|
4425
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
4426
|
-
}
|
|
4427
|
-
}
|
|
4428
|
-
/**
|
|
4429
|
-
* @param {string} scene_id
|
|
4430
|
-
* @returns {boolean}
|
|
4431
|
-
*/
|
|
4432
|
-
removeScene(scene_id) {
|
|
4433
|
-
const ptr0 = passStringToWasm0(scene_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4434
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4435
|
-
const ret = wasm.ogscenemanager_removeScene(this.__wbg_ptr, ptr0, len0);
|
|
4436
|
-
return ret !== 0;
|
|
4437
|
-
}
|
|
4438
|
-
/**
|
|
4439
|
-
* @param {string} scene_id
|
|
4440
|
-
*/
|
|
4441
|
-
setCurrentScene(scene_id) {
|
|
4442
|
-
const ptr0 = passStringToWasm0(scene_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4443
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4444
|
-
const ret = wasm.ogscenemanager_setCurrentScene(this.__wbg_ptr, ptr0, len0);
|
|
4445
|
-
if (ret[1]) {
|
|
4446
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4447
|
-
}
|
|
4448
|
-
}
|
|
4449
|
-
/**
|
|
4450
|
-
* @returns {string | undefined}
|
|
4451
|
-
*/
|
|
4452
|
-
getCurrentSceneId() {
|
|
4453
|
-
const ret = wasm.ogscenemanager_getCurrentSceneId(this.__wbg_ptr);
|
|
4454
|
-
let v1;
|
|
4455
|
-
if (ret[0] !== 0) {
|
|
4456
|
-
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
4457
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
4458
|
-
}
|
|
4459
|
-
return v1;
|
|
4460
|
-
}
|
|
4461
|
-
/**
|
|
4462
|
-
* @returns {string}
|
|
4463
|
-
*/
|
|
4464
|
-
listScenes() {
|
|
4465
|
-
let deferred2_0;
|
|
4466
|
-
let deferred2_1;
|
|
4467
|
-
try {
|
|
4468
|
-
const ret = wasm.ogscenemanager_listScenes(this.__wbg_ptr);
|
|
4469
|
-
var ptr1 = ret[0];
|
|
4470
|
-
var len1 = ret[1];
|
|
4471
|
-
if (ret[3]) {
|
|
4472
|
-
ptr1 = 0; len1 = 0;
|
|
4473
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
4474
|
-
}
|
|
4475
|
-
deferred2_0 = ptr1;
|
|
4476
|
-
deferred2_1 = len1;
|
|
4477
|
-
return getStringFromWasm0(ptr1, len1);
|
|
4478
|
-
} finally {
|
|
4479
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
4480
|
-
}
|
|
4481
|
-
}
|
|
4482
|
-
/**
|
|
4483
|
-
* @param {string} scene_id
|
|
4484
|
-
* @returns {string}
|
|
4485
|
-
*/
|
|
4486
|
-
getSceneSerialized(scene_id) {
|
|
4487
|
-
let deferred3_0;
|
|
4488
|
-
let deferred3_1;
|
|
4489
|
-
try {
|
|
4490
|
-
const ptr0 = passStringToWasm0(scene_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4491
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4492
|
-
const ret = wasm.ogscenemanager_getSceneSerialized(this.__wbg_ptr, ptr0, len0);
|
|
4493
|
-
var ptr2 = ret[0];
|
|
4494
|
-
var len2 = ret[1];
|
|
4495
|
-
if (ret[3]) {
|
|
4496
|
-
ptr2 = 0; len2 = 0;
|
|
4497
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
4498
|
-
}
|
|
4499
|
-
deferred3_0 = ptr2;
|
|
4500
|
-
deferred3_1 = len2;
|
|
4501
|
-
return getStringFromWasm0(ptr2, len2);
|
|
4502
|
-
} finally {
|
|
4503
|
-
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
4504
|
-
}
|
|
4505
|
-
}
|
|
4506
|
-
/**
|
|
4507
|
-
* @param {string} scene_id
|
|
4508
|
-
* @param {string} entity_id
|
|
4509
|
-
* @returns {boolean}
|
|
4510
|
-
*/
|
|
4511
|
-
removeEntityFromScene(scene_id, entity_id) {
|
|
4512
|
-
const ptr0 = passStringToWasm0(scene_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4513
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4514
|
-
const ptr1 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4515
|
-
const len1 = WASM_VECTOR_LEN;
|
|
4516
|
-
const ret = wasm.ogscenemanager_removeEntityFromScene(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
4517
|
-
if (ret[2]) {
|
|
4518
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
4519
|
-
}
|
|
4520
|
-
return ret[0] !== 0;
|
|
4521
|
-
}
|
|
4522
|
-
/**
|
|
4523
|
-
* @param {string} scene_id
|
|
4524
|
-
* @param {string} entity_id
|
|
4525
|
-
* @param {string} kind
|
|
4526
|
-
* @param {string} brep_serialized
|
|
4527
|
-
*/
|
|
4528
|
-
addBrepEntityToScene(scene_id, entity_id, kind, brep_serialized) {
|
|
4529
|
-
const ptr0 = passStringToWasm0(scene_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4530
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4531
|
-
const ptr1 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4532
|
-
const len1 = WASM_VECTOR_LEN;
|
|
4533
|
-
const ptr2 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4534
|
-
const len2 = WASM_VECTOR_LEN;
|
|
4535
|
-
const ptr3 = passStringToWasm0(brep_serialized, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4536
|
-
const len3 = WASM_VECTOR_LEN;
|
|
4537
|
-
const ret = wasm.ogscenemanager_addBrepEntityToScene(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
4538
|
-
if (ret[1]) {
|
|
4539
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4540
|
-
}
|
|
4541
|
-
}
|
|
4542
|
-
/**
|
|
4543
|
-
* @param {string} entity_id
|
|
4544
|
-
* @param {string} kind
|
|
4545
|
-
* @param {string} brep_serialized
|
|
4546
|
-
*/
|
|
4547
|
-
addBrepEntityToCurrentScene(entity_id, kind, brep_serialized) {
|
|
4548
|
-
const ptr0 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4549
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4550
|
-
const ptr1 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4551
|
-
const len1 = WASM_VECTOR_LEN;
|
|
4552
|
-
const ptr2 = passStringToWasm0(brep_serialized, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4553
|
-
const len2 = WASM_VECTOR_LEN;
|
|
4554
|
-
const ret = wasm.ogscenemanager_addBrepEntityToCurrentScene(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
4555
|
-
if (ret[1]) {
|
|
4556
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4557
|
-
}
|
|
4558
|
-
}
|
|
4559
|
-
/**
|
|
4560
|
-
* @param {string} scene_id
|
|
4561
|
-
* @param {string} entity_id
|
|
4562
|
-
* @param {string} kind
|
|
4563
|
-
* @param {string} brep_serialized
|
|
4564
|
-
*/
|
|
4565
|
-
replaceBrepEntityInScene(scene_id, entity_id, kind, brep_serialized) {
|
|
4566
|
-
const ptr0 = passStringToWasm0(scene_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4567
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4568
|
-
const ptr1 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4569
|
-
const len1 = WASM_VECTOR_LEN;
|
|
4570
|
-
const ptr2 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4571
|
-
const len2 = WASM_VECTOR_LEN;
|
|
4572
|
-
const ptr3 = passStringToWasm0(brep_serialized, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4573
|
-
const len3 = WASM_VECTOR_LEN;
|
|
4574
|
-
const ret = wasm.ogscenemanager_replaceBrepEntityInScene(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
4575
|
-
if (ret[1]) {
|
|
4576
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4577
|
-
}
|
|
4578
|
-
}
|
|
4579
|
-
/**
|
|
4580
|
-
* @param {string} entity_id
|
|
4581
|
-
* @param {string} kind
|
|
4582
|
-
* @param {string} brep_serialized
|
|
4583
|
-
*/
|
|
4584
|
-
replaceBrepEntityInCurrentScene(entity_id, kind, brep_serialized) {
|
|
4585
|
-
const ptr0 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4586
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4587
|
-
const ptr1 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4588
|
-
const len1 = WASM_VECTOR_LEN;
|
|
4589
|
-
const ptr2 = passStringToWasm0(brep_serialized, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4590
|
-
const len2 = WASM_VECTOR_LEN;
|
|
4591
|
-
const ret = wasm.ogscenemanager_replaceBrepEntityInCurrentScene(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
4592
|
-
if (ret[1]) {
|
|
4593
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4594
|
-
}
|
|
4595
|
-
}
|
|
4596
|
-
/**
|
|
4597
|
-
* @param {string} scene_id
|
|
4598
|
-
* @param {string} entity_id
|
|
4599
|
-
* @param {string} kind
|
|
4600
|
-
* @param {string} brep_serialized
|
|
4601
|
-
*/
|
|
4602
|
-
refreshBrepEntityInScene(scene_id, entity_id, kind, brep_serialized) {
|
|
4603
|
-
const ptr0 = passStringToWasm0(scene_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4604
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4605
|
-
const ptr1 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4606
|
-
const len1 = WASM_VECTOR_LEN;
|
|
4607
|
-
const ptr2 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4608
|
-
const len2 = WASM_VECTOR_LEN;
|
|
4609
|
-
const ptr3 = passStringToWasm0(brep_serialized, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4610
|
-
const len3 = WASM_VECTOR_LEN;
|
|
4611
|
-
const ret = wasm.ogscenemanager_refreshBrepEntityInScene(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
4612
|
-
if (ret[1]) {
|
|
4613
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4614
|
-
}
|
|
4615
|
-
}
|
|
4616
|
-
/**
|
|
4617
|
-
* @param {string} entity_id
|
|
4618
|
-
* @param {string} kind
|
|
4619
|
-
* @param {string} brep_serialized
|
|
4620
|
-
*/
|
|
4621
|
-
refreshBrepEntityInCurrentScene(entity_id, kind, brep_serialized) {
|
|
4622
|
-
const ptr0 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4623
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4624
|
-
const ptr1 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4625
|
-
const len1 = WASM_VECTOR_LEN;
|
|
4626
|
-
const ptr2 = passStringToWasm0(brep_serialized, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4627
|
-
const len2 = WASM_VECTOR_LEN;
|
|
4628
|
-
const ret = wasm.ogscenemanager_refreshBrepEntityInCurrentScene(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
4629
|
-
if (ret[1]) {
|
|
4630
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4631
|
-
}
|
|
4632
|
-
}
|
|
4633
|
-
/**
|
|
4634
|
-
* @param {string} scene_id
|
|
4635
|
-
* @param {string} entity_id
|
|
4636
|
-
* @param {OGLine} line
|
|
4637
|
-
*/
|
|
4638
|
-
addLineToScene(scene_id, entity_id, line) {
|
|
4639
|
-
const ptr0 = passStringToWasm0(scene_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4640
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4641
|
-
const ptr1 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4642
|
-
const len1 = WASM_VECTOR_LEN;
|
|
4643
|
-
_assertClass(line, OGLine);
|
|
4644
|
-
const ret = wasm.ogscenemanager_addLineToScene(this.__wbg_ptr, ptr0, len0, ptr1, len1, line.__wbg_ptr);
|
|
4645
|
-
if (ret[1]) {
|
|
4646
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4647
|
-
}
|
|
4648
|
-
}
|
|
4649
|
-
/**
|
|
4650
|
-
* @param {string} entity_id
|
|
4651
|
-
* @param {OGLine} line
|
|
4652
|
-
*/
|
|
4653
|
-
addLineToCurrentScene(entity_id, line) {
|
|
4654
|
-
const ptr0 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4655
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4656
|
-
_assertClass(line, OGLine);
|
|
4657
|
-
const ret = wasm.ogscenemanager_addLineToCurrentScene(this.__wbg_ptr, ptr0, len0, line.__wbg_ptr);
|
|
4658
|
-
if (ret[1]) {
|
|
4659
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4660
|
-
}
|
|
4661
|
-
}
|
|
4662
|
-
/**
|
|
4663
|
-
* @param {string} scene_id
|
|
4664
|
-
* @param {string} entity_id
|
|
4665
|
-
* @param {OGPolyline} polyline
|
|
4666
|
-
*/
|
|
4667
|
-
addPolylineToScene(scene_id, entity_id, polyline) {
|
|
4668
|
-
const ptr0 = passStringToWasm0(scene_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4669
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4670
|
-
const ptr1 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4671
|
-
const len1 = WASM_VECTOR_LEN;
|
|
4672
|
-
_assertClass(polyline, OGPolyline);
|
|
4673
|
-
const ret = wasm.ogscenemanager_addPolylineToScene(this.__wbg_ptr, ptr0, len0, ptr1, len1, polyline.__wbg_ptr);
|
|
4674
|
-
if (ret[1]) {
|
|
4675
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4676
|
-
}
|
|
4677
|
-
}
|
|
4678
|
-
/**
|
|
4679
|
-
* @param {string} entity_id
|
|
4680
|
-
* @param {OGPolyline} polyline
|
|
4681
|
-
*/
|
|
4682
|
-
addPolylineToCurrentScene(entity_id, polyline) {
|
|
4683
|
-
const ptr0 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4684
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4685
|
-
_assertClass(polyline, OGPolyline);
|
|
4686
|
-
const ret = wasm.ogscenemanager_addPolylineToCurrentScene(this.__wbg_ptr, ptr0, len0, polyline.__wbg_ptr);
|
|
4687
|
-
if (ret[1]) {
|
|
4688
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4689
|
-
}
|
|
4690
|
-
}
|
|
4691
|
-
/**
|
|
4692
|
-
* @param {string} scene_id
|
|
4693
|
-
* @param {string} entity_id
|
|
4694
|
-
* @param {OGArc} arc
|
|
4695
|
-
*/
|
|
4696
|
-
addArcToScene(scene_id, entity_id, arc) {
|
|
4697
|
-
const ptr0 = passStringToWasm0(scene_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4698
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4699
|
-
const ptr1 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4700
|
-
const len1 = WASM_VECTOR_LEN;
|
|
4701
|
-
_assertClass(arc, OGArc);
|
|
4702
|
-
const ret = wasm.ogscenemanager_addArcToScene(this.__wbg_ptr, ptr0, len0, ptr1, len1, arc.__wbg_ptr);
|
|
4703
|
-
if (ret[1]) {
|
|
4704
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4705
|
-
}
|
|
4706
|
-
}
|
|
4707
|
-
/**
|
|
4708
|
-
* @param {string} entity_id
|
|
4709
|
-
* @param {OGArc} arc
|
|
4710
|
-
*/
|
|
4711
|
-
addArcToCurrentScene(entity_id, arc) {
|
|
4712
|
-
const ptr0 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4713
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4714
|
-
_assertClass(arc, OGArc);
|
|
4715
|
-
const ret = wasm.ogscenemanager_addArcToCurrentScene(this.__wbg_ptr, ptr0, len0, arc.__wbg_ptr);
|
|
4716
|
-
if (ret[1]) {
|
|
4717
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4718
|
-
}
|
|
4719
|
-
}
|
|
4720
|
-
/**
|
|
4721
|
-
* @param {string} scene_id
|
|
4722
|
-
* @param {string} entity_id
|
|
4723
|
-
* @param {OGRectangle} rectangle
|
|
4724
|
-
*/
|
|
4725
|
-
addRectangleToScene(scene_id, entity_id, rectangle) {
|
|
4726
|
-
const ptr0 = passStringToWasm0(scene_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4727
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4728
|
-
const ptr1 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4729
|
-
const len1 = WASM_VECTOR_LEN;
|
|
4730
|
-
_assertClass(rectangle, OGRectangle);
|
|
4731
|
-
const ret = wasm.ogscenemanager_addRectangleToScene(this.__wbg_ptr, ptr0, len0, ptr1, len1, rectangle.__wbg_ptr);
|
|
4732
|
-
if (ret[1]) {
|
|
4733
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4734
|
-
}
|
|
4735
|
-
}
|
|
4736
|
-
/**
|
|
4737
|
-
* @param {string} entity_id
|
|
4738
|
-
* @param {OGRectangle} rectangle
|
|
4739
|
-
*/
|
|
4740
|
-
addRectangleToCurrentScene(entity_id, rectangle) {
|
|
4741
|
-
const ptr0 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4742
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4743
|
-
_assertClass(rectangle, OGRectangle);
|
|
4744
|
-
const ret = wasm.ogscenemanager_addRectangleToCurrentScene(this.__wbg_ptr, ptr0, len0, rectangle.__wbg_ptr);
|
|
4745
|
-
if (ret[1]) {
|
|
4746
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4747
|
-
}
|
|
4748
|
-
}
|
|
4749
|
-
/**
|
|
4750
|
-
* @param {string} scene_id
|
|
4751
|
-
* @param {string} entity_id
|
|
4752
|
-
* @param {OGPolygon} polygon
|
|
4753
|
-
*/
|
|
4754
|
-
addPolygonToScene(scene_id, entity_id, polygon) {
|
|
4755
|
-
const ptr0 = passStringToWasm0(scene_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4756
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4757
|
-
const ptr1 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4758
|
-
const len1 = WASM_VECTOR_LEN;
|
|
4759
|
-
_assertClass(polygon, OGPolygon);
|
|
4760
|
-
const ret = wasm.ogscenemanager_addPolygonToScene(this.__wbg_ptr, ptr0, len0, ptr1, len1, polygon.__wbg_ptr);
|
|
4761
|
-
if (ret[1]) {
|
|
4762
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4763
|
-
}
|
|
4764
|
-
}
|
|
4765
|
-
/**
|
|
4766
|
-
* @param {string} entity_id
|
|
4767
|
-
* @param {OGPolygon} polygon
|
|
4768
|
-
*/
|
|
4769
|
-
addPolygonToCurrentScene(entity_id, polygon) {
|
|
4770
|
-
const ptr0 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4771
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4772
|
-
_assertClass(polygon, OGPolygon);
|
|
4773
|
-
const ret = wasm.ogscenemanager_addPolygonToCurrentScene(this.__wbg_ptr, ptr0, len0, polygon.__wbg_ptr);
|
|
4774
|
-
if (ret[1]) {
|
|
4775
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4776
|
-
}
|
|
4777
|
-
}
|
|
4778
|
-
/**
|
|
4779
|
-
* @param {string} scene_id
|
|
4780
|
-
* @param {string} entity_id
|
|
4781
|
-
* @param {OGCuboid} cuboid
|
|
4782
|
-
*/
|
|
4783
|
-
addCuboidToScene(scene_id, entity_id, cuboid) {
|
|
4784
|
-
const ptr0 = passStringToWasm0(scene_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4785
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4786
|
-
const ptr1 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4787
|
-
const len1 = WASM_VECTOR_LEN;
|
|
4788
|
-
_assertClass(cuboid, OGCuboid);
|
|
4789
|
-
const ret = wasm.ogscenemanager_addCuboidToScene(this.__wbg_ptr, ptr0, len0, ptr1, len1, cuboid.__wbg_ptr);
|
|
4790
|
-
if (ret[1]) {
|
|
4791
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4792
|
-
}
|
|
4793
|
-
}
|
|
4794
|
-
/**
|
|
4795
|
-
* @param {string} entity_id
|
|
4796
|
-
* @param {OGCuboid} cuboid
|
|
4797
|
-
*/
|
|
4798
|
-
addCuboidToCurrentScene(entity_id, cuboid) {
|
|
4799
|
-
const ptr0 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4800
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4801
|
-
_assertClass(cuboid, OGCuboid);
|
|
4802
|
-
const ret = wasm.ogscenemanager_addCuboidToCurrentScene(this.__wbg_ptr, ptr0, len0, cuboid.__wbg_ptr);
|
|
4803
|
-
if (ret[1]) {
|
|
4804
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4805
|
-
}
|
|
4806
|
-
}
|
|
4807
|
-
/**
|
|
4808
|
-
* @param {string} scene_id
|
|
4809
|
-
* @param {string} entity_id
|
|
4810
|
-
* @param {OGCylinder} cylinder
|
|
4811
|
-
*/
|
|
4812
|
-
addCylinderToScene(scene_id, entity_id, cylinder) {
|
|
4813
|
-
const ptr0 = passStringToWasm0(scene_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4814
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4815
|
-
const ptr1 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4816
|
-
const len1 = WASM_VECTOR_LEN;
|
|
4817
|
-
_assertClass(cylinder, OGCylinder);
|
|
4818
|
-
const ret = wasm.ogscenemanager_addCylinderToScene(this.__wbg_ptr, ptr0, len0, ptr1, len1, cylinder.__wbg_ptr);
|
|
4819
|
-
if (ret[1]) {
|
|
4820
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4821
|
-
}
|
|
4822
|
-
}
|
|
4823
|
-
/**
|
|
4824
|
-
* @param {string} entity_id
|
|
4825
|
-
* @param {OGCylinder} cylinder
|
|
4826
|
-
*/
|
|
4827
|
-
addCylinderToCurrentScene(entity_id, cylinder) {
|
|
4828
|
-
const ptr0 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4829
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4830
|
-
_assertClass(cylinder, OGCylinder);
|
|
4831
|
-
const ret = wasm.ogscenemanager_addCylinderToCurrentScene(this.__wbg_ptr, ptr0, len0, cylinder.__wbg_ptr);
|
|
4832
|
-
if (ret[1]) {
|
|
4833
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4834
|
-
}
|
|
4835
|
-
}
|
|
4836
|
-
/**
|
|
4837
|
-
* @param {string} scene_id
|
|
4838
|
-
* @param {string} entity_id
|
|
4839
|
-
* @param {OGSphere} sphere
|
|
4840
|
-
*/
|
|
4841
|
-
addSphereToScene(scene_id, entity_id, sphere) {
|
|
4842
|
-
const ptr0 = passStringToWasm0(scene_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4843
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4844
|
-
const ptr1 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4845
|
-
const len1 = WASM_VECTOR_LEN;
|
|
4846
|
-
_assertClass(sphere, OGSphere);
|
|
4847
|
-
const ret = wasm.ogscenemanager_addSphereToScene(this.__wbg_ptr, ptr0, len0, ptr1, len1, sphere.__wbg_ptr);
|
|
4848
|
-
if (ret[1]) {
|
|
4849
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4850
|
-
}
|
|
4851
|
-
}
|
|
4852
|
-
/**
|
|
4853
|
-
* @param {string} entity_id
|
|
4854
|
-
* @param {OGSphere} sphere
|
|
4855
|
-
*/
|
|
4856
|
-
addSphereToCurrentScene(entity_id, sphere) {
|
|
4857
|
-
const ptr0 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4858
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4859
|
-
_assertClass(sphere, OGSphere);
|
|
4860
|
-
const ret = wasm.ogscenemanager_addSphereToCurrentScene(this.__wbg_ptr, ptr0, len0, sphere.__wbg_ptr);
|
|
4861
|
-
if (ret[1]) {
|
|
4862
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4863
|
-
}
|
|
4864
|
-
}
|
|
4865
|
-
/**
|
|
4866
|
-
* @param {string} scene_id
|
|
4867
|
-
* @param {string} entity_id
|
|
4868
|
-
* @param {OGWedge} wedge
|
|
4869
|
-
*/
|
|
4870
|
-
addWedgeToScene(scene_id, entity_id, wedge) {
|
|
4871
|
-
const ptr0 = passStringToWasm0(scene_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4872
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4873
|
-
const ptr1 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4874
|
-
const len1 = WASM_VECTOR_LEN;
|
|
4875
|
-
_assertClass(wedge, OGWedge);
|
|
4876
|
-
const ret = wasm.ogscenemanager_addWedgeToScene(this.__wbg_ptr, ptr0, len0, ptr1, len1, wedge.__wbg_ptr);
|
|
4877
|
-
if (ret[1]) {
|
|
4878
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4879
|
-
}
|
|
4880
|
-
}
|
|
4881
|
-
/**
|
|
4882
|
-
* @param {string} entity_id
|
|
4883
|
-
* @param {OGWedge} wedge
|
|
4884
|
-
*/
|
|
4885
|
-
addWedgeToCurrentScene(entity_id, wedge) {
|
|
4886
|
-
const ptr0 = passStringToWasm0(entity_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4887
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4888
|
-
_assertClass(wedge, OGWedge);
|
|
4889
|
-
const ret = wasm.ogscenemanager_addWedgeToCurrentScene(this.__wbg_ptr, ptr0, len0, wedge.__wbg_ptr);
|
|
4890
|
-
if (ret[1]) {
|
|
4891
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
4892
|
-
}
|
|
4893
|
-
}
|
|
4894
|
-
/**
|
|
4895
|
-
* @param {string} scene_id
|
|
4896
|
-
* @param {string} camera_json
|
|
4897
|
-
* @param {string | null} [hlr_json]
|
|
4898
|
-
* @returns {string}
|
|
4899
|
-
*/
|
|
4900
|
-
projectTo2DCamera(scene_id, camera_json, hlr_json) {
|
|
4901
|
-
let deferred5_0;
|
|
4902
|
-
let deferred5_1;
|
|
4903
|
-
try {
|
|
4904
|
-
const ptr0 = passStringToWasm0(scene_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4905
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4906
|
-
const ptr1 = passStringToWasm0(camera_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4907
|
-
const len1 = WASM_VECTOR_LEN;
|
|
4908
|
-
var ptr2 = isLikeNone(hlr_json) ? 0 : passStringToWasm0(hlr_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4909
|
-
var len2 = WASM_VECTOR_LEN;
|
|
4910
|
-
const ret = wasm.ogscenemanager_projectTo2DCamera(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
4911
|
-
var ptr4 = ret[0];
|
|
4912
|
-
var len4 = ret[1];
|
|
4913
|
-
if (ret[3]) {
|
|
4914
|
-
ptr4 = 0; len4 = 0;
|
|
4915
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
4916
|
-
}
|
|
4917
|
-
deferred5_0 = ptr4;
|
|
4918
|
-
deferred5_1 = len4;
|
|
4919
|
-
return getStringFromWasm0(ptr4, len4);
|
|
4920
|
-
} finally {
|
|
4921
|
-
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
4922
|
-
}
|
|
4923
|
-
}
|
|
4924
|
-
/**
|
|
4925
|
-
* @param {string} scene_id
|
|
4926
|
-
* @param {string} camera_json
|
|
4927
|
-
* @param {string | null} [hlr_json]
|
|
4928
|
-
* @returns {string}
|
|
4929
|
-
*/
|
|
4930
|
-
projectTo2DCameraPretty(scene_id, camera_json, hlr_json) {
|
|
4931
|
-
let deferred5_0;
|
|
4932
|
-
let deferred5_1;
|
|
4933
|
-
try {
|
|
4934
|
-
const ptr0 = passStringToWasm0(scene_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4935
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4936
|
-
const ptr1 = passStringToWasm0(camera_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4937
|
-
const len1 = WASM_VECTOR_LEN;
|
|
4938
|
-
var ptr2 = isLikeNone(hlr_json) ? 0 : passStringToWasm0(hlr_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4939
|
-
var len2 = WASM_VECTOR_LEN;
|
|
4940
|
-
const ret = wasm.ogscenemanager_projectTo2DCameraPretty(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
4941
|
-
var ptr4 = ret[0];
|
|
4942
|
-
var len4 = ret[1];
|
|
4943
|
-
if (ret[3]) {
|
|
4944
|
-
ptr4 = 0; len4 = 0;
|
|
4945
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
4946
|
-
}
|
|
4947
|
-
deferred5_0 = ptr4;
|
|
4948
|
-
deferred5_1 = len4;
|
|
4949
|
-
return getStringFromWasm0(ptr4, len4);
|
|
4950
|
-
} finally {
|
|
4951
|
-
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
4952
|
-
}
|
|
4953
|
-
}
|
|
4954
|
-
/**
|
|
4955
|
-
* @param {string} scene_id
|
|
4956
|
-
* @param {string} camera_json
|
|
4957
|
-
* @param {string | null} [hlr_json]
|
|
4958
|
-
* @returns {string}
|
|
4959
|
-
*/
|
|
4960
|
-
projectTo2DLines(scene_id, camera_json, hlr_json) {
|
|
4961
|
-
let deferred5_0;
|
|
4962
|
-
let deferred5_1;
|
|
4963
|
-
try {
|
|
4964
|
-
const ptr0 = passStringToWasm0(scene_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4965
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4966
|
-
const ptr1 = passStringToWasm0(camera_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4967
|
-
const len1 = WASM_VECTOR_LEN;
|
|
4968
|
-
var ptr2 = isLikeNone(hlr_json) ? 0 : passStringToWasm0(hlr_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4969
|
-
var len2 = WASM_VECTOR_LEN;
|
|
4970
|
-
const ret = wasm.ogscenemanager_projectTo2DLines(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
4971
|
-
var ptr4 = ret[0];
|
|
4972
|
-
var len4 = ret[1];
|
|
4973
|
-
if (ret[3]) {
|
|
4974
|
-
ptr4 = 0; len4 = 0;
|
|
4975
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
4976
|
-
}
|
|
4977
|
-
deferred5_0 = ptr4;
|
|
4978
|
-
deferred5_1 = len4;
|
|
4979
|
-
return getStringFromWasm0(ptr4, len4);
|
|
4980
|
-
} finally {
|
|
4981
|
-
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
4982
|
-
}
|
|
4983
|
-
}
|
|
4984
|
-
/**
|
|
4985
|
-
* @param {string} scene_id
|
|
4986
|
-
* @param {string} camera_json
|
|
4987
|
-
* @param {string | null} [hlr_json]
|
|
4988
|
-
* @returns {string}
|
|
4989
|
-
*/
|
|
4990
|
-
projectTo2DLinesPretty(scene_id, camera_json, hlr_json) {
|
|
4991
|
-
let deferred5_0;
|
|
4992
|
-
let deferred5_1;
|
|
4993
|
-
try {
|
|
4994
|
-
const ptr0 = passStringToWasm0(scene_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4995
|
-
const len0 = WASM_VECTOR_LEN;
|
|
4996
|
-
const ptr1 = passStringToWasm0(camera_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4997
|
-
const len1 = WASM_VECTOR_LEN;
|
|
4998
|
-
var ptr2 = isLikeNone(hlr_json) ? 0 : passStringToWasm0(hlr_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4999
|
-
var len2 = WASM_VECTOR_LEN;
|
|
5000
|
-
const ret = wasm.ogscenemanager_projectTo2DLinesPretty(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
5001
|
-
var ptr4 = ret[0];
|
|
5002
|
-
var len4 = ret[1];
|
|
5003
|
-
if (ret[3]) {
|
|
5004
|
-
ptr4 = 0; len4 = 0;
|
|
5005
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
5006
|
-
}
|
|
5007
|
-
deferred5_0 = ptr4;
|
|
5008
|
-
deferred5_1 = len4;
|
|
5009
|
-
return getStringFromWasm0(ptr4, len4);
|
|
5010
|
-
} finally {
|
|
5011
|
-
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
5012
|
-
}
|
|
5013
|
-
}
|
|
5014
|
-
/**
|
|
5015
|
-
* @param {string} camera_json
|
|
5016
|
-
* @param {string | null} [hlr_json]
|
|
5017
|
-
* @returns {string}
|
|
5018
|
-
*/
|
|
5019
|
-
projectCurrentTo2DCamera(camera_json, hlr_json) {
|
|
5020
|
-
let deferred4_0;
|
|
5021
|
-
let deferred4_1;
|
|
5022
|
-
try {
|
|
5023
|
-
const ptr0 = passStringToWasm0(camera_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5024
|
-
const len0 = WASM_VECTOR_LEN;
|
|
5025
|
-
var ptr1 = isLikeNone(hlr_json) ? 0 : passStringToWasm0(hlr_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5026
|
-
var len1 = WASM_VECTOR_LEN;
|
|
5027
|
-
const ret = wasm.ogscenemanager_projectCurrentTo2DCamera(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
5028
|
-
var ptr3 = ret[0];
|
|
5029
|
-
var len3 = ret[1];
|
|
5030
|
-
if (ret[3]) {
|
|
5031
|
-
ptr3 = 0; len3 = 0;
|
|
5032
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
5033
|
-
}
|
|
5034
|
-
deferred4_0 = ptr3;
|
|
5035
|
-
deferred4_1 = len3;
|
|
5036
|
-
return getStringFromWasm0(ptr3, len3);
|
|
5037
|
-
} finally {
|
|
5038
|
-
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
5039
|
-
}
|
|
5040
|
-
}
|
|
5041
|
-
/**
|
|
5042
|
-
* @param {string} camera_json
|
|
5043
|
-
* @param {string | null} [hlr_json]
|
|
5044
|
-
* @returns {string}
|
|
5045
|
-
*/
|
|
5046
|
-
projectCurrentTo2DLines(camera_json, hlr_json) {
|
|
5047
|
-
let deferred4_0;
|
|
5048
|
-
let deferred4_1;
|
|
5049
|
-
try {
|
|
5050
|
-
const ptr0 = passStringToWasm0(camera_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5051
|
-
const len0 = WASM_VECTOR_LEN;
|
|
5052
|
-
var ptr1 = isLikeNone(hlr_json) ? 0 : passStringToWasm0(hlr_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5053
|
-
var len1 = WASM_VECTOR_LEN;
|
|
5054
|
-
const ret = wasm.ogscenemanager_projectCurrentTo2DLines(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
5055
|
-
var ptr3 = ret[0];
|
|
5056
|
-
var len3 = ret[1];
|
|
5057
|
-
if (ret[3]) {
|
|
5058
|
-
ptr3 = 0; len3 = 0;
|
|
5059
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
5060
|
-
}
|
|
5061
|
-
deferred4_0 = ptr3;
|
|
5062
|
-
deferred4_1 = len3;
|
|
5063
|
-
return getStringFromWasm0(ptr3, len3);
|
|
5064
|
-
} finally {
|
|
5065
|
-
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
5066
|
-
}
|
|
5067
|
-
}
|
|
5068
|
-
/**
|
|
5069
|
-
* @param {string} brep_serialized
|
|
5070
|
-
* @param {string | null} [config_json]
|
|
5071
|
-
* @returns {OGStlExportResult}
|
|
5072
|
-
*/
|
|
5073
|
-
exportBrepToStl(brep_serialized, config_json) {
|
|
5074
|
-
const ptr0 = passStringToWasm0(brep_serialized, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5075
|
-
const len0 = WASM_VECTOR_LEN;
|
|
5076
|
-
var ptr1 = isLikeNone(config_json) ? 0 : passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5077
|
-
var len1 = WASM_VECTOR_LEN;
|
|
5078
|
-
const ret = wasm.ogscenemanager_exportBrepToStl(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
5079
|
-
if (ret[2]) {
|
|
5080
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
5081
|
-
}
|
|
5082
|
-
return OGStlExportResult.__wrap(ret[0]);
|
|
5083
|
-
}
|
|
5084
|
-
/**
|
|
5085
|
-
* @param {string} scene_id
|
|
5086
|
-
* @param {string | null} [config_json]
|
|
5087
|
-
* @returns {OGStlExportResult}
|
|
5088
|
-
*/
|
|
5089
|
-
exportSceneToStl(scene_id, config_json) {
|
|
5090
|
-
const ptr0 = passStringToWasm0(scene_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5091
|
-
const len0 = WASM_VECTOR_LEN;
|
|
5092
|
-
var ptr1 = isLikeNone(config_json) ? 0 : passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5093
|
-
var len1 = WASM_VECTOR_LEN;
|
|
5094
|
-
const ret = wasm.ogscenemanager_exportSceneToStl(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
5095
|
-
if (ret[2]) {
|
|
5096
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
5097
|
-
}
|
|
5098
|
-
return OGStlExportResult.__wrap(ret[0]);
|
|
5099
|
-
}
|
|
5100
|
-
/**
|
|
5101
|
-
* @param {string | null} [config_json]
|
|
5102
|
-
* @returns {OGStlExportResult}
|
|
5103
|
-
*/
|
|
5104
|
-
exportCurrentSceneToStl(config_json) {
|
|
5105
|
-
var ptr0 = isLikeNone(config_json) ? 0 : passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5106
|
-
var len0 = WASM_VECTOR_LEN;
|
|
5107
|
-
const ret = wasm.ogscenemanager_exportCurrentSceneToStl(this.__wbg_ptr, ptr0, len0);
|
|
5108
|
-
if (ret[2]) {
|
|
5109
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
5110
|
-
}
|
|
5111
|
-
return OGStlExportResult.__wrap(ret[0]);
|
|
5112
|
-
}
|
|
5113
|
-
/**
|
|
5114
|
-
* @param {string} brep_serialized
|
|
5115
|
-
* @param {string | null} [config_json]
|
|
5116
|
-
* @returns {OGStepExportResult}
|
|
5117
|
-
*/
|
|
5118
|
-
exportBrepToStep(brep_serialized, config_json) {
|
|
5119
|
-
const ptr0 = passStringToWasm0(brep_serialized, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5120
|
-
const len0 = WASM_VECTOR_LEN;
|
|
5121
|
-
var ptr1 = isLikeNone(config_json) ? 0 : passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5122
|
-
var len1 = WASM_VECTOR_LEN;
|
|
5123
|
-
const ret = wasm.ogscenemanager_exportBrepToStep(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
5124
|
-
if (ret[2]) {
|
|
5125
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
5126
|
-
}
|
|
5127
|
-
return OGStepExportResult.__wrap(ret[0]);
|
|
5128
|
-
}
|
|
5129
|
-
/**
|
|
5130
|
-
* @param {string} scene_id
|
|
5131
|
-
* @param {string | null} [config_json]
|
|
5132
|
-
* @returns {OGStepExportResult}
|
|
5133
|
-
*/
|
|
5134
|
-
exportSceneToStep(scene_id, config_json) {
|
|
5135
|
-
const ptr0 = passStringToWasm0(scene_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5136
|
-
const len0 = WASM_VECTOR_LEN;
|
|
5137
|
-
var ptr1 = isLikeNone(config_json) ? 0 : passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5138
|
-
var len1 = WASM_VECTOR_LEN;
|
|
5139
|
-
const ret = wasm.ogscenemanager_exportSceneToStep(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
5140
|
-
if (ret[2]) {
|
|
5141
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
5142
|
-
}
|
|
5143
|
-
return OGStepExportResult.__wrap(ret[0]);
|
|
5144
|
-
}
|
|
5145
|
-
/**
|
|
5146
|
-
* @param {string | null} [config_json]
|
|
5147
|
-
* @returns {OGStepExportResult}
|
|
5148
|
-
*/
|
|
5149
|
-
exportCurrentSceneToStep(config_json) {
|
|
5150
|
-
var ptr0 = isLikeNone(config_json) ? 0 : passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5151
|
-
var len0 = WASM_VECTOR_LEN;
|
|
5152
|
-
const ret = wasm.ogscenemanager_exportCurrentSceneToStep(this.__wbg_ptr, ptr0, len0);
|
|
5153
|
-
if (ret[2]) {
|
|
5154
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
5155
|
-
}
|
|
5156
|
-
return OGStepExportResult.__wrap(ret[0]);
|
|
5157
|
-
}
|
|
5158
|
-
/**
|
|
5159
|
-
* @param {string} brep_serialized
|
|
5160
|
-
* @param {string | null} [config_json]
|
|
5161
|
-
* @returns {OGIfcExportResult}
|
|
5162
|
-
*/
|
|
5163
|
-
exportBrepToIfc(brep_serialized, config_json) {
|
|
5164
|
-
const ptr0 = passStringToWasm0(brep_serialized, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5165
|
-
const len0 = WASM_VECTOR_LEN;
|
|
5166
|
-
var ptr1 = isLikeNone(config_json) ? 0 : passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5167
|
-
var len1 = WASM_VECTOR_LEN;
|
|
5168
|
-
const ret = wasm.ogscenemanager_exportBrepToIfc(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
5169
|
-
if (ret[2]) {
|
|
5170
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
5171
|
-
}
|
|
5172
|
-
return OGIfcExportResult.__wrap(ret[0]);
|
|
5173
|
-
}
|
|
5174
|
-
/**
|
|
5175
|
-
* @param {string} scene_id
|
|
5176
|
-
* @param {string | null} [config_json]
|
|
5177
|
-
* @returns {OGIfcExportResult}
|
|
5178
|
-
*/
|
|
5179
|
-
exportSceneToIfc(scene_id, config_json) {
|
|
5180
|
-
const ptr0 = passStringToWasm0(scene_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5181
|
-
const len0 = WASM_VECTOR_LEN;
|
|
5182
|
-
var ptr1 = isLikeNone(config_json) ? 0 : passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5183
|
-
var len1 = WASM_VECTOR_LEN;
|
|
5184
|
-
const ret = wasm.ogscenemanager_exportSceneToIfc(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
5185
|
-
if (ret[2]) {
|
|
5186
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
5187
|
-
}
|
|
5188
|
-
return OGIfcExportResult.__wrap(ret[0]);
|
|
4391
|
+
get_anchor() {
|
|
4392
|
+
const ret = wasm.ogrectangle_get_anchor(this.__wbg_ptr);
|
|
4393
|
+
return Vector3.__wrap(ret);
|
|
5189
4394
|
}
|
|
5190
4395
|
/**
|
|
5191
|
-
* @param {
|
|
5192
|
-
* @
|
|
4396
|
+
* @param {number} distance
|
|
4397
|
+
* @param {number} acute_threshold_degrees
|
|
4398
|
+
* @param {boolean} bevel
|
|
4399
|
+
* @returns {string}
|
|
5193
4400
|
*/
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
4401
|
+
get_offset_serialized(distance, acute_threshold_degrees, bevel) {
|
|
4402
|
+
let deferred1_0;
|
|
4403
|
+
let deferred1_1;
|
|
4404
|
+
try {
|
|
4405
|
+
const ret = wasm.ogrectangle_get_offset_serialized(this.__wbg_ptr, distance, acute_threshold_degrees, bevel);
|
|
4406
|
+
deferred1_0 = ret[0];
|
|
4407
|
+
deferred1_1 = ret[1];
|
|
4408
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
4409
|
+
} finally {
|
|
4410
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
5200
4411
|
}
|
|
5201
|
-
return OGIfcExportResult.__wrap(ret[0]);
|
|
5202
4412
|
}
|
|
5203
4413
|
}
|
|
5204
4414
|
|
|
@@ -5857,7 +5067,7 @@ export class OGSweep {
|
|
|
5857
5067
|
* @returns {Vector3}
|
|
5858
5068
|
*/
|
|
5859
5069
|
get_anchor() {
|
|
5860
|
-
const ret = wasm.
|
|
5070
|
+
const ret = wasm.ogsweep_get_anchor(this.__wbg_ptr);
|
|
5861
5071
|
return Vector3.__wrap(ret);
|
|
5862
5072
|
}
|
|
5863
5073
|
/**
|
|
@@ -5986,163 +5196,532 @@ export class OGWedge {
|
|
|
5986
5196
|
wasm.ogwedge_set_rotation(this.__wbg_ptr, ptr0);
|
|
5987
5197
|
}
|
|
5988
5198
|
/**
|
|
5989
|
-
* @param {Vector3} scale
|
|
5199
|
+
* @param {Vector3} scale
|
|
5200
|
+
*/
|
|
5201
|
+
set_scale(scale) {
|
|
5202
|
+
_assertClass(scale, Vector3);
|
|
5203
|
+
var ptr0 = scale.__destroy_into_raw();
|
|
5204
|
+
const ret = wasm.ogwedge_set_scale(this.__wbg_ptr, ptr0);
|
|
5205
|
+
if (ret[1]) {
|
|
5206
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
5207
|
+
}
|
|
5208
|
+
}
|
|
5209
|
+
generate_brep() {
|
|
5210
|
+
const ret = wasm.ogwedge_generate_brep(this.__wbg_ptr);
|
|
5211
|
+
if (ret[1]) {
|
|
5212
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
5213
|
+
}
|
|
5214
|
+
}
|
|
5215
|
+
clean_geometry() {
|
|
5216
|
+
wasm.ogwedge_clean_geometry(this.__wbg_ptr);
|
|
5217
|
+
}
|
|
5218
|
+
generate_geometry() {
|
|
5219
|
+
const ret = wasm.ogwedge_generate_geometry(this.__wbg_ptr);
|
|
5220
|
+
if (ret[1]) {
|
|
5221
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
5222
|
+
}
|
|
5223
|
+
}
|
|
5224
|
+
/**
|
|
5225
|
+
* @returns {string}
|
|
5226
|
+
*/
|
|
5227
|
+
get_brep_serialized() {
|
|
5228
|
+
let deferred1_0;
|
|
5229
|
+
let deferred1_1;
|
|
5230
|
+
try {
|
|
5231
|
+
const ret = wasm.ogwedge_get_brep_serialized(this.__wbg_ptr);
|
|
5232
|
+
deferred1_0 = ret[0];
|
|
5233
|
+
deferred1_1 = ret[1];
|
|
5234
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
5235
|
+
} finally {
|
|
5236
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
5237
|
+
}
|
|
5238
|
+
}
|
|
5239
|
+
/**
|
|
5240
|
+
* @returns {string}
|
|
5241
|
+
*/
|
|
5242
|
+
get_local_brep_serialized() {
|
|
5243
|
+
let deferred1_0;
|
|
5244
|
+
let deferred1_1;
|
|
5245
|
+
try {
|
|
5246
|
+
const ret = wasm.ogwedge_get_local_brep_serialized(this.__wbg_ptr);
|
|
5247
|
+
deferred1_0 = ret[0];
|
|
5248
|
+
deferred1_1 = ret[1];
|
|
5249
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
5250
|
+
} finally {
|
|
5251
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
5252
|
+
}
|
|
5253
|
+
}
|
|
5254
|
+
/**
|
|
5255
|
+
* @returns {string}
|
|
5256
|
+
*/
|
|
5257
|
+
get_geometry_serialized() {
|
|
5258
|
+
let deferred1_0;
|
|
5259
|
+
let deferred1_1;
|
|
5260
|
+
try {
|
|
5261
|
+
const ret = wasm.ogwedge_get_geometry_serialized(this.__wbg_ptr);
|
|
5262
|
+
deferred1_0 = ret[0];
|
|
5263
|
+
deferred1_1 = ret[1];
|
|
5264
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
5265
|
+
} finally {
|
|
5266
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
5267
|
+
}
|
|
5268
|
+
}
|
|
5269
|
+
/**
|
|
5270
|
+
* @returns {string}
|
|
5271
|
+
*/
|
|
5272
|
+
get_local_geometry_serialized() {
|
|
5273
|
+
let deferred1_0;
|
|
5274
|
+
let deferred1_1;
|
|
5275
|
+
try {
|
|
5276
|
+
const ret = wasm.ogwedge_get_local_geometry_serialized(this.__wbg_ptr);
|
|
5277
|
+
deferred1_0 = ret[0];
|
|
5278
|
+
deferred1_1 = ret[1];
|
|
5279
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
5280
|
+
} finally {
|
|
5281
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
5282
|
+
}
|
|
5283
|
+
}
|
|
5284
|
+
/**
|
|
5285
|
+
* @returns {Float64Array}
|
|
5286
|
+
*/
|
|
5287
|
+
get_geometry_buffer() {
|
|
5288
|
+
const ret = wasm.ogwedge_get_geometry_buffer(this.__wbg_ptr);
|
|
5289
|
+
var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
5290
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
5291
|
+
return v1;
|
|
5292
|
+
}
|
|
5293
|
+
/**
|
|
5294
|
+
* @returns {Float64Array}
|
|
5295
|
+
*/
|
|
5296
|
+
get_local_geometry_buffer() {
|
|
5297
|
+
const ret = wasm.ogwedge_get_local_geometry_buffer(this.__wbg_ptr);
|
|
5298
|
+
var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
5299
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
5300
|
+
return v1;
|
|
5301
|
+
}
|
|
5302
|
+
/**
|
|
5303
|
+
* @returns {string}
|
|
5304
|
+
*/
|
|
5305
|
+
get_outline_geometry_serialized() {
|
|
5306
|
+
let deferred1_0;
|
|
5307
|
+
let deferred1_1;
|
|
5308
|
+
try {
|
|
5309
|
+
const ret = wasm.ogwedge_get_outline_geometry_serialized(this.__wbg_ptr);
|
|
5310
|
+
deferred1_0 = ret[0];
|
|
5311
|
+
deferred1_1 = ret[1];
|
|
5312
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
5313
|
+
} finally {
|
|
5314
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
5315
|
+
}
|
|
5316
|
+
}
|
|
5317
|
+
/**
|
|
5318
|
+
* @returns {string}
|
|
5319
|
+
*/
|
|
5320
|
+
get_local_outline_geometry_serialized() {
|
|
5321
|
+
let deferred1_0;
|
|
5322
|
+
let deferred1_1;
|
|
5323
|
+
try {
|
|
5324
|
+
const ret = wasm.ogwedge_get_local_outline_geometry_serialized(this.__wbg_ptr);
|
|
5325
|
+
deferred1_0 = ret[0];
|
|
5326
|
+
deferred1_1 = ret[1];
|
|
5327
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
5328
|
+
} finally {
|
|
5329
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
5330
|
+
}
|
|
5331
|
+
}
|
|
5332
|
+
/**
|
|
5333
|
+
* @returns {Float64Array}
|
|
5334
|
+
*/
|
|
5335
|
+
get_outline_geometry_buffer() {
|
|
5336
|
+
const ret = wasm.ogwedge_get_outline_geometry_buffer(this.__wbg_ptr);
|
|
5337
|
+
var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
5338
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
5339
|
+
return v1;
|
|
5340
|
+
}
|
|
5341
|
+
/**
|
|
5342
|
+
* @returns {Float64Array}
|
|
5343
|
+
*/
|
|
5344
|
+
get_local_outline_geometry_buffer() {
|
|
5345
|
+
const ret = wasm.ogwedge_get_local_outline_geometry_buffer(this.__wbg_ptr);
|
|
5346
|
+
var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
5347
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
5348
|
+
return v1;
|
|
5349
|
+
}
|
|
5350
|
+
/**
|
|
5351
|
+
* @returns {Vector3}
|
|
5352
|
+
*/
|
|
5353
|
+
get_anchor() {
|
|
5354
|
+
const ret = wasm.ogsweep_get_anchor(this.__wbg_ptr);
|
|
5355
|
+
return Vector3.__wrap(ret);
|
|
5356
|
+
}
|
|
5357
|
+
}
|
|
5358
|
+
|
|
5359
|
+
const OGWorldGraphFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5360
|
+
? { register: () => {}, unregister: () => {} }
|
|
5361
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_ogworldgraph_free(ptr >>> 0, 1));
|
|
5362
|
+
|
|
5363
|
+
export class OGWorldGraph {
|
|
5364
|
+
|
|
5365
|
+
__destroy_into_raw() {
|
|
5366
|
+
const ptr = this.__wbg_ptr;
|
|
5367
|
+
this.__wbg_ptr = 0;
|
|
5368
|
+
OGWorldGraphFinalization.unregister(this);
|
|
5369
|
+
return ptr;
|
|
5370
|
+
}
|
|
5371
|
+
|
|
5372
|
+
free() {
|
|
5373
|
+
const ptr = this.__destroy_into_raw();
|
|
5374
|
+
wasm.__wbg_ogworldgraph_free(ptr, 0);
|
|
5375
|
+
}
|
|
5376
|
+
constructor() {
|
|
5377
|
+
const ret = wasm.ogworldgraph_new();
|
|
5378
|
+
this.__wbg_ptr = ret >>> 0;
|
|
5379
|
+
OGWorldGraphFinalization.register(this, this.__wbg_ptr, this);
|
|
5380
|
+
return this;
|
|
5381
|
+
}
|
|
5382
|
+
/**
|
|
5383
|
+
* @param {string} id
|
|
5384
|
+
* @param {string} brep_json
|
|
5385
|
+
*/
|
|
5386
|
+
define(id, brep_json) {
|
|
5387
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5388
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5389
|
+
const ptr1 = passStringToWasm0(brep_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5390
|
+
const len1 = WASM_VECTOR_LEN;
|
|
5391
|
+
const ret = wasm.ogworldgraph_define(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
5392
|
+
if (ret[1]) {
|
|
5393
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
5394
|
+
}
|
|
5395
|
+
}
|
|
5396
|
+
/**
|
|
5397
|
+
* @param {string} id
|
|
5398
|
+
* @param {string} brep_json
|
|
5399
|
+
*/
|
|
5400
|
+
define_legacy(id, brep_json) {
|
|
5401
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5402
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5403
|
+
const ptr1 = passStringToWasm0(brep_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5404
|
+
const len1 = WASM_VECTOR_LEN;
|
|
5405
|
+
const ret = wasm.ogworldgraph_define_legacy(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
5406
|
+
if (ret[1]) {
|
|
5407
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
5408
|
+
}
|
|
5409
|
+
}
|
|
5410
|
+
/**
|
|
5411
|
+
* @param {string} id
|
|
5412
|
+
*/
|
|
5413
|
+
undefine(id) {
|
|
5414
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5415
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5416
|
+
const ret = wasm.ogworldgraph_undefine(this.__wbg_ptr, ptr0, len0);
|
|
5417
|
+
if (ret[1]) {
|
|
5418
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
5419
|
+
}
|
|
5420
|
+
}
|
|
5421
|
+
/**
|
|
5422
|
+
* @param {string} id
|
|
5423
|
+
* @returns {boolean}
|
|
5424
|
+
*/
|
|
5425
|
+
has_definition(id) {
|
|
5426
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5427
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5428
|
+
const ret = wasm.ogworldgraph_has_definition(this.__wbg_ptr, ptr0, len0);
|
|
5429
|
+
return ret !== 0;
|
|
5430
|
+
}
|
|
5431
|
+
/**
|
|
5432
|
+
* @param {string} spec_json
|
|
5433
|
+
*/
|
|
5434
|
+
add_node(spec_json) {
|
|
5435
|
+
const ptr0 = passStringToWasm0(spec_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5436
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5437
|
+
const ret = wasm.ogworldgraph_add_node(this.__wbg_ptr, ptr0, len0);
|
|
5438
|
+
if (ret[1]) {
|
|
5439
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
5440
|
+
}
|
|
5441
|
+
}
|
|
5442
|
+
/**
|
|
5443
|
+
* @param {string} id
|
|
5444
|
+
* @param {string} local_json
|
|
5445
|
+
*/
|
|
5446
|
+
set_local(id, local_json) {
|
|
5447
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5448
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5449
|
+
const ptr1 = passStringToWasm0(local_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5450
|
+
const len1 = WASM_VECTOR_LEN;
|
|
5451
|
+
const ret = wasm.ogworldgraph_set_local(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
5452
|
+
if (ret[1]) {
|
|
5453
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
5454
|
+
}
|
|
5455
|
+
}
|
|
5456
|
+
/**
|
|
5457
|
+
* @param {string} id
|
|
5458
|
+
* @param {string | null} [parent]
|
|
5990
5459
|
*/
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5460
|
+
reparent(id, parent) {
|
|
5461
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5462
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5463
|
+
var ptr1 = isLikeNone(parent) ? 0 : passStringToWasm0(parent, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5464
|
+
var len1 = WASM_VECTOR_LEN;
|
|
5465
|
+
const ret = wasm.ogworldgraph_reparent(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
5995
5466
|
if (ret[1]) {
|
|
5996
5467
|
throw takeFromExternrefTable0(ret[0]);
|
|
5997
5468
|
}
|
|
5998
5469
|
}
|
|
5999
|
-
|
|
6000
|
-
|
|
5470
|
+
/**
|
|
5471
|
+
* @param {string} id
|
|
5472
|
+
*/
|
|
5473
|
+
remove_node(id) {
|
|
5474
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5475
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5476
|
+
const ret = wasm.ogworldgraph_remove_node(this.__wbg_ptr, ptr0, len0);
|
|
6001
5477
|
if (ret[1]) {
|
|
6002
5478
|
throw takeFromExternrefTable0(ret[0]);
|
|
6003
5479
|
}
|
|
6004
5480
|
}
|
|
6005
|
-
|
|
6006
|
-
|
|
5481
|
+
/**
|
|
5482
|
+
* @param {string} id
|
|
5483
|
+
* @returns {boolean}
|
|
5484
|
+
*/
|
|
5485
|
+
has_node(id) {
|
|
5486
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5487
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5488
|
+
const ret = wasm.ogworldgraph_has_node(this.__wbg_ptr, ptr0, len0);
|
|
5489
|
+
return ret !== 0;
|
|
6007
5490
|
}
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
5491
|
+
/**
|
|
5492
|
+
* @param {string} id
|
|
5493
|
+
* @returns {Float64Array}
|
|
5494
|
+
*/
|
|
5495
|
+
get_world(id) {
|
|
5496
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5497
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5498
|
+
const ret = wasm.ogworldgraph_get_world(this.__wbg_ptr, ptr0, len0);
|
|
5499
|
+
if (ret[3]) {
|
|
5500
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
6012
5501
|
}
|
|
5502
|
+
var v2 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
5503
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
5504
|
+
return v2;
|
|
6013
5505
|
}
|
|
6014
5506
|
/**
|
|
6015
|
-
* @
|
|
5507
|
+
* @param {string} id
|
|
5508
|
+
* @returns {Float64Array}
|
|
6016
5509
|
*/
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
deferred1_1 = ret[1];
|
|
6024
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
6025
|
-
} finally {
|
|
6026
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
5510
|
+
get_world_bounds(id) {
|
|
5511
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5512
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5513
|
+
const ret = wasm.ogworldgraph_get_world_bounds(this.__wbg_ptr, ptr0, len0);
|
|
5514
|
+
if (ret[3]) {
|
|
5515
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
6027
5516
|
}
|
|
5517
|
+
var v2 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
5518
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
5519
|
+
return v2;
|
|
6028
5520
|
}
|
|
6029
5521
|
/**
|
|
5522
|
+
* @param {string} items_a_json
|
|
5523
|
+
* @param {string} items_b_json
|
|
5524
|
+
* @param {number} depth
|
|
6030
5525
|
* @returns {string}
|
|
6031
5526
|
*/
|
|
6032
|
-
|
|
6033
|
-
let
|
|
6034
|
-
let
|
|
5527
|
+
clash(items_a_json, items_b_json, depth) {
|
|
5528
|
+
let deferred4_0;
|
|
5529
|
+
let deferred4_1;
|
|
6035
5530
|
try {
|
|
6036
|
-
const
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
5531
|
+
const ptr0 = passStringToWasm0(items_a_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5532
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5533
|
+
const ptr1 = passStringToWasm0(items_b_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5534
|
+
const len1 = WASM_VECTOR_LEN;
|
|
5535
|
+
const ret = wasm.ogworldgraph_clash(this.__wbg_ptr, ptr0, len0, ptr1, len1, depth);
|
|
5536
|
+
var ptr3 = ret[0];
|
|
5537
|
+
var len3 = ret[1];
|
|
5538
|
+
if (ret[3]) {
|
|
5539
|
+
ptr3 = 0; len3 = 0;
|
|
5540
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
5541
|
+
}
|
|
5542
|
+
deferred4_0 = ptr3;
|
|
5543
|
+
deferred4_1 = len3;
|
|
5544
|
+
return getStringFromWasm0(ptr3, len3);
|
|
6040
5545
|
} finally {
|
|
6041
|
-
wasm.__wbindgen_free(
|
|
5546
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
6042
5547
|
}
|
|
6043
5548
|
}
|
|
6044
5549
|
/**
|
|
5550
|
+
* @param {string} items_a_json
|
|
5551
|
+
* @param {string} items_b_json
|
|
5552
|
+
* @param {number} clearance
|
|
6045
5553
|
* @returns {string}
|
|
6046
5554
|
*/
|
|
6047
|
-
|
|
6048
|
-
let
|
|
6049
|
-
let
|
|
5555
|
+
clearance(items_a_json, items_b_json, clearance) {
|
|
5556
|
+
let deferred4_0;
|
|
5557
|
+
let deferred4_1;
|
|
6050
5558
|
try {
|
|
6051
|
-
const
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
5559
|
+
const ptr0 = passStringToWasm0(items_a_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5560
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5561
|
+
const ptr1 = passStringToWasm0(items_b_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5562
|
+
const len1 = WASM_VECTOR_LEN;
|
|
5563
|
+
const ret = wasm.ogworldgraph_clearance(this.__wbg_ptr, ptr0, len0, ptr1, len1, clearance);
|
|
5564
|
+
var ptr3 = ret[0];
|
|
5565
|
+
var len3 = ret[1];
|
|
5566
|
+
if (ret[3]) {
|
|
5567
|
+
ptr3 = 0; len3 = 0;
|
|
5568
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
5569
|
+
}
|
|
5570
|
+
deferred4_0 = ptr3;
|
|
5571
|
+
deferred4_1 = len3;
|
|
5572
|
+
return getStringFromWasm0(ptr3, len3);
|
|
6055
5573
|
} finally {
|
|
6056
|
-
wasm.__wbindgen_free(
|
|
5574
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
6057
5575
|
}
|
|
6058
5576
|
}
|
|
6059
5577
|
/**
|
|
5578
|
+
* @param {string} item_a
|
|
5579
|
+
* @param {string} item_b
|
|
5580
|
+
* @param {number} tolerance
|
|
6060
5581
|
* @returns {string}
|
|
6061
5582
|
*/
|
|
6062
|
-
|
|
6063
|
-
let
|
|
6064
|
-
let
|
|
5583
|
+
distance(item_a, item_b, tolerance) {
|
|
5584
|
+
let deferred4_0;
|
|
5585
|
+
let deferred4_1;
|
|
6065
5586
|
try {
|
|
6066
|
-
const
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
5587
|
+
const ptr0 = passStringToWasm0(item_a, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5588
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5589
|
+
const ptr1 = passStringToWasm0(item_b, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5590
|
+
const len1 = WASM_VECTOR_LEN;
|
|
5591
|
+
const ret = wasm.ogworldgraph_distance(this.__wbg_ptr, ptr0, len0, ptr1, len1, tolerance);
|
|
5592
|
+
var ptr3 = ret[0];
|
|
5593
|
+
var len3 = ret[1];
|
|
5594
|
+
if (ret[3]) {
|
|
5595
|
+
ptr3 = 0; len3 = 0;
|
|
5596
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
5597
|
+
}
|
|
5598
|
+
deferred4_0 = ptr3;
|
|
5599
|
+
deferred4_1 = len3;
|
|
5600
|
+
return getStringFromWasm0(ptr3, len3);
|
|
6070
5601
|
} finally {
|
|
6071
|
-
wasm.__wbindgen_free(
|
|
5602
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
6072
5603
|
}
|
|
6073
5604
|
}
|
|
6074
5605
|
/**
|
|
6075
|
-
* @
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
6080
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
6081
|
-
return v1;
|
|
6082
|
-
}
|
|
6083
|
-
/**
|
|
6084
|
-
* @returns {Float64Array}
|
|
6085
|
-
*/
|
|
6086
|
-
get_local_geometry_buffer() {
|
|
6087
|
-
const ret = wasm.ogwedge_get_local_geometry_buffer(this.__wbg_ptr);
|
|
6088
|
-
var v1 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
6089
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
6090
|
-
return v1;
|
|
6091
|
-
}
|
|
6092
|
-
/**
|
|
5606
|
+
* @param {string} items_json
|
|
5607
|
+
* @param {string} camera_json
|
|
5608
|
+
* @param {string | null | undefined} hlr_json
|
|
5609
|
+
* @param {number} deflection
|
|
6093
5610
|
* @returns {string}
|
|
6094
5611
|
*/
|
|
6095
|
-
|
|
6096
|
-
let
|
|
6097
|
-
let
|
|
5612
|
+
project_lines(items_json, camera_json, hlr_json, deflection) {
|
|
5613
|
+
let deferred5_0;
|
|
5614
|
+
let deferred5_1;
|
|
6098
5615
|
try {
|
|
6099
|
-
const
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
5616
|
+
const ptr0 = passStringToWasm0(items_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5617
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5618
|
+
const ptr1 = passStringToWasm0(camera_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5619
|
+
const len1 = WASM_VECTOR_LEN;
|
|
5620
|
+
var ptr2 = isLikeNone(hlr_json) ? 0 : passStringToWasm0(hlr_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5621
|
+
var len2 = WASM_VECTOR_LEN;
|
|
5622
|
+
const ret = wasm.ogworldgraph_project_lines(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, deflection);
|
|
5623
|
+
var ptr4 = ret[0];
|
|
5624
|
+
var len4 = ret[1];
|
|
5625
|
+
if (ret[3]) {
|
|
5626
|
+
ptr4 = 0; len4 = 0;
|
|
5627
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
5628
|
+
}
|
|
5629
|
+
deferred5_0 = ptr4;
|
|
5630
|
+
deferred5_1 = len4;
|
|
5631
|
+
return getStringFromWasm0(ptr4, len4);
|
|
6103
5632
|
} finally {
|
|
6104
|
-
wasm.__wbindgen_free(
|
|
5633
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
6105
5634
|
}
|
|
6106
5635
|
}
|
|
6107
5636
|
/**
|
|
5637
|
+
* @param {string} items_json
|
|
5638
|
+
* @param {string} views_json
|
|
5639
|
+
* @param {number} deflection
|
|
6108
5640
|
* @returns {string}
|
|
6109
5641
|
*/
|
|
6110
|
-
|
|
6111
|
-
let
|
|
6112
|
-
let
|
|
5642
|
+
project_views(items_json, views_json, deflection) {
|
|
5643
|
+
let deferred4_0;
|
|
5644
|
+
let deferred4_1;
|
|
6113
5645
|
try {
|
|
6114
|
-
const
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
5646
|
+
const ptr0 = passStringToWasm0(items_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5647
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5648
|
+
const ptr1 = passStringToWasm0(views_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5649
|
+
const len1 = WASM_VECTOR_LEN;
|
|
5650
|
+
const ret = wasm.ogworldgraph_project_views(this.__wbg_ptr, ptr0, len0, ptr1, len1, deflection);
|
|
5651
|
+
var ptr3 = ret[0];
|
|
5652
|
+
var len3 = ret[1];
|
|
5653
|
+
if (ret[3]) {
|
|
5654
|
+
ptr3 = 0; len3 = 0;
|
|
5655
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
5656
|
+
}
|
|
5657
|
+
deferred4_0 = ptr3;
|
|
5658
|
+
deferred4_1 = len3;
|
|
5659
|
+
return getStringFromWasm0(ptr3, len3);
|
|
6118
5660
|
} finally {
|
|
6119
|
-
wasm.__wbindgen_free(
|
|
5661
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
6120
5662
|
}
|
|
6121
5663
|
}
|
|
6122
5664
|
/**
|
|
6123
|
-
* @
|
|
5665
|
+
* @param {string} items_json
|
|
5666
|
+
* @param {string | null} [config_json]
|
|
5667
|
+
* @returns {OGStlExportResult}
|
|
6124
5668
|
*/
|
|
6125
|
-
|
|
6126
|
-
const
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
5669
|
+
export_stl(items_json, config_json) {
|
|
5670
|
+
const ptr0 = passStringToWasm0(items_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5671
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5672
|
+
var ptr1 = isLikeNone(config_json) ? 0 : passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5673
|
+
var len1 = WASM_VECTOR_LEN;
|
|
5674
|
+
const ret = wasm.ogworldgraph_export_stl(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
5675
|
+
if (ret[2]) {
|
|
5676
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
5677
|
+
}
|
|
5678
|
+
return OGStlExportResult.__wrap(ret[0]);
|
|
6130
5679
|
}
|
|
6131
5680
|
/**
|
|
6132
|
-
* @
|
|
5681
|
+
* @param {string} items_json
|
|
5682
|
+
* @param {string | null} [config_json]
|
|
5683
|
+
* @returns {OGStepExportResult}
|
|
6133
5684
|
*/
|
|
6134
|
-
|
|
6135
|
-
const
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
5685
|
+
export_step(items_json, config_json) {
|
|
5686
|
+
const ptr0 = passStringToWasm0(items_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5687
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5688
|
+
var ptr1 = isLikeNone(config_json) ? 0 : passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5689
|
+
var len1 = WASM_VECTOR_LEN;
|
|
5690
|
+
const ret = wasm.ogworldgraph_export_step(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
5691
|
+
if (ret[2]) {
|
|
5692
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
5693
|
+
}
|
|
5694
|
+
return OGStepExportResult.__wrap(ret[0]);
|
|
6139
5695
|
}
|
|
6140
5696
|
/**
|
|
6141
|
-
* @
|
|
5697
|
+
* @param {string} items_json
|
|
5698
|
+
* @param {string | null} [config_json]
|
|
5699
|
+
* @returns {OGIfcExportResult}
|
|
6142
5700
|
*/
|
|
6143
|
-
|
|
6144
|
-
const
|
|
6145
|
-
|
|
5701
|
+
export_ifc(items_json, config_json) {
|
|
5702
|
+
const ptr0 = passStringToWasm0(items_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5703
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5704
|
+
var ptr1 = isLikeNone(config_json) ? 0 : passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5705
|
+
var len1 = WASM_VECTOR_LEN;
|
|
5706
|
+
const ret = wasm.ogworldgraph_export_ifc(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
5707
|
+
if (ret[2]) {
|
|
5708
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
5709
|
+
}
|
|
5710
|
+
return OGIfcExportResult.__wrap(ret[0]);
|
|
5711
|
+
}
|
|
5712
|
+
/**
|
|
5713
|
+
* @returns {number}
|
|
5714
|
+
*/
|
|
5715
|
+
node_count() {
|
|
5716
|
+
const ret = wasm.ogworldgraph_node_count(this.__wbg_ptr);
|
|
5717
|
+
return ret >>> 0;
|
|
5718
|
+
}
|
|
5719
|
+
/**
|
|
5720
|
+
* @returns {number}
|
|
5721
|
+
*/
|
|
5722
|
+
definition_count() {
|
|
5723
|
+
const ret = wasm.ogworldgraph_definition_count(this.__wbg_ptr);
|
|
5724
|
+
return ret >>> 0;
|
|
6146
5725
|
}
|
|
6147
5726
|
}
|
|
6148
5727
|
|
|
@@ -6526,7 +6105,7 @@ export class WorkPlane {
|
|
|
6526
6105
|
* @returns {Vector3}
|
|
6527
6106
|
*/
|
|
6528
6107
|
get origin() {
|
|
6529
|
-
const ret = wasm.
|
|
6108
|
+
const ret = wasm.ogarc_get_anchor(this.__wbg_ptr);
|
|
6530
6109
|
return Vector3.__wrap(ret);
|
|
6531
6110
|
}
|
|
6532
6111
|
/**
|