Ankit Pandit Posted 8 hours ago Posted 8 hours ago Hi everyone, Ankit here. I’m currently looking for a reliable solution to generate 2D outer boundaries for complex drawings in AutoCAD. The solution should be: Highly accurate (able to capture minute details) Efficient in terms of performance (handling large/complex drawings smoothly) Capable of working with imperfect geometry (small gaps, overlaps, etc.) I’ve used tools like TotalBoundary earlier, but since it’s no longer purchasable/accessible, I’m exploring alternatives. Does anyone know of any plugin, LISP, or workflow that can achieve similar or better results? Any recommendations would be really helpful. Thanks in advance! Quote
SLW210 Posted 1 hour ago Posted 1 hour ago Here is something simple I threw together a while ago. Not everything you want, but should help. I started a more extreme version with more options back when people were posting they couldn't get TotalBoundary and SuperBoundary any longer. I'll try to get back on it this week, in the mean time, if you could post a drawing with some before and after it would help. I have no idea what all TotalBoundary and SuperBoundary does, it may help to explain exactly how you need to select and exactly what should be a boundary in your drawing it might might it easier. Hopefully a better LISPer will jump in. ;;; Select objects that define outlines. Works on LINE/ARC/CIRCLE/SPLINE/LWPOLYLINE. ;;; ;;; https://www.cadtutor.net/forum/topic/99063-need-a-tool-for-creating-2d-outlines-for-complex-2d-drawings/#findComment-678789 ;;; ;;; By SLW210 (a.k.a. Steve Wilson) ;;; ;;; MakeOut.lsp (defun c:MakeOut (/ ss i ent lst pts plines regions pp) (vl-load-com) (if (setq ss (ssget '((0 . "LINE,ARC,CIRCLE,SPLINE,LWPOLYLINE")))) (progn (setq i 0) (while (< i (sslength ss)) (setq ent (ssname ss i)) (setq i (1+ i)) ) (command "_.-boundary" ss "") (command "_.pedit" ss "" "J" "" "Y") (setq i 0) (while (< i (sslength ss)) (setq ent (ssname ss i)) (if (= (cdr (assoc 0 (entget ent))) "LWPOLYLINE") (progn (command "_.pedit" ent "" "S" "0.01" "") (command "_.pedit" ent "" "C" "") ) ) (setq i (1+ i)) ) (princ "\nOutline created.") ) (princ "\nNo valid entities selected.") ) (princ) ) 1 Quote
Ankit Pandit Posted 43 minutes ago Author Posted 43 minutes ago 43 minutes ago, SLW210 said: Here is something simple I threw together a while ago. Not everything you want, but should help. I started a more extreme version with more options back when people were posting they couldn't get TotalBoundary and SuperBoundary any longer. I'll try to get back on it this week, in the mean time, if you could post a drawing with some before and after it would help. I have no idea what all TotalBoundary and SuperBoundary does, it may help to explain exactly how you need to select and exactly what should be a boundary in your drawing it might might it easier. Hopefully a better LISPer will jump in. ;;; Select objects that define outlines. Works on LINE/ARC/CIRCLE/SPLINE/LWPOLYLINE. ;;; ;;; https://www.cadtutor.net/forum/topic/99063-need-a-tool-for-creating-2d-outlines-for-complex-2d-drawings/#findComment-678789 ;;; ;;; By SLW210 (a.k.a. Steve Wilson) ;;; ;;; MakeOut.lsp (defun c:MakeOut (/ ss i ent lst pts plines regions pp) (vl-load-com) (if (setq ss (ssget '((0 . "LINE,ARC,CIRCLE,SPLINE,LWPOLYLINE")))) (progn (setq i 0) (while (< i (sslength ss)) (setq ent (ssname ss i)) (setq i (1+ i)) ) (command "_.-boundary" ss "") (command "_.pedit" ss "" "J" "" "Y") (setq i 0) (while (< i (sslength ss)) (setq ent (ssname ss i)) (if (= (cdr (assoc 0 (entget ent))) "LWPOLYLINE") (progn (command "_.pedit" ent "" "S" "0.01" "") (command "_.pedit" ent "" "C" "") ) ) (setq i (1+ i)) ) (princ "\nOutline created.") ) (princ "\nNo valid entities selected.") ) (princ) ) Thanks for sharing this, really appreciate it. I gave your LISP a try on a few drawings — it works quite well on cleaner geometry, so that was helpful. In my case, I’m mostly dealing with drawings that have small gaps or slightly messy geometry, and that’s where I’m still seeing some inconsistencies with boundary creation. Your point about sharing an example makes sense — I’ll put together a sample with before/after to better explain the issue. I’ve also been experimenting with a slightly different approach for handling these kinds of cases, especially for more complex drawings. I’ll share a quick example once I clean it up a bit. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.