×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

breakinfg an polyline

breakinfg an polyline

breakinfg an polyline

(OP)
Hi there

I'm doing a culvert design and need to insert cross sections into the desing program. at present I use cross sections at 50m intervals. I need to break my polyline(representing my river) into 50m segments. is there a way of doing this? at present i have to measure manually and it takes time as my polyline as bends in it.

thanx

RE: breakinfg an polyline

Could DIVIDE be what you are lloking for?

"Everybody is ignorant, only on different subjects." — Will Rogers

RE: breakinfg an polyline

I thought about DIVIDE, too, but you'll need to extend/trim your PLINE to be a multiple of 50 in order to get 50m segments.

That, and I don't recall if DIVIDE actually breaks the lines/curves or just puts the points onto the PLINE.

--------------------
How much do YOU owe?
http://www.brillig.com/debt_clock/
--------------------

RE: breakinfg an polyline

(OP)
it does not seem to break the pline onto the segments. What is the function of it then?

RE: breakinfg an polyline

The divide command will put points (nodes) at 50m intervals along the polyline. Set your pdmode to something other than 0 to see the points better (a setting of 3 will show as an X). You can use the following macro to break the polyline at the points.

^C^CBREAK \F nod \@;

____________________
Acad2005, Terramodel

RE: breakinfg an polyline

(OP)
thax so much lpseifert. it worked just fine. the macro did not seem to work. I'll just break it manually.

thanx alot

RE: breakinfg an polyline

Hi,

I found a lisp, that would do that automatically.
1. _divide or _measure-> points
2. the lisp

CODE

(vl-load-com)
(defun BREAK-PKT(L LISTE /  LASTOBJEKT)    
  (setq LASTOBJEKT(entlast))
  (command "_break" L (car LISTE) (car LISTE))  
  (if (cdr LISTE)
    (progn
      (Break-PKT L (cdr LISTE))
      (if (entnext LASTOBJEKT)
        (Break-PKT (entnext LASTOBJEKT) (cdr LISTE))
      )
    )
  )  
)
(defun BREAK-PKT0( L /  PKTL LISTE INDEX)  
  (if (setq PKTL (ssget "_x"  '((0 . "POINT"))))        
    (progn      
      (setq INDEX -1)
      (repeat (sslength PKTL)
        (setq LISTE (cons (cdr(assoc 10 (entget(ssname PKTL (setq INDEX (1+ INDEX)))))) LISTE))
      )
      (if(setq LISTE(vl-remove-if-not
                      '(lambda(X)      
                        (equal                      
                          (distance
                            (vlax-curve-getClosestPointTo (vlax-ename->vla-object L) X)
                            X                        
                          )
                          0.0
                          0.001
                        )  
                      )  
                      LISTE
                    )  
        )      
        (Break-PKT L LISTE)
      )
    )
  )    
)
(defun c:BREAK-PKT( / L INDEX)
  (setvar "cmdecho" 0)
  (command "_ucs" "_w")
  (if (setq L (ssget '((0 . "LINE,*POLYLINE,ARC"))))
    (progn
      (setq INDEX -1)
      (repeat (sslength L)
        (BREAK-PKT0  (ssname L (setq INDEX (1+ INDEX))))
      )
    )
  )  
  (setvar "cmdecho" 1)
  (princ)
)

ADT 2004
ACAD 2002

RE: breakinfg an polyline

(OP)
how do i install/use the lisp

RE: breakinfg an polyline

(OP)
thanx for the help

RE: breakinfg an polyline

From the point command, use MEASURE--it work as I just tried it but be careful on the unit selection under "UNITS".

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources