boundary leak

Discussion in 'AutoCAD' started by Michael Pape & Associates, Mar 29, 2005.

  1. Does anyone know of a way to see where the boundary "leak" is when you're
    using the boundary or hatch command so you can fix it easier? A lisp
    routine that would put a point when it hits a spot that is not bounded on
    the screen? Something like that anyway. Thanks! Allison
     
    Michael Pape & Associates, Mar 29, 2005
    #1
  2. You need to make the possible boundary first, then have the ability to
    redline the gaps where does not bound.

    I do not think this is just an easy to do routine... will see, how others
    think.

    LE.
     
    Luis Esquivel, Mar 29, 2005
    #2
  3. Michael Pape & Associates

    Walt Engle Guest

    When this happens to me, I use polyline to outline new boundary and then hatch
    - essentially forgetting where the "lead" is.
     
    Walt Engle, Mar 29, 2005
    #3
  4. Michael Pape & Associates

    Joe Burke Guest

    Luis and Allison,

    Here's a half-baked solution which seems reliable when there are no arcs in the
    pline. In some cases it works correctly with arcs included, in other cases not. I
    haven't figured what the hiccup is there yet. Needs more thought.

    The CircleMark function puts a circle marker at the midpoint of a gap if one is
    found.

    Joe Burke

    Code:
    ;; mark a gap in a lwpline if one exists
    ;; JB  3/31/2005
    (defun c:FindGap (/ CircleMark MidPoint obj objlst lst1 lst2)
    
    (defun CircleMark (pt / rad)
    (setq rad (/ (getvar "viewsize") 125.0))
    (entmake (list '(0 . "CIRCLE")
    (cons 10 pt)
    (cons 40 rad))
    )
    )
    
    (defun MidPoint (p1 p2)
    (mapcar '* (mapcar '+ p1 p2) '(0.5 0.5 0.5))
    )
    
    (while
    (or
    (not (setq obj (car (entsel "\nSelect lwpline to check: "))))
    (not (setq obj (vlax-ename->vla-object obj)))
    (not (equal "AcDbPolyline" (vlax-get obj 'ObjectName)))
    )
    (princ "\nMissed pick or wrong object type. ")
    )
    
    (if (= -1 (vlax-get obj 'Closed))
    (princ "\nPline is closed. ")
    (progn
    (setq objlst (vlax-invoke obj 'Explode))
    (foreach x objlst
    (setq lst1 (cons (vlax-get x 'StartPoint) lst1))
    (setq lst2 (cons (vlax-get x 'EndPoint) lst2))
    )
    (setq lst2 (append (cdr lst2) (list (car lst2))))
    (foreach x objlst
    (vla-delete x)
    )
    (mapcar '(lambda (a b)
    (if (not (equal a b))
    (CircleMark (MidPoint a b)))) lst1 lst2)
    )
    )
    (princ)
    ) ;end
    
     
    Joe Burke, Mar 31, 2005
    #4
  5. Joe,

    Where the polyline came from?.... As I understood the question was to just
    pick an internal point and being able to pre-defined the gaps locations,
    bpoly that is used by bhatch does not have that ability.

    LE.
     
    Luis Esquivel, Mar 31, 2005
    #5
  6. Michael Pape & Associates

    Joe Burke Guest

    Hi Luis,

    As I read the OP's question, it was to find a gap in a pline and place a mark at the
    gap. I assume so the gap can be fixed. Which in turn would allow boundary and hatch
    commands to work at expected.

    Seems like a common issue to me, but maybe I misunderstood.

    Regards
    Joe
     
    Joe Burke, Mar 31, 2005
    #6
  7. Ok.... let me read it again, I had the impression that it was just looking
    to being able to pick an internal point and draw a boundary with the gaps
    [if they exists] and just manually or programmatically fill them, to just
    put the new hatch in there....

    Sorry... this two new german friends I have.... alz and heimer



    LE.
     
    Luis Esquivel, Mar 31, 2005
    #7
  8. Perhaps I'm not reading the original request right, or
    something. From what the OP says, they're attempting
    to use BOUNDARY or HATCH with an internal point, and
    they are being told that there is a leak. What does that
    have specifically to do with LWPOLYLINES?
     
    Tony Tanzillo, Mar 31, 2005
    #8
  9. There's no simple solution to this, because finding
    the 'leaks' essentially entails doing everything that
    the BOUNDARY command does, and then some.
     
    Tony Tanzillo, Mar 31, 2005
    #9
  10. Ok... my English 101, was not bad.

    And I'm going again, I wrote in visual lisp and autolisp code a function
    similar to bpoly, base on my knowlegde level of math and calculus, and does
    a decent job, I would try to make it do the locations of the gaps.

    And maybe some of these days I would try to export my algorithm into
    ARX.....

    LE.
     
    Luis Esquivel, Mar 31, 2005
    #10
  11. And there is GBOUND by Tovna....
     
    Luis Esquivel, Mar 31, 2005
    #11
  12. Michael Pape & Associates

    Joe Burke Guest

    Luis and Tony,

    I must have been hallucinating. Agreed, I misunderstood the question.

    Joe Burke
     
    Joe Burke, Apr 1, 2005
    #12
  13. Don Jose,

    No hay ningun problema mi amigo, a todos nos pasa.

    Saludos,
    Luis.
     
    Luis Esquivel, Apr 2, 2005
    #13
  14. Thanks for all the responses. Sorry I didn't reply back sooner, I've been
    studying for a licensure test. We use closed boundaries for several things
    in our drawings aside from hatching. We use them for getting areas, as a
    drawing tool, etc, so whether the routine I get shows me where the gap is so
    I can fix it, or fixes it, I don't care, as long as I can make the boundary.
    If we just have a few boundaries to make, it's not a problem to draw them
    manually, but sometimes we have tons to do, and you just can't tell where
    the problem is. Some drawings are worse than others when it comes to
    generating boundaries. I've gotten drawings from consultants where you
    could click inside a closed polyline, and it wouldn't make a boundary. It
    seems like if you can specify a gap size in polyline join, you could do the
    same thing with boundary, and then it would jump over small gaps and
    continue on. I realize that sometimes the things that seem simplest are the
    most difficult to program. I'm off to try the circle mark routine that Joe
    posted. Thanks All! Allison
     
    Michael Pape & Associates, Apr 6, 2005
    #14
  15. Well, I tried the mark circle routine, I didn't "get it" until I tried it.
    Obviously when using the boundary command, you're not picking a point inside
    an almost closed polyline. If that were the case I'd just close it. What I
    was hoping, was that routine would let you pick inside an area and then mark
    the gap. Oh well... Off to see what gbound is.
     
    Michael Pape & Associates, Apr 6, 2005
    #15
  16. Allison,

    Have a look at gpoly.... is an alternative I wrote, that might help
    you....if not.... you need to buy gbound

    Look for the thread about GPOLY.... and please let me know and to all if you
    have any problems during the installation, please


    LE.
     
    Luis Esquivel, Apr 6, 2005
    #16
  17. Hi Luis, thanks for the offer. I looked for the thread, and the two I found
    said to email you for the program. Is there something I'm missing? Thanks,
    Allison
     
    Michael Pape & Associates, Apr 7, 2005
    #17
  18. Still is available in the customer-files.... look for "gpoly version
    1.01...."


    ....
     
    Luis Esquivel, Apr 7, 2005
    #18
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.