CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 08:04:42 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=2355aba7ac299050391717b70dbe088a6c26509befb930b0a0b8a1a8c9686908a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%229R0WTz7S2tf6NMTVX5NAO9UzA1jFwWDa%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d51683dfdadfa6-BLR
Bar offset - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;; Define a global variable for the last entered bar diameter
- (setq lastBarDiameter nil)
- ;; Diameter and offset values
- (setq diameters '((3 . 0.375) (4 . 0.5) (5 . 0.625) (6 . 0.75)
- (7 . 0.875) (8 . 1.0) (9 . 1.270) (10 . 1.310)))
- ;; Function to create or select a layer based on diameter
- (defun ensureLayer (dia)
- (setq layerName (strcat "B" (rtos dia 2 0)))
- (setq layerColor (cond
- ((= dia 3) 10)
- ((= dia 4) 14)
- ((= dia 5) 30)
- ((= dia 6) 40)
- ((= dia 7) 50)
- ((= dia 8) 70)
- ((= dia 9) 99)
- ((= dia 10) 110)))
- (if (not (tblsearch "layer" layerName))
- (command "_.layer" "M" layerName "C" (itoa layerColor) "" "L" "CONTINUOUS" "" "p" "n" "" ""))
- (setvar "clayer" layerName)
- )
- ;; Function to prompt for bar diameter
- (defun getBarDiameter ()
- (setq dia (getreal (strcat "\nEnter bar diameter (last entered#: "
- (if lastBarDiameter (rtos lastBarDiameter 2 0) "None") "): ")))
- (if (not dia)
- (setq dia lastBarDiameter)) ; Use the last entered diameter if none entered
- (if (and dia (>= dia 3) (<= dia 10))
- (progn (setq lastBarDiameter dia) dia) ; Return valid diameter
- (progn (princ "\nInvalid diameter. Please enter a value between 3 and 10.") nil))
- )
- ;; DG: Draw circle with bar diameter, placing the circle's bottom exactly at the user-specified point
- (defun c:DG ()
- (if (setq dia (getBarDiameter)) ; Get bar diameter
- (progn
- (setq radius (/ (cdr (assoc dia diameters)) 2)) ; Calculate the radius
- (ensureLayer dia) ; Ensure the correct layer is set
- ;; Allow the user to specify multiple points for placing circles
- (while (setq basePt (getpoint "\nSpecify bottom point for the circle (or press Enter to finish):"))
- ;; Adjust the center point to be above the base point by the radius
- (setq centerPt (list (car basePt) (+ (cadr basePt) radius) (caddr basePt)))
- ;; Draw the circle with the calculated center point and radius
- (command "circle" centerPt radius)
- )
- (princ (strcat "\nCircles created on layer: " layerName))
- )
- )
- (setvar "clayer" "0-35") ; Reset to default layer
- (princ)
- )
- ;; DH: Offset objects with bar diameter
- (defun c:DH ()
- (if (setq dia (getBarDiameter))
- (progn
- (setq offsetValue (cdr (assoc dia diameters)))
- (if (setq ss (ssget "_+.:S:L" '((0 . "*POLYLINE,*LINE,CIRCLE,ELLIPSE"))))
- (progn
- (ensureLayer dia) ; Ensure the correct layer is set
- (while (setq p (getpoint (strcat "\nSpecify point for offset (Nominal Bar Dia: "
- (rtos offsetValue 2 3) "): ")))
- (command "_.offset" offsetValue ss "_non" p "")
- (setq e (entlast))
- (command "_.chprop" e "" "_layer" layerName "") ; Assign layer to new object
- (setq ss (ssadd e ss)) ; Add the new offset object to selection set
- )
- )
- (princ "\nNo valid objects selected for offset.")
- )
- )
- )
- (setvar "clayer" "0-35") ; Reset to default layer
- (princ)
- )
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ L
JavaScript | 1 sec ago | 0.25 KB
-
Free Crypto Method (NEVER SEEN BEFORE)⭐⭐ S
JavaScript | 10 sec ago | 0.25 KB
-
⭐✅ Swapzone Glitch ✅ Working ⭐⭐ P
JavaScript | 19 sec ago | 0.25 KB
-
📌 Swapzone +37% glitch ⭐ P
JavaScript | 1 min ago | 0.25 KB
-
⭐⭐⭐Exchange Exploit⭐⭐
Java | 1 min ago | 0.10 KB
-
✅⭐ Make huge profits on trading ⭐⭐ R
JavaScript | 1 min ago | 0.25 KB
-
⭐⭐⭐Exchange Exploit T I⭐⭐
Java | 1 min ago | 0.10 KB
-
⭐✅ Marketplace Glitch ✅ Working ✅ NEVER SEEN...
JavaScript | 1 min ago | 0.25 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand