PROFILE CUTTING OPTIMIZATION CALCULATION

Use this space to ask how to do whatever you're trying to use SolidWorks to do.
User avatar
Ömür Tokman
Posts: 361
Joined: Sat Mar 13, 2021 3:49 am
Answers: 1
Location: İstanbul-Türkiye
x 995
x 347
Contact:

PROFILE CUTTING OPTIMIZATION CALCULATION

Unread post by Ömür Tokman »

Hello everybody,
I couldn't decide why I would write about this topic. I made an Excel macro that I've been thinking about for a long time and wanted to share it here.
This macro places part profiles with cutting dimensions into one length profile with minimum wastage. The more parts that need to be cut, the more profiles create the cutting order.
I used an online site for its algorithm and modified it to meet my needs.
I hope it will be useful for someone.
2023-12-01_16-40-59.png
#1d linear cut optimizer
Attachments
PROFILE CUTTING OPTIMIZATION CALCULATION.xls
(137 KiB) Downloaded 620 times
You ˹alone˺ we worship and You ˹alone˺ we ask for help.
martins
Posts: 2
Joined: Sat Feb 24, 2024 3:45 am
Answers: 0
x 2

Re: PROFILE CUTTING OPTIMIZATION CALCULATION

Unread post by martins »

hi, I found this excel file and great job, it does what it needs to do. however, I would like to ask about the possibility of processing the "profile length" residues, length - number, and since it would also count the residues, use the residues first and then use the profile length, which is basic
User avatar
Ömür Tokman
Posts: 361
Joined: Sat Mar 13, 2021 3:49 am
Answers: 1
Location: İstanbul-Türkiye
x 995
x 347
Contact:

Re: PROFILE CUTTING OPTIMIZATION CALCULATION

Unread post by Ömür Tokman »

Hello Gentlemen,
An update.
This time I'm doing things with a tlb reference file in C#.
The first version was putting the cutting lengths in order and getting the result. I wanted to make a VBA that creates self-renewing combinations and actually I did it, but Excel was crashing when the combinations increased, unfortunately Excel does not work in multi-item lists. That's why I even handled the codes that create the combinations in C#.
I'm adding all my work, I think someone who understands software should develop it further.
current operation.
Cutting lengths in Excel are collected in a list.
C# creates self-renewing combinations from numbers whose sum reaches the stock size.
selects the largest one and prints it to Excel.
The numbers entered in Excel are deleted from the first list and the process is repeated for the remaining cutting dyes. until there are no more cutting sizes left in the list. The process repeats.
Remember, I am not a software developer, these issues need to be improved.
Result: It meets my needs.

Please test, we can do better together.
2024-02-28_11-34-19.png
2024-02-28_11-35-31.png
2024-02-28_11-36-27.png
Important!
As for getting it to work on other machines, you'll need to register the TLB file with the system. Just setting the reference isn't enough.

regsvr32 C:\Your_Path_Here\CSharpLibrary.tlb
Attachments
PROFILE CUT OPTIMIZATION CALCULATION-V2.zip
(241.7 KiB) Downloaded 292 times
You ˹alone˺ we worship and You ˹alone˺ we ask for help.
User avatar
gupta9665
Posts: 420
Joined: Thu Mar 11, 2021 10:20 am
Answers: 25
Location: India
x 438
x 459

Re: PROFILE CUTTING OPTIMIZATION CALCULATION

Unread post by gupta9665 »

Thank you for sharing.
Deepak Gupta
SOLIDWORKS Consultant/Blogger
martins
Posts: 2
Joined: Sat Feb 24, 2024 3:45 am
Answers: 0
x 2

Re: PROFILE CUTTING OPTIMIZATION CALCULATION

Unread post by martins »

Hello, I am completely out of this. I can still edit something in Excel VBA in a "trial-and-error" way, but in this case I have to hope that someone will find your idea and I, as a layman, will use a working project. basically I have not yet managed to register the TLB into the system, which is essential for it to work.
vinnoo
Posts: 1
Joined: Thu Jul 18, 2024 10:37 am
Answers: 0

Re: PROFILE CUTTING OPTIMIZATION CALCULATION

Unread post by vinnoo »

Dear Ömür Tokman,
Thank you so much for a wonderful attempt.

I've downloaded "PROFILE CUTTING OPTIMIZATION CALCULATION.xls" and it's working fine, however when I tried with larger cutting list it is kind of giving wrong combination for few of the bars. Kindly check the attachment.

I know you are working on it on your busy schedule, kindly try to rectify it in your free time.
I've failed to set up your second attempt, and I found the first one is much easier and helpful.

Thank you
Vinnoo
Attachments
PROFILE CUTTING OPTIMIZATION CALCULATION_02.xls
(109.5 KiB) Downloaded 138 times
Post Reply