VicoWang Posted Friday at 08:25 AM Posted Friday at 08:25 AM A smarter break command for Line, Polyline, Circle, Arc, Ellipse, and Spline objects. Supports both single-point and two-point break operations. PS: This is a super simple feature requirement from a real beginner user, so it's also shared. Installation method (upgradable in the future): [Smart Break] VCID: D86938 @ VedaCAD Note: To install via VCID, you need to install VedaCAD in advance and log in to a free account (or PRO account). Tips: Welcome developers to publish their plugins on VedaCAD and obtain their plugin's VCID for plugin sharing (even free accounts can publish) Smart Break.mov Quote
BIGAL Posted Saturday at 04:53 AM Posted Saturday at 04:53 AM (edited) Just a comment, in some instances, one bug with trimming ends as in the triangles is that it is a visual display thing, but for quantities need the true length including the cut out bit. Can be done using other methods. Did you do a google and look at Forums/autodesk pretty sure have seen that done before and code was provided. A google search revealed multiple pages re this subject. Edited Saturday at 04:54 AM by BIGAL Quote
VicoWang Posted Saturday at 05:08 AM Author Posted Saturday at 05:08 AM 10 minutes ago, BIGAL said: Just a comment, in some instances, one bug with trimming ends as in the triangles is that it is a visual display thing, but for quantities need the true length including the cut out bit. Can be done using other methods. Did you do a google and look at Forums/autodesk pretty sure have seen that done before and code was provided. A google search revealed multiple pages re this subject. Spot on, BIGAL. You're 100% right about the quantity takeoff (QTO) catch. In civil and structural workflows, physically severing a line or pipe geometry for cosmetic reasons creates absolute havoc when extracting true lengths and schedules later on. This quick routine was built purely for 2D drafting/detailing where visual layout takes precedence, but your point about true engineering lengths is a vital distinction that every drafter should keep in mind. To your second point: you're completely right. In the 40-year history of AutoCAD and AutoLISP, is there any daily drafting convenience routine that hasn't already been written a dozen times over? This tool actually came from a junior drafter on another forum who was struggling with basic break operations. For veterans who have spent decades in the forums, digging up a 15-year-old snippet or writing a quick defun is second nature. But for someone just starting out today, wading through thousands of fragmented legacy threads, dealing with APPLOAD, and fixing support paths is an intimidating barrier. And that’s honestly the whole philosophy behind what I’m building with VedaCAD. The goal isn't to claim that I've invented groundbreaking algorithms or brand-new geometry math. The code already exists in the collective wisdom of this community. The bottleneck has always been accessibility and distribution. Packaging even the simplest, most mundane utility into a 6-character VCID isn't about code prestige—it’s about bridging that gap so a beginner can get up and running in 2 seconds without the 30-year-old deployment friction. Really appreciate the engineering critique on the cut-out lengths—always learning from the veterans here! Quote
SLW210 Posted 1 hour ago Posted 1 hour ago Does it break an Ellipse that was created with PELLIPSE = 1, which is the old style Polyline, a.k.a. Heavy Polyline and 2D Polyline? 3D Polylines? Quote
VicoWang Posted 56 minutes ago Author Posted 56 minutes ago 30 minutes ago, SLW210 said: Does it break an Ellipse that was created with PELLIPSE = 1, which is the old style Polyline, a.k.a. Heavy Polyline and 2D Polyline? 3D Polylines? Good eye! To be honest, this is simply a lightweight wrapper around the native ._BREAK command — no custom vlax-curve stuff here. It just passes the pick points directly to CAD. So for edge cases like 3D Polylines or closed objects (PELLIPSE = 1), it completely inherits standard AutoCAD behavior (and its native limitations). Here is the source code so you can see exactly what it's doing under the hood: ;; ----------------------------------------------------------------------------- ;; Plugin Name: Smart Break ;; Version: 1.0 ;; Author: Vico ;; Description: A smarter break command for Line, Polyline, Circle, Arc, Ellipse, ;; and Spline objects. Supports both single-point and two-point break operations. ;; ----------------------------------------------------------------------------- (defun c:SB ( / *error* old_osmode old_cmdecho ent pt1 pt2 ) (defun *error* ( msg ) (if old_osmode (setvar "OSMODE" old_osmode)) (if old_cmdecho (setvar "CMDECHO" old_cmdecho)) (princ) ) (setq old_osmode (getvar "OSMODE")) (setq old_cmdecho (getvar "CMDECHO")) (setvar "OSMODE" 545) (setvar "CMDECHO" 0) (if (setq ent (entsel "\nSelect object to break: ")) (if (setq pt1 (getpoint "\nSpecify first break point: ")) (progn (setq pt2 (getpoint pt1 "\nSpecify second break point <Press ENTER for single point>: ")) (if (not pt2) (setq pt2 pt1) ) (vl-cmdf "._BREAK" ent "_F" "_non" pt1 "_non" pt2) ) ) ) (setvar "OSMODE" old_osmode) (setvar "CMDECHO" old_cmdecho) (princ) ) (princ "\nSmart Break v1.0 by Vico loaded. Type SB to execute.") (princ) 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.