VBA for: select line by angle and length ?

Hi there,

I am working on a file created from a vectorized paper scan.
The file looks pretty good, and all elements are simple lines only.
(no other elements, curves, b-splines etc.)

However, some of the hatched areas still got a bit of  "noise" in it. See below.

Therefore, what I would like to be able to do, is to tidy up the information,
and eliminate some speckles, either through selecting the correct information
and delete the rest, or the other way around.

Ie. "select line by angle" and "select line by length" (or both in one step).

Since this is not a standard selection, I already did a bit of research.
I checked the web, Inga's collection and the postings , but it seems that
there is no matching tool available??

Anyone who can help?

Many thanks!

Jan

PS: I have attached the above pattern as a dgn file, might be of use.

 

hatch.dgn
Parents Reply Children
  • You can take a look at the attached sample.
    Of course there is a half a dozen different ways to code this and I just happened to pick one that seemed to work well with the sample data provided. It might do what you want as-is or at least should give you something to tinker with.

    Enjoy!
    -G-

    SelectLinesJRoth.mvba
  • Gerald,
    This is an amazing tool.
    Exactly what I was after, (button pressed - problem resolved)
    A big time saver to clean up this type of vectorized angular information.

    I did some more tests, and found it can also be applied in many different ways  !

    In case of multiple directions or cross hatches in the same file,
    I did select one direction first,and after that I rotated/mirrored
    the drawing, to proceed with the rest.
    Phantastic !

    Many thanks!

    Jan