Jump to content

Recommended Posts

Posted
30 minutes ago, marko_ribar said:

Command function (c:OVERKILL-MR) will remove curves that fully overlap each other removing smaller one and remaining bigger one, else how would CAD know which curve is phallic one (which one to remove and which one to leave intact)...

In the context of a drawing with enclosed areas, invalid polylines are those that:

1) Are exactly duplicated

2) Are partially duplicated but do not enclose any perimeter

3) Are nearly duplicated and, although they enclose some perimeter with the polyline they nearly duplicate, enclose an insignificant area.

Posted

@PGia

This is why I said to study complete topic : to force you to mod. *.lsp you find useful to make it suit your needs... To be honest I don't quite understand what you consider operationaly appropriate that needs to be modified in (c:OVERKILL-MR) to suit your needs...

  • Like 1
Posted

Most if not everyone on here have fulltime jobs, a few may be retired/semiretired.

 

I have a full time job drafting/designing, so coding is something I do to help myself, when I can I help others, at the end of the day I have to get my drawings out the door.

 

Like I stated, you will have to keep tightening the parameters and reducing the amount of the drawing run each time.

 

The only way to get a customized, do it all, routine, will be to wait on someone here to be able to get to it, learn to adjust similar codes yourself, ask at The Swamp and/or Autodesk Forums (maybe some one with more time on their hands will give it a shot), be sure to link this thread and any others or pay a LISP expert to custom write you something.

 

I removed about 52 plines, I ran a few sections at 100 (default) and 1 for the fuzz, then ran the entire drawing. Was fast on the small sections and a minute or two on the entire drawing.

 

You may only need to keep selecting different parameters and selecting smaller areas for speed.

 

Just read the entire thread like already suggested.

 

I have to ask though, where are you getting these drawings that have all the extra pieces?

 

 

Dpted LWPs_Overkill_MR.dwg

  • Like 1
Posted

@PGia I was also taking a look at your last drawing.
It feels like it's the result of a poorly done cleanup in some version of Map or C3D.

I also tried Marko Ribar's command.
As SLW says, you should try all possible ranges to determine with greater certainty whether the command can do what you need.

Either way, playing with those ranges may have side effects on the rest of the drawing: OVERKILL-MR probably wasn't designed with drawings like yours in mind.

So I think you'll have to choose between taking the risk or looking for something else.

P.S. If you have a version of C3D available, also try 'adedwgclean'. Although I'm not very optimistic about that either.

Posted

Sorry.

I didn't mean to be annoying with my questions. Up until two weeks ago, I had a colleague helping me with this project, but we had a problem, and he slammed the door, leaving me with several drawings like this.

 

I don't quite understand how the OVERKILL-MR command works. I've tried several ranges (not too many, I admit), and it seems that instead of solving some problems, it can cause others. So I agree with GLAVCVS about the "side effects."

 

I'll try to find another solution.

Posted

The problem with free solutions is time, your request doesn't seem easy to me, so it will take me some time to do it.

 

Your AutoCAD 2017 could be the issue, but I'm not too sure there will be a  better LISP solution than those on the thread linked by @marko_ribar.

 

 

I ran it again with 100 and 4 on AutoCAD 2000i at home, down to 438 Polylines, I don't see any of the side effects you mention.

 

Dpted LWPs_Overkill_MR.dwg

Posted
3 hours ago, SLW210 said:

The problem with free solutions is time, your request doesn't seem easy to me, so it will take me some time to do it.

 

Your AutoCAD 2017 could be the issue, but I'm not too sure there will be a  better LISP solution than those on the thread linked by @marko_ribar.

 

 

I ran it again with 100 and 4 on AutoCAD 2000i at home, down to 438 Polylines, I don't see any of the side effects you mention.

 

Dpted LWPs_Overkill_MR.dwg 724.95 kB · 3 downloads

Overkill in AutoCAD 2000?

My old AutoCAD 2002 doesn't have Overkill.

I thought that command wasn't implemented until at least the 2004 version.

Posted
2 hours ago, GLAVCVS said:

Overkill in AutoCAD 2000?

My old AutoCAD 2002 doesn't have Overkill.

I thought that command wasn't implemented until at least the 2004 version.

 

Overkill was originally part of Express Tools or Bonus tools. If you didn't know where to download it, you would probably miss it!

 

Overkill should have been available from R2000.

 

 

overkill-start.PNG

Posted
3 hours ago, eldon said:

 

Overkill was originally part of Express Tools or Bonus tools. If you didn't know where to download it, you would probably miss it!

 

Overkill should have been available from R2000.

 

 

overkill-start.PNG

 

I think I've been on my island too long.

Posted (edited)
18 hours ago, SLW210 said:

The problem with free solutions is time, your request doesn't seem easy to me, so it will take me some time to do it.

 

Your AutoCAD 2017 could be the issue, but I'm not too sure there will be a  better LISP solution than those on the thread linked by @marko_ribar.

 

 

I ran it again with 100 and 4 on AutoCAD 2000i at home, down to 438 Polylines, I don't see any of the side effects you mention.

 

Dpted LWPs_Overkill_MR.dwg 724.95 kB · 4 downloads

 

I've been analyzing the drawing you attached.

I've circled the side effects I've seen with red circles.

Basically: polylines that have disappeared.

Dpted LWPs_Overkill_MR.dwg

Edited by PGia
Posted
20 hours ago, GLAVCVS said:

Overkill in AutoCAD 2000?

My old AutoCAD 2002 doesn't have Overkill.

I thought that command wasn't implemented until at least the 2004 version.

I used the indicated LISP from @marko_ribar Overkill-MR linked in the previous thread.

Posted
6 hours ago, PGia said:

 

I've been analyzing the drawing you attached.

I've circled the side effects I've seen with red circles.

