Sepliste-XDATA fuer Separator/AS/ES-Reihenfolge + Unit-Tests, makunbound-Fix
Sammelt beim Bau von VF_n/GF_n-Ketten die Baureihenfolge der Separator-/ AS-/ES-Sub-Bloecke vor dem Block-Sweep und schreibt sie als XDATA auf den fertigen Wrapper (ssg_ks_insert.lsp); export.lsp liest sie fuer das neue "sepliste"-Feld im CSV-Export, export_neighbors.py nutzt es als Fallback zur BBox-Kollisionspruefung. Dazu Unit-Tests fuer die reinen Serialisierungs- funktionen (Chunking, Roundtrip) in test_unit.lsp. Ausserdem: makunbound (existiert nicht in BricsCAD-AutoLISP) aus test_run_all.lsp entfernt - verursachte Laufzeitfehler bei SSG_RUN_ALL_TESTS_EXPORT/_OFFEN. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+37
-1
@@ -588,7 +588,8 @@
|
||||
;; include-bbox -- Kodierung ueber csv:kos-encode (siehe dort).
|
||||
(defun csv:block-to-json (ename include-bbox / ed blk-name layer pt rotation handle attribs bbox bbox-json
|
||||
insert-quat insert-kos k-list warnung-json warnung-eintrag
|
||||
zuordnung-fix-json zuordnung-fix-eintrag)
|
||||
zuordnung-fix-json zuordnung-fix-eintrag sepliste-json sepliste-app sepliste
|
||||
sepliste-teile sepliste-first)
|
||||
(setq ed (entget ename))
|
||||
(setq blk-name (cdr (assoc 2 ed)))
|
||||
(setq layer (cdr (assoc 8 ed)))
|
||||
@@ -667,6 +668,40 @@
|
||||
(setq zuordnung-fix-json
|
||||
(strcat ",\"zuordnung_fix\":\"" (csv:json-escape (cdr zuordnung-fix-eintrag)) "\""))
|
||||
)
|
||||
;; VF_n/GF_n-Wrapper: Separator-/AS-/ES-Reihenfolge aus der beim Bau
|
||||
;; geschriebenen XDATA lesen (siehe ssg-sepliste-xdata-lesen,
|
||||
;; ssg_ks_insert.lsp) und als "sepliste"-Array einbetten. Nur gesetzt, wenn
|
||||
;; die XDATA vorhanden ist (Altbestand-Wrapper ohne die neue XDATA bleiben
|
||||
;; ohne dieses Feld - export_neighbors.py faellt dann auf den bisherigen
|
||||
;; BBox-Kollisionspfad zurueck).
|
||||
(setq sepliste-json "")
|
||||
(if (car (atoms-family 1 '("SSG-SEPLISTE-XDATA-LESEN")))
|
||||
(progn
|
||||
(setq sepliste-app
|
||||
(cond
|
||||
((wcmatch (strcase blk-name) "VF_*") "SSG_VF_SEP")
|
||||
((wcmatch (strcase blk-name) "GF_*") "SSG_GF_SEP")
|
||||
(t nil)))
|
||||
(if sepliste-app
|
||||
(setq sepliste (ssg-sepliste-xdata-lesen ename sepliste-app)))
|
||||
(if sepliste
|
||||
(progn
|
||||
(setq sepliste-teile "" sepliste-first t)
|
||||
(foreach e sepliste
|
||||
(setq sepliste-teile
|
||||
(strcat sepliste-teile (if sepliste-first "" ",")
|
||||
"{\"typ\":\"" (nth 0 e) "\""
|
||||
",\"lfdnr\":" (itoa (nth 1 e))
|
||||
",\"x\":" (rtos (nth 2 e) 2 2)
|
||||
",\"y\":" (rtos (nth 3 e) 2 2)
|
||||
"}"))
|
||||
(setq sepliste-first nil)
|
||||
)
|
||||
(setq sepliste-json (strcat ",\"sepliste\":[" sepliste-teile "]"))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(strcat
|
||||
" {\"block_name\":\"" (csv:json-escape blk-name) "\""
|
||||
",\"layer\":\"" (csv:json-escape layer) "\""
|
||||
@@ -684,6 +719,7 @@
|
||||
bbox-json
|
||||
warnung-json
|
||||
zuordnung-fix-json
|
||||
sepliste-json
|
||||
"}"
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user