Results 1 to 4 of 4

Thread: IntersectWith says lines don't intersect

  1. #1
    Login to Give a bone
    0

    Angry IntersectWith says lines don't intersect

    Using the Extend command both sets of lines below will intersect each other. Using the line command and intersection snap for line selection, both line sets return a line from the apparent intersection. Using VBA IntersectWith the first set of lines fails, the second set of lines returns a point.

    The line points are determined mathmatecally identically, the only difference between the coordinates is the UCS used to perform the design. Why does it not work and produce the same results regardless of the UCS?

    Code:
    Dim oPoint as variant
    opoint = oline1.IntersectWith(oline2, acExtendBoth)

    Data for the fail result:
    Line 1:
    156,278.737825336822,0
    156,245.665579823409,118.1451695696

    Line 2:
    23.0866842342004,277.987825336822,0
    156,244.915579823409,118.1451695696


    Data for the working result
    Line 1:
    15,139.75,-2.012174663178
    -103.1451695696,139.75,-35.0844201765914

    Line 2:
    15,271.9133157658,-2.012174663178
    -103.1451695696,139,-35.0844201765914

  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: IntersectWith says lines don't intersect

    I think that posting the drawing(s) itself might attract more help.
    R. Robert Bell
    Design Technology Manager
    Stantec
    Opinions expressed are mine alone and do not reflect the views of Stantec.

  3. #3
    AUGI Addict fixo's Avatar
    Join Date
    2005-05
    Location
    Pietari, Venäjä
    Posts
    1,269
    Login to Give a bone
    0

    Default Re: IntersectWith says lines don't intersect

    Just a shot in the dark:
    Check elevation properties for both lines

    ~'J'~
    "The whole problem with the world is that fools and fanatics are always
    so certain of themselves, and wiser people so full of doubts."
    Bertrand Russell

  4. #4
    Login to Give a bone
    0

    Default Re: IntersectWith says lines don't intersect

    Finally got back to this project ... as it turns out, the lines being used to determine the intersection were pars of a solid that cannot be referenced.

    Once I drew lines about those edges of the solids necessary to determine intersections, it all worked ok.

    Lesson learned ... you can't reference something that isn't physically there with VBA.

Similar Threads

  1. IntersectWith motod problem VBA
    By 4gokay372489 in forum VBA/COM Interop
    Replies: 1
    Last Post: 2013-02-06, 11:22 AM
  2. IntersectWith Problems
    By srperrier in forum Dot Net API
    Replies: 0
    Last Post: 2011-08-05, 08:07 PM
  3. Problems with IntersectWith
    By Lee Mac in forum AutoLISP
    Replies: 3
    Last Post: 2009-05-17, 11:20 PM
  4. Intersectwith issue
    By kerbocad in forum VBA/COM Interop
    Replies: 2
    Last Post: 2009-02-19, 03:27 PM
  5. IntersectWith Question
    By david.brissenden in forum VBA/COM Interop
    Replies: 3
    Last Post: 2008-10-13, 01:59 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
  •