Commit Graph
15 Commits
Author SHA1 Message Date
davideandClaude Sonnet 5 60dfd26e8b Snellisci CLAUDE.md: rimuovi duplicazione con docs/architettura.md e db-cad-index.md
La sezione Architettura ripeteva quasi verbatim il dettaglio file-per-file
gia' in docs/architettura.md e docs/db-cad-index.md, gonfiando il contesto
caricato in ogni sessione senza aggiungere informazione. Sostituita con un
riepilogo delle 5 fasi del wizard e rimandi puntuali; nessun contenuto perso,
solo spostato dove viveva gia' in dettaglio.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-21 15:41:22 +02:00
davideandClaude Sonnet 5 5c9661eb12 Fix euristica BOM, unifica script/GUI su un'unica fonte, aggiungi test integrazione/E2E
Due bug reali trovati confrontando l'estrazione BOM con la BOM ufficiale Creo:
un componente scartato per placement fallito in un file veniva bloccato per
sempre anche quando il file giusto aveva un vero placement (perdendo interi
sotto-alberi come 9256510047), e i codici con suffisso (_C01 ecc.) richiedevano
sempre placement esplicito invece dell'eccezione per occorrenze ripetute già
presente nella GUI. Entrambi corretti.

AssemblyComponentScanner reso pubblico e scripts/BomViaDb.cs, ExtractCreoStrings.cs
riscritti per referenziarlo via "#:project" invece di duplicare l'euristica:
un'unica fonte di verità condivisa da GUI e script standalone.

Aggiunti test di integrazione per Indexer.ScanAsync (mai coperto oltre al
parsing del nome file) e test end-to-end che ricostruiscono l'intera pipeline
disco -> indice -> risoluzione albero componenti senza toccare la UI.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-21 13:43:54 +02:00
davideandClaude Sonnet 5 379deec986 Remove the step_finali copy/report feature
Not needed anymore: the app no longer copies matched .stp files from
step/ into a separate step_finali/ folder, or reports which distinta
codes are still missing a STEP. Removed the "Crea cartella step_finali"
button, GeneraReportStep, and ReportStepForm/EsitoStep. Phase 5 keeps
"Verifica completezza assiemi" and the drag&drop .asm list (still how
files get sent to Creo Distributed Batch); renamed from "Verifica
completezza e STEP" to "Verifica completezza" since it's no longer about
STEP output. PulisciRawEStep now only clears raw/ and step/.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-21 11:23:46 +02:00
davideandClaude Sonnet 5 13798ad47c Add explicit working folder; rename project from CadSearchGui to PrepStep
Working folder (phase 1): CSV/raw/step/step_finali all used to live split
across two different implicit locations (CSV in the "repo root" found by
walking up for CLAUDE.md, raw/step next to the input distinta file) with
neither shown to the user. That repo-root lookup also silently breaks once
the app runs as a standalone published exe on a machine with no repo/
CLAUDE.md at all. Replaced both with one explicit "cartella di lavoro",
auto-suggested (last used, remembered the same way as the DB path) and
changeable from phase 1, with no dependency on any repo marker file.

Rename: CadSearchGui was the working name from before the app had a
product identity; renamed folders, csproj files, namespace and the
AppData settings folder to PrepStep throughout, matching the exe name
already in use. Product-facing name stays "Cevolani StepPrep".

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-21 11:18:43 +02:00
davideandClaude Sonnet 5 6726dd2216 Add app icon, product name/version, and document them
- New app.ico (from the Cevolani favicon, background made transparent and
  cropped tighter to the logo so it stays legible at 16/24px), wired up via
  ApplicationIcon in the csproj and re-read at runtime for the window icon.
- Named the product "Cevolani StepPrep" and set Version=0.1.0 in the csproj;
  shown in the window title. The CadSearchGui folder/namespace/csproj keep
  their technical name, only the product-facing name changed.
- Updated CLAUDE.md, README.md and docs/architettura.md to reflect the
  product name/version, UiStile.cs, app.ico, and that this app is a
  pre-process step ahead of Creo Distributed Batch.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-21 11:00:01 +02:00
davideandClaude Sonnet 5 6511d58b01 Parallelize raw/ copy and document overall architecture
CopiaFileTrovati now copies with Parallel.ForEach (degree 6) instead of
sequentially: the bottleneck is network latency to the share, not CPU,
so overlapping copies gives a large speedup (~5x in a synthetic
benchmark with simulated SMB latency, documented in
docs/copia-raw-parallela.md).

