iRule for generating flat patterns for .stp files

iRule for generating flat patterns for .stp files

zvonimirpetrovic89
Participant Participant
264 Views
4 Replies
Message 1 of 5

iRule for generating flat patterns for .stp files

zvonimirpetrovic89
Participant
Participant

Hi everyone,

 

I have found some codes that make .dxf files for flat patterns that are very useful. Usually since many companies that I work with use Solidworks or Inventor, we usually make .stp files that work with both programs. Now, if you import an .stp file in Inventor and save it it will be an assembly with parts and assemblies in it. I want to write a code that reads the parts and parts whithin sub-assemblies and convert parts that are sheet metal parts to sheet metal parts and create flat patterns as .dxf files that are not just in the assembly but also sub-assemblies. Creation of flat patterns is not giving good results if thickness is not manually inputed so I would imagine that the code has a set of thicknesses like .8 mm, 1 mm, 1.25 mm, 1.5 mm, 2 mm, 2,5 mm, 3 mm, 4 mm, 5 mm, 6 mm, 8 mm, 10 mm, 12 mm, 15 mm, 20 mm, 25 mm and 30 mm thocknesses and then the code tries to create a flat pattern until it mamages to create one since it would not create it untill the manual input for thickness is not given.

Usually I have a STEP file that is an assembly and what I want is to convert all the parts to sheet metal parts that have a thickmess that matches those, create flat patterns, make .dxf flat patterns with all parts in all sub-assemblies parts and name them by the name in ste .stp file and then add the quantity, material and thickness to the file name.

 

The codes I have work very well with assemblies made in Inventor and having thickness already in the .ipt files, however I would like the code to be able to read gauges and automatically make flat patterns according to matching thicnkesses to their parts and also giving quantity numbers to the whole assembly and sub-assemblies, not just the sheet metal parts that are in the main assembly but also in sub-assemblies.

 

If you have any questions I can send you the codes to see how they work.

 

Thanls in advance 🙂

265 Views
4 Replies
Replies (4)
Message 2 of 5

jeremy.goenen
Advocate
Advocate

That sounds really interresting, mind to share your progress so far?

Fanden Sie diesen Beitrag hilfreich? Fühlen Sie sich frei, diesen Beitrag zu liken.
Wurde Ihre Frage erfolgreich beantwortet? Klicken Sie dann auf die Schaltfläche LÖSUNG AKZEPTIEREN

Inventor Versionen:
2025.2
0 Likes
Message 3 of 5

A.Acheson
Mentor
Mentor

Please share your codes your using and place an empty line with pseudo code where you want to make new functionality. The sky is the limit with automation and really the major roadblock is time so if you can share as much information as possible then the starting starting point will be clear.

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 4 of 5

zvonimirpetrovic89
Participant
Participant

This is the code from this site:

 

https://clintbrown.co.uk/2020/09/05/ilogic-export-all-flat-patterns-to-one-dxf/

 

I would actually change it to ask the user to select an edge, measure the edge, assign the edge length to the thickness of the part, make the flat pattern and then ask the user to pick the surface of the flat pattern to export as the .dxf flat pattern and continue then with the sheet metal parts in the assembly within the .spt assembly. This would make the stp file saved as an assembly and the parts that are able to be cut parts and the cutting parts would be parts that are able to be cut from sheet metal gauged from 0,5 to 60 mm sheet metal.

The gauges are: 0.5, 0.8, 1, 1.25, 1.5, 1.75, 1.8, 2, 2.25, 2.5, 2.75, 3, 4, 5, 7.5, 8, 10, 12, 12.5, 15, 17.5, 20, 22.5, 25, 27.5, 30, 35, 40, 45, 50 and 60 mm thickness gaugess and then everything else  would be able to be changed manually since everything is automated and specisal cases appear only sometimes.

 

Here is the code: website:

https://clintbrown.co.uk/2020/09/05/ilogic-export-all-flat-patterns-to-one-dxf/

 

What is wrong with the code - it makes flat platterns with sides of a part visible but as a part of the cutting - under sides are also included

0 Likes
Message 5 of 5

zvonimirpetrovic89
Participant
Participant

I like the text in your signature 🙂

I am trying to write a code to read whitch sheet metal parts af an .stp assebly are standard sheet metal parts, ask the program to assign which side i want to make a flat pattern from, make one, make a dxf. file out of it and do that for all the parts inside the .stp file and export one side of each part that I choose out if it.

Cheers 🙂

0 Likes