Resolve UNI family-table hardware (screws/nuts/washers) as components
These appear in the .asm binary as a family-table instance name (e.g. "R6--_-_U6592<UNI6592>"), not a separate file on disk - only the generic "uni6592.prt" is actually indexed. Extract just the "<UNI...>" content instead of the full instance name, in both the standalone script and the production scanner, so standard hardware stops being silently dropped as "not found in index". Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
52d126372d
commit
338a7327a0
4 files changed
+55
-2
No files matched your search
@@ -67,6 +67,22 @@ public class AssemblyComponentScannerTests
|
||||
finally { File.Delete(percorso); }
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Estrae_il_codice_generico_da_istanze_di_family_table_UNI()
|
||||
{
|
||||
// Visto su 9244228576.asm: le viti normalizzate compaiono come istanza di family
|
||||
// table "R12--_-_U6592<UNI6592>", ma il file reale indicizzato è "uni6592.prt".
|
||||
string percorso = ScriviAsmFinto(
|
||||
"Componente ID 1 (R12--_-_U6592<UNI6592>.PRT) x Componente ID 2 (R12--_-_U6592<UNI6592>.PRT)");
|
||||
try
|
||||
{
|
||||
var codici = AssemblyComponentScanner.EstraiCodiciReferenziati(percorso);
|
||||
Assert.Contains("UNI6592", codici);
|
||||
Assert.DoesNotContain("R12--_-_U6592<UNI6592>", codici);
|
||||
}
|
||||
finally { File.Delete(percorso); }
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void File_inesistente_lancia_eccezione_IO() =>
|
||||
Assert.Throws<DirectoryNotFoundException>(() =>
|
||||
|
||||
Reference in new issue
Block a user