Basically: polylines that have disappeared.

Dpted LWPs_Overkill_MR.dwg 473.31 kB · 1 download

 

Purely an issue with which options you choose.

They are not necessarily side effects.

  • Agree 1
Posted
3 hours ago, SLW210 said:

I used the indicated LISP from @marko_ribar Overkill-MR linked in the previous thread.

Marko's code calls (command "Overkill"...)
So, if Overkill is not available in the version of AutoCAD you're running, OVERKILL-MR won't work.

Posted

@PGia   

I went out for my 40-50 km bike ride today and I've been thinking about this for a while.

 

IMG_20250511_195004.thumb.jpg.e6a8130ae1825da51907b86ca9635333.jpg

 

I tried OVERKILL-MR and I admit I wasn't able to figure out the right ranges to remove the excess without causing any damage to the rest of the drawing (perhaps someone can prove otherwise).

For this reason, in my opinion, I think you should look for another solution.

I assume your ultimate goal is to have a clean drawing on which to create a polygon topology.

To do this, use '_mapclean' in C3D, activating the options in 'Cleanup Actions':
- Delete duplicates
- Erase short objects
- Break crossing objects
- Dissolve pseudonodes
Repeat this 2 or 3 times.
I don't think this will solve all the problems.
But it will leave the drawing ready for you to try creating a polygon topology.
The problematic polylines that remain in the drawing will appear with each attempt to create the topology.
It's a laborious but safe process.

I imagine you're confused because you suddenly have to do something you haven't done before.
But I think you'll have no choice but to waste a little time learning.

  • Like 3
Posted

Never stop thinking about problems, even when you are doing something outside.... 🚴‍♂️ 🏊‍♂️ 🏃‍♂️ Nice @GLAVCVS!

  • Like 3
Posted
17 hours ago, GLAVCVS said:

Marko's code calls (command "Overkill"...)
So, if Overkill is not available in the version of AutoCAD you're running, OVERKILL-MR won't work.

As eldon explained, it's an Express Tool in AutoCAD 2000i.

Posted

As mentioned by @GLAVCVS, this is just a messy job from someone, in the end it will just take time to clean it perfectly.

 

I ran Mapclean a few times (using parameters from @GLAVCVS) and ended with this..

Dpted LWPs_Mapclean.dwg

Posted

Is this going to need a combination of routines then? Overkills in the various forms, plus MapClean, Audit, Purge (I do them by default anyway), assessing the drawing manually and then shooting the drawing originator.

 

 

 

Glavcvs... yup that is a thing I do often - the quiet time and the mind works

Posted

Pretty much like the recommendations--- Autodesk Civil 3D Help | Maintaining Clean Drawings | Autodesk

 

Quote

As part of the project team’s work process, you can use a number of standard AutoCAD operations to eliminate redundant data from project drawings

 

The OP will need to get the use of Civil 3D or Map 3D, they currently use AutoCAD 2015.

 

Here are the definitions for MAPCLEAN options. 

 

AutoCAD Map 3D 2026 Help | About Drawing Cleanup | Autodesk

 

There is a -MAPCLEAN, so could do it all with a code.

 

You can save a MAPCLEAN profile and supply the name for -MAPCLEAN.

 

AutoCAD Map 3D 2026 Help | To Save Cleanup Settings as a Profile | Autodesk

 

;;; Clean (-MAPCLEAN in Map/Civil 3D), Audit, Purge.
;;;
;;; https://www.cadtutor.net/forum/topic/97915-duplicated-lwpolylines/page/2/#findComment-672009
;;;
;;; By SLW210 (a.k.a. Steve Wilson)
;;;

(defun c:CAP ()
  ;; Define a default profile name
  (setq profileName "CleanDupsTest.dpf") ; Replace "CleanDupsTest.dpf" with your actual profile name if different
  
  ;; Run the -MAPCLEAN command with the profile
  (command "-MAPCLEAN" profileName)
  (princ (strcat "\nRunning -MAPCLEAN with profile: " profileName))

  ;; Run the AUDIT command with the "Y" option (fix any errors)
  (command "AUDIT" "Y")
  (princ "\nRunning AUDIT...")

  ;; Run the PURGE command with the "ALL" option and "N" (No confirmation for purging)
  (command "-PURGE" "ALL" "" "N")
  (princ "\nRunning -PURGE...")

  (princ "\nProcess Complete!")
)

(princ "\nType 'CAP' to run the cleanup process.")
(princ)

 

Dpted LWPs_CAP.dwg CleanDupsTest.dpf

Posted
3 hours ago, Steven P said:

Is this going to need a combination of routines then? Overkills in the various forms, plus MapClean, Audit, Purge (I do them by default anyway), assessing the drawing manually and then shooting the drawing originator.

If you have a Map or C3D version, Overkill is not necessary.

The workflow in these cases is to use "_mapclean" with tolerances of 1 or 2 cm (in cartography, nothing that isn't the same is that close) and with the aforementioned parameters (although, depending on the case, it may be necessary to activate some more).

Repeat the command 2-3 times.

Although it may seem that everything has been resolved, this is probably not the case. There are minor errors that are not visible to the naked eye until you try to create a polygon topology.
Why? All polylines in the significant layers used to create polygons must connect at their ends to at least one other significant polyline.
If there are polylines with one end that doesn't coincide with any other, it will be considered a pseudonode and will need to be reviewed.
But it may also happen that a small piece of a polyline, almost overlapping another, creates an imperceptible perimeter. Detecting these cases is almost impossible if you don't use an object as a centroid for each of the perimeters because, then, when creating the polygon topology, any perimeter without a centroid object will be detected as an "unlabeled perimeter" and will be located on the screen with a specific block.

Therefore, as I said, the process can be laborious.
But it is also safe.

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...