+ Reply to Thread
Results 1 to 3 of 3

Thread: steve,about addpolyline

  1. #1

    steve,about addpolyline

    can you modify the rs.addpolyline method? i found the method will automaticlly remove duplicate points. then i can not add close polylines anymore. add one more option?

    Thanks.
    --sheng
    slightly i come, slightly i gone.

  2. #2
    Super Moderator Mitch's Avatar
    Join Date
    May 2010
    Location
    Switzerland
    Posts
    286
    This seems to be working here - I can create a closed polyline. It will not eliminate duplicate points if they are the first and last points in the list, only elsewhere if they are consecutive in the list.
    python Code:
      import rhinoscriptsyntax as rs
      pts=[(0,0,0),(1,0,0),(1,1,0),(0,2,0),(-1,1,0),(0,0,0)]
      rs.AddPolyline(pts)
    --Mitch

  3. #3
    Thanks Mitch.
    now i know why. use tuple in list. not list in list. thanks again!
    slightly i come, slightly i gone.

+ Reply to Thread

Posting Permissions

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