Results 1 to 9 of 9

Thread: sequence redefine leadership and direction of a polyline composed of lines and arcs

  1. #1
    Member
    Join Date
    2009-01
    Posts
    33
    Login to Give a bone
    0

    Default sequence redefine leadership and direction of a polyline composed of lines and arcs

    you can redefine the squenza points, and their line of a polyline?

    In practice I have many polylines which I want to change the start and then the sequence of the other, or the direction.

    basically I want to export the heads and try to pass the txt file to a CNC machine.

    thanks

  2. #2
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: sequence redefine leadership and direction of a polyline composed of lines and arcs

    In AutoCAD 2011 the PEdit command has an option to reverse the PLine.
    R. Robert Bell
    Design Technology Manager
    Stantec
    Opinions expressed are mine alone and do not reflect the views of Stantec.

  3. #3
    AUGI Addict
    Join Date
    2008-02
    Posts
    1,141
    Login to Give a bone
    0

    Default Re: sequence redefine leadership and direction of a polyline composed of lines and arcs

    Quote Originally Posted by RobertB View Post
    In AutoCAD 2011 the PEdit command has an option to reverse the PLine.
    Wow, is that what he meant?

  4. #4
    Member
    Join Date
    2009-01
    Posts
    33
    Login to Give a bone
    0

    Default Re: sequence redefine leadership and direction of a polyline composed of lines and arcs

    I want to change the initial vertex and direction of a polyline made up of lines and arcs.....

    I hope I was clear

    thank you

  5. #5
    All AUGI, all the time
    Join Date
    2015-10
    Location
    Belgrade, Serbia, Europe
    Posts
    564
    Login to Give a bone
    0

    Default Re: sequence redefine leadership and direction of a polyline composed of lines and arcs

    If you change initial vertex of a polyline, the whole polyline would look different... In CAD it is essential important the order of procedure of witch the entities are created... This order is kept in its memory and entity data... You can only modify entity in new manner, but everything previously made will be the same... Just think of it, you have polyline; and if your first vertex becomes someone else, entity data would be moved from initial first (assoc 10 edata of a polyline) to some else (assoc 10 edata) and what would be with other (assoc 10 edata) ? - one part of the list of entity data would remain the same - from that some (assoc 10 edata) to the end, but first part - to that some (assoc 10 edata) would go to the end... The whole look of polyline would be different...

    Direction of entity you can change in ACAD 2011 by reversing order of points through PEDIT -> edit vertex -> reverse ... Then the polyline would look the same and only procedure of its creation would be inverted...

  6. #6
    All AUGI, all the time
    Join Date
    2015-10
    Location
    Belgrade, Serbia, Europe
    Posts
    564
    Login to Give a bone
    0

    Default Re: sequence redefine leadership and direction of a polyline composed of lines and arcs

    Anyway, if the polyline is closed - for other I don't guarantee that you'll get result you want, you can apply this routine :

    Code:
    (defun c:ChInitVert ()
    (prompt "\nPick closed polyline with arcs")
    (setq e (car (entsel)))
    (setq ed (entget e))
    (setq edd nil)
    (setq q -1)
    (while (< q 0)
    (progn
    (setq ec (car ed))
    (setq ed (cdr ed))
    (if (eq (car ec) 10) (progn (setq ed (cons ec ed)) (setq edd (reverse edd)) (setq q 1)) (setq edd (cons ec edd)))
    ))
    (setq eddd nil)
    (setq eddd1 nil)
    (setq eddd2 nil)
    (setq eddd ed)
    (setq m (getreal "\nInput number of witch vertex do you want to become initial counting original as 0 : "))
    (setq n (* m 5))
    (setq i 0)
    (foreach ec eddd
    (progn
    (setq i (+ i 1))
    (if (<= i n)
    (setq eddd1 (cons ec eddd1))
    )
    (if (> i n)
    (setq eddd2 (cons ec eddd2))
    )
    ))
    (setq eddd1 (reverse eddd1))
    (setq eddd2 (cdr eddd2))
    (setq eddd2 (reverse eddd2))
    (setq eddd3 '((210 0.0 0.0 1.0)))
    (setq newed (append edd eddd2 eddd1 eddd3))
    (entmod newed)
    (entupd e)
    (princ "\nAfter ChInitVert, run PEDIT->Edit Vertex to see change")
    (textscr)
    (princ)
    )
    M.R.
    Last edited by marko_ribar; 2010-10-20 at 02:09 PM. Reason: CODE IS NOW GOOD - TEST IT

  7. #7
    Member
    Join Date
    2009-01
    Posts
    33
    Login to Give a bone
    0

    Default Re: sequence redefine leadership and direction of a polyline composed of lines and arcs

    it's not good routine for pline with many arcs........because change the look of the polyline

  8. #8
    All AUGI, all the time
    Join Date
    2015-10
    Location
    Belgrade, Serbia, Europe
    Posts
    564
    Login to Give a bone
    0

    Default Re: sequence redefine leadership and direction of a polyline composed of lines and arcs

    I've made corrections...

    test it now...

    M.R.

    To see another solution view :
    https://forums.augi.com/showthread.php?p=1105551
    Last edited by marko_ribar; 2010-10-21 at 08:14 AM. Reason: more elegant solution of routine...

  9. #9
    AUGI Addict
    Join Date
    2008-02
    Posts
    1,141
    Login to Give a bone
    0

    Default Re: sequence redefine leadership and direction of a polyline composed of lines and arcs

    I wrote this for reversing the direction of LWPolylines, Lines and Splines.

Similar Threads

  1. Spline algorith for polyline arcs
    By Alex.Kostikov in forum AutoCAD General
    Replies: 0
    Last Post: 2010-01-20, 10:00 PM
  2. Replies: 6
    Last Post: 2009-04-16, 11:23 AM
  3. Family Composed of Symbolic Lines Only
    By jeff.richards in forum Revit Architecture - Families
    Replies: 4
    Last Post: 2008-12-07, 09:13 PM
  4. Help reversing direction of polyline
    By jpaulsen in forum AutoLISP
    Replies: 4
    Last Post: 2006-12-20, 02:26 PM
  5. Linetype text direction on arcs
    By Ammon in forum AutoCAD Customization
    Replies: 8
    Last Post: 2005-12-08, 04:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •