arc start & end pts & normal in vba

Discussion in 'AutoCAD' started by kcimos, Nov 23, 2004.

  1. kcimos

    kcimos Guest

    it seems that regardless of which way an arc is drawn in autocad (CW, CCW), vba alway lists the start pt & end pt as if it was drawn CCW (which ends up being the opposite of what it should be 50% fo the time). is this correct?
    also i checked the normal for 2 arcs, 1 drawn CW, the other CCW, both were 0,0,1. it seems that 1 should 0,0, 1, & the the other should be 0,0, -1 (based on the right hand rule)?
     
    kcimos, Nov 23, 2004
    #1
  2. I just did a quick test and it looks like VBA is not your problem. I drew
    the same arc twice, CW and then CCW, and when I listed them in ACAD, they
    had the same start angle and the same end angle. So it looks like ACAD
    forgets which way you drew the arc as soon as you draw it. BTW, if you draw
    an arc that completes the circle of a previous arc, their Start and End
    angles will be swapped.

    HTH,
    James


    CCW), vba alway lists the start pt & end pt as if it was drawn CCW (which
    ends up being the opposite of what it should be 50% fo the time). is this
    correct?
    0,0,1. it seems that 1 should 0,0, 1, & the the other should be 0,0, -1
    (based on the right hand rule)?
     
    James Belshan, Nov 24, 2004
    #2
  3. kcimos

    kcimos Guest

    ok thanks.
    hmmmm.
    well thats interesting.

    i'm doing a curved polyline to straightsegment polyline conversion kindof thing. it only works half the time, depending on which way the curves are drawn.
    by using pedit, edit i can trace the order the new pl was drawn, when it doesn't come out right, all the points after the first are backwards, i know why this is happening (i think), but can't find a test for it, because ACAD can't keep it straight.

    ARGHHHHHHHHHHHHHH!

    (& now i think the time spend on this can never be made up in any effencies gained by using this routine throught the rest of my working life (if i ever get it to work))
     
    kcimos, Nov 24, 2004
    #3
  4. Post your routine if you can. Someone will be able to figure out a quick
    solution, I think. I didn't know you were looking at polyline arc segments,
    I just looked at a regular arc.

    As far as time goes, this routine may not pay for itself, but you also have
    knowledge from creating it that you'll be able to apply to future problems.

    The sign of the .GetBulge value for an arc segment may help you figure out
    which direction that segment goes.

    HTH,
    James


    thing. it only works half the time, depending on which way the curves are
    drawn.
    doesn't come out right, all the points after the first are backwards, i know
    why this is happening (i think), but can't find a test for it, because ACAD
    can't keep it straight.
    effencies gained by using this routine throught the rest of my working life
    (if i ever get it to work))
     
    James Belshan, Nov 24, 2004
    #4
  5. Arcs in AutoCAD are always stored with a CCW start/end. Been that way since
    the beginning.
    --
    John Goodfellow
    irtfnm
    use john at goodfellowassoc dot com


    CCW), vba alway lists the start pt & end pt as if it was drawn CCW (which
    ends up being the opposite of what it should be 50% fo the time). is this
    correct?
    0,0,1. it seems that 1 should 0,0, 1, & the the other should be 0,0, -1
    (based on the right hand rule)?
     
    John Goodfellow, Nov 24, 2004
    #5
  6. kcimos

    kcimos Guest

    all i needed to do was use the get buldge method on the original polyline to figure out which way the individual arcs are going
     
    kcimos, Nov 24, 2004
    #6
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.