AMF (Additive Manufacturing File Format) Constellation Builder

AMF (Additive Manufacturing File) Constellation Builder

Generate XML structure for multi-object, multi-material 3D printing.

I. Generated AMF XML Structure

II. Configuration Summary

Parameter Value Description
Project NameMulti-Color PrototypeOverall job reference.
Unit ScalemillimeterStandard unit for dimensions.
Total Objects0Number of geometry instances.
Materials Defined0Number of custom materials (M1, M2, etc.).

Define Object Instance

Constellation List

Project Metadata

Material Definitions (for M1, M2, M3)

Define the color properties for the first three materials (R, G, B values 0-1).

No objects added yet.

'; return; } objects.forEach(obj => { const item = document.createElement('div'); item.className = 'amfc-list-item'; item.innerHTML = ` [ID ${obj.id}] ${obj.type}: Pos (${obj.posX}, ${obj.posY}) Mat: ${obj.materialId} `; container.appendChild(item); }); }; window.amfcAddObject = function() { const type = document.getElementById('in-object-type').value; const materialId = document.getElementById('in-material-id').value; const posX = parseFloat(document.getElementById('in-pos-x').value) || 0; const posY = parseFloat(document.getElementById('in-pos-y').value) || 0; const rotZ = parseFloat(document.getElementById('in-rot-z').value) || 0; const newId = objectIdCounter++; objects.push({ id: newId, type, materialId, posX, posY, rotZ }); amfcRenderObjectList(); amfcGenerate(); }; window.amfcDeleteObject = function(id) { objects = objects.filter(obj => obj.id !== id); amfcRenderObjectList(); amfcGenerate(); }; // --- Sync & Event Listeners --- document.querySelectorAll('.amfc-input, .amfc-select').forEach(el => { el.addEventListener('input', amfcGenerate); el.addEventListener('change', amfcGenerate); }); // Initial Render amfcRenderObjectList(); amfcGenerate(); // --- Navigation --- window.amfcSwitchTab = function(tabId, btnElement) { document.querySelectorAll('.amfc-tab-pane').forEach(el => el.classList.remove('active')); document.querySelectorAll('.amfc-tab-btn').forEach(el => el.classList.remove('active')); document.getElementById(tabId).classList.add('active'); if(btnElement) { btnElement.classList.add('active'); } else { const idx = parseInt(tabId.split('-')[2]) - 1; document.querySelectorAll('.amfc-tab-btn')[idx].classList.add('active'); } if (tabId === 'amfc-tab-1') amfcGenerate(); }; window.amfcNextTab = function(n) { amfcSwitchTab('amfc-tab-' + n); }; window.amfcPrevTab = function(n) { amfcSwitchTab('amfc-tab-' + n); }; // --- PDF Export --- document.getElementById('amfc-download-btn').addEventListener('click', function() { amfcGenerate(); const element = document.getElementById('amfc-pdf-content'); const footer = element.querySelector('.amfc-pdf-footer'); // Show footer for PDF footer.style.display = 'block'; const opt = { margin: 0.3, filename: document.getElementById('conf-project-name').value.replace(/\s+/g, '_') + '_AMF_Blueprint.pdf', image: { type: 'jpeg', quality: 0.98 }, html2canvas: { scale: 2, backgroundColor: '#ffffff' }, jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait' } }; html2pdf().set(opt).from(element).save().then(function(){ footer.style.display = 'none'; }); }); });
Scroll to Top