@bldrs-ai/conway 0.23.940 → 0.23.954
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 +55 -5
- package/compiled/dependencies/conway-geom/interface/conway_geometry.d.ts.map +1 -1
- package/compiled/dependencies/conway-geom/interface/conway_geometry.js +15 -0
- package/compiled/examples/browser-bundled.cjs +1 -1
- package/compiled/examples/cli-bundled.cjs +156 -99
- package/compiled/examples/validator-bundled.cjs +1 -1
- package/compiled/src/ifc/ifc_command_line_main.js +151 -101
- package/compiled/src/ifc/ifc_geometry_extraction.d.ts +2 -2
- package/compiled/src/ifc/ifc_geometry_extraction.d.ts.map +1 -1
- package/compiled/src/ifc/ifc_geometry_extraction.js +2 -2
- package/compiled/src/rendering/threejs/simple_viewer_scene.js +11 -0
- package/compiled/src/version/version.js +1 -1
- package/compiled/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -116,14 +116,64 @@ git push origin HEAD
|
|
|
116
116
|
# IFC Parser Console Test Application
|
|
117
117
|
|
|
118
118
|
Conway has a test application for parsing IFC step files to see the performance and included entity types at src/core/ifc/ifc_command_line_main.ts.
|
|
119
|
-
|
|
119
|
+
|
|
120
|
+
You can set up an alias to reference the latest package or build from source and use yarn cli:
|
|
120
121
|
|
|
121
122
|
```
|
|
122
|
-
yarn cli
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
alias conway='yarn cli'
|
|
124
|
+
OR
|
|
125
|
+
alias conway='npx --package=@bldrs-ai/conway@latest exec cli'
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
It can be run with:
|
|
129
|
+
|
|
126
130
|
```
|
|
131
|
+
conway [ifc file path]
|
|
132
|
+
# To output geometry
|
|
133
|
+
conway -g [ifc file path]
|
|
134
|
+
# Use -m 1024 for larger files
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### CLI Geometry Output Options
|
|
138
|
+
|
|
139
|
+
You can now output various geometry formats using the CLI:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
conway [ifc file path] [options]
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**Examples:**
|
|
146
|
+
- Output all geometry (default GLTF + GLB):
|
|
147
|
+
```bash
|
|
148
|
+
conway index.ifc --geometry
|
|
149
|
+
```
|
|
150
|
+
- Output only GLTF:
|
|
151
|
+
```bash
|
|
152
|
+
conway index.ifc --geometry --gltf
|
|
153
|
+
```
|
|
154
|
+
- Output only GLB:
|
|
155
|
+
```bash
|
|
156
|
+
conway index.ifc --geometry --glb
|
|
157
|
+
```
|
|
158
|
+
- Output GLTF with Draco compression:
|
|
159
|
+
```bash
|
|
160
|
+
conway index.ifc --geometry --gltf-draco
|
|
161
|
+
```
|
|
162
|
+
- Output GLB with Draco compression:
|
|
163
|
+
```bash
|
|
164
|
+
conway index.ifc --geometry --glb-draco
|
|
165
|
+
```
|
|
166
|
+
- Run geometry processing without saving output files:
|
|
167
|
+
```bash
|
|
168
|
+
conway index.ifc --geometry --nooutput
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
You can also combine flags as needed. For example:
|
|
172
|
+
```bash
|
|
173
|
+
conway index.ifc --geometry --gltf-draco --glb-draco
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Run `conway --help` for the full list of available flags and options.
|
|
127
177
|
|
|
128
178
|
The included index.ifc in the repo is recommended for testing.
|
|
129
179
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conway_geometry.d.ts","sourceRoot":"","sources":["../../../../dependencies/conway-geom/interface/conway_geometry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;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AAS,CAAC,kBAAkB,CAAC,EACvC,SAAS,EAAE,SAAS,CAAC,cAAc,CAAC,EACpC,KAAK,EAAE,OAAO,EACd,WAAW,EAAE,OAAO,EACpB,OAAO,EAAE,MAAM,EACf,cAAc,GAAE,MAAU,EAC1B,aAAa,GAAE,MAAwB,GACzC,WAAW;IAWb;;;;OAIG;IACH,mBAAmB,CAAC,UAAU,EAAE,sBAAsB,GAAG,kBAAkB;IAI3E;;;;OAIG;IACH,mBAAmB,CAAC,UAAU,EAAE,yBAAyB,GAAG,kBAAkB;IAI9E;;;;OAIG;IACH,mBAAmB,CAAC,UAAU,EAAE,sBAAsB,GAAG,kBAAkB;IAI3E;;;;OAIG;IACH,iBAAiB,CAAC,UAAU,EAAE,oBAAoB,GAAG,kBAAkB;IAIvE;;;OAGG;IACH,oBAAoB,IAAI,kBAAkB;IAI1C;;;;OAIG;IACH,KAAK,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM;IAIvC;;OAEG;IACH,OAAO;CAIR"}
|
|
@@ -15,10 +15,25 @@ function pThreadsAllowed() {
|
|
|
15
15
|
// (SharedArrayBuffer may exist but will only work with threads if
|
|
16
16
|
// crossOriginIsolated is true.)
|
|
17
17
|
if (isWebPlatform()) {
|
|
18
|
+
if (isIosBrowser()) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
18
21
|
return window.crossOriginIsolated === true;
|
|
19
22
|
}
|
|
20
23
|
return true;
|
|
21
24
|
}
|
|
25
|
+
function isIosBrowser() {
|
|
26
|
+
if (typeof navigator === 'undefined') {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
const ua = navigator.userAgent || navigator.vendor || '';
|
|
30
|
+
if (/\b(iPad|iPhone|iPod)\b/i.test(ua)) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
return navigator.platform === 'MacIntel' &&
|
|
34
|
+
typeof navigator.maxTouchPoints === 'number' &&
|
|
35
|
+
navigator.maxTouchPoints > 1;
|
|
36
|
+
}
|
|
22
37
|
export let wasmType = "";
|
|
23
38
|
let ConwayGeomWasm;
|
|
24
39
|
let modulePrefix = '../Dist/';
|
|
@@ -68492,7 +68492,7 @@ var IfcStepParser = class extends StepParser {
|
|
|
68492
68492
|
IfcStepParser.Instance = new IfcStepParser();
|
|
68493
68493
|
|
|
68494
68494
|
// compiled/src/version/version.js
|
|
68495
|
-
var versionString = "Conway Web-Ifc Shim v0.22.
|
|
68495
|
+
var versionString = "Conway Web-Ifc Shim v0.22.954";
|
|
68496
68496
|
|
|
68497
68497
|
// compiled/src/statistics/statistics.js
|
|
68498
68498
|
var Statistics = class {
|
|
@@ -82850,10 +82850,23 @@ function pThreadsAllowed() {
|
|
|
82850
82850
|
return false;
|
|
82851
82851
|
}
|
|
82852
82852
|
if (isWebPlatform()) {
|
|
82853
|
+
if (isIosBrowser()) {
|
|
82854
|
+
return false;
|
|
82855
|
+
}
|
|
82853
82856
|
return window.crossOriginIsolated === true;
|
|
82854
82857
|
}
|
|
82855
82858
|
return true;
|
|
82856
82859
|
}
|
|
82860
|
+
function isIosBrowser() {
|
|
82861
|
+
if (typeof navigator === "undefined") {
|
|
82862
|
+
return false;
|
|
82863
|
+
}
|
|
82864
|
+
const ua = navigator.userAgent || navigator.vendor || "";
|
|
82865
|
+
if (/\b(iPad|iPhone|iPod)\b/i.test(ua)) {
|
|
82866
|
+
return true;
|
|
82867
|
+
}
|
|
82868
|
+
return navigator.platform === "MacIntel" && typeof navigator.maxTouchPoints === "number" && navigator.maxTouchPoints > 1;
|
|
82869
|
+
}
|
|
82857
82870
|
var wasmType = "";
|
|
82858
82871
|
var ConwayGeomWasm3;
|
|
82859
82872
|
var modulePrefix = "../Dist/";
|
|
@@ -84711,7 +84724,7 @@ var IfcSceneBuilder = class {
|
|
|
84711
84724
|
};
|
|
84712
84725
|
|
|
84713
84726
|
// compiled/src/version/version.js
|
|
84714
|
-
var versionString = "Conway Web-Ifc Shim v0.22.
|
|
84727
|
+
var versionString = "Conway Web-Ifc Shim v0.22.954";
|
|
84715
84728
|
|
|
84716
84729
|
// compiled/src/statistics/statistics.js
|
|
84717
84730
|
var Statistics = class {
|
|
@@ -87902,7 +87915,7 @@ var IfcGeometryExtraction = class _IfcGeometryExtraction {
|
|
|
87902
87915
|
geometry_ = new this.wasmModule.IfcGeometry();
|
|
87903
87916
|
}
|
|
87904
87917
|
for (const face of from) {
|
|
87905
|
-
if (face instanceof
|
|
87918
|
+
if (face instanceof IfcFaceSurface) {
|
|
87906
87919
|
this.extractAdvancedFace(face, geometry_);
|
|
87907
87920
|
} else {
|
|
87908
87921
|
this.extractFace(face, geometry_);
|
|
@@ -89545,10 +89558,30 @@ function doWork() {
|
|
|
89545
89558
|
alias: "f"
|
|
89546
89559
|
});
|
|
89547
89560
|
yargs2.option("geometry", {
|
|
89548
|
-
describe: "Output Geometry in
|
|
89561
|
+
describe: "Output Geometry in GLTF + GLB formats",
|
|
89549
89562
|
type: "boolean",
|
|
89550
89563
|
alias: "g"
|
|
89551
89564
|
});
|
|
89565
|
+
yargs2.option("gltf", {
|
|
89566
|
+
describe: "Output GLTF format",
|
|
89567
|
+
type: "boolean",
|
|
89568
|
+
alias: "gltf"
|
|
89569
|
+
});
|
|
89570
|
+
yargs2.option("glb", {
|
|
89571
|
+
describe: "Output GLB format",
|
|
89572
|
+
type: "boolean",
|
|
89573
|
+
alias: "glb"
|
|
89574
|
+
});
|
|
89575
|
+
yargs2.option("gltf-draco", {
|
|
89576
|
+
describe: "Output GLTF format with Draco compression",
|
|
89577
|
+
type: "boolean",
|
|
89578
|
+
alias: "gltf-draco"
|
|
89579
|
+
});
|
|
89580
|
+
yargs2.option("glb-draco", {
|
|
89581
|
+
describe: "Output GLB format with Draco compression",
|
|
89582
|
+
type: "boolean",
|
|
89583
|
+
alias: "glb-draco"
|
|
89584
|
+
});
|
|
89552
89585
|
yargs2.option("nooutput", {
|
|
89553
89586
|
describe: "Run geometry processing but do not output files.",
|
|
89554
89587
|
type: "boolean",
|
|
@@ -89573,7 +89606,7 @@ function doWork() {
|
|
|
89573
89606
|
describe: "Maximum chunk size in megabytes (note, this is the allocation size, not the output size)",
|
|
89574
89607
|
type: "number",
|
|
89575
89608
|
alias: "m",
|
|
89576
|
-
default:
|
|
89609
|
+
default: 1024
|
|
89577
89610
|
});
|
|
89578
89611
|
yargs2.option("strict", {
|
|
89579
89612
|
describe: "Makes parser/reference errors on nullable fields return null instead of an error",
|
|
@@ -89602,6 +89635,10 @@ function doWork() {
|
|
|
89602
89635
|
const noOutput = argv["nooutput"];
|
|
89603
89636
|
const limitCSG = !argv["limitcsg"];
|
|
89604
89637
|
const maxCSGDepth = argv["csgdepth"];
|
|
89638
|
+
const outputGltf = argv["gltf"];
|
|
89639
|
+
const outputGlb = argv["glb"];
|
|
89640
|
+
const outputGltfDraco = argv["gltf-draco"];
|
|
89641
|
+
const outputGlbDraco = argv["glb-draco"];
|
|
89605
89642
|
try {
|
|
89606
89643
|
indexIfcBuffer = import_fs.default.readFileSync(ifcFile);
|
|
89607
89644
|
} catch (_ex) {
|
|
@@ -89672,7 +89709,11 @@ function doWork() {
|
|
|
89672
89709
|
const maxChunk = argv["maxchunk"] ?? DEFAULT_CHUNK;
|
|
89673
89710
|
const maxGeometrySize = maxChunk << MEGABYTE_SHIFT;
|
|
89674
89711
|
if (noOutput === void 0 || !noOutput) {
|
|
89675
|
-
|
|
89712
|
+
if (outputGltf === void 0 && outputGlb === void 0 && outputGltfDraco === void 0 && outputGlbDraco === void 0) {
|
|
89713
|
+
serializeGeometry(scene, fileName, maxGeometrySize, true, true, true, true, includeSpace);
|
|
89714
|
+
} else {
|
|
89715
|
+
serializeGeometry(scene, fileName, maxGeometrySize, outputGltf, outputGlb, outputGltfDraco, outputGlbDraco, includeSpace);
|
|
89716
|
+
}
|
|
89676
89717
|
}
|
|
89677
89718
|
}
|
|
89678
89719
|
} else {
|
|
@@ -89749,7 +89790,11 @@ function doWork() {
|
|
|
89749
89790
|
Logger.printStatistics(modelID);
|
|
89750
89791
|
}).help().argv;
|
|
89751
89792
|
}
|
|
89752
|
-
function serializeGeometry(scene, fileNameNoExtension, maxGeometrySize, includeSpaces) {
|
|
89793
|
+
function serializeGeometry(scene, fileNameNoExtension, maxGeometrySize, outputGltf = false, outputGlb = false, outputGltfDraco = false, outputGlbDraco = false, includeSpaces) {
|
|
89794
|
+
let executionTimeInMsGlb = 0;
|
|
89795
|
+
let executionTimeInMsGlbDraco = 0;
|
|
89796
|
+
let executionTimeInMsGltf = 0;
|
|
89797
|
+
let executionTimeInMsGltfDraco = 0;
|
|
89753
89798
|
const geometryAggregator = new GeometryAggregator(conwaywasm, { maxGeometrySize, outputSpaces: includeSpaces });
|
|
89754
89799
|
geometryAggregator.append(scene);
|
|
89755
89800
|
const aggregatedGeometry = geometryAggregator.aggregateNative();
|
|
@@ -89759,112 +89804,124 @@ function serializeGeometry(scene, fileNameNoExtension, maxGeometrySize, includeS
|
|
|
89759
89804
|
}
|
|
89760
89805
|
const convertor = new GeometryConvertor(conwaywasm);
|
|
89761
89806
|
const startTimeGlb = Date.now();
|
|
89762
|
-
|
|
89763
|
-
|
|
89764
|
-
|
|
89765
|
-
if (glbResult.
|
|
89766
|
-
|
|
89767
|
-
|
|
89768
|
-
|
|
89769
|
-
for (let uriIndex = 0; uriIndex < glbResult.bufferUris.size(); uriIndex++) {
|
|
89770
|
-
const uri = glbResult.bufferUris.get(uriIndex);
|
|
89771
|
-
const managedBuffer = conwaywasm.wasmModule.getUint8Array(glbResult.buffers.get(uriIndex));
|
|
89772
|
-
try {
|
|
89773
|
-
import_fs.default.writeFileSync(uri, managedBuffer);
|
|
89774
|
-
} catch (err) {
|
|
89775
|
-
Logger.error(`Error writing to file: ${err}`);
|
|
89807
|
+
if (outputGlb) {
|
|
89808
|
+
const glbResults = convertor.toGltfs(aggregatedGeometry, true, false, `${fileNameNoExtension}_test`);
|
|
89809
|
+
for (const glbResult of glbResults) {
|
|
89810
|
+
if (glbResult.success) {
|
|
89811
|
+
if (glbResult.buffers.size() !== glbResult.bufferUris.size()) {
|
|
89812
|
+
Logger.error("Buffer size != Buffer URI size!\n");
|
|
89813
|
+
return;
|
|
89776
89814
|
}
|
|
89777
|
-
|
|
89778
|
-
|
|
89779
|
-
|
|
89780
|
-
|
|
89781
|
-
|
|
89782
|
-
|
|
89783
|
-
|
|
89784
|
-
|
|
89785
|
-
const executionTimeInMsGlb = endTimeGlb - startTimeGlb;
|
|
89786
|
-
const startTimeGlbDraco = Date.now();
|
|
89787
|
-
const glbDracoResults = convertor.toGltfs(aggregatedGeometry, true, true, `${fileNameNoExtension}_test_draco`);
|
|
89788
|
-
for (const glbDracoResult of glbDracoResults) {
|
|
89789
|
-
if (glbDracoResult.success) {
|
|
89790
|
-
if (glbDracoResult.buffers.size() !== glbDracoResult.bufferUris.size()) {
|
|
89791
|
-
Logger.error("Buffer size != Buffer URI size!\n");
|
|
89792
|
-
return;
|
|
89793
|
-
}
|
|
89794
|
-
for (let uriIndex = 0; uriIndex < glbDracoResult.bufferUris.size(); uriIndex++) {
|
|
89795
|
-
const uri = glbDracoResult.bufferUris.get(uriIndex);
|
|
89796
|
-
const managedBuffer = conwaywasm.wasmModule.getUint8Array(glbDracoResult.buffers.get(uriIndex));
|
|
89797
|
-
try {
|
|
89798
|
-
import_fs.default.writeFileSync(uri, managedBuffer);
|
|
89799
|
-
} catch (err) {
|
|
89800
|
-
Logger.error(`Error writing to file: ${err}`);
|
|
89815
|
+
for (let uriIndex = 0; uriIndex < glbResult.bufferUris.size(); uriIndex++) {
|
|
89816
|
+
const uri = glbResult.bufferUris.get(uriIndex);
|
|
89817
|
+
const managedBuffer = conwaywasm.wasmModule.getUint8Array(glbResult.buffers.get(uriIndex));
|
|
89818
|
+
try {
|
|
89819
|
+
import_fs.default.writeFileSync(uri, managedBuffer);
|
|
89820
|
+
} catch (err) {
|
|
89821
|
+
Logger.error(`Error writing to file: ${err}`);
|
|
89822
|
+
}
|
|
89801
89823
|
}
|
|
89824
|
+
} else {
|
|
89825
|
+
Logger.error("GLB generation unsuccessful");
|
|
89802
89826
|
}
|
|
89803
|
-
|
|
89804
|
-
|
|
89805
|
-
}
|
|
89806
|
-
|
|
89807
|
-
|
|
89808
|
-
}
|
|
89809
|
-
|
|
89810
|
-
|
|
89811
|
-
|
|
89812
|
-
|
|
89813
|
-
|
|
89814
|
-
|
|
89815
|
-
|
|
89816
|
-
|
|
89817
|
-
|
|
89818
|
-
|
|
89819
|
-
|
|
89820
|
-
|
|
89821
|
-
|
|
89822
|
-
|
|
89823
|
-
|
|
89824
|
-
|
|
89825
|
-
|
|
89827
|
+
glbResult.bufferUris?.delete();
|
|
89828
|
+
glbResult.buffers?.delete();
|
|
89829
|
+
}
|
|
89830
|
+
const endTimeGlb = Date.now();
|
|
89831
|
+
executionTimeInMsGlb = endTimeGlb - startTimeGlb;
|
|
89832
|
+
}
|
|
89833
|
+
if (outputGlbDraco) {
|
|
89834
|
+
const startTimeGlbDraco = Date.now();
|
|
89835
|
+
const glbDracoResults = convertor.toGltfs(aggregatedGeometry, true, true, `${fileNameNoExtension}_test_draco`);
|
|
89836
|
+
for (const glbDracoResult of glbDracoResults) {
|
|
89837
|
+
if (glbDracoResult.success) {
|
|
89838
|
+
if (glbDracoResult.buffers.size() !== glbDracoResult.bufferUris.size()) {
|
|
89839
|
+
Logger.error("Buffer size != Buffer URI size!\n");
|
|
89840
|
+
return;
|
|
89841
|
+
}
|
|
89842
|
+
for (let uriIndex = 0; uriIndex < glbDracoResult.bufferUris.size(); uriIndex++) {
|
|
89843
|
+
const uri = glbDracoResult.bufferUris.get(uriIndex);
|
|
89844
|
+
const managedBuffer = conwaywasm.wasmModule.getUint8Array(glbDracoResult.buffers.get(uriIndex));
|
|
89845
|
+
try {
|
|
89846
|
+
import_fs.default.writeFileSync(uri, managedBuffer);
|
|
89847
|
+
} catch (err) {
|
|
89848
|
+
Logger.error(`Error writing to file: ${err}`);
|
|
89849
|
+
}
|
|
89826
89850
|
}
|
|
89851
|
+
} else {
|
|
89852
|
+
console.error("GLB Draco generation unsuccessful");
|
|
89827
89853
|
}
|
|
89828
|
-
|
|
89829
|
-
|
|
89830
|
-
}
|
|
89831
|
-
|
|
89832
|
-
|
|
89833
|
-
}
|
|
89834
|
-
|
|
89835
|
-
|
|
89836
|
-
|
|
89837
|
-
|
|
89838
|
-
|
|
89839
|
-
|
|
89840
|
-
|
|
89841
|
-
|
|
89842
|
-
|
|
89854
|
+
glbDracoResult.bufferUris?.delete();
|
|
89855
|
+
glbDracoResult.buffers?.delete();
|
|
89856
|
+
}
|
|
89857
|
+
const endTimeGlbDraco = Date.now();
|
|
89858
|
+
executionTimeInMsGlbDraco = endTimeGlbDraco - startTimeGlbDraco;
|
|
89859
|
+
}
|
|
89860
|
+
if (outputGltf) {
|
|
89861
|
+
const startTimeGltf = Date.now();
|
|
89862
|
+
const gltfResults = convertor.toGltfs(aggregatedGeometry, false, false, `${fileNameNoExtension}`);
|
|
89863
|
+
for (const gltfResult of gltfResults) {
|
|
89864
|
+
if (gltfResult.success) {
|
|
89865
|
+
if (gltfResult.buffers.size() !== gltfResult.bufferUris.size()) {
|
|
89866
|
+
Logger.error("Buffer size !== Buffer URI size!\n");
|
|
89867
|
+
return;
|
|
89868
|
+
}
|
|
89869
|
+
for (let uriIndex = 0; uriIndex < gltfResult.bufferUris.size(); uriIndex++) {
|
|
89870
|
+
const uri = gltfResult.bufferUris.get(uriIndex);
|
|
89871
|
+
const managedBuffer = conwaywasm.wasmModule.getUint8Array(gltfResult.buffers.get(uriIndex));
|
|
89872
|
+
try {
|
|
89873
|
+
import_fs.default.writeFileSync(uri, managedBuffer);
|
|
89874
|
+
} catch (err) {
|
|
89875
|
+
Logger.error(`Error writing to file: ${err}`);
|
|
89876
|
+
}
|
|
89877
|
+
}
|
|
89878
|
+
} else {
|
|
89879
|
+
Logger.error("GLTF generation unsuccessful");
|
|
89843
89880
|
}
|
|
89844
|
-
|
|
89845
|
-
|
|
89846
|
-
|
|
89847
|
-
|
|
89848
|
-
|
|
89849
|
-
|
|
89850
|
-
|
|
89881
|
+
gltfResult.bufferUris?.delete();
|
|
89882
|
+
gltfResult.buffers?.delete();
|
|
89883
|
+
}
|
|
89884
|
+
const endTimeGltf = Date.now();
|
|
89885
|
+
executionTimeInMsGltf = endTimeGltf - startTimeGltf;
|
|
89886
|
+
}
|
|
89887
|
+
if (outputGltfDraco) {
|
|
89888
|
+
const startTimeGltfDraco = Date.now();
|
|
89889
|
+
const gltfResultsDraco = convertor.toGltfs(aggregatedGeometry, false, true, `${fileNameNoExtension}_draco`);
|
|
89890
|
+
for (const gltfResultDraco of gltfResultsDraco) {
|
|
89891
|
+
if (gltfResultDraco.success) {
|
|
89892
|
+
if (gltfResultDraco.buffers.size() !== gltfResultDraco.bufferUris.size()) {
|
|
89893
|
+
Logger.error("Buffer size !== Buffer URI size!\n");
|
|
89894
|
+
return;
|
|
89851
89895
|
}
|
|
89896
|
+
for (let uriIndex = 0; uriIndex < gltfResultDraco.bufferUris.size(); uriIndex++) {
|
|
89897
|
+
const uri = gltfResultDraco.bufferUris.get(uriIndex);
|
|
89898
|
+
const managedBuffer = conwaywasm.wasmModule.getUint8Array(gltfResultDraco.buffers.get(uriIndex));
|
|
89899
|
+
try {
|
|
89900
|
+
import_fs.default.writeFileSync(uri, managedBuffer);
|
|
89901
|
+
} catch (err) {
|
|
89902
|
+
Logger.error(`Error writing to file: ${err}`);
|
|
89903
|
+
}
|
|
89904
|
+
}
|
|
89905
|
+
} else {
|
|
89906
|
+
Logger.error("Draco GLTF generation unsuccessful");
|
|
89852
89907
|
}
|
|
89853
|
-
|
|
89854
|
-
|
|
89908
|
+
gltfResultDraco.bufferUris?.delete();
|
|
89909
|
+
gltfResultDraco.buffers?.delete();
|
|
89855
89910
|
}
|
|
89856
|
-
|
|
89857
|
-
|
|
89911
|
+
const endTimeGltfDraco = Date.now();
|
|
89912
|
+
executionTimeInMsGltfDraco = endTimeGltfDraco - startTimeGltfDraco;
|
|
89858
89913
|
}
|
|
89859
|
-
const endTimeGltfDraco = Date.now();
|
|
89860
|
-
const executionTimeInMsGltfDraco = endTimeGltfDraco - startTimeGltfDraco;
|
|
89861
89914
|
aggregatedGeometry.geometry.delete();
|
|
89862
89915
|
aggregatedGeometry.materials.delete();
|
|
89863
89916
|
Logger.info(`There were ${aggregatedGeometry.chunks.length} geometry chunks`);
|
|
89864
|
-
|
|
89865
|
-
|
|
89866
|
-
|
|
89867
|
-
|
|
89917
|
+
if (outputGlb)
|
|
89918
|
+
Logger.info(`GLB Generation took ${executionTimeInMsGlb} milliseconds to execute.`);
|
|
89919
|
+
if (outputGltf)
|
|
89920
|
+
Logger.info(`GLTF Generation took ${executionTimeInMsGltf} milliseconds to execute.`);
|
|
89921
|
+
if (outputGlbDraco)
|
|
89922
|
+
Logger.info(`GLB Draco Generation took ${executionTimeInMsGlbDraco} milliseconds to execute.`);
|
|
89923
|
+
if (outputGltfDraco)
|
|
89924
|
+
Logger.info(`GLTF Draco Generation took ${executionTimeInMsGltfDraco} milliseconds to execute.`);
|
|
89868
89925
|
}
|
|
89869
89926
|
function propertyExtraction(model) {
|
|
89870
89927
|
IfcPropertyExtraction.extractIFCProperties(model, true);
|
|
@@ -68490,7 +68490,7 @@ var IfcStepParser = class extends StepParser {
|
|
|
68490
68490
|
IfcStepParser.Instance = new IfcStepParser();
|
|
68491
68491
|
|
|
68492
68492
|
// compiled/src/version/version.js
|
|
68493
|
-
var versionString = "Conway Web-Ifc Shim v0.22.
|
|
68493
|
+
var versionString = "Conway Web-Ifc Shim v0.22.954";
|
|
68494
68494
|
|
|
68495
68495
|
// compiled/src/statistics/statistics.js
|
|
68496
68496
|
var Statistics = class {
|