Fix PCTG filament misidentified as PC (#478)

This commit is contained in:
maziggy
2026-02-21 10:01:26 +01:00
parent e6236301b4
commit 7d46b44561
7 changed files with 13 additions and 7 deletions
@@ -80,7 +80,7 @@ interface ConfigureAmsSlotModalProps {
}
// Known filament material types
const MATERIAL_TYPES = ['PLA', 'PETG', 'ABS', 'ASA', 'TPU', 'PC', 'PA', 'NYLON', 'PVA', 'HIPS', 'PP', 'PET'];
const MATERIAL_TYPES = ['PLA', 'PETG', 'PCTG', 'ABS', 'ASA', 'TPU', 'PC', 'PA', 'NYLON', 'PVA', 'HIPS', 'PP', 'PET'];
// Extract filament type from preset name by finding known material type
function parsePresetName(name: string): { material: string; brand: string; variant: string } {
@@ -390,6 +390,9 @@ export function ConfigureAmsSlotModal({
} else if (material.includes('TPU')) {
tempMin = 200;
tempMax = 240;
} else if (material === 'PCTG') {
tempMin = 220;
tempMax = 260;
} else if (material.includes('PC')) {
tempMin = 260;
tempMax = 300;
@@ -22,7 +22,7 @@ import { useToast } from '../contexts/ToastContext';
import { useAuth } from '../contexts/AuthContext';
// Known material types for name-parsing fallback
const MATERIAL_TYPES = ['PLA', 'PETG', 'ABS', 'ASA', 'TPU', 'PC', 'PA', 'PVA', 'HIPS', 'PP', 'PET', 'NYLON'];
const MATERIAL_TYPES = ['PLA', 'PETG', 'PCTG', 'ABS', 'ASA', 'TPU', 'PC', 'PA', 'PVA', 'HIPS', 'PP', 'PET', 'NYLON'];
const FILAMENT_TYPE_COLORS: Record<string, string> = {
PLA: 'E8E8E8', PETG: '4A90D9', ABS: 'E67E22', ASA: 'D35400',
+1 -1
View File
@@ -36,7 +36,7 @@ export function parsePresetName(name: string): { brand: string; material: string
const materials = [
'PLA-CF', 'PETG-CF', 'ABS-GF', 'ASA-CF', 'PA-CF', 'PAHT-CF', 'PA6-CF', 'PA6-GF',
'PPA-CF', 'PPA-GF', 'PET-CF', 'PPS-CF', 'PC-CF', 'PC-ABS', 'ABS-GF',
'PETG', 'PLA', 'ABS', 'ASA', 'PC', 'PA', 'TPU', 'PVA', 'HIPS', 'BVOH', 'PPS', 'PCTG', 'PEEK', 'PEI',
'PCTG', 'PETG', 'PLA', 'ABS', 'ASA', 'PC', 'PA', 'TPU', 'PVA', 'HIPS', 'BVOH', 'PPS', 'PEEK', 'PEI',
];
// Find material in the name