produzione 1 #9

Merged
JoeKung merged 135 commits from dev into main 2026-03-03 09:58:04 +01:00
5 changed files with 29 additions and 10 deletions
Showing only changes of commit 4f301b1652 - Show all commits

View File

@@ -91,9 +91,9 @@
></app-select>
} @else {
<app-select
formControlName="printSpeed"
[label]="'CALC.PRINT_SPEED' | translate"
[options]="printSpeeds"
formControlName="nozzleDiameter"
[label]="'CALC.NOZZLE' | translate"
[options]="nozzleDiameters"
></app-select>
}
</div>

View File

@@ -47,10 +47,11 @@ export class UploadFormComponent {
{ label: 'Alta definizione', value: 'High' }
];
printSpeeds = [
{ label: 'Slow (High Quality)', value: 'Slow' },
{ label: 'Standard', value: 'Standard' },
{ label: 'Fast (Draft)', value: 'Fast' }
nozzleDiameters = [
{ label: '0.2 mm (+2 CHF)', value: 0.2 },
{ label: '0.4 mm (Standard)', value: 0.4 },
{ label: '0.6 mm (+2 CHF)', value: 0.6 },
{ label: '0.8 mm (+2 CHF)', value: 0.8 }
];
infillPatterns = [
@@ -66,7 +67,7 @@ export class UploadFormComponent {
{ label: '0.16 mm', value: 0.16 },
{ label: '0.20 mm (Standard)', value: 0.20 },
{ label: '0.24 mm', value: 0.24 },
{ label: '0.28 mm (Draft - Fast)', value: 0.28 }
{ label: '0.28 mm', value: 0.28 }
];
acceptedFormats = '.stl,.3mf,.step,.stp,.obj,.amf,.ply,.igs,.iges';
@@ -76,12 +77,13 @@ export class UploadFormComponent {
itemsTouched: [false], // Hack to track touched state for custom items list
material: ['PLA', Validators.required],
quality: ['Standard', Validators.required],
printSpeed: ['Standard', Validators.required],
// Print Speed removed
notes: [''],
// Advanced fields
// Color removed from global form
infillDensity: [20, [Validators.min(0), Validators.max(100)]],
layerHeight: [0.2, [Validators.min(0.05), Validators.max(1.0)]],
nozzleDiameter: [0.4, Validators.required],
infillPattern: ['grid'],
supportEnabled: [false]
});

View File

@@ -13,6 +13,8 @@ export interface QuoteRequest {
infillDensity?: number;
infillPattern?: string;
supportEnabled?: boolean;
layerHeight?: number;
nozzleDiameter?: number;
mode: 'easy' | 'advanced';
}
@@ -77,6 +79,8 @@ export class QuoteEstimatorService {
if (request.infillDensity) formData.append('infill_density', request.infillDensity.toString());
if (request.infillPattern) formData.append('infill_pattern', request.infillPattern);
if (request.supportEnabled) formData.append('support_enabled', 'true');
if (request.layerHeight) formData.append('layer_height', request.layerHeight.toString());
if (request.nozzleDiameter) formData.append('nozzle_diameter', request.nozzleDiameter.toString());
}
const headers: any = {};
@@ -123,7 +127,13 @@ export class QuoteEstimatorService {
observer.next(100);
// Calculate Results
const setupCost = 10;
// Base setup cost
let setupCost = 10;
// Surcharge for non-standard nozzle
if (request.nozzleDiameter && request.nozzleDiameter !== 0.4) {
setupCost += 2;
}
const items: QuoteItem[] = [];

View File

@@ -25,6 +25,12 @@
"QUALITY": "Quality",
"QUANTITY": "Quantity",
"NOTES": "Additional Notes",
"NOZZLE": "Nozzle Diameter",
"INFILL": "Infill (%)",
"PATTERN": "Infill Pattern",
"LAYER_HEIGHT": "Layer Height",
"SUPPORT": "Supports",
"SUPPORT_DESC": "Enable supports for overhangs",
"CALCULATE": "Calculate Quote",
"RESULT": "Estimated Quote",
"TIME": "Print Time",

View File

@@ -30,6 +30,7 @@
"INFILL": "Riempimento (%)",
"PATTERN": "Pattern di riempimento",
"LAYER_HEIGHT": "Altezza Layer",
"NOZZLE": "Diametro Ugello",
"SUPPORT": "Supporti",
"SUPPORT_DESC": "Abilita supporti per sporgenze",
"CALCULATE": "Calcola Preventivo",