Jump to content
lucky9

Extend line to touch nearest boundary

Recommended Posts

lucky9

Hi,  Is there a routine which could help to extend plines to nearest boundary. In my drawing there are several Plines which are not touching the boundary ( not connected to each other ).  Based on the given tolerance I want that , all the untouched lines should extends to their nearest line  boundaries 

Here is a before after pic 

 

Best Regards 

lucky9

extendboundary.jpg

Share this post


Link to post
Share on other sites
Mugna101

Why wont u use Extend command?

Id usually just type "Ex" and hit enter twice so it will select all. next thing is just to click on the lines for it to extend.

it will extend the line til its nearest observable boundary

Share this post


Link to post
Share on other sites
BIGAL

Munga101 9 clicks v's just window objects. On my to look at list.

 

2021 users is this not now a function of extend ?

  • Like 1

Share this post


Link to post
Share on other sites
tombu
On 1/20/2021 at 5:39 PM, BIGAL said:

Munga101 9 clicks v's just window objects. On my to look at list.

 

2021 users is this not now a function of extend ?

Yes, Ex then F (for fence) or pick and drag the cursor.

Share this post


Link to post
Share on other sites
lucky9

I have a drawing which contains digitized lines (road) from google(KML)  they are mostly broken not touching the other lines to make up a proper road. So I needed  a way to extend these lines all at ones instead of manually click them to extend.  

Share this post


Link to post
Share on other sites
tombu

Why not add a small drawing of those lines?

Have you tried using Pedit with a fuzz distance?

 

Share this post


Link to post
Share on other sites
lucky9

Sample file is attached

On 1/23/2021 at 1:35 AM, tombu said:

Why not add a small drawing of those lines?

Have you tried using Pedit with a fuzz distance?

 

 

Sample.dxf

Share this post


Link to post
Share on other sites
tombu
2 hours ago, lucky9 said:

Sample file is attached

 

Sample.dxf 856.45 kB · 2 downloads

Wow! That drawing didn't look anything like your original post. Even with 2016 selecting all before using EXTEND make it pretty easy picking the lines you want extended except two segments at the same angle missing each other could only be connected by moving the endpoint of one line to match the other. I don't see any way this could be coded to do any easier.

Share this post


Link to post
Share on other sites
BIGAL

I found the opposite a overshoot that should be fixed to.

 

image.png.96d00de8403dc93380560da5944ac7fb.png

 

Another but ugly

image.png.f0b97001491dfbc7bbb5cf376e564a0c.png

Share this post


Link to post
Share on other sites
eldon
On 1/22/2021 at 7:06 PM, lucky9 said:

I have a drawing which contains digitized lines (road) from google(KML)  they are mostly broken not touching the other lines to make up a proper road. So I needed  a way to extend these lines all at ones instead of manually click them to extend.  

 

I would say that it would be extremely unwise to have an automatic way of extending lines in a mapping drawing. You do not know what is happening at each junction.

 

It would be safer to inspect each junction. It might take longer, but you would know that the extended lines, where necessary, would make sense.

Share this post


Link to post
Share on other sites
ronjonp

@eldon Agreed .. which answer is 'correct'?

image.png.9eb27d7ef66819bcb0bad019dcb8b64f.png

Share this post


Link to post
Share on other sites
lucky9

 

10 hours ago, ronjonp said:

@eldon Agreed .. which answer is 'correct'?

image.png.9eb27d7ef66819bcb0bad019dcb8b64f.png

 

4th one, where the line was joined at intersection.

Share this post


Link to post
Share on other sites
eldon

In the sample dxf posted, there were nearly 200 junctions. Of those, about half needed no further action. But with the other half, some needed to be extended, some needed to be trimmed and others needed the end of the line to be stretched.

 

How can you get a lisp to decide which action to use?

 

This is really a case where lisp cannot give the required solution - unless someone knows better.

Share this post


Link to post
Share on other sites
lucky9
1 hour ago, eldon said:

In the sample dxf posted, there were nearly 200 junctions. Of those, about half needed no further action. But with the other half, some needed to be extended, some needed to be trimmed and others needed the end of the line to be stretched.

 

How can you get a lisp to decide which action to use?

 

This is really a case where lisp cannot give the required solution - unless someone knows better.

I guess there is no better way than to do it manually instead :( , I will process these lines manually 

Thank you guys for your comments and suggestions. 

Have a nice day ! 

Share this post


Link to post
Share on other sites
BIGAL

Nice tombu. Gave it a try 

 

lucky9 you may have to outsource, its pretty quick. 

 

Undershoot
Modified object(s)     :1644
Deleted object(s)    :1
Created object(s)    :758

  • Thanks 1

Share this post


Link to post
Share on other sites
lucky9

Share this post


Link to post
Share on other sites
eldon

I looked at the video of the cleanup tools, and it seems to confirm my previous comments.

 

There is no lisp that can do what you want. It appears that you still have to zoom to each junction and set up for the particular cleanup tool every time. Also, I feel that these tools insulate users from knowing how AutoCAD works.

 

I reckon that I can work faster in this particular instance by using command aliases, grips and a nimble mouse. However, if you can afford the money and the time, you might feel that the tools could make your life easier. Do not let me discourage you.

Share this post


Link to post
Share on other sites
eldon

This is an example of my concerns.

 

Which solution is correct? A, B, C or something else?

 

Which solution would the automatic cleanup tool produce? How would you know which solution unless you inspect the junction individually?

 

 

Which is correct.PNG

Share this post


Link to post
Share on other sites
lucky9

 

1 hour ago, eldon said:

This is an example of my concerns.

 

Which solution is correct? A, B, C or something else?

 

Which solution would the automatic cleanup tool produce? How would you know which solution unless you inspect the junction individually?

 

 

Which is correct.PNG

B would be the solution. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...