MCPcopy Create free account
hub / github.com/TechJeeper/Printventory / extractGeometry

Function extractGeometry

parse-worker.js:102–121  ·  view source on GitHub ↗
(geometry, matrix, transferables)

Source from the content-addressed store, hash-verified

100 if (extract && typeof extract.zipHasSplitModelParts === 'function' && extract.zipHasSplitModelParts(names)) {
101 return true;
102 }
103 let modelBytes = 0;
104 for (let i = 0; i < names.length; i++) {
105 if (!names[i].toLowerCase().endsWith('.model')) continue;
106 const part = zip[names[i]];
107 modelBytes += part && part.length ? part.length : 0;
108 if (modelBytes > FAST_3MF_XML_BYTES) return true;
109 }
110 return false;
111}
112
113function parse3mfFastFromZip(zip) {
114 const extract = self.ThreeMFMeshExtract;
115 if (!extract || typeof extract.extractAllMeshesFast !== 'function') {
116 throw new Error('3MF fast extractor is not available');
117 }
118 const names = zipKeys(zip);
119 const xmlParts = [];
120 for (let i = 0; i < names.length; i++) {
121 if (!names[i].toLowerCase().endsWith('.model')) continue;
122 xmlParts.push(decodeZipText(zip[names[i]]));
123 }
124 if (xmlParts.length === 0) {

Callers 1

processObjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected