boundary leak
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
boundary leak
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
Michael Pape & Associates
Guest





Posted: Wed Mar 30, 2005 2:03 am    Post subject: boundary leak Reply with quote

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

Back to top
Luis Esquivel
Guest





Posted: Wed Mar 30, 2005 2:43 am    Post subject: Re: boundary leak Reply with quote

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.

Quote:
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

Back to top
Walt Engle
Guest





Posted: Wed Mar 30, 2005 3:52 am    Post subject: Re: boundary leak Reply with quote

When this happens to me, I use polyline to outline new boundary and then hatch
- essentially forgetting where the "lead" is.

Back to top
Joe Burke
Guest





Posted: Thu Mar 31, 2005 8:42 pm    Post subject: Re: boundary leak Reply with quote

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
Back to top
Luis Esquivel
Guest





Posted: Thu Mar 31, 2005 8:57 pm    Post subject: Re: boundary leak Reply with quote

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.
Back to top
Joe Burke
Guest





Posted: Thu Mar 31, 2005 9:25 pm    Post subject: Re: boundary leak Reply with quote

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

"Luis Esquivel" <nospam@address.withheld> wrote in message
news:424c1ddc_1@newsprd01...
Quote:
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.

Back to top
Luis Esquivel
Guest





Posted: Thu Mar 31, 2005 9:37 pm    Post subject: Re: boundary leak Reply with quote

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.

"Joe Burke" <joburke@hawaii.rr.com> wrote in message
news:424c2488$1_1@newsprd01...
Quote:
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.
Back to top
Tony Tanzillo
Guest





Posted: Thu Mar 31, 2005 9:40 pm    Post subject: Re: boundary leak Reply with quote

"Joe Burke" <joburke@hawaii.rr.com> wrote

Quote:
Here's a half-baked solution which seems reliable when there are no arcs the pline.

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?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005
http://www.acadxtabs.com
Back to top
Tony Tanzillo
Guest





Posted: Thu Mar 31, 2005 9:44 pm    Post subject: Re: boundary leak Reply with quote

There's no simple solution to this, because finding
the 'leaks' essentially entails doing everything that
the BOUNDARY command does, and then some.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005
http://www.acadxtabs.com

"Michael Pape & Associates" <mpa@atlantic.net> wrote in message news:4249c2b4$1_3@newsprd01...
Quote:
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

Back to top
Luis Esquivel
Guest





Posted: Thu Mar 31, 2005 9:51 pm    Post subject: Re: boundary leak Reply with quote

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.

"Tony Tanzillo" <tony.tanzillo@U_KNOW_WHERE.com> wrote in message
news:424c28e0_3@newsprd01...
Quote:
There's no simple solution to this, because finding
the 'leaks' essentially entails doing everything that
the BOUNDARY command does, and then some.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005
http://www.acadxtabs.com

"Michael Pape & Associates" <mpa@atlantic.net> wrote in message
news:4249c2b4$1_3@newsprd01...
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



Back to top
Luis Esquivel
Guest





Posted: Thu Mar 31, 2005 10:08 pm    Post subject: Re: boundary leak Reply with quote

And there is GBOUND by Tovna....
Back to top
Joe Burke
Guest





Posted: Fri Apr 01, 2005 8:16 pm    Post subject: Re: boundary leak Reply with quote

Luis and Tony,

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

Joe Burke


"Luis Esquivel" <nospam@address.withheld> wrote in message
news:424c1ddc_1@newsprd01...
Quote:
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.

Back to top
Luis Esquivel
Guest





Posted: Sat Apr 02, 2005 7:43 am    Post subject: Re: boundary leak Reply with quote

Don Jose,

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

Saludos,
Luis.
Back to top
Michael Pape & Associates
Guest





Posted: Thu Apr 07, 2005 1:20 am    Post subject: Re: boundary leak Reply with quote

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" <mpa@atlantic.net> wrote in message
news:4249c2b4$1_3@newsprd01...
Quote:
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

Back to top
Michael Pape & Associates
Guest





Posted: Thu Apr 07, 2005 1:59 am    Post subject: Re: boundary leak Reply with quote

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" <mpa@atlantic.net> wrote in message
news:425452a8$1_2@newsprd01...
Quote:
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" <mpa@atlantic.net> wrote in message
news:4249c2b4$1_3@newsprd01...
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



Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Contact Us
Powered by phpBB