Files
huanld 6cd126af41
Release pipeline / Get version (push) Has been cancelled
Release pipeline / Get Chart Name (push) Has been cancelled
Release pipeline / tests (push) Has been cancelled
Release pipeline / builds (push) Has been cancelled
Release pipeline / builds-ghcr (push) Has been cancelled
Release pipeline / test-deployments (push) Has been cancelled
Release pipeline / deploy (push) Has been cancelled
Release pipeline / Helm chart oci (push) Has been cancelled
Release pipeline / npm (push) Has been cancelled
Release pipeline / snyk (push) Has been cancelled
feat: custom IFC converter with C++ geometry injection
- Add custom IFC converter using web-ifc C++ DLL for geometry extraction
- Add GeometryInjector.cs: patches Speckle objects with mesh geometry
- Add NativeIfcGeometry.cs: P/Invoke bindings to WebIfcDll
- Add CustomMeshConverterFactory.cs: custom Xbim mesh converter
- Configure fileimport-service dotnet IFC pipeline
- Add VPS deployment config (docker-compose-vps.yml)
- Add dev scripts: run_backend.bat, run_frontend.bat, start_dev.bat
- Update .gitignore: exclude scratch/IFC-toolkit, engine_web-ifc
- Memory optimization for Xbim (MemoryModel mode)
2026-04-16 06:46:41 +07:00

73 lines
2.6 KiB
JavaScript

// Check small file geometry count
const http = require('http');
function fetchObj(streamId, objectId) {
return new Promise((resolve, reject) => {
const req = http.request({
hostname: '127.0.0.1', port: 3000,
path: `/objects/${streamId}/${objectId}/single`,
method: 'GET', headers: { 'Accept': 'application/json' }
}, (res) => {
let body = '';
res.on('data', d => body += d);
res.on('end', () => { try { resolve(JSON.parse(body)); } catch(e) { resolve(null); } });
});
req.on('error', reject);
req.end();
});
}
function gql(q) {
return new Promise((resolve, reject) => {
const data = JSON.stringify({ query: q });
const req = http.request({
hostname: '127.0.0.1', port: 3000, path: '/graphql',
method: 'POST',
headers: { 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(data) }
}, (res) => {
let body = '';
res.on('data', d => body += d);
res.on('end', () => resolve(JSON.parse(body)));
});
req.on('error', reject);
req.write(data);
req.end();
});
}
async function main() {
// Get all models
const result = await gql(`{ project(id: "5acd4310c0") { models { items { id name } } } }`);
const models = result.data?.project?.models?.items || [];
console.log('Models:', models.map(m => `${m.name} (${m.id})`).join(', '));
// Also check the small file project
const result2 = await gql(`{ project(id: "10891fe0fa") { models { items { id name versions(limit:1) { items { id referencedObject } } } } } }`);
const models2 = result2.data?.project?.models?.items || [];
for (const m of models2) {
const ver = m.versions?.items?.[0];
if (!ver?.referencedObject) continue;
console.log(`\nSmall file model: ${m.name}`);
const root = await fetchObj('10891fe0fa', ver.referencedObject);
if (!root) continue;
console.log('Root type:', root.speckle_type, 'keys:', Object.keys(root).join(', '));
// Walk first few children
const elements = root.elements || [];
if (Array.isArray(elements)) {
for (let i = 0; i < Math.min(elements.length, 2); i++) {
const el = elements[i];
if (el?.referencedId) {
const child = await fetchObj('10891fe0fa', el.referencedId);
if (child) {
const hasDisplay = 'displayValue' in child;
console.log(` Child: ${child.name || 'unnamed'} [${child.speckle_type}] displayValue: ${hasDisplay ? (Array.isArray(child.displayValue) ? child.displayValue.length + ' items' : typeof child.displayValue) : 'NONE'}`);
}
}
}
}
}
}
main().catch(console.error);