What’s it for?
Within the technical documentation of machines, it offen happens that graphics of single assemblies or the whole machine have to be made. Usually the 2D-drawings of the 3D-models are used for that. With larger machines these drawingviews can easily contain a few tenthousand lines. As long as they are only handled electronically that’s not a problem at first sight. But sometimes the graphics need to be plotted or engraved on signs. If the views are not cleaned up beforehand, then the machine runtimes will rise in astronomical heights. Now generally, there are two options to reduce the amount of lines: either by selecting and deleting them manually (very! time-consuming) or by hiding complete parts or assemblies (but then you might as well loose lines that you originally wanted to keep). So we need a possibility to hide only the “insignificant” lines and still keep the “important” ones. That’s what this macro tries to solve.
How does it work?
The key approach is to delete only “short” lines from the view. Now what “short” means is obviously very different for each model -> an excavator shovel has other conditions than a sewing machine head. (regarding the absolute size as well as the amount of detail). So the reference has to be the model itself. The macro shown here, therefor at first internally gathers all lengths of all lines in the view. After that the user can decide, what percentage of these lines he wants to be deleted. For instance, if 50% should be removed, then the program will delete the shortest 50% of all lines (i.e. every line, that is shorter than the median). To what value this percentage needs to be set in the individual case, obviously depends on the size of the assembly and the demanded level of detail. Practical experience shows, that for very large and detailed assemblies the recognizable view quality hardly drops before 90% deleted lines. For smaller assemblies however this can even start at 30%.

All rights reserved.