Fix c:KreiselConnect: abstandStr, typNum, newBasePoint als lokale Variablen ergänzt. Wären sonst global gewesen. dentify-connection-point: insertPoint, pickX, pickY, tolerance, type als lokale Variablen ergänzt ; calculate-new-basepoint: insertPoint als lokale Variable ergänzt; LAYER S_LP: Layername S_LP nach Farbwert eingefügt; [200

This commit is contained in:
2026-05-15 12:52:17 +02:00
parent b0a178829a
commit c1fa63f067
2 changed files with 8 additions and 6 deletions
+5 -5
View File
@@ -73,7 +73,7 @@
;; ============================================
;; Smart-Connect-Einfügebefehl
;; ============================================
(defun c:KreiselConnect ( / existingObj pickPoint connectionType newX newY abstand typ)
(defun c:KreiselConnect ( / existingObj pickPoint connectionType newX newY abstand typ abstandStr typNum newBasePoint)
(princ "\n=== Kreisel Smart Connect ===\n")
@@ -124,7 +124,7 @@
;; ============================================
;; Verbindungspunkt-Typ erkennen
;; ============================================
(defun identify-connection-point (obj pickPoint / x y abstand)
(defun identify-connection-point (obj pickPoint / x y abstand insertPoint pickX pickY tolerance type)
;; Basispunkt des Moduls ermitteln (aus Einfügepunkt berechnen)
(setq insertPoint (cdr (assoc 10 (entget obj))))
(setq x (car insertPoint) y (cadr insertPoint))
@@ -186,7 +186,7 @@
;; ============================================
;; Basispunkt des neuen Moduls berechnen
;; ============================================
(defun calculate-new-basepoint (obj pickPoint connectionType abstand / x y newX newY)
(defun calculate-new-basepoint (obj pickPoint connectionType abstand / x y newX newY insertPoint)
(setq insertPoint (cdr (assoc 10 (entget obj))))
(setq x (car insertPoint) y (cadr insertPoint))
@@ -243,7 +243,7 @@
;; Tangenten zeichnen
(if (not (tblsearch "LAYER" "S_LP"))
(command "_.LAYER" "_NEW" "S_LP" "_C" "7" "" "")
(command "_.LAYER" "_NEW" "S_LP" "_C" "7" "S_LP" "")
)
(setvar "CLAYER" "S_LP")
@@ -268,7 +268,7 @@
(if (= typ "PIN")
(progn
(if (not (tblsearch "LAYER" "pinbereich"))
(command "_.LAYER" "_NEW" "pinbereich" "_C" "3" "_LT" "2punkt" "")
(command "_.LAYER" "_NEW" "pinbereich" "_C" "3" "pinbereich" "_LT" "2punkt" "pinbereich" "")
)
(setvar "CLAYER" "pinbereich")
(setvar "CECOLOR" "3")