+ Reply to Thread
Results 1 to 3 of 3

Thread: CurvePlane() Bug?

Threaded View

  1. #1

    CurvePlane() Bug?

    Hi people,

    Now I am trying to extract a curve plane using CurvePlane() method.
    However, this function always returns None value when it come to the certain curve, which is actually planar polyline. (and when I check planarity of this curve using isCurvePlanar(), the result says the curve is not planar, although it is)
    I spent a lot of time to figure out why with no luck..


    It will be really appreciated if you can give me some help!
    I simplified the code and also attach the curve that has a problem with CurvePlane().

    Thank you!

    Code:
    import rhinoscriptsyntax as rs
    curve = rs.GetObject("Select a curve", rs.filter.curve)
    plane = rs.CurvePlane(curve)
    print(plane)
    Attached Files
    Last edited by noclew; 05-16-2012 at 02:32 AM.

  2. #2
    Super Moderator Mitch's Avatar
    Join Date
    May 2010
    Location
    Switzerland
    Posts
    285
    This is not really a problem with Python - it's just that for some reason Rhino thinks the curve is not planar - it may be out at some molecular level... or there is a bug somewhere. If IsCurvePlanar fails, then Rhino doesn't think it's planar and CurvePlane will return None, which is normal if you feed it a non planar curve.

    --Mitch

  3. #3
    Thank Mtch,

    I agree. Looking into the curvePlane method, I found that isCurvePlanar does not work on some curves even though they are valid planar geometry. It is strange that if I manipulate erroneous curves using closeCurve or exploding and joining them in different manners, curvePlane starts to work. I will see if I can found a way to circumvent this problem. It seems there some bugs... Thank for you comment Mitch!

+ 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