Etagenförderer auch editierbar gemacht.
This commit is contained in:
@@ -93,7 +93,7 @@ Detaillierte Dokumentation aller Funktionen und Befehle: siehe `Lisp/README.md`.
|
||||
| `ssg_dialog.lsp` | - | DCL-Dialog-Vorlagen und Hilfsfunktionen |
|
||||
| `ssg_layer.lsp` | - | Layer-Verwaltung |
|
||||
| `KreiselInsert.lsp` | KreiselInsert, KreiselConnect, KreiselRedraw, KreiselQuick, KreiselEdit, KreiselParams, KreiselLabelSetup, KreiselLabelPos, KreiselLabelHoehe, ILS_Eckrad | ILS Kreisel und Eckrad komplett in AutoLISP |
|
||||
| `VarioFoerderer.lsp` (Wrapper fuer `vf_core.lsp`/`vf_standard.lsp`/`vf_etage.lsp`/`vf_linienzug.lsp`) | FOERDERANLAGE, VARIOFOERDERER_EDIT, Vario_Kette_Merge | Vario-Foerderanlagen Generator (Typen Standard/Etage/Linienzug); Standardfall + Werteingabe per DCL-Dialog (`vfs-standard-dialog-ablauf` in vf_standard.lsp); Doppelklick auf VF_n-Block ruft VARIOFOERDERER_EDIT (nur fuer per Dialog erstellte Standard-Bloecke, erkannt an XDATA); `Vario_Kette_Merge` (in vf_linienzug.lsp) fuehrt mehrere einzeln gebaute VF_n-Bloecke ab einem gewaehlten Start-Baustein ueber die reale KS_AUS->KS_EIN-Nachbarschaft zu einem Gesamt-Block zusammen (aggregierte Attribute, Luecken-Erkennung) |
|
||||
| `VarioFoerderer.lsp` (Wrapper fuer `vf_core.lsp`/`vf_standard.lsp`/`vf_etage.lsp`/`vf_linienzug.lsp`) | FOERDERANLAGE, VARIOFOERDERER_EDIT, Vario_Kette_Merge | Vario-Foerderanlagen Generator (Typen Standard/Etage/Linienzug); Standard- UND Etage-Typ: Werteingabe per DCL-Dialog (`vfs-standard-dialog-ablauf` in vf_standard.lsp bzw. `vfe-etage-dialog-ablauf` in vf_etage.lsp, beide nutzen dieselben Dialoge `vfs-dialog-eingabe-basis`/`vfs-dialog-winkel-verteilung`); Doppelklick auf VF_n-Block ruft VARIOFOERDERER_EDIT, das per SSG_VF_EDIT-XDATA-Marker ("standard"/"etage") in den passenden Neuaufbau-Zweig dispatcht (`vfe-edit-ent` fuer Etage); Linienzug-/Altbestand-Bloecke ohne Marker werden abgewiesen; `Vario_Kette_Merge` (in vf_linienzug.lsp) fuehrt mehrere einzeln gebaute VF_n-Bloecke ab einem gewaehlten Start-Baustein ueber die reale KS_AUS->KS_EIN-Nachbarschaft zu einem Gesamt-Block zusammen (aggregierte Attribute, Luecken-Erkennung) |
|
||||
| `Gefaellestrecke.lsp` | GEFAELLESTRECKE, GEFAELLESTRECKE_EDIT | Gefaelle-Foerderanlage (AUS -> Staustrecke skaliert -> Separator -> EIN); Modus 1 per DCL-Dialog (Einfuegehoehe, Element-Winkel 30/90); Doppelklick auf GF_n-Block ruft GEFAELLESTRECKE_EDIT (Dialog vorbelegt, Neuaufbau) |
|
||||
| `export.lsp` | EXPORTSIVAS, EXPORTCSV, OMNI_UPDATE_ATTRIBS | JSON-Sammlung und Python-Export (Omniflo-Merkmale/Sum-Zeile via lib/export_csv.py) |
|
||||
| `OmniModulInsert.lsp` | OMNI_LOAD, OMNI_APB_*, OMNI_W*_*, OMNI_AP60/AP110, OMNI_TEF_*, OMNI_TV_*, OMNI_APBW_*, OMNI_EDIT | Omniflo-Komponenten: Boegen, Weichen, Verbinder, Transferwagen, Edit-Dialog |
|
||||
|
||||
+15
-11
@@ -1288,12 +1288,14 @@
|
||||
(setq vf-nummer (vf-next-number))
|
||||
(princ (ssg-textf "vfc-naechste-vf-nummer" (list (itoa vf-nummer))))
|
||||
|
||||
;; 2b. Standardfall (anlage-typ "standard") + Werteingabe -> DCL-Dialog
|
||||
;; (dcl/variofoerderer.dcl, siehe vf_standard.lsp: vfs-standard-dialog-ablauf).
|
||||
;; 3D-Linie-Eingabe und alle anderen Anlagen-Typen (Etage, Linienzug) bleiben
|
||||
;; unveraendert interaktiv (fallen unten in den bestehenden Konsolen-Ablauf,
|
||||
;; der die Eingabemodus-Frage dabei erneut stellt - siehe vf-eingabe-abfragen).
|
||||
(if (= anlage-typ "standard")
|
||||
;; 2b. Standard- ODER Etage-Typ + Werteingabe -> DCL-Dialog
|
||||
;; (dcl/variofoerderer.dcl; Standard: vfs-standard-dialog-ablauf in
|
||||
;; vf_standard.lsp, Etage: vfe-etage-dialog-ablauf in vf_etage.lsp - beide
|
||||
;; nutzen dieselben Dialoge vfs-dialog-eingabe-basis/-winkel-verteilung).
|
||||
;; 3D-Linie-Eingabe und der Typ Linienzug bleiben unveraendert interaktiv
|
||||
;; (fallen unten in den Konsolen-Ablauf, der die Eingabemodus-Frage erneut
|
||||
;; stellt - siehe vf-eingabe-abfragen).
|
||||
(if (member anlage-typ '("standard" "etage"))
|
||||
(progn
|
||||
(princ (ssg-text "vfc-eingabemodus-header"))
|
||||
(princ (ssg-text "vfc-eingabemodus-3dlinie"))
|
||||
@@ -1301,7 +1303,9 @@
|
||||
(setq antwort (getstring (ssg-text "vfc-prompt-wahl-1-2-ohne-default")))
|
||||
(if (= antwort "2")
|
||||
(progn
|
||||
(vfs-standard-dialog-ablauf vf-nummer)
|
||||
(if (= anlage-typ "etage")
|
||||
(vfe-etage-dialog-ablauf vf-nummer)
|
||||
(vfs-standard-dialog-ablauf vf-nummer))
|
||||
(exit)
|
||||
)
|
||||
)
|
||||
@@ -1476,12 +1480,12 @@
|
||||
richtung best-winkel startpunkt lastEnt hz
|
||||
"0" "Schoenenberger Geruest"))
|
||||
|
||||
;; Standard-Bloecke aus dem interaktiven Konsolen-Ablauf ebenfalls mit der
|
||||
;; Standard- UND Etage-Bloecke aus dem interaktiven Konsolen-Ablauf mit der
|
||||
;; SSG_VF_EDIT-XDATA markieren - sie sind (wie die Dialog-Variante) aus
|
||||
;; Attributen + hz verlustfrei rekonstruierbar, also per Doppelklick
|
||||
;; (c:VARIOFOERDERER_EDIT) editierbar. Etage/Linienzug bleiben unmarkiert.
|
||||
(if (and vf-insert (= anlage-typ "standard"))
|
||||
(vfs-xdata-schreiben vf-insert hz))
|
||||
;; (c:VARIOFOERDERER_EDIT) editierbar. Linienzug bleibt unmarkiert.
|
||||
(if (and vf-insert (member anlage-typ '("standard" "etage")))
|
||||
(vf-edit-xdata-schreiben vf-insert anlage-typ hz))
|
||||
|
||||
(princ "\n=========================================")
|
||||
)
|
||||
|
||||
@@ -825,6 +825,174 @@
|
||||
endpunkt
|
||||
)
|
||||
|
||||
;; ============================================================
|
||||
;; TEIL 7: DCL-DIALOG (Neuanlage + Edit)
|
||||
;; ============================================================
|
||||
;; Der Etage-Typ nutzt dieselben Dialoge wie der Standard-Typ
|
||||
;; (vfs-dialog-eingabe-basis / vfs-dialog-winkel-verteilung in vf_standard.lsp).
|
||||
;; Unterschiede zum Standard-Ablauf: Berechnung ueber berechne-etage (braucht
|
||||
;; seite), Einfuegung ueber etage-foerderanlage-einfuegen, KEINE horizontale
|
||||
;; Zwischenstrecke (Winkel-Sentinel 0). XDATA-Marker "etage".
|
||||
|
||||
;; Gemeinsame Berechnung + Winkel/Verteilung-Dialog + Einfuegung.
|
||||
;; Wird von der Neuanlage (vfe-etage-dialog-ablauf) und vom Edit (vfe-edit-ent)
|
||||
;; genutzt. winkel-prefill: Vorbelegung fuer vfs-dialog-winkel-verteilung oder nil.
|
||||
;; Analog vfs-standard-dialog-berechnen-einfuegen in vf_standard.lsp.
|
||||
(defun vfe-etage-dialog-berechnen-einfuegen (vf-nummer deltaL deltaH richtung startpunkt hz seite
|
||||
winkel-prefill geruest-einzelmodul geruest-typ /
|
||||
ergebnis ergebnis-liste gueltige-winkel
|
||||
winkelwahl best-winkel L_GF L_VF L_GF1 L_GF2 verteilung-modus
|
||||
n-scanner hoehe-von hoehe-bis lastEnt vf-insert vf-endpunkt
|
||||
staustrecke-basis)
|
||||
(setq ergebnis (berechne-etage deltaL deltaH richtung seite))
|
||||
(setq ergebnis-liste (cadddr ergebnis))
|
||||
(setq staustrecke-basis (ssg-cfg-or "vario" "staustrecke_basis" 1000))
|
||||
|
||||
(setq gueltige-winkel
|
||||
(mapcar 'car
|
||||
(vl-remove-if-not
|
||||
(function (lambda (e) (and (nth 3 e) (numberp (nth 1 e)) (numberp (nth 2 e))
|
||||
(>= (nth 1 e) 0) (>= (nth 2 e) 0))))
|
||||
ergebnis-liste)))
|
||||
|
||||
(if (null gueltige-winkel)
|
||||
(alert (ssg-textf "vfc-alert-kein-winkel"
|
||||
(list (chr 916) (rtos deltaL 2 0) (rtos deltaH 2 0) richtung)))
|
||||
(progn
|
||||
(setq winkelwahl (vfs-dialog-winkel-verteilung gueltige-winkel ergebnis-liste staustrecke-basis winkel-prefill))
|
||||
(if (null winkelwahl)
|
||||
(princ (ssg-text "vfc-vorgang-abgebrochen"))
|
||||
(progn
|
||||
(setq best-winkel (nth 0 winkelwahl)
|
||||
L_GF (nth 1 winkelwahl)
|
||||
L_VF (nth 2 winkelwahl)
|
||||
L_GF1 (nth 3 winkelwahl)
|
||||
L_GF2 (nth 4 winkelwahl)
|
||||
verteilung-modus (nth 5 winkelwahl))
|
||||
(setq n-scanner 0)
|
||||
(setq hoehe-von (caddr startpunkt))
|
||||
(setq hoehe-bis
|
||||
(cond ((= richtung "Auf") (+ hoehe-von deltaH))
|
||||
((= richtung "Ab") (- hoehe-von deltaH))
|
||||
(t hoehe-von)))
|
||||
(setq lastEnt (vf-lastent-ohne-attribute))
|
||||
(setq vf-endpunkt
|
||||
(etage-foerderanlage-einfuegen deltaL deltaH richtung best-winkel L_GF1 L_GF2 L_VF startpunkt seite hz))
|
||||
(setq vf-insert
|
||||
(vf-block-erstellen "etage" seite vf-nummer n-scanner
|
||||
hoehe-von hoehe-bis deltaH deltaL L_VF L_GF1 L_GF2
|
||||
richtung best-winkel startpunkt lastEnt hz
|
||||
geruest-einzelmodul geruest-typ))
|
||||
(if vf-insert (vf-edit-xdata-schreiben vf-insert "etage" hz))
|
||||
(princ "\n=========================================")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(list vf-insert vf-endpunkt)
|
||||
)
|
||||
|
||||
;; Neuanlage (Menue/Konsole -> Dialog): Startpunkt (X/Y) picken, Basis-Dialog,
|
||||
;; dann gemeinsame Berechnung/Winkel-Dialog/Einfuegung.
|
||||
;; Analog vfs-standard-dialog-ablauf in vf_standard.lsp.
|
||||
(defun vfe-etage-dialog-ablauf (vf-nummer / eingabe deltaL deltaH richtung
|
||||
z-start hz seite startpunkt startpunkt-xy dim
|
||||
geruest-einzelmodul geruest-typ motorseite)
|
||||
(setq startpunkt-xy (getpoint (ssg-text "vfc-prompt-startpunkt-aus")))
|
||||
(if (null startpunkt-xy) (setq startpunkt-xy '(0 0 0)))
|
||||
|
||||
(setq eingabe (vfs-dialog-eingabe-basis nil))
|
||||
(if (null eingabe)
|
||||
(princ (ssg-text "vfc-vorgang-abgebrochen"))
|
||||
(progn
|
||||
(setq deltaL (nth 0 eingabe)
|
||||
deltaH (nth 1 eingabe)
|
||||
richtung (nth 2 eingabe)
|
||||
z-start (nth 3 eingabe)
|
||||
hz (nth 4 eingabe)
|
||||
seite (nth 5 eingabe)
|
||||
dim (nth 6 eingabe)
|
||||
geruest-einzelmodul (nth 7 eingabe)
|
||||
geruest-typ (nth 8 eingabe)
|
||||
motorseite (nth 9 eingabe))
|
||||
(setq startpunkt (list (car startpunkt-xy) (cadr startpunkt-xy) z-start))
|
||||
;; Gewaehlte Dimension (2D/3D) + Motorseite fuer den Bau erzwingen, danach zurueck.
|
||||
(setq *ssg-ils-dim* dim)
|
||||
(setq *vf-motorseite* motorseite)
|
||||
(vfe-etage-dialog-berechnen-einfuegen vf-nummer deltaL deltaH richtung startpunkt hz seite nil
|
||||
geruest-einzelmodul geruest-typ)
|
||||
(setq *ssg-ils-dim* nil)
|
||||
(setq *vf-motorseite* nil)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; Edit eines bestehenden Etage-VF-Blocks (VF_n mit SSG_VF_EDIT-XDATA "etage").
|
||||
;; Wird von c:VARIOFOERDERER_EDIT (vf_standard.lsp) per Typ-Dispatch gerufen und
|
||||
;; laeuft innerhalb der dort geoeffneten ssg-start-Sitzung. Liest Parameter aus
|
||||
;; XDATA/Attributen, zeigt sie vorbelegt und baut bei OK am selben Startpunkt neu
|
||||
;; auf. Analog dem Standard-Edit-Body in c:VARIOFOERDERER_EDIT.
|
||||
(defun vfe-edit-ent (ent / ed bname startpunkt attribs xd
|
||||
deltaL deltaH richtung z-start hz seite dim
|
||||
eingabe vf-nummer best-winkel-attr L_GF_m-teile
|
||||
prefill-basis prefill-winkel
|
||||
geruest-einzelmodul geruest-typ motorseite)
|
||||
(setq ed (entget ent))
|
||||
(setq bname (cdr (assoc 2 ed)))
|
||||
(setq xd (vfs-xdata-lesen ent))
|
||||
(setq startpunkt (cdr (assoc 10 ed)))
|
||||
(setq attribs (ssg-attrib-read ent))
|
||||
(setq hz (atof (nth 1 xd)))
|
||||
(setq deltaL (atof (cond ((cdr (assoc "DELTA_L_mm" attribs))) ("15000"))))
|
||||
(setq deltaH (atof (cond ((cdr (assoc "DELTA_H_mm" attribs))) ("0"))))
|
||||
(setq richtung (cond ((cdr (assoc "ANTRIEBFAHRTRICHTUNG" attribs))) ("Auf")))
|
||||
(setq seite (cond ((cdr (assoc "SEITE_AS" attribs))) ("links")))
|
||||
(setq z-start (caddr startpunkt))
|
||||
|
||||
(setq prefill-basis
|
||||
(list (cons "deltaL" deltaL) (cons "deltaH" deltaH) (cons "richtung" richtung)
|
||||
(cons "einfuegehoehe" z-start) (cons "hz" hz) (cons "seite" seite)
|
||||
(cons "dim" (cond ((ssg-dim-xdata-lesen ent)) ("3D")))
|
||||
(cons "geruest-einzelmodul" (cond ((cdr (assoc "GERUEST_EINZELMODUL" attribs))) ("1")))
|
||||
(cons "geruest-typ" (cdr (assoc "GERUEST_TYP" attribs)))
|
||||
(cons "motorseite" (cond ((cdr (assoc "MOTORSEITE" attribs))) ("rechts")))))
|
||||
|
||||
(setq eingabe (vfs-dialog-eingabe-basis prefill-basis))
|
||||
(if (null eingabe)
|
||||
(princ (ssg-text "vfc-vorgang-abgebrochen"))
|
||||
(progn
|
||||
(setq deltaL (nth 0 eingabe)
|
||||
deltaH (nth 1 eingabe)
|
||||
richtung (nth 2 eingabe)
|
||||
z-start (nth 3 eingabe)
|
||||
hz (nth 4 eingabe)
|
||||
seite (nth 5 eingabe)
|
||||
dim (nth 6 eingabe)
|
||||
geruest-einzelmodul (nth 7 eingabe)
|
||||
geruest-typ (nth 8 eingabe)
|
||||
motorseite (nth 9 eingabe))
|
||||
(setq startpunkt (list (car startpunkt) (cadr startpunkt) z-start))
|
||||
|
||||
(setq best-winkel-attr (atoi (cond ((cdr (assoc "VF_WINKEL" attribs))) ("0"))))
|
||||
(setq L_GF_m-teile (ssg-cfg-split-comma (cond ((cdr (assoc "L_GF_m" attribs))) ("0.0,0.0"))))
|
||||
(setq prefill-winkel
|
||||
(list (cons "winkel" best-winkel-attr)
|
||||
(cons "verteilung-idx" "3")
|
||||
(cons "lgf1" (* 1000.0 (atof (car L_GF_m-teile))))))
|
||||
|
||||
(setq *ssg-ils-dim* dim)
|
||||
(setq *vf-motorseite* motorseite)
|
||||
(entdel ent)
|
||||
(setq vf-nummer (vf-next-number))
|
||||
(vfe-etage-dialog-berechnen-einfuegen vf-nummer deltaL deltaH richtung
|
||||
startpunkt hz seite prefill-winkel geruest-einzelmodul geruest-typ)
|
||||
(setq *ssg-ils-dim* nil)
|
||||
(setq *vf-motorseite* nil)
|
||||
(princ (ssg-textf "vfs-edit-neu-aufgebaut" (list bname)))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; ============================================================
|
||||
;; REGISTRIERUNG
|
||||
;; ============================================================
|
||||
|
||||
+20
-3
@@ -952,18 +952,27 @@
|
||||
;; ============================================================
|
||||
(if (null *vf-xdata-app*) (setq *vf-xdata-app* "SSG_VF_EDIT"))
|
||||
|
||||
(defun vfs-xdata-schreiben (ent hz /)
|
||||
;; Allgemeiner Schreiber: markiert ein VF_n-INSERT mit Typ-Marker + hz. Der
|
||||
;; Typ ("standard"/"etage") steuert beim Edit (c:VARIOFOERDERER_EDIT) den
|
||||
;; passenden Neuaufbau-Zweig. hz ist der einzige nicht aus den Attributen
|
||||
;; rekonstruierbare Wert (Baurichtung).
|
||||
(defun vf-edit-xdata-schreiben (ent typ hz /)
|
||||
(regapp *vf-xdata-app*)
|
||||
(entmod
|
||||
(append (entget ent)
|
||||
(list
|
||||
(list -3
|
||||
(list *vf-xdata-app*
|
||||
(cons 1000 "standard")
|
||||
(cons 1000 typ)
|
||||
(cons 1000 (rtos (float hz) 2 4)))))))
|
||||
ent
|
||||
)
|
||||
|
||||
;; Rueckwaerts-kompatibler Wrapper fuer den Standard-Typ.
|
||||
(defun vfs-xdata-schreiben (ent hz /)
|
||||
(vf-edit-xdata-schreiben ent "standard" hz)
|
||||
)
|
||||
|
||||
;; XDATA lesen -> (typ-marker hz-str) oder nil.
|
||||
(defun vfs-xdata-lesen (ent / xd app-data)
|
||||
(setq xd (entget ent (list *vf-xdata-app*)))
|
||||
@@ -1176,7 +1185,15 @@
|
||||
(progn (alert (ssg-textf "vfs-edit-kein-vf" (list bname))) (ssg-end) (exit)))
|
||||
|
||||
(setq xd (vfs-xdata-lesen ent))
|
||||
(if (or (null xd) (/= (car xd) "standard"))
|
||||
(if (null xd)
|
||||
(progn (alert (ssg-textf "vfs-edit-keine-xdata" (list bname))) (ssg-end) (exit)))
|
||||
;; Typ-Dispatch: Etage-Bloecke gehen in den Etage-Edit-Zweig (vfe-edit-ent in
|
||||
;; vf_etage.lsp) und laufen innerhalb der bereits geoeffneten ssg-start-Sitzung
|
||||
;; weiter. Standard-Bloecke fallen unten in den bisherigen Ablauf. Andere
|
||||
;; Marker (Linienzug/Altbestand) werden abgewiesen.
|
||||
(if (= (car xd) "etage")
|
||||
(progn (vfe-edit-ent ent) (ssg-end) (exit)))
|
||||
(if (/= (car xd) "standard")
|
||||
(progn (alert (ssg-textf "vfs-edit-keine-xdata" (list bname))) (ssg-end) (exit)))
|
||||
|
||||
(setq startpunkt (cdr (assoc 10 ed)))
|
||||
|
||||
Vendored
+1
-1
@@ -157,7 +157,7 @@
|
||||
"block": "S-LP",
|
||||
"x": 8922,
|
||||
"y": 13509,
|
||||
"z": 1467,
|
||||
"z": 1941,
|
||||
"rotation": 180,
|
||||
"assigned_to": "VF_Schnitt_C"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user