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
@@ -20,11 +20,16 @@ namespace CadSearchGui;
|
||||
/// Falso positivo noto ed escluso: gli ID interni di viste salvate, nel formato
|
||||
/// "ModelView#<numero>", hanno la stessa forma di un codice (8-12 cifre) e
|
||||
/// compaiono più volte come un riferimento vero. Vedi docs/formato-asm.md.
|
||||
///
|
||||
/// Viti/dadi/rosette normalizzati UNI sono family table Creo: il nome che compare nel
|
||||
/// binario (es. "R6--_-_U6592<UNI6592>") è la singola istanza, non un file separato
|
||||
/// su disco - il file reale indicizzato è il generico "uni6592.prt.<versione>", quindi
|
||||
/// va estratto solo il contenuto tra "<" e ">". Vedi docs/formato-asm.md.
|
||||
/// </summary>
|
||||
static class AssemblyComponentScanner
|
||||
{
|
||||
private static readonly Regex CodiceRegex = new(
|
||||
@"(?<!ModelView#)\b\d{8,12}(?:_[A-Za-z]\d{2,4}|[A-Za-z]{0,2})\b", RegexOptions.Compiled);
|
||||
@"(?<!ModelView#)\b\d{8,12}(?:_[A-Za-z]\d{2,4}|[A-Za-z]{0,2})\b|(?<=<)UNI\d+(?=>)", RegexOptions.Compiled);
|
||||
private const int OccorrenzeMinime = 2;
|
||||
|
||||
public static HashSet<string> EstraiCodiciReferenziati(string percorsoAsm)
|
||||
|
||||
Reference in new issue
Block a user