Test to guarantee Region entity?

Discussion in 'AutoCAD' started by Fatfreek, Jan 28, 2004.

  1. Fatfreek

    Fatfreek Guest

    I'm drawing a blank. I need to test certain entities to guarantee they are
    Regions. Any suggestions?

    My motive here is I just ran into a flaw in my code up front that is not
    properly testing for closed LWpolylines. The following selection snippet
    allows open ones to get through. Perhaps if I can bullet proof this segment
    I won't need the Region test above.

    (setq PolyOne ;_closed lwpolys only
    (ssget ":S"
    '((-4 . "&")
    (70 . 1)
    )
    )
    )

    I am using 2004 SP 1A under Win2K Pro
    Len Miller
     
    Fatfreek, Jan 28, 2004
    #1
  2. Fatfreek

    Fatfreek Guest

    Sorry for the alarm, part of which, was false. The part of wanting to test
    that an entity is a Region is still true.

    I thought my code (see below) was not properly testing for closed
    LWpolylines. I was wrong. I'd forgot that it had, in fact warned me that a
    certain irregular boundary polyline was not closed. At the time, I simply
    halted the automated routine, brought up the Properties dialog box, checked
    the Closed pulldown from No to Yes, and went back into the automated routine
    (which again failed). Yes, the routine failed to create a Region of that
    polyline, not because it was open but because there was this appendage (not
    visible till a close Zoom). Oh, yes, there was closure at this vertex, but
    one portion of this polyline being nearly tangent to the adjacent portion,
    went beyond the closed joint and protruded for a very short distance.

    That, apparently, is what the Region command objected to.

    Len Miller
     
    Fatfreek, Jan 29, 2004
    #2
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.