Leaderboard
Popular Content
Showing content with the highest reputation since 12/23/2025 in Posts
-
Greetings to all members of Cad Tutor, Based on the upcoming holidays and New Year, I'v made something interesting which I want it to share with you. Everything was made using a Lisp. I hope it will interesting to all of you and maybe give some inspiration to the next year to made something different and share it with rest of us . Notice (it is on cyrillic, in Serbian language): - ЗИМСКА СЛУЖБА = Winter service on roads; - СРЕЋНА НОВА ГОДИНА = HAPPY NEW YEAR; - XO-XO-XOO = HO-HO-HOO (). Happy New Year 2026 to all members, and wish you all the best and new codes . NovaGodina2026_CadTutor.mp4 Best regards, Saxlle.7 points
-
2 points
-
2 points
-
Attempt number 2: This code is intended to always return a centerline whose points are all perfectly equidistant from the margins. This should happen in all cases where two LWPOLYLINEs are provided, one for each margin. The case of islands has not been considered yet. The resulting centerline is geometrically dense. This can probably be simplified in a future version. The approach taken in this code has been to obtain points from the normals and the bisectors of each margin, which are then combined at the end to build a list of points. Therefore, it is a fragmentary and massive approach. For this reason, the code is not very fast. However, there is another, more elegant approach, based on dynamically relating the geometry of both margins. It is more complex, but it would also be faster, and the error margins would be “bridgable”. If this thread has enough life in it, I may feel sufficiently motivated to finish it. That’s all for now. ;|*********************** CENTER-LINE ************************* ************************ G L A V C V S ************************* ************************** F E C I T *************************** |; (defun c:CLG (/ PI/2 lst e1 e2 l1 l2 lp lp1 lp2 p0 p> p< r1? x m a tol autoInt? ordenaPts interCpta ptEqd) (defun autoInt? (l lp / p0 p1 p2);autointersecci贸n? (if l (setq p1 (polar (car l) (setq a (angle (car l) (cadr l))) 0.001) p2 (polar (cadr l) (+ a PI) 0.001) x (if (not (vl-some '(lambda (p) (if p0 (inters p0 (setq p0 p) p1 p2) (not (setq p0 p)))) lp)) l) ) ) ) (defun ordenaPts (lst / pIni dm d ps? ps lr); puntos en orden (setq pIni (mapcar '(lambda (a b) (/ (+ a b) 2.0)) (car lp1) (car lp2))) (while lst (foreach p lst (if (and dm (/= (min (setq d (distance (if ps ps pIni) p)) dm) dm)) (setq dm d ps? p) (if (not dm) (setq dm (distance (if ps ps pIni) p) ps? p)) ) ) (setq ps ps? ps? nil dm nil lst (vl-remove ps lst) lr (cons (cadr ps) (cons (car ps) lr))) ) lr ) (defun interCpta (pM p1 p2 lp / i? i1 i2 d a b); captura de los m谩rgenes (defun i? (pA pB lp / p0 i dm is a) (foreach p lp (if p0 (if (setq i (inters p0 (setq p0 p) pA pB)) (if (and dm (/= (min (setq d (distance pM i)) dm) dm)) (setq dm d is i) (if (not dm) (setq dm (distance pm i) is i)) ) ) ) (setq p0 p) ) (if is (list (car is) (cadr is) 0.0)) ) (if (and (setq a (i? p1 p2 lp1)) (setq b (i? p1 p2 lp2))) (list a b) ) ) (defun ptEqd (A B e1 e2 / eqDist-f t0 t1 f0 f1 tm fm n i v+- v*); captura punto equidistante (defun v+- (o a b) (mapcar o a b)) (defun v* (p s) (mapcar '(lambda (x) (* x s)) p)) (defun eqDist-f (ds A B e1 e2 / pt d1 d2) (setq pt (v+- '+ A (v* (v+- '- B A) ds)); Punto sobre AB: P(ds) = A + ds (B - A) d1 (distance pt (vlax-curve-getClosestPointTo e1 pt)) d2 (distance pt (vlax-curve-getClosestPointTo e2 pt)) ) (- d1 d2) ) (setq t0 0.0 t1 1.0) (while (and (< (setq n (if n (1+ n) 0)) 100) (> (- t1 t0) 1e-6));m茅todo de bisecci贸n (setq tm (/ (+ t0 t1) 2.0) fm (eqDist-f tm A B e1 e2) ) (if (< (abs fm) 1e-9) (setq n 100 t1 tm t0 tm) (if (< (* (if f0 f0 (eqDist-f t0 A B e1 e2)) fm) 0.0) (setq t1 tm f1 fm) (setq t0 tm f0 fm) ) ) ) (if (< t1 1.0) ; par谩metro final y punto equidistante (v+- '+ A (v* (v+- '- B A) (/ (+ t0 t1) 2.0))) ) ) (if (and (setq e1 (car (entsel "\nSelect FIRST LWPolyline..."))) (= (cdr (assoc 0 (setq l1 (entget e1)))) "LWPOLYLINE") ) (if (and (setq e2 (car (entsel "\nSelect SECOND LWPolyline..."))) (= (cdr (assoc 0 (setq l2 (entget e2)))) "LWPOLYLINE") ) (progn (foreach l l1 (if (= (car l) 10) (setq lp1 (cons (cdr l) lp1)))) (foreach l l2 (if (= (car l) 10) (setq lp2 (cons (cdr l) lp2)))) (setq r1? (> (distance (car lp1) (car lp2)) (distance (car lp1) (last lp2)))) (setq tol 0.01 PI/2 (/ PI 2.) lp1 (if r1? (reverse lp1) lp1)) (foreach e (list e1 e2) (setq p0 nil m nil r? (if (equal e e1) r1?) lp (if (equal e e1) lp2 lp1)) (while (setq p (vlax-curve-getPointAtParam e (setq m (if m ((if r? 1- 1+) m) (if r? (vlax-curve-getEndParam e) 0))))) (if p0 (progn (setq lAB (autoInt? (interCpta p (polar p (setq a (+ (angle p0 p) PI/2)) 10000) (polar p (+ a PI) 10000) lp) (if (equal e e1) lp1 lp2));NORMAL AL COMIENZO DEL SEGMENTO lst (if lAB (cons (ptEqd (car lAB) (cadr lAB) e1 e2) lst) lst) ) (if (setq p> (vlax-curve-getPointAtParam e ((if r? 1- 1+) m))) (setq lAB (autoInt? (interCpta p (polar p (setq a (/ (+ (angle p p0) (angle p p>)) 2.)) 10000) (polar p (+ a PI) 10000) lp) (if (equal e e1) lp1 lp2)) ; Bisectriz lst (if lAB (cons (ptEqd (car lAB) (cadr lAB) e1 e2) lst) lst) lAB (autoInt? (interCpta p (polar p (setq a (+ (angle p p>) PI/2)) 10000) (polar p (+ a PI) 10000) lp) (if (equal e e1) lp1 lp2));NORMAL AL FINAL DEL SEGMENTO lst (if lAB (cons (ptEqd (car lAB) (cadr lAB) e1 e2) lst) lst) ) ) (setq p< p0 p0 p) ) (if (setq p> (vlax-curve-getPointAtParam e ((if r? 1- 1+) m))) (setq lAB (autoInt? (interCpta p (polar (setq p0 p) (setq a (+ (angle p0 p>) PI/2)) 10000) (polar p0 (+ a PI) 10000) lp) (if (equal e e1) lp1 lp2)) lst (if lAB (cons (ptEqd (car lAB) (cadr lAB) e1 e2) lst) lst) ) ) ) ) ) (vla-AddLightWeightPolyline (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object))) (vlax-Make-Variant (vlax-SafeArray-Fill (vlax-Make-SafeArray 5 (cons 0 (- (length (setq lst (reverse (ordenaPts lst)))) 1))) lst)) ) ) ) ) (princ) )2 points
-
Super cool to see the progress IntelliCAD has made with their C++ API. I’ve been working to port pyrx, still not released, there’s a couple small issues I need to work out import traceback from pyrx import Ap, Db, Ge # ----------------------------- # Simple spline-based vector font # ----------------------------- FONT = { "H": [[(0, 0), (0, 10)], [(5, 0), (5, 10)], [(0, 5), (5, 5)]], "A": [[(0, 0), (2.5, 10), (5, 0)], [(1.2, 5), (3.8, 5)]], "P": [[(0, 0), (0, 10)], [(0, 10), (5, 9), (5, 6), (0, 5)]], "Y": [[(0, 10), (2.5, 5)], [(5, 10), (2.5, 5)], [(2.5, 5), (2.5, 0)]], "N": [[(0, 0), (0, 10)], [(0, 10), (5, 0)], [(5, 0), (5, 10)]], "E": [[(5, 0), (0, 0), (0, 10), (5, 10)], [(0, 5), (4, 5)]], "W": [[(0, 10), (1.2, 0), (2.5, 6), (3.8, 0), (5, 10)]], "R": [[(0, 0), (0, 10)], [(0, 10), (5, 9), (5, 6), (0, 5)], [(0, 5), (5, 0)]], " ": [], } # ----------------------------- # Create a spline from points # ----------------------------- def add_spline(ms, pts, base, scale): arr = [] for p in pts: arr.append(Ge.Point3d(base.x + p[0] * scale, base.y + p[1] * scale, 0.0)) spline = Db.Spline(arr, 3, 0.0) ms.appendAcDbEntity(spline) # ----------------------------- # Write text as splines # ----------------------------- def write_happy_new_year(start=Ge.Point3d(0, 0, 0), scale=5.0, spacing=8.0): db = Db.curDb() ms = Db.BlockTableRecord(db.modelSpaceId(), Db.OpenMode.kForWrite) cursor = Ge.Point3d(start.x, start.y, 0) text = "HAPPY NEW YEAR" for ch in text: strokes = FONT.get(ch.upper(), []) for stroke in strokes: add_spline(ms, stroke, cursor, scale) cursor.x += spacing * scale # ----------------------------- # Entry point # ----------------------------- def PyRxCmd_HAPPYNEWYEAR(): try: write_happy_new_year(start=Ge.Point3d(0, 0, 0), scale=2.5, spacing=7.0) except Exception as err: traceback.print_exception(err)1 point
-
My 0.02¢ sprinkle some code in updates a variable through out the code. and recall it with error trapping This will show Error# 4 : bad argument type <(40)> ; expected <NUMBER> at [DXF/XED data] this error message would tell you to look after (setq x "4") for the error. (defun c:CIR (/ cen rad) (defun *error* (msg) (if (not (member msg '( "Function cancelled" "quit / exit abort"))) (princ (strcat "\nError# " x " : " msg)) ) (princ) ) (setq x "1") (setq cen (getpoint "\nSpecify center point: ")) (setq x "2") (if cen (progn (setq x "3") (setq rad (getdist cen "\nSpecify radius: ")) (setq x "4") (if rad (entmake (list '(0 . "CIRCLE") '(100 . "AcDbEntity") '(100 . "AcDbCircle") (cons 10 cen) (cons 40 ra))) ) (setq x "5") ) ) (setq x "6") (princ) ) -edit guess this is more steps then what Steven P posted. Also remember someone saying that zwcad can't use some vl commands.1 point
-
Like Steven P often use an Alert so it stops and can see where it got to. I tend to test code as I make it so I don't write all the code then test, If using defuns in main code test them by using Setq to set the value of the variables used in the defun and I use copy code and paste to command line to run a few lines at a time. The obvious problem I use Notepad++, is check for open and close bracket matching as I create code. I think it was ZWCAD that wrote VBA code when using macro record am I correct ?1 point
-
Not sure for ZWCad, but if you put checks into the code this can narrow down to where there error is. For example (princ "\nOK to here 1")... and 2, 3, 4 etc will show where the code runs to before an error (often errors are grammatically correct and just not doing what you want). Might help you out till you get another answer1 point
-
Here’s a test extracting data from multiple drawings import traceback import pandas as pd import os from pyrx import Ap, Db, Ed, Ge def proccessDrawing(db: Db.Database, data: dict): blk_dict = db.getBlocks() fname = os.path.basename(db.getFilename()) data[fname] = [] for name, id in blk_dict.items(): if name != "RMNUM": continue btr = Db.BlockTableRecord(id) for refid in btr.getBlockReferenceIds(): blkref = Db.BlockReference(refid) for attid in blkref.attributeIds(): attref = Db.AttributeReference(attid) data[fname].append(attref.textString()) def openSideDatabase(dwg_path: str, data: dict): sdb = Db.Database(False, True) sdb.readDwgFile(dwg_path) sdb.closeInput(True) proccessDrawing(sdb, data) @Ap.Command() def doit(): try: data = {} dwgs = Ap.Application.listFilesInPath("E:\\FloorPlans", ".dwg") for dwg in dwgs: openSideDatabase(dwg, data) df = pd.DataFrame(data) print(df) except Exception as err: traceback.print_exception(err) output : Success module _DOIT is loaded: Command: doit 1st floor.dwg 2nd floor.dwg 3rd floor.dwg 0 1049 2049 3049 1 1045 2045 3045 2 1032 2032 3032 3 1048 2048 3048 4 1046 2046 3046 .. ... ... ... 94 1122 2122 3122 95 1106 2106 3106 96 1104 2104 3104 97 1093 2093 3093 98 1042 2042 3042 [99 rows x 3 columns]1 point
-
A couple of LISPs, PurgeZeroLengths and PurgeZeroTexts: Note that purgezerolengths has a 'less than a length' for very short lines, here set at 0.01 - comment that out with ;; at the beginning of the line if not needed. These remove orphaned lines and texts. Copy and paste to a new drawing (top left -> bottom right seletion) or wblock does a lot. If not needed delete points - don't show up on the printed page, and if not needed get rid. Bit more effort but using blocks for repeated objects can remove some bloating. If you don't need them to be polylines, explode 2 vertex polylines into lines (2nd LISP box below). Explode heavy polylines into LW polylines of you can, both smaller file sizes One I have tucked away, join perpendicular lines back together - example convert from PDF, dashes are individual lines, this will go some way to recreating them as lines - run after 2 vertex poly to line (3rd LISP box, not perfect, only does H or V lines) (defun c:PurgeZeroLengths ( / MySS DelSS MyEnt EndA EndB) ;; for within blocks (setq MySS (ssget (list (cons 0 "LINE,SPLINE,LWPOLYLINE,POLYLINE,ARC,CIRCLE,ELLIPSE")))) (setq acount 0) (setq DelSS (ssadd)) (while (< acount (sslength MySS)) (setq MyEnt (ssname MySS acount)) (if (equal (vlax-curve-getDistAtParam MyEnt (vlax-curve-getEndParam MyEnt)) 0) (progn (setq DelSS (ssadd MyEnt DelSS)) ) ) ; end if ;;If less then a length (if (< (vlax-curve-getDistAtParam MyEnt (vlax-curve-getEndParam MyEnt)) 0.01) (progn (setq DelSS (ssadd MyEnt DelSS)) ) ) ; end if (setq acount (+ acount 1)) ) ; end while (princ "\nDeleting ")(princ (sslength DelSS))(princ " lines") (command "erase" DelSS "") (princ) ) (defun c:PurgeZeroTexts ( / MySS DelSS MyEnt MyText) ;; for within blocks (setq MySS (ssget (list (cons 0 "*TEXT")(cons 1 "")))) (setq acount 0) (setq DelSS (ssadd)) (if MySS (progn (while (< acount (sslength MySS)) (setq MyEnt (ssname MySS acount)) (setq MyText (cdr (assoc 1 (entget MyEnt)))) (if (equal MyText "") (progn (setq DelSS (ssadd MyEnt DelSS)) ) ) ; end if (setq acount (+ acount 1)) ) ; end while (princ "\nDeleting ")(princ (sslength DelSS))(princ " lines") (command "erase" DelSS "") ) ; end progn (progn (princ "No zero content texts found") ) ) ; end if (princ) ) (defun c:pdfDashed2PL ( / MyEnt MySS EndA EndB LEndA LEndB Orientation acount EndPoints LineLengths) ;; Selects by layer and colour (defun LoadLineType (doc LineTypeName FileName) ;;https://www.cadtutor.net/forum/topic/76557-load-linetypes-from-lisphelp/ (if (and (not (existLinetype doc LineTypeName)) (vl-catch-all-error-p (vl-catch-all-apply 'vla-load (list (vla-get-Linetypes doc) LineTypeName FileName) )) ; end vl-catch ) ; end and nil T ) ; end if ) ; end defun (defun existLinetype (doc LineTypeName / item loaded) (vlax-for item (vla-get-linetypes doc) (if (= (strcase (vla-get-name item)) (strcase LineTypeName)) (setq loaded T) ) ) ) (setq thisdrawing (vla-get-activedocument (vlax-get-acad-object))) (vla-startundomark thisdrawing) ;;Load Line Types (LoadLineType ThisDrawing "Dashed" "acad.lin") (LoadLineType ThisDrawing "Center" "acad.lin") ;;Select Reference Line (while (= MyEnt nil) (setq MyLine (car (entsel "\nSelect reference Line"))) (if (= MyLine nil) (princ "\nPity the fool, nothing selected. ") (setq MyEnt (entget MyLine)) ) ) ; end while ;;Work out 2 end points (if (= (cdr (assoc 0 MyEnt)) "LINE") (progn (setq EndA (cdr (assoc 10 MyEnt))) (setq EndB (cdr (assoc 11 MyEnt))) ) ; end progn (progn (setq EndA (cdr (assoc 10 MyEnt))) (setq EndB (cdr (assoc 10 (reverse MyEnt)))) ) ; end progn ) ; end if ;;Work out orientation (if (equal (car EndA) (car EndB) 0.0001) (progn (setq Orientation "V") ; Orientation (setq SSFilter "=,*,*") ; SSGET filter (setq EnFilter1 "caddr"); CAR / CADR Filter for entity (setq EnFilter2 "cadr") ; CAR / CADR Filter for entity ) ) (if (equal (cadr EndA)(cadr EndB) 0.0001) (progn (setq Orientation "H") (setq SSFilter "*,=,*") (setq EnFilter1 "cadr") (setq EnFilter2 "caddr") ) ) ;; Get Selection Set (if (= Orientation nil) (progn (princ "Selected line is not orthogonal") ) ; end progn no orientation (progn (princ "\nSelect Broken line: ") (if (assoc 62 MyEnt) (setq MySS (ssget (list (cons 0 "*LINE")(assoc 8 MyEnt)(assoc 62 MyEnt)(cons -4 SSFilter) (cons 10 EndA) ))) (setq MySS (ssget (list (cons 0 "*LINE")(assoc 8 MyEnt)(cons -4 SSFilter) (cons 10 EndA) ))) ) ;; Delete non ortho from SS (setq acount (sslength MySS)) (setq EndPoints (list)) (setq LineLengths (list)) (while ( > acount 0) (setq AnEnt (entget (ssname MySS (- acount 1)))) (setq LEndA (assoc 10 AnEnt)) (if (= (cdr (assoc 0 AnEnt)) "LWPOLYLINE") (progn (setq LEndB (assoc 10 (reverse AnEnt))) ) (progn (setq LEndB (assoc 11 AnEnt)) ) ) ; end if (if (and (equal ((eval (read EnFilter2)) LEndA) ((eval (read EnFilter2)) (assoc 10 MyEnt)) 0.0001) (equal ((eval (read EnFilter2)) LEndB) ((eval (read EnFilter2)) (assoc 10 MyEnt)) 0.0001) ) ; end and (progn ;;Lines to join in SS (setq EndPoints (cons ((eval (read EnFilter1)) LendA) EndPoints)) (setq EndPoints (cons ((eval (read EnFilter1)) LendB) EndPoints)) (setq LineLengths (cons (distance (cdr LendA) (cdr LendB)) LineLengths)) ) (progn ;; Remove lines from SS (setq MySS (ssdel (ssname MySS (- acount 1)) MySS)) ;; Remove line from selection set ) ; end progn ) ; end if (setq acount (- acount 1)) ) ; end while (setq EndPoints (vl-sort EndPoints '<)) ; order small to large ;;Modify Reference Line (if (< ((eval (read EnFilter1)) EndA)((eval (read EnFilter1)) EndB)) (progn (if (= (cdr (assoc 0 MyEnt)) "LINE") (if (= Orientation "H") (progn (setq MyEnt (subst (cons 11 (list (car EndPoints) (cadr EndA) (caddr EndA))) (assoc 11 MyEnt) MyEnt )) (setq MyEnt (subst (cons 10 (list (last EndPoints) (cadr EndB) (caddr EndB))) (assoc 10 MyEnt) MyEnt )) (entmod MyEnt) ) ; end progn (progn (setq MyEnt (subst (cons 11 (list (car EndA) (car EndPoints) (caddr EndA))) (assoc 11 MyEnt) MyEnt )) (setq MyEnt (subst (cons 10 (list (car EndA) (last EndPoints) (caddr EndB))) (assoc 10 MyEnt) MyEnt )) (entmod MyEnt) ) ; end progn ) ; end if (if (= Orientation "H") (progn (setq MyEnt (subst (cons 10 (list (car EndPoints) (cadr EndA))) (assoc 10 (reverse MyEnt)) MyEnt )) (setq MyEnt (subst (cons 10 (list (last EndPoints) (cadr EndB))) (assoc 10 MyEnt) MyEnt )) (entmod MyEnt) ) ; end progn (progn (setq MyEnt (subst (cons 10 (list (car EndA) (car EndPoints))) (assoc 10 MyEnt) MyEnt )) (setq MyEnt (subst (cons 10 (list (car EndA) (last EndPoints))) (assoc 10 (reverse MyEnt)) MyEnt )) (entmod MyEnt) ) ; end progn ) ; end if ) ; end if line ;; (princ "\nEnd A smaller") ) ;end progn (progn (if (= (cdr (assoc 0 MyEnt)) "LINE") (if (= Orientation "H") (progn (setq MyEnt (subst (cons 11 (list (car EndPoints) (cadr EndA) (caddr EndA))) (assoc 11 MyEnt) MyEnt )) (setq MyEnt (subst (cons 10 (list (last EndPoints) (cadr EndB) (caddr EndB))) (assoc 10 MyEnt) MyEnt )) (entmod MyEnt) ) (progn (setq MyEnt (subst (cons 11 (list (car EndA) (car EndPoints) (caddr EndA))) (assoc 11 MyEnt) MyEnt )) (setq MyEnt (subst (cons 10 (list (car EndA) (last EndPoints) (caddr EndB))) (assoc 10 MyEnt) MyEnt )) (entmod MyEnt) ) ) (if (= Orientation "H") (progn (setq MyEnt (subst (cons 10 (list (car EndPoints) (cadr EndA))) (assoc 10 MyEnt) MyEnt )) (setq MyEnt (subst (cons 10 (list (last EndPoints) (cadr EndB))) (assoc 10 (reverse MyEnt)) MyEnt )) (entmod MyEnt) ) (progn (setq MyEnt (subst (cons 10 (list (car EndA) (car EndPoints))) (assoc 10 (reverse MyEnt)) MyEnt )) (setq MyEnt (subst (cons 10 (list (car EndA) (last EndPoints))) (assoc 10 MyEnt) MyEnt )) (entmod MyEnt) ) ) ) ; end if line ;; (princ "\nEnd B smaller") ) ; end progn ) ; end if smaller ;; set MyEnt to line type - dashed / centre (setq LineLengths (vl-sort LineLengths '<)) ; order small to large (if (< (* 2 (cadr LineLengths))(cadr (reverse LineLengths))) ; 2nd longest line 2x longer than 2nd shorted line (vla-put-Linetype (vlax-ename->vla-object MyLine) "Center") (vla-put-Linetype (vlax-ename->vla-object MyLine) "Dashed") ) (setq MySS (ssDel MyLine MySS)) (command "erase" MySS "") ) ; end progn H or V ) ; end if Orientation H or V (vla-Endundomark thisdrawing) (princ) )1 point
-
Need more information. What exactly are you doing, step by step? Do you have MAP 3D?1 point
-
What you'll probably need to do is set the proper coordinate system in your viewport. To make things simpler, you can create the proper view with UCS, give it a name, and save it. That way you can use it as many times as you need to. To prepare your plan, go to paper space, open the viewport, and "restore" the view. Once you have your linework at the right scale, angle, and location, lock the viewport. If your model is not supposed to look like a wireframe, check the properties for the Visual Style while in model space. If this doesn't help, please give us more information.1 point
-
To test my memory, I opened the default drawing, created a new scale 1:1, and drew a couple of objects and a dimension. I made the dimension annotative and gave it the 1:1 scale. I copied those objects to the clipboard. Then I opened a second new drawing, which had our template settings, including a 1:1 scale. I pasted the objects from the clipboard into the second drawing. You'll never guess what happened. The pasted dimension had a scale of 1:1_1. In other words, that's the type of name AutoCAD gives a duplicate scale when it doesn't want you to rename an arbitrarily large group of settings. Does that shed any light on the issue?1 point
-
How is "1:1_1" different from "1:1"? Is it possible there's a duplicate scale?1 point
-
1 point
-
I think the real-world situation may be more complex than what we’ve seen here so far. I took a look at the links that @SLW210 attached and decided to test the Lisp codes proposed up to this point. I looked through my drawings for something that could serve as an example for this problem, but it was like looking for a needle in a haystack. So, in the end, I decided to look for something in the real world that clearly corresponds to this issue — something like this: So I drew those margins and tested all the codes that have appeared in this thread so far. The result was… this! In the drawing, you can see the ones that managed to reach the end. However, the codes by BIGAL, GP_, GLAVCVS, and MarkoRibar couldn't even do that. Here’s the drawing AxisExple4.dwg1 point
-
Nice test @PGia, thanks! For some reason I didnt consider closed polylines in the _checkOffset function, so I added an extra check there. Should work as expected now: Not sure about the short corner. The lines are so narrow the centerline is pushed back out of the point. Seems to be logical to me but it does feel intuitive. Narrow indents don't get much love from the centerline. So "inlets" don't have enough influence on the shape of the line. What would the expected result be? Below makes sense since there is not enough space to go into the indent. Or are you maybe something like this where the line splits and goes into the hole:1 point
-
if you just want to go up and down use Ctrl+Pgdn, Ctrl+Pgup. This will let you jump to any layout. Goto-layout.lsp1 point
-
gsksun4 - It allows you to maximize the viewport. This gives you a model space view while working in a viewport. The advantage of working in this mode is the ability to work in model space with all the layers frozen in the viewport. You can double click outside the "red rope" to minimize the view.1 point
-
Just curious, why don't you scale and lock your viewport while you are inside the viewport? Select the scale from the viewport scale list on the status bar and then click on the padlock.1 point
