Algorithm for automatic reading of dimensions from a technical drawing

Algorithm for automatic reading of dimensions from a technical drawing

patryk_machnik
Observer Observer
822 Views
4 Replies
Message 1 of 5

Algorithm for automatic reading of dimensions from a technical drawing

patryk_machnik
Observer
Observer

Good morning, I'd like to develop software that will: - read dimensions from a technical drawing in PDF/DWG/DXF format (reading the length and width of a part from the dimension line for a given item) + read the material grade (from the assembly table) - then, based on boundary conditions, the program will determine which part will be laser-processed (thickness < 25 mm) or plasma-processed (> 25 mm < 100 mm) + whether or not it will be a bent element. I've seen that Python can do this. The biggest problem is how the program will find the dimensions and determine the dimensions: length x width. The drawing has many dimension lines. While the grade is usually listed in the table in the lower right corner, the dimensions are arranged differently. I'd appreciate any advice on how to approach this.

0 Likes
823 Views
4 Replies
Replies (4)
Message 2 of 5

Kent1Cooper
Consultant
Consultant

Post a sample drawing showing what you start with and what you want as a result.  For example, how would an "assembly table" associate a "material grade" with a particular part?  Are they 3D solids that actually have thickness?  [Then if they're flat, the thickness can be read from the bounding box without need for association with an assembly table, but if bent into 3D, that's not possible.]  And are the parts all rectangular and orthogonally oriented, so that "the length and width of a part" are the only dimensions?  [I kind of assume not, with the "bent element" possibility, but it's not clear what that means -- bent in what direction?]

From what I get from your description, I wonder whether it's realistic to do it by "read[ing] dimensions," that is, Dimension objects.  Finding dimensions is not difficult, nor pulling their measured values [if that's what you mean by "reading" them], but if there are more than one part in a drawing, getting a routine to figure out which dimensions are partners in applying to the same part would be difficult.

If the parts are 2D outlines drawn as Polylines, it could presumably just "read" the parts themselves.  Then it wouldn't matter which dimensions share applicability to the same part, nor even whether there are any dimensions at all.

Kent Cooper, AIA
Message 3 of 5

patryk_machnik
Observer
Observer

The drawings contain several items (details), listed in a summary table—item 1, item 2, item 3, and so on. Therefore, the drawings contain X dimensions for X details (there may be only one detail, but it doesn't have to be). The drawings are 2D in PDF or DWG format. An example of such a drawing is attached. This is the simplest case, but you have to start somewhere.

 

I want to extract from the drawing: width [mm], length [mm], grade (e.g., S235JR), process: laser (if the part thickness is up to 25 mm) or plasma (part thickness from 25 to 100 mm), and whether the part will be bent or not. That's just the beginning... Then I also add welding symbols, for example. The software should then detect such a symbol and notify that the part will be welded. Information such as length x width and grade are included in the table in the lower right corner. I didn't take a photo of it in this particular photo. However, I receive drawings from clients, and what's included in the table doesn't always match the dimensions in the drawing. Sometimes the tables are also empty. This isn't a fixed relationship. So, we usually have to rely on the dimensions directly from the drawing.

 

patryk_machnik_0-1755363004410.jpeg

0 Likes
Message 4 of 5

gbattinPH5TG
Advocate
Advocate

This seems like a very specific requirement that your company should define up-front from the people sending you these detailed drawings. Perhaps requesting that these detailed drawings use easily distinguishable layers based on the thickness of the laser to be used on a specific CAD layer to easily distinguish that property, as well as asking the people preparing to add the appropriate weld for a given connection. Maybe a PDF does not give enough detail that you need, and they should send you a CAD drawing with the proper weld symbols... It also might be that an AutoCAD drawing is not suitable for the type of information that you require. Maybe a model from Inventor or SolidWorks would be better suited based on the metals being used...

If not, having the people providing the detail could use a lot more annotation to accommodate these requirements as well.

Message 5 of 5

marcos.pellizzoniT2NXB
Enthusiast
Enthusiast

Isso me parece o caso de usar IA...

0 Likes