anoopab777 Posted January 5, 2013 Posted January 5, 2013 i want to divide a helix into number of segments...for this i used divide command..but its not working..what shall i do to divide the helix..no of segments or length of segment is not important...pls someone help me...thanks in sdvance... Quote
Dadgad Posted January 5, 2013 Posted January 5, 2013 Welcome to the forum. Try entering DDPTYPE at the commandline, then select a new point style which will be more visible along your helix, then try again. Quote
anoopab777 Posted January 5, 2013 Author Posted January 5, 2013 thank u so much for ur reply..it worked...now i can solve my problem...actually i thought the divide command will break the helix into no of segments.is there any option for doing it..??? Quote
anoopab777 Posted January 5, 2013 Author Posted January 5, 2013 once again "thank u so much" for ur help..... Quote
Dadgad Posted January 5, 2013 Posted January 5, 2013 once again "thank u so much" for ur help..... You are very welcome. All you need to do is specify the number of segments into which you wish to DIVIDE the entity, as shown in the image, and commandline history. Open your commandline up, so that while you are working it displays a total of 3 lines, the active commandline, and 2 lines of history. Quote
ReMark Posted January 5, 2013 Posted January 5, 2013 Please refrain from posting the same question a minute apart. It can lead to confusion and makes it frustrating to follow the course of a thread. Thank you. Quote
JD Mather Posted January 5, 2013 Posted January 5, 2013 I think the OP is asking for the one entity to become several entities rather than simply point markers. Quote
Dadgad Posted January 5, 2013 Posted January 5, 2013 I think the OP is asking for the one entity to become several entities rather than simply point markers. Now that you mention it JD, I bet you are correct, target fixated on the DIVIDE command. And reasonably shagged too. Quote
JD Mather Posted January 5, 2013 Posted January 5, 2013 As I recall isn't there some sort of Break at Point command in AutoCAD? Quote
Dadgad Posted January 5, 2013 Posted January 5, 2013 The BREAK commands while helpful aren't terribly accurate. If precision were important, I would create really tiny circles at each of those points, then create the breaks using the TRIM command, with the ALL option. Come to think of it, that still wouldn't be precise, as the two end segments would each be longer by the radius of the circle created for trimming. Quote
dbroada Posted January 5, 2013 Posted January 5, 2013 I would use the break command object sanpped to the node. You may have to... BREAK (select line) type F to indicate the first point. OSNAP one node for the second point either reselct OSNAP node or type @ continue with other nodes Quote
welldriller Posted January 21, 2013 Posted January 21, 2013 (edited) dadgad: Not a bad idea, but you could also use the line command, zoom, and then the trim command. This way you could control the size of the breaks also. welldriller Edited January 21, 2013 by welldriller correct spelling Quote
SLW210 Posted January 22, 2013 Posted January 22, 2013 I found these somwhere a while back. DIVCUT makes equal length segments, MESCUT makes segments of a specified length. ;; DIVCUT ;; Cut the selected object in the specified number of equal segments (defun c:divcut (/ ent end div len elst) (vl-load-com) (if (and (setq ent (car (entsel))) (not (vl-catch-all-error-p (setq end (vl-catch-all-apply 'vlax-curve-getEndParam (list ent)) ) ) ) (princ (strcat "\nObject length: " (rtos (setq len (vlax-curve-getDistAtParam ent end))) ) ) (setq div (getint "\nNumber of segments: ")) (< 0 div) (setq len (/ len div)) ) (progn (vla-StartUndoMark (vla-get-ActiveDocument (vlax-get-acad-object))) (repeat (1- div) (setq ent (cadr (CutCurveAtPoint ent (vlax-curve-getPointAtDist ent len)) ) ) ) (vla-EndUndoMark (vla-get-ActiveDocument (vlax-get-acad-object))) ) (princ "\nNon valid entity") ) (princ) ) ;; MESCUT ;; Cut the selecte object in segments of the specified length (defun c:mescut (/ ent end tot len div elst) (vl-load-com) (if (and (setq ent (car (entsel))) (not (vl-catch-all-error-p (setq end (vl-catch-all-apply 'vlax-curve-getEndParam (list ent)) ) ) ) (princ (strcat "\nObject length: " (rtos (setq tot (vlax-curve-getDistAtParam ent end))) ) ) (setq len (getdist "\nSegments length: ")) (< 0 len) (setq div (fix (/ tot len))) ) (progn (vla-StartUndoMark (vla-get-ActiveDocument (vlax-get-acad-object))) (repeat div (setq ent (cadr (CutCurveAtPoint ent (vlax-curve-getPointAtDist ent len)) ) ) ) (vla-EndUndoMark (vla-get-ActiveDocument (vlax-get-acad-object))) ) (princ "\nNon valid entity") ) (princ) ) ;; Cut a curve object at specified point ;; ;; Arguments ;; ent : the object to be cut (ename or vla-object) ;; pt : The cut point (WCS coordinates) ;; ;; Retur ;; a list of the two created objects (ename or vla-object) (defun CutCurveAtPoint (ent pt / vl lst cl start end ec os) (vl-load-com) (and (= (type ent) 'VLA-OBJECT) (setq ent (vlax-vla-object->ename ent) vl T ) ) (cond ((equal pt (vlax-curve-getEndPoint ent) 1e-9) (setq lst (list ent nil)) ) ((equal pt (vlax-curve-getStartPoint ent) 1e-9) (setq lst (list nil ent)) ) ((null (vlax-curve-getParamAtPoint ent pt)) (setq lst (list ent nil)) ) (T (setq start (trans (vlax-curve-getStartPoint ent) 0 1) end (trans (vlax-curve-getEndPoint ent) 0 1) ec (getvar "cmdecho") os (getvar "osmode") ) (setvar "cmdecho" 0) (setvar "osmode" 0) (if (and (wcmatch (cdr (assoc 0 (entget ent))) "*POLYLINE") (= 1 (logand 1 (cdr (assoc 70 (entget ent))))) ) (progn (command "_.break" ent (trans pt 0 1) "@") (setq cl (entlast)) ) (progn (if (= "POLYLINE" (cdr (assoc 0 (entget ent)))) (progn (entmake (entget ent)) (setq vx (entnext ent)) (while (= "VERTEX" (cdr (assoc 0 (entget vx)))) (entmake (entget vx)) (setq vx (entnext vx)) ) (entmake '((0 . "SEQEND"))) (setq cl (entlast) po T ) ) (setq cl (entmakex (entget ent))) ) (command "_.break" ent (trans pt 0 1) end) (and po (setq ent (entlast))) (command "_.break" cl start (trans pt 0 1)) (and po (setq cl (entlast))) ) ) (setvar "cmdecho" ec) (setvar "osmode" os) (setq lst (list ent cl)) ) ) (if vl (mapcar '(lambda (x) (if x (vlax-ename->vla-object x) ) ) lst ) lst ) ) Quote
Dadgad Posted January 22, 2013 Posted January 22, 2013 I like the looks of that DIVCUT, not that I know when I would ever use it, but still a good tool to have. Thanks SLW. 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.