Entities from which the boundary is created

Discussion in 'AutoCAD' started by mgrigoriev, Apr 3, 2004.

  1. mgrigoriev

    mgrigoriev Guest

    My drawing consists of only lines and curves. Command boundary returns a polyline or a region. I am trying to figure out what entities actually formed this boundary. In other words, I pick a point on the drawing, and need to get the handles of all the lines/curves on my drawing that participated in boundary creation. It would be great to get a VB analog of the AutoCAD "boundary" command, or at least an algorythm of how this can be done.
     
    mgrigoriev, Apr 3, 2004
    #1
  2. mgrigoriev

    wivory Guest

    Well, you could iterate through all items in the drawing and do an IntersectsWith against your new boundary entity.

    Regards

    Wayne Ivory
    IT Analyst Programmer
    Wespine Industries Pty Ltd
     
    wivory, Apr 5, 2004
    #2
  3. mgrigoriev

    mgrigoriev Guest

    Well, if a line intersects the boundary, that doesn't necessarily mean that it forms it. Besides, the boundary command itself takes a lot of time to run. If I add a function that iterates through all the entities in the drawing, it would take forever. I would like to avoid that if possible.
     
    mgrigoriev, Apr 5, 2004
    #3
  4. mgrigoriev

    wivory Guest

    I can't actually think of a situation where a line intersects the boundary but doesn't form part of it. Even if it T-junctions on the outside it still has a small component in the boundary, although I can understand that you might not want that one. I think you could check the number of intersections in that case and where it is only one perhaps discount it.

    As for the iteration performance, it depends on the number of entities we're talking about, but an alternative might be doing a selection set 'Crossing' the boundary. Depending on your requirements you may have to subsequently exclude fully-contained items from the set (search this group for methods for determining if a point is inside a polyline, especially with the use of rays).

    Regards

    Wayne
     
    wivory, Apr 6, 2004
    #4
  5. mgrigoriev

    wivory Guest

    Scratch the point-inside-polyline idea - a better way would be to iterate the selection set and do an IntersectWith on each item. If it doesn't intersect then it is fully-contained within the boundary.

    Regards

    Wayne
     
    wivory, Apr 6, 2004
    #5
  6. mgrigoriev

    mgrigoriev Guest

    How about lines that are parallel, therefore don't intersect?
     
    mgrigoriev, Apr 7, 2004
    #6
  7. mgrigoriev

    wivory Guest

    I don't understand what you're asking about parallel lines. They wouldn't be part of the boundary and they wouldn't be picked up by the method I've suggested.

    Perhaps you can explain your question a bit more.

    Regards

    Wayne
     
    wivory, Apr 8, 2004
    #7
  8. mgrigoriev

    mgrigoriev Guest

    I am sorry, Wayne. My last question had nothing to do with the task. I guess I was thinking about something else.

    I still have a little complication, though. All the entities that I am looking for are on xrefs. Do I have to copy them onto the modelspace one by one, then intersect, then delete, or is there another way?
     
    mgrigoriev, Apr 8, 2004
    #8
  9. mgrigoriev

    wivory Guest

    Not sure, sorry. I don't do any work with xrefs. Perhaps somebody else can help?

    Regards

    Wayne
     
    wivory, Apr 13, 2004
    #9
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.