Jump to content

Identify similar shapes


Steven P

Recommended Posts

Good afternoon.

 

I am expecting this to be a 'sorry, not possible' answer however here goes...

 

Todays back ground to the question is I have been sent a 'CAD FIle' which is CAD->PDF->CAD->Exploded PDF, so it looks good to the project managers eyes.. but....  For example all the letters are broken down to their component lines and curves (I know if you convert a PDF now it can convert text to text... but they don't obviously).

 

Is there any way that I can identify a shape made from a few objects and for AutoCAD to locate all similar shapes within the drawing? I think I can then delete the original object and replace it in this case with the letter. Once I have letters I have a text join function to create words afterwards.

 

(with a similar idea I had one yesterday, which had had a conversion where all 300 or so electrical terminals - all the same symbol - were individual blocks - would be great to use a similar idea, locate similar shapes and replace them to be a single block)

 

So expecting this to be a 'sorry cannot be done' but you never know

 

Thanks for looking

Link to comment
Share on other sites

Steven,

 

I don't know if you have access to The Swamp, but Marko Ribar created a routine which might work for you.

 

It is similar to the Blockify command in Bricscad, where you can make blocks from similarly arranged entities (in your case lines which form letters), I can't test it as I am already using Bricscad so have no need for it but it may help you select the "letters".

 

http://www.theswamp.org/index.php?topic=55186.0

  • Like 1
Link to comment
Share on other sites

I can see how Blockify works - just been trying it thanks.

 

Couple of small things I note was that there is no similarity, it is either exactly the same or nothing on my short test (so a letter A and A x 1.05 height are not the same) which is a shame. It might work for my other example of the multiple blocks, I'll try it next time I need to.

 

Blockify is a VLX so I can't see the LISP code, can't change it to suit either. In the case of letters it makes up an indivdual letter, as a block I would still need to replace the lines in a block with the letter, then go through the drawing  and explode the block which might only be a bit quicker then just copying a each letter in turn, past on top of the text and delete the line version. I'll look again tomorrow properly, close but not quite unfortunately

Link to comment
Share on other sites

Hi

Post a sample, maybe I can help you.

I had this dwg file from pdf with a lot of errors. Some of the text were imported correct, but some were imported as hatch. Worst, some words were imported both ways, with a hatch in the middle.

 

Hatch to text1.gif

Link to comment
Share on other sites

Raster to Vector has been around for years, now we have PDF to dwg, both promise miracles. Your pdf sounds like its all raster or short vectors. 

 

"Using PDFIMPORT with PDFs created from scanned images/documents will result in the creation of a raster image file, which is then attached to the drawing as an xref. The raster imagery will not be converted into editable geometry."

 

It may be worth looking at raster to vector also perhaps a combination of the 2.

 

Tried a import ttf came in other text what a mess. Bit like the raster draw manually only what is required erase all the rest.

Link to comment
Share on other sites

Steven,

 

If Stefan BMR's routine doesn't do what need, then you need to look for OCR software (Optical Character Recognition), this ability can be found in PDF and Raster to Vector programs.

 

There are a few out there that might do what you need and if it is only one drawing that needs converting just try the demos as some of them are quite expensive.

  • Like 1
Link to comment
Share on other sites

21 hours ago, Steven P said:

Good morning,

Here is an area from the drawing I was talking about this week, wonder if this will work Stefan

Hi

 

My method works with ttf only, based on the area and the perimeter of the outer boundary. Unfortunately, this doesn't work in your situation.

I think it is possible, with my lisp and some extra steps, or some other methods, but now I don't have the time. Sorry.

 

  • Like 1
Link to comment
Share on other sites

9 hours ago, BIGAL said:

 

I'd agree, use PDF / CAD to convert it using the tools, but I was only sent a converted CAD file in this case. I'll see what happens if I make a PDF and convert it again but suspect I'll get the same again.

 

 

 

 

No problem Stefan, thanks for looking

Link to comment
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
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...