ATTN: John Uhden @cv_inside bug.

Discussion in 'AutoCAD' started by BillZ, Apr 1, 2004.

  1. BillZ

    BillZ Guest

    R2004.
    John.
    While testing my area clear program that now implements the @cv_inside function I found this problem.
    My program produces a point that is way out in space (-6.88997e+015 11.283 0.0). This is possible when the two segments that I use the @delta function on to get the deflection angle return a very sharp angle (near zero).
    When this point is fed to @cv_inside it returns true.
    I found that (setq Points (vlax-invoke Outer "IntersectWith" $cv_ray acExtendNone)) returns a list of about 11 points.
    Command: (@cv_inside tp vlaobj-outline)

    (49.5598 9.51014 0.0 48.5162 9.36869 0.0 48.5162 7.37672 0.0 43.7037 7.37672
    0.0 43.7037 9.98428 0.0 43.7208 10.0058 0.0 43.8535 10.2601 0.0 44.1099 10.4392
    0.0 48.6099 10.4392 0.0 48.5162 10.4392 0.0 48.5162 10.4472 0.0)
    Thus cv_inside returns T.
    The polygon outline is not very complex or odd (like a box with a bulge and an inverted corner) So the ray should not cross more than 2 or 3 times.
    I may be able to fix my side so that it doesn't create a point like that but thought I should still say something in case others have trouble.

    Bill
     
    BillZ, Apr 1, 2004
    #1
  2. BillZ

    BillZ Guest

    Hmm...
    I'm looking at it with the ray made visible.
    When I'm zoomed in it creates that point I talked about.
    When I'm zoomed out a few X, it doesn't make the point way out in space. Works perfect.
    I'm confused, why would the zoom affect a point calculation?
    (setq ds2 (/ dis1 (cos (/ an3 2.0))) ;distance of offset.
    ptx (polar p1 (+ (+ an1 ang1)(/ an3 2.0)) ds2) ;offset point from vertex at 1/2 included angle.
    cnt (1+ cnt)
    )
    Even with that weird point, why would (vlax-invoke Outer "IntersectWith" $cv_ray acExtendNone) return a weird list on that point?

    Bill
     
    BillZ, Apr 1, 2004
    #2
  3. BillZ

    Joe Burke Guest

    Bill,

    See John's thread subject: @Inside "Look, Ma... No Rays!" dated 9/15/2003.

    Joe Burke
     
    Joe Burke, Apr 1, 2004
    #3
  4. BillZ

    John Uhden Guest

    Bill (and thanks Joe for the history):

    I never finished it. Rays are NOT the answer. We had poor Doug chasing his
    tail and I still feel bad about it.
    I'm so blasted busy these days that I can't even play here too much. But please
    feel free to pester me (even by e-mail; hell eveyone else does), and I'll try to
    wrap it up. The real solution was to sum the deflections around the perimiter
    (I know you know about deflections), but there were issues with polylines vs.
    ellipses, I think. Then again, who needs ellipses? My PELLIPSE variable is set
    to 1 so I can offset the blasted things and maintain the equidistance (izzat a
    word?).




    0.0). This is possible when the two segments that I use the @delta function on
    to get the deflection angle return a very sharp angle (near zero).
    acExtendNone)) returns a list of about 11 points.
    inverted corner) So the ray should not cross more than 2 or 3 times.
    thought I should still say something in case others have trouble.
     
    John Uhden, Apr 3, 2004
    #4
  5. BillZ

    Joe Burke Guest

    John,

    Glad to hear you've been blasted lately. I was beginning to wonder if we were simply
    boring you. :)

    Yup, that's a word.

    Joe
     
    Joe Burke, Apr 3, 2004
    #5
  6. BillZ

    John Uhden Guest

    Found time to play.
    Check out the latest @cv_inside.lsp (attached).




    0.0). This is possible when the two segments that I use the @delta function on
    to get the deflection angle return a very sharp angle (near zero).
    acExtendNone)) returns a list of about 11 points.
    inverted corner) So the ray should not cross more than 2 or 3 times.
    thought I should still say something in case others have trouble.
     
    John Uhden, Apr 4, 2004
    #6
  7. BillZ

    BillZ Guest

    John,
    Can you send me the new @cv_inside via email?
    They have so protected with anti-virus and anti-spam software right now that I can't touch the attachments.
    Or try posting in CF.
    Thanks
    Bill
     
    BillZ, Apr 5, 2004
    #7
  8. BillZ

    BillZ Guest

    Forget that last post John. I got the routine.

    Thanks

    Bill
     
    BillZ, Apr 5, 2004
    #8
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.