+ Reply to Thread
Results 1 to 5 of 5

Thread: Is Line function

  1. #1

    Is Line function

    If I use the IsLine() on the following line. It returns False. Even though in Rhino under the details for the element is says it is a line. The file is attached.


    Code:
    Object1 = rs.GetObject('Select Curve',4)
    
    LineTest1 = rs.IsLine(Object1)
    
    print(LineTest1)
    Attached Images
    Attached Files

  2. #2
    Senior Member Steve Baer's Avatar
    Join Date
    Apr 2010
    Location
    Seattle
    Posts
    1,464
    Blog Entries
    19
    The attached file didn't have a line in it. I ran a quick test by creating a line in Rhino and got a return value of True from your script so you'll probably need to report your file so I can test with that specific piece of geometry.

    Thanks,
    -Steve

  3. #3
    Yeah your right. I must not have saved it before I uploaded it. Here it is again.

    Actually I did the same thing and found if I use "Line' in Rhino it does return True. If I use "Polyline" with 2 points it returns False.

    Dennis
    Attached Files

  4. #4
    Senior Member Steve Baer's Avatar
    Join Date
    Apr 2010
    Location
    Seattle
    Posts
    1,464
    Blog Entries
    19
    Got it. I see that the original RhinoScript version of this function treats any two-point curve as a line. I just made these changes in the source code so you should see this fix in an upcoming beta. You can also get the fix from github at
    https://github.com/mcneel/rhinopytho...cript/curve.py

    Thanks,
    -Steve

  5. #5
    Sweet. Thanks.

+ Reply to Thread

Tags for this 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