Recognize commercial parts with alphabetic names in .asm scanning
Pro-E numeric codes cover most components, but parts downloaded as STEP from online catalogs (rings, bushings, knobs...) get alphabetic Creo names with no predictable shape. Add a second extraction path that tokenizes the binary generically and validates candidates against the known codes in cad_index.db, applying the same placement/occurrence rule used for bare numeric codes. Numeric extraction is unchanged, so missing-from-index reporting for renamed/moved Pro-E codes still works. Also load all known prt/asm codes once per scan instead of one query per candidate, in both RisolviAlberoComponenti and VerificaCompletezzaAssiemi. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c75dd21551
commit
8a8a7d0417
7 files changed
+363
-106
No files matched your search
@@ -0,0 +1,18 @@
|
||||
#:package Microsoft.Data.Sqlite@10.0.12
|
||||
// dotnet run scripts/Query.cs -- <cad_index.db> <sql>
|
||||
using Microsoft.Data.Sqlite;
|
||||
|
||||
using var connection = new SqliteConnection($"Data Source={args[0]};Mode=ReadOnly");
|
||||
connection.Open();
|
||||
using var command = connection.CreateCommand();
|
||||
command.CommandText = args[1];
|
||||
using var reader = command.ExecuteReader();
|
||||
int righe = 0;
|
||||
while (reader.Read())
|
||||
{
|
||||
righe++;
|
||||
var valori = Enumerable.Range(0, reader.FieldCount).Select(i => reader.IsDBNull(i) ? "" : reader.GetValue(i).ToString());
|
||||
Console.WriteLine(string.Join(" | ", valori));
|
||||
}
|
||||
Console.WriteLine($"({righe} righe)");
|
||||
return 0;
|
||||
Reference in new issue
Block a user