[ADD] Kreisel-Drehrichtung (DREHRICHTUNG) per JSON steuerbar: kreisel-insert-script bekommt optionalen 6. Parameter drehrichtung (GUZ/UZS), hundm05:bau-kreisel liest ihn aus dem Testdaten-JSON aus. Showroom ILS: Kreisel_Showroom_02/03/05 GUZ, Kreisel_Showroom_01/06 UZS eingetragen. Doku (lisp_methods.md, json-input-lisp.md) nachgezogen.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -696,16 +696,20 @@
|
|||||||
;; rotation : Drehwinkel in Grad
|
;; rotation : Drehwinkel in Grad
|
||||||
;; typ : Kreiselart ("STANDARD", "PIN", ...)
|
;; typ : Kreiselart ("STANDARD", "PIN", ...)
|
||||||
;; hoehe : Hoehe in mm (oder nil fuer Z aus pt)
|
;; hoehe : Hoehe in mm (oder nil fuer Z aus pt)
|
||||||
|
;; drehrichtung : "GUZ"/"UZS" (optional, nil -> Default aus *kreisel-attrib-defs*)
|
||||||
;; Rueckgabe: Entity-Name des erzeugten Blocks oder nil
|
;; Rueckgabe: Entity-Name des erzeugten Blocks oder nil
|
||||||
(defun kreisel-insert-script (pt abstand rotation typ hoehe / z blockEnt)
|
(defun kreisel-insert-script (pt abstand rotation typ hoehe drehrichtung
|
||||||
|
/ z blockEnt attribs)
|
||||||
(ssg-start (ssg-text "kreisel-start-script-insert") '(("OSMODE") ("CECOLOR")))
|
(ssg-start (ssg-text "kreisel-start-script-insert") '(("OSMODE") ("CECOLOR")))
|
||||||
(if (null typ) (setq typ "STANDARD"))
|
(if (null typ) (setq typ "STANDARD"))
|
||||||
(setq z (if hoehe hoehe
|
(setq z (if hoehe hoehe
|
||||||
(if (and pt (caddr pt)) (caddr pt) *kreisel-default-hoehe*)))
|
(if (and pt (caddr pt)) (caddr pt) *kreisel-default-hoehe*)))
|
||||||
|
(setq attribs (list (cons "KREISELART" typ)
|
||||||
|
(cons "HOEHE" (rtos z 2 0))))
|
||||||
|
(if drehrichtung
|
||||||
|
(setq attribs (cons (cons "DREHRICHTUNG" drehrichtung) attribs)))
|
||||||
(setq blockEnt
|
(setq blockEnt
|
||||||
(draw-module (list (car pt) (cadr pt) z) abstand rotation
|
(draw-module (list (car pt) (cadr pt) z) abstand rotation attribs))
|
||||||
(list (cons "KREISELART" typ)
|
|
||||||
(cons "HOEHE" (rtos z 2 0)))))
|
|
||||||
(ssg-end)
|
(ssg-end)
|
||||||
blockEnt
|
blockEnt
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -82,9 +82,12 @@ Block `KREISEL_n`, gebaut von `KreiselInsert.lsp`.
|
|||||||
| `abstand` | ja | Mittenabstand Antriebsrad - Spannrad | `kreisel.default_laenge` (2300) |
|
| `abstand` | ja | Mittenabstand Antriebsrad - Spannrad | `kreisel.default_laenge` (2300) |
|
||||||
| `rotation` | nein | Drehung der Achse AN -> SP, frei (kein Raster) | 0.0 |
|
| `rotation` | nein | Drehung der Achse AN -> SP, frei (kein Raster) | 0.0 |
|
||||||
| `typ` | nein | `"STANDARD"` oder `"PIN"` -> Attribut `KREISELART` | `"STANDARD"` |
|
| `typ` | nein | `"STANDARD"` oder `"PIN"` -> Attribut `KREISELART` | `"STANDARD"` |
|
||||||
|
| `drehrichtung` | nein | `"GUZ"` oder `"UZS"` -> Attribut `DREHRICHTUNG` | `"UZS"` |
|
||||||
|
|
||||||
Treiber: `kreisel:run-insert-test` (`test_kreisel.lsp`), `mubea:build-kreisel`,
|
Treiber: `kreisel:run-insert-test` (`test_kreisel.lsp`), `mubea:build-kreisel`,
|
||||||
`hundm05:bau-kreisel` (auch fuer `dematic_arvato.json`).
|
`hundm05:bau-kreisel` (auch fuer `dematic_arvato.json`/`showroom_ils.json`).
|
||||||
|
Nur `hundm05:bau-kreisel` liest `drehrichtung` aus und reicht sie an
|
||||||
|
`kreisel-insert-script` weiter; `mubea:build-kreisel` setzt es (noch) nicht um.
|
||||||
|
|
||||||
### 1.2 Connect (Start- und Endpunkt)
|
### 1.2 Connect (Start- und Endpunkt)
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -38,7 +38,7 @@ Einheiten: mm und Grad. `hz` = Fahrtrichtung in der XY-Ebene, 0 = +X,
|
|||||||
|
|
||||||
## 1. Kreisel und Eckrad (`KreiselInsert.lsp`)
|
## 1. Kreisel und Eckrad (`KreiselInsert.lsp`)
|
||||||
|
|
||||||
### `kreisel-insert-script (pt abstand rotation typ hoehe)`
|
### `kreisel-insert-script (pt abstand rotation typ hoehe drehrichtung)`
|
||||||
|
|
||||||
Kreisel an einem freien Punkt. Ruft `draw-module` auf.
|
Kreisel an einem freien Punkt. Ruft `draw-module` auf.
|
||||||
|
|
||||||
@@ -49,6 +49,7 @@ Kreisel an einem freien Punkt. Ruft `draw-module` auf.
|
|||||||
| `rotation` | Drehung der Achse AN -> SP in Grad |
|
| `rotation` | Drehung der Achse AN -> SP in Grad |
|
||||||
| `typ` | `"STANDARD"` oder `"PIN"` (nil = `"STANDARD"`) -> Attribut `KREISELART` |
|
| `typ` | `"STANDARD"` oder `"PIN"` (nil = `"STANDARD"`) -> Attribut `KREISELART` |
|
||||||
| `hoehe` | Einbauhoehe; nil = Z von `pt`, sonst `*kreisel-default-hoehe*` |
|
| `hoehe` | Einbauhoehe; nil = Z von `pt`, sonst `*kreisel-default-hoehe*` |
|
||||||
|
| `drehrichtung` | `"GUZ"`/`"UZS"` -> Attribut `DREHRICHTUNG` (optional, nil = Default `"UZS"` aus `*kreisel-attrib-defs*`) |
|
||||||
|
|
||||||
Rueckgabe: Entity des `KREISEL_n`-Blocks oder nil. Setzt `ssg-start`/`ssg-end`
|
Rueckgabe: Entity des `KREISEL_n`-Blocks oder nil. Setzt `ssg-start`/`ssg-end`
|
||||||
selbst.
|
selbst.
|
||||||
|
|||||||
@@ -78,14 +78,15 @@
|
|||||||
;; Rueckgabe: Ergebnis-Record in derselben Form wie die Ketten, damit
|
;; Rueckgabe: Ergebnis-Record in derselben Form wie die Ketten, damit
|
||||||
;; vsp-results-schreiben beide in EINE Datei schreibt (unterschieden ueber
|
;; vsp-results-schreiben beide in EINE Datei schreibt (unterschieden ueber
|
||||||
;; das Feld "kind").
|
;; das Feld "kind").
|
||||||
(defun hundm05:bau-kreisel (obj / id x y z abstand rotation typ pt ent ed rec)
|
(defun hundm05:bau-kreisel (obj / id x y z abstand rotation typ drehrichtung pt ent ed rec)
|
||||||
(setq id (ssg-val obj "id"))
|
(setq id (ssg-val obj "id"))
|
||||||
(setq x (ssg-val obj "x")
|
(setq x (ssg-val obj "x")
|
||||||
y (ssg-val obj "y")
|
y (ssg-val obj "y")
|
||||||
z (ssg-val obj "z")
|
z (ssg-val obj "z")
|
||||||
abstand (ssg-val obj "abstand")
|
abstand (ssg-val obj "abstand")
|
||||||
rotation (ssg-val obj "rotation")
|
rotation (ssg-val obj "rotation")
|
||||||
typ (ssg-val obj "typ"))
|
typ (ssg-val obj "typ")
|
||||||
|
drehrichtung (ssg-val obj "drehrichtung"))
|
||||||
(if (numberp x) (setq x (float x)))
|
(if (numberp x) (setq x (float x)))
|
||||||
(if (numberp y) (setq y (float y)))
|
(if (numberp y) (setq y (float y)))
|
||||||
(if (numberp z) (setq z (float z)))
|
(if (numberp z) (setq z (float z)))
|
||||||
@@ -106,9 +107,9 @@
|
|||||||
(princ (strcat "\n [KREISEL] " id " -> (" (rtos x 2 0) ", "
|
(princ (strcat "\n [KREISEL] " id " -> (" (rtos x 2 0) ", "
|
||||||
(rtos y 2 0) ", " (rtos (if z z 0.0) 2 0) ") A="
|
(rtos y 2 0) ", " (rtos (if z z 0.0) 2 0) ") A="
|
||||||
(rtos abstand 2 0) " R=" (rtos (if rotation rotation 0.0) 2 1)
|
(rtos abstand 2 0) " R=" (rtos (if rotation rotation 0.0) 2 1)
|
||||||
" " typ))
|
" " typ (if drehrichtung (strcat " " drehrichtung) "")))
|
||||||
(setq ent (kreisel-insert-script pt abstand
|
(setq ent (kreisel-insert-script pt abstand
|
||||||
(if rotation rotation 0.0) typ z))
|
(if rotation rotation 0.0) typ z drehrichtung))
|
||||||
(if ent
|
(if ent
|
||||||
(progn
|
(progn
|
||||||
(setq ed (entget ent))
|
(setq ed (entget ent))
|
||||||
|
|||||||
Vendored
+5
@@ -9,6 +9,7 @@
|
|||||||
"rotation": 90.0,
|
"rotation": 90.0,
|
||||||
"typ": "STANDARD",
|
"typ": "STANDARD",
|
||||||
"darstellung": "2D",
|
"darstellung": "2D",
|
||||||
|
"drehrichtung": "UZS",
|
||||||
"comment": "aus DXF: Radmitte AN8 (Layer 1ANTR-800) (26997.93, 3466.40) -> SP8 (Layer 1SP-800) (26997.93, 12498.90), Mittenabstand 9032.50, rotation 90.00 Grad; x/y = AN8-Mitte minus Radius. ACHTUNG hoehe=11039.9 ist NICHT belegt: AN8/SP8 sind flache 2D-Symbole auf Z=0 und nur 0 3D-Nachbarn in 3000 mm - zu wenige fuer eine belegbare Hoehe. Hoehe 2226.4 vom Anwender.",
|
"comment": "aus DXF: Radmitte AN8 (Layer 1ANTR-800) (26997.93, 3466.40) -> SP8 (Layer 1SP-800) (26997.93, 12498.90), Mittenabstand 9032.50, rotation 90.00 Grad; x/y = AN8-Mitte minus Radius. ACHTUNG hoehe=11039.9 ist NICHT belegt: AN8/SP8 sind flache 2D-Symbole auf Z=0 und nur 0 3D-Nachbarn in 3000 mm - zu wenige fuer eine belegbare Hoehe. Hoehe 2226.4 vom Anwender.",
|
||||||
"hoehe_quelle": "Anwender"
|
"hoehe_quelle": "Anwender"
|
||||||
},
|
},
|
||||||
@@ -22,6 +23,7 @@
|
|||||||
"rotation": 90.0,
|
"rotation": 90.0,
|
||||||
"typ": "STANDARD",
|
"typ": "STANDARD",
|
||||||
"darstellung": "2D",
|
"darstellung": "2D",
|
||||||
|
"drehrichtung": "GUZ",
|
||||||
"comment": "aus DXF: Radmitte AN8 (Layer 1ANTR-800) (26997.93, 13298.90) -> SP8 (Layer 1SP-800) (26997.93, 16298.90), Mittenabstand 3000.00, rotation 90.00 Grad; x/y = AN8-Mitte minus Radius. ACHTUNG hoehe=11039.9 ist NICHT belegt: AN8/SP8 sind flache 2D-Symbole auf Z=0 und nur 0 3D-Nachbarn in 3000 mm - zu wenige fuer eine belegbare Hoehe. Hoehe 2226.4 vom Anwender.",
|
"comment": "aus DXF: Radmitte AN8 (Layer 1ANTR-800) (26997.93, 13298.90) -> SP8 (Layer 1SP-800) (26997.93, 16298.90), Mittenabstand 3000.00, rotation 90.00 Grad; x/y = AN8-Mitte minus Radius. ACHTUNG hoehe=11039.9 ist NICHT belegt: AN8/SP8 sind flache 2D-Symbole auf Z=0 und nur 0 3D-Nachbarn in 3000 mm - zu wenige fuer eine belegbare Hoehe. Hoehe 2226.4 vom Anwender.",
|
||||||
"hoehe_quelle": "Anwender"
|
"hoehe_quelle": "Anwender"
|
||||||
},
|
},
|
||||||
@@ -35,6 +37,7 @@
|
|||||||
"rotation": 180.0,
|
"rotation": 180.0,
|
||||||
"typ": "STANDARD",
|
"typ": "STANDARD",
|
||||||
"darstellung": "2D",
|
"darstellung": "2D",
|
||||||
|
"drehrichtung": "GUZ",
|
||||||
"comment": "aus DXF: Radmitte AN8 (Layer 1ANTR-800) (36705.93, 9888.90) -> SP8 (Layer 1SP-800) (29505.93, 9888.90), Mittenabstand 7200.00, rotation 180.00 Grad; x/y = AN8-Mitte minus Radius. ACHTUNG hoehe=11039.9 ist NICHT belegt: AN8/SP8 sind flache 2D-Symbole auf Z=0 und nur 0 3D-Nachbarn in 3000 mm - zu wenige fuer eine belegbare Hoehe. Hoehe 1700.0 vom Anwender.",
|
"comment": "aus DXF: Radmitte AN8 (Layer 1ANTR-800) (36705.93, 9888.90) -> SP8 (Layer 1SP-800) (29505.93, 9888.90), Mittenabstand 7200.00, rotation 180.00 Grad; x/y = AN8-Mitte minus Radius. ACHTUNG hoehe=11039.9 ist NICHT belegt: AN8/SP8 sind flache 2D-Symbole auf Z=0 und nur 0 3D-Nachbarn in 3000 mm - zu wenige fuer eine belegbare Hoehe. Hoehe 1700.0 vom Anwender.",
|
||||||
"hoehe_quelle": "Anwender"
|
"hoehe_quelle": "Anwender"
|
||||||
},
|
},
|
||||||
@@ -48,6 +51,7 @@
|
|||||||
"rotation": 0.0,
|
"rotation": 0.0,
|
||||||
"typ": "STANDARD",
|
"typ": "STANDARD",
|
||||||
"darstellung": "2D",
|
"darstellung": "2D",
|
||||||
|
"drehrichtung": "GUZ",
|
||||||
"comment": "aus DXF: Radmitte (manuell AN8) (Layer --kreisel-achse) (27797.93, 16298.90) -> (manuell SP8) (Layer --kreisel-achse) (36705.93, 16298.90), Mittenabstand 8908.00, rotation 0.00 Grad; x/y = AN8-Mitte minus Radius. ACHTUNG hoehe=0.0 ist NICHT belegt: AN8/SP8 sind flache 2D-Symbole auf Z=0 und nur 0 3D-Nachbarn in 3000 mm - zu wenige fuer eine belegbare Hoehe. Hoehe 2226.4 vom Anwender.",
|
"comment": "aus DXF: Radmitte (manuell AN8) (Layer --kreisel-achse) (27797.93, 16298.90) -> (manuell SP8) (Layer --kreisel-achse) (36705.93, 16298.90), Mittenabstand 8908.00, rotation 0.00 Grad; x/y = AN8-Mitte minus Radius. ACHTUNG hoehe=0.0 ist NICHT belegt: AN8/SP8 sind flache 2D-Symbole auf Z=0 und nur 0 3D-Nachbarn in 3000 mm - zu wenige fuer eine belegbare Hoehe. Hoehe 2226.4 vom Anwender.",
|
||||||
"hoehe_quelle": "Anwender"
|
"hoehe_quelle": "Anwender"
|
||||||
},
|
},
|
||||||
@@ -61,6 +65,7 @@
|
|||||||
"rotation": 0.0,
|
"rotation": 0.0,
|
||||||
"typ": "STANDARD",
|
"typ": "STANDARD",
|
||||||
"darstellung": "2D",
|
"darstellung": "2D",
|
||||||
|
"drehrichtung": "UZS",
|
||||||
"comment": "aus DXF: Radmitte (manuell AN8) (Layer --kreisel-achse) (28772.93, 13093.90) -> (manuell SP8) (Layer --kreisel-achse) (35305.93, 13093.90), Mittenabstand 6533.00, rotation 0.00 Grad; x/y = AN8-Mitte minus Radius. ACHTUNG hoehe=0.0 ist NICHT belegt: AN8/SP8 sind flache 2D-Symbole auf Z=0 und nur 0 3D-Nachbarn in 3000 mm - zu wenige fuer eine belegbare Hoehe. Hoehe 1970 vom Anwender.",
|
"comment": "aus DXF: Radmitte (manuell AN8) (Layer --kreisel-achse) (28772.93, 13093.90) -> (manuell SP8) (Layer --kreisel-achse) (35305.93, 13093.90), Mittenabstand 6533.00, rotation 0.00 Grad; x/y = AN8-Mitte minus Radius. ACHTUNG hoehe=0.0 ist NICHT belegt: AN8/SP8 sind flache 2D-Symbole auf Z=0 und nur 0 3D-Nachbarn in 3000 mm - zu wenige fuer eine belegbare Hoehe. Hoehe 1970 vom Anwender.",
|
||||||
"hoehe_quelle": "Anwender"
|
"hoehe_quelle": "Anwender"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user