[CHANGE] Eckverbindungen werden nun als T-Verbindung gezählt und ausgewiesen

This commit is contained in:
2026-10-09 08:12:04 +02:00
parent 690938157f
commit 5ae1fc308c
5 changed files with 69 additions and 64 deletions
+19 -26
View File
@@ -277,6 +277,13 @@
)
)
;; Bildet den intern klassifizierten Typ auf den Anzeigetyp ab.
;; Eckverbindungen werden als T-Verbindungen ausgegeben, da derselbe
;; Gerüstverbinder verbaut wird.
(defun display-type (typ)
(if (= typ "Eckverbindung") "T-Verbindung" typ)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; DRAW
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -339,12 +346,10 @@
;; TEXTDATEI-EXPORT
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun write-report (all-pts filepath layers / f n-kr n-tv n-ek n-kontakt n-gesamt)
(setq n-kr (count-by-type all-pts "Kreuzung"))
(setq n-tv (count-by-type all-pts "T-Verbindung"))
(setq n-ek (count-by-type all-pts "Eckverbindung"))
(setq n-kontakt (+ n-tv n-ek))
(setq n-gesamt (length all-pts))
(defun write-report (all-pts filepath layers / f n-kr n-tv n-gesamt)
(setq n-kr (count-by-type all-pts "Kreuzung"))
(setq n-tv (count-by-type all-pts "T-Verbindung"))
(setq n-gesamt (length all-pts))
(setq f (open filepath "w"))
(if (not f)
@@ -372,20 +377,10 @@
(write-line " VERBINDUNGSTYPEN" f)
(write-line "------------------------------------------------" f)
(write-line "" f)
(write-line (strcat " Kreuzungen : " (itoa n-kr)) f)
(write-line (strcat " T-Verbindungen : " (itoa n-tv)) f)
(write-line (strcat " Eckverbindungen : " (itoa n-ek)) f)
(write-line (strcat " Kreuzungen : " (itoa n-kr)) f)
(write-line (strcat " T-Verbindungen : " (itoa n-tv)) f)
(write-line "" f)
(write-line "------------------------------------------------" f)
(write-line " SUMMEN" f)
(write-line "------------------------------------------------" f)
(write-line "" f)
(write-line (strcat " Kreuzungen : " (itoa n-kr)) f)
(write-line (strcat " Kontaktpunkte (T + Eck) : " (itoa n-kontakt)) f)
(write-line (strcat " davon T-Verbindungen : " (itoa n-tv)) f)
(write-line (strcat " davon Eckverbindungen : " (itoa n-ek)) f)
(write-line "" f)
(write-line (strcat " GESAMT : " (itoa n-gesamt)) f)
(write-line (strcat " GESAMT : " (itoa n-gesamt)) f)
(write-line "" f)
(write-line "================================================" f)
(close f)
@@ -514,7 +509,6 @@
(ensure-layer "D-KREUZUNG" 1)
(ensure-layer "D-T_VERBINDUNG" 3)
(ensure-layer "D-ECKVERBINDUNG" 5)
(prompt (strcat "\nLinien gefunden: " (itoa (length lines))))
@@ -536,11 +530,11 @@
(setq typ (cdr result)) ;; Typ — direkt aus find-intersection
(if (not (point-exists pt all-pts tol))
(progn
(setq typ (display-type typ))
(setq all-pts (cons (list (car pt) (cadr pt) typ) all-pts))
(cond
((= typ "Kreuzung") (create-circle pt radius "D-KREUZUNG"))
((= typ "T-Verbindung") (create-circle pt radius "D-T_VERBINDUNG"))
((= typ "Eckverbindung") (create-circle pt radius "D-ECKVERBINDUNG"))
((= typ "Kreuzung") (create-circle pt radius "D-KREUZUNG"))
((= typ "T-Verbindung") (create-circle pt radius "D-T_VERBINDUNG"))
)
)
)
@@ -554,10 +548,9 @@
)
(prompt "\n\n===== ERGEBNIS =====")
(prompt (strcat "\nKreuzungen: " (itoa (count-by-type all-pts "Kreuzung"))))
(prompt (strcat "\nKreuzungen: " (itoa (count-by-type all-pts "Kreuzung"))))
(prompt (strcat "\nT-Verbindungen: " (itoa (count-by-type all-pts "T-Verbindung"))))
(prompt (strcat "\nEckverbindungen: " (itoa (count-by-type all-pts "Eckverbindung"))))
(prompt (strcat "\nGESAMT: " (itoa (length all-pts))))
(prompt (strcat "\nGESAMT: " (itoa (length all-pts))))
;; ── Report schreiben ──────────────────────────────────────
(setq dwg-name