refactor: KS_PRUEFEN schreibt dx/dy/dz je 2D/3D in eigene Spalten

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-24 14:03:09 +02:00
parent 328b62ceec
commit 27c7101f79
+7 -2
View File
@@ -27,6 +27,10 @@
(max (abs (- (car a) (car b))) (abs (- (cadr a) (cadr b))) (abs (- (caddr a) (caddr b))))
nil))
;; i-te Komponente (0=x,1=y,2=z) eines Punktes als String, oder "-"
(defun ksp-comp (p i)
(if p (rtos (nth i p) 2 3) "-"))
;; (dx dy dz) = aus - ein (nil wenn einer fehlt)
(defun ksp-delta (ein aus)
(if (and ein aus)
@@ -72,7 +76,8 @@
(strcat base ";"
(ksp-pt-str e2) ";" (ksp-pt-str e3) ";" (if ediff (rtos ediff 2 3) "-") ";"
(ksp-pt-str a2) ";" (ksp-pt-str a3) ";" (if adiff (rtos adiff 2 3) "-") ";"
(ksp-pt-str d2) ";" (ksp-pt-str d3) ";" status))
(ksp-comp d2 0) ";" (ksp-comp d2 1) ";" (ksp-comp d2 2) ";"
(ksp-comp d3 0) ";" (ksp-comp d3 1) ";" (ksp-comp d3 2) ";" status))
(defun c:KS_PRUEFEN ( / basis dir dat2 dat3 basen f base rows fh fpath n)
;; vf_core (extract-ks-from-block) sicherstellen
@@ -108,7 +113,7 @@
"/ks_pruefung.csv"))
(setq fh (open fpath "w"))
(if (null fh) (progn (alert (strcat "Kann Ausgabedatei nicht schreiben: " fpath)) (exit)))
(write-line "Block;KS_EIN_2D;KS_EIN_3D;EIN_diff;KS_AUS_2D;KS_AUS_3D;AUS_diff;dxyz_2D(aus-ein);dxyz_3D(aus-ein);Status" fh)
(write-line "Block;KS_EIN_2D;KS_EIN_3D;EIN_diff;KS_AUS_2D;KS_AUS_3D;AUS_diff;dx_2D;dy_2D;dz_2D;dx_3D;dy_3D;dz_3D;Status" fh)
(setq n 0)
(foreach r rows (write-line r fh) (setq n (1+ n)))
(close fh)