Also adds docs/architettura.md, a full architecture overview of every
source file, the wizard's 5 phases, dialogs, persistence and standalone
scripts.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-21 10:07:46 +02:00
davideandClaude Sonnet 5 0966e66232 Add drag&drop .asm preview and force CSV output to repo root
Fase 5 now shows the distinta's .asm files already copied to raw/ as
draggable icons, so they can be dropped straight onto Creo or Explorer
without re-hitting the DB/share. The CSV from fase 2 is now always
written to the repo root (found by walking up to CLAUDE.md) instead of
next to the input file, wherever that happens to be.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-21 09:54:06 +02:00
davideandClaude Sonnet 5 8a8a7d0417 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>
2026-09-18 08:41:01 +02:00
davideandClaude Sonnet 5 e6de563f60 Distinguish missing STEP from missing CAD source in the final report
A component with no .stp could mean two different things: the CAD source
was never found in the index at all, or it's indexed but nobody exported
the STEP yet. Cross-references the missing codes against cad_index.db
(reusing the phase-2 verification cache when available) and reports each
as EsitoStep.StepMancante vs ComponenteNonTrovato, colored differently.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-17 13:24:25 +02:00
davideandClaude Sonnet 5 1f6cb2da00 Limit step_finali to the BOM's own components
Sub-components discovered recursively in phase 4 exist only to complete
raw/, not to define what final STEP files are expected - including them
made step_finali report unrelated sub-parts as missing/created. Also drops
the now-unused _componentiRisolti field.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-17 12:26:39 +02:00
davideandClaude Sonnet 5 52d126372d Redesign the final STEP phase to build a step_finali folder
Previously it only compared the top-level BOM against step/ and reported
matches, without copying anything. Now it unions the BOM codes with the
sub-components resolved in phase 4, copies every matching .stp into a new
step_finali/ folder, and reports what got created vs what's still missing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-17 10:23:35 +02:00
davideandClaude Sonnet 5 f28cb818bd Add standalone .asm BOM-extraction scripts and format documentation
Reverse-engineered the Creo .asm binary format enough to extract referenced
component codes via a text heuristic, mirroring AssemblyComponentScanner's
approach and Form1's recursive resolution against cad_index.db. Documents
known false-positive classes (ModelView# view IDs, self-references, and
phantom references to superseded/renamed codes).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-17 09:01:45 +02:00
davideandClaude Sonnet 5 52483177f0 Add wizard UI, general-assembly resolution, and test suite
Restructure Form1 into a sequential wizard (database -> import -> raw ->
recursive component resolution -> completeness/STEP report), fix
case-sensitivity bugs in codice/tipo_file lookups and a word-boundary gap
in the assembly scanner that missed _D100-style sub-assembly references,
and treat the distinta's general assembly as an ordinary CSV row (derived
from the DBP_<codice>_<timestamp> filename) instead of special-casing it
throughout. Also adds CadSearchGui.Tests (xUnit) covering the scanner,
filename parsing, and the case-insensitive DB lookup behavior.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-16 16:25:52 +02:00
davideandClaude Sonnet 5 146ce78eae Index Unificati/Commerciali, merge cleanup buttons, report unmatched components
- Add 'Unificati' and 'Commerciali' as indexed root folders alongside the
  existing four, updating Indexer.CartelleRadice and the docs.
- Replace the separate "Pulisci cartella raw" / "Pulisci cartella step"
  buttons with a single "Pulisci raw e step" that clears both under one
  confirmation; falls back to a folder picker when no path is known yet
  in the session instead of staying disabled.
- "Trova componenti referenziati" now also writes a persistent summary
  (PRT/sub-assemblies found and copied, codes not found) to the main
  window's status line, not just the popup dialog, and reports clearly
  when no database is loaded instead of failing silently.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-16 12:05:07 +02:00
davideandClaude Sonnet 5 82a69e0d20 Add CadSearchGui: WinForms app to index and search the CAD archive
Indicizza le cartelle __Accessori, __B.end, __Corpi, __Fondi in un DB
SQLite locale ed espone una GUI di ricerca (codice, tipo, cartella,
solo ultima versione) con aggiornamento incrementale dell'indice e
stima del tempo rimanente.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-16 09:58:55 +02:00