[76] PDF-Import: Kreise/Bögen, Strichmuster, Clips, Zwei-Punkt-Kalibrierung
- Rust pdf_geom.rs: Kreis/Bogen aus Bézier-Folgen (Toleranz relativ zum Radius), Clip-Bereiche (Rechteck exakt, Polygon für Linien exakt, Flächen bei konvexem Clip exakt); pdf_vector.rs wendet W/W*, Form-/Seiten-BBox an, Texte ausserhalb entfallen, ungerade Strichmuster verdoppelt. - Kurven kommen als Contour.curve (circle/arc) in die DXF-Import-Form, damit Mitte/Quadrant fangbar sind. - Strichmuster: Muster in Papier-mm je Ebene, passender Linienstil oder neuer „PDF-Strich"-Stil. - Import-Dialog „PDF importieren" mit Zwei-Punkt-Kalibrierung (Vorschau, Fang, wahre Länge → Massstab). Claude-Session: https://claude.ai/code/session_01NTYBZBvLYCtugMJoKXaB67
This commit is contained in:
18 files changed
+1782
-36
No files matched your search
@@ -21,6 +21,7 @@ import { buildDrawings } from "../ui/ImportDialog";
|
||||
import { distinctImportLayers, planImportCategories } from "../io/dxfToDrawings";
|
||||
import type { ImportDecision, PdfImportOptions } from "../ui/ImportDialog";
|
||||
import { isPdfFile, pdfPageToImport, readPdfVectorPage } from "../io/pdfVector";
|
||||
import { planDashLineStyles } from "../io/pdfLineStyles";
|
||||
import type { PdfVectorPage } from "../io/pdfVector";
|
||||
import { exportScheduleCsv } from "../export/exportSchedule";
|
||||
import { exportIfcSpf } from "../export/exportIfc";
|
||||
@@ -297,6 +298,7 @@ export function useProjectFileActions(
|
||||
widthPt: page.width,
|
||||
heightPt: page.height,
|
||||
images: page.images,
|
||||
preview: page,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -693,12 +695,22 @@ export function useProjectFileActions(
|
||||
setProject((p) => ({ ...p, layers: [...p.layers, parent] }));
|
||||
}
|
||||
}
|
||||
// PDF-Strichmuster ([76]): passenden Linienstil nehmen oder Strichmuster-Stil anlegen (vor den Zeichnungen).
|
||||
const dashPlan = planDashLineStyles(decision.parsed.layerDashes, project.lineStyles);
|
||||
if (dashPlan.created.length) {
|
||||
const created = dashPlan.created;
|
||||
setProject((p) => ({
|
||||
...p,
|
||||
lineStyles: [...p.lineStyles, ...created.filter((c) => !p.lineStyles.some((l) => l.id === c.id))],
|
||||
}));
|
||||
}
|
||||
let drawings = buildDrawings(
|
||||
decision,
|
||||
levelId,
|
||||
project,
|
||||
activeCategoryCode,
|
||||
codeByLayer,
|
||||
dashPlan.styleByLayer,
|
||||
);
|
||||
// Platzierung „viewCenter": den Gesamt-Umriss so verschieben, dass seine
|
||||
// Mitte auf die Mitte des aktuellen Ausschnitts fällt (sonst bleibt alles an
|
||||
|
||||
Reference in new issue
Block a user