خانه / برنامه نویسی / کتابخانه برنامه نویسی بهینه سازی لیست برش

کتابخانه برنامه نویسی بهینه سازی لیست برش

در این پست یکی از کتابخانه های بهینه سازی لیست برش را معرفی کردیم که میتوانید در بسیاری از زبان های برنامه نویسی از آن استفاده نمایید.

کتابخانه برنامه نویسی بهینه سازی برش

در گذشته در این پست در مورد اهمیت بهینه سازی در برش متریال های مختلف و نرم افزارهایی که در این زمینه وجود دارد توضیحاتی قرار داده بودیم که به کمک آن میتوانستید لیست برش بهینه ای را تهیه کنید.در این پست میخواهیم کتابخانه ای را برای برنامه نویسان و توسعه دهندگان نرم افزار معرفی کنیم که بتوانند از این الگوریتم های بهینه برش در نرم افزارهای خود استفاده کنند.

کتابخانه CutGLib با توجه به متریال موردنظر بهترین حالت دستور برش را به صورت تک بعدی و دو بعدی طراحی می کند.با این استفاده از این کتابخانه هر زمان که نیاز به یافتن راهی برای برش چندین قسمت از یک متریال دارید، فقط باید یک نمونه از کلاس CutEngine ایجاد کنید و پارامترهای موردنظر از جمله موجودی متریال ، طول موجود ، تعداد برش موردنظر ، طول برش ها و … را مشخص کرده تا محاسبات انجام شود.

این کتابخانه الگوهای برش بهینه ای را در اختیار شما قرار میدهد که کمترین مقدار پرت را داشته باشد.همچنین در صورت بروز هرگونه خطا در روش محاسبه ، پیغام خطای دقیق را را نمایش میدهد.

قابلیت های کتابخانه CutGLib :

  • بهینه سازی برش به صورت 1D و 2D
  • امکان ایجاد فایل تصویر از الگوی برش با فرمت PNG
  • امکان خروجی به اکسل با فرمت CSV
  • امکان استفاده از خروجی الگوی برش در نرم افزار اتوکد به کمک فرمت DXF خروجی گرفته شده
  • امکان خروجی الگوی برش به فرمت PTX که برای برخی از دستگاه های CNC کاربرد دارد.

استفاده کتابخانه CutGLib در زبان های برنامه نویسی مختلف:

در حال حاضر از دستورات و قابلیت های این کتابخانه میتوانید در زبان های برنامه نویسی زیر استفاده کنید :

  • #C
  • VB.NET
  • ++C
  • VB6
  • VBA-EXCEL
  • Delphi

 

نحوه اضافه کردن فایل کتابخانه CutGLib در زبان های برنامه نویسی مختلف

زبان برنامه نویسی سی شارپ و vb.net : کافیست یک پروژه تحت دات نت فریمورک 4.5 یا بالاتر ایجاد کرده و سپس فایل کتابخانه CutGLib.dll را در کنار فایل خروجی برنامه کپی کنید و در ادامه در رفرنس پروژه فایل CutGLib.dll رو اضافه کنید.

زبان برنامه نویسی vb6 و VBA-EXCEL : براساس نوع ویندوز 32 یا 64 بیتی که نصب دارید فایل CutGLib.dll را در مسیر های زیر کپی کنید :

x86: C:\Windows\System32
x64: C:\Windows\SysWOW64

سپس در استارت منو دستور cmd جستجو کنید و آن را بصورت Run Admin اجرا کنید.سپس در ادامه خط اول و خط دوم دستورات نوشته شده را بصورت جداگانه داخل آن کپی کنید :

برای ویندوز 32 بیتی :

cd C:\Windows\System32
C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe CutGLib.dll /tlb:CutGLib.tlb /codebase

برای ویندوز 64 بیتی :

cd C:\Windows\SysWOW64
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe CutGLib.dll /tlb:CutGLib64.tlb /codebase

سپس در پروژه VBA-EXCEL یا vb6 در منوی رفرنس میتوانید در لیست نمایش داده شده CutGlib را انتخاب کنید.

زبان برنامه نویسی ++C و دلفی : مشابه توضیحات گفته شده میتوانید در این زبان های برنامه نویسی نیز این کتابخانه استفاده نمایید.

 

نحوه فعالسازی و دریافت لایسنس

این کتابخانه را در حالت رایگان به مدت 30 روز میتوانید استفاده کنید.چناچه نیاز به استفاده همیشگی و بدون محدودیت این کتابخانه را دارید میتوانید لایسنس آن را از ما دریافت نمایید.

نوع لایسنس هزینه لایسنس سایر توضیحات
Computer LicenseKey 200 هزارتومان این نوع لایسنس براساس کدسخت افزاری سیستم شما ایجاد میشود و امکان استفاده در سایر سیستم ها وجود ندارد.صرفا در همان سیستمی که کدسخت افزاری برای آن ایجاد شده میتوانید از این لایسنس استفاده کنید.
Unlimited LicenseKey 900 هزارتومان این نوع لایسنس را بدون هیچ محدودیت سخت افزاری میتوانید در همه سیستم ها استفاده کنید.

توجه : در توضیحات زیر نمونه دستورات براساس زبان برنامه نویسی سی شارپ نوشته شده است و در سایر زبان ها نیز مشابه همین دستورات وجود دارد.

لایسنس Computer LicenseKey :

  • برای ارسال کد سخت افزاری دستور زیر را در پروژه موردنظر اجرا کنید و کدسخت افزاری را برای ما ارسال کنید :
 CutEngine CutEngine = new CutEngine();
 string HardwareCode = CutEngine.ComputerHardwareCode();
  • بعد از دریافت لایسنس با دستور زیر میتوانید در کدنویسی پروژه موردنظر قرار بدید :
 CutEngine CutEngine = new CutEngine();
CutEngine.SetComputerLicenseKey("LicenseKey");

لایسنس Unlimited LicenseKey :

بعد از دریافت لایسنس با دستور زیر میتوانید در کدنویسی پروژه موردنظر قرار بدید :

 CutEngine CutEngine = new CutEngine();
CutEngine.SetSiteLicenseKey("LicenseKey");

 

تغییرات انجام شده در نسخه های مختلف

Version 4.9.4 (2023-11-17)
————————————————–
– Fixed null object error for cases with non-zero minimal waste sizes.

Version 4.9.3 (2023-10-19)
————————————————–
– Updated sign-in certificate.

Version 4.9.2 (2023-09-09)
————————————————–
– Fixed post-processing step to produce less stocks.

Version 4.9.1 (2023-09-02)
————————————————–
– Improved utilization of panels with non-zero waste minimal size.

Version 4.9.0 (2023-08-29)
————————————————–
– Added filling of orthogonal stripes areas.

Version 4.8.2 (2023-06-24)
————————————————–
– Improved optimization for 2D stock cutting.

Version 4.8.1 (2023-06-06)
————————————————–
– Fixed the maximum parts per stock option for linear cutting.

Version 4.8.0 (2023-05-22)
————————————————–
– Added combining linear stocks in order to accommodate bigger parts that exceed any stock lengths.
– Fixed getting computer hardware code for 32-bit applications on Windows 64-bit.

Version 4.7.3 (2023-04-18)
————————————————–
– Fixed the error of overlapping pattern in post-processing stage.

Version 4.7.2 (2023-04-04)
————————————————–
– Improved optimization for the cases when all parts can be fit into one sheet.

Version 4.7.1 (2022-11-17)
————————————————–
– Fixed optimization algorithm to not exceed maximum cut levels for non-standard (less than 6) cuts.

Version 4.7.0 (2022-09-12)
————————————————–
– Added post-processing step for combining parts placement in 2D optimization algorithm.

Version 4.6.6 (2022-08-29)
————————————————–
– Added export stock ID into CSV file.
– Fixed rounding issue with angled linear cutting.

Version 4.6.5 (2022-08-23)
————————————————–
– Fixed the random problem with part intersection in 2D cutting.

Version 4.6.4 (2022-07-06)
————————————————–
– Fixed random index of bound error in 1D cutting.

Version 4.6.3 (2022-05-17)
————————————————–
– Improved 2D optimization by combining a waste area of different straps.

Version 4.6.2 (2022-03-02)
————————————————–
– Fixed linear part location calculation for angle cuts with zero cross section.

Version 4.6.1 (2022-02-13)
————————————————–
– Fixed linear part location calculation for angle cuts with non-zero saw kerf.

Version 4.6.0 (2022-01-11)
————————————————–
– Added property LinearSortAscending that defines sorting linear parts on stocks in
ascending (true) (increasing length) or descending (false) order.

Version 4.5.8 (2021-10-08)
————————————————–
– Fixed issue with priority cutting big parts from big panels with limited amount.

Version 4.5.7 (2021-09-12)
————————————————–
– Improved waste part generation for non-zero saw kerf.

Version 4.5.6 (2021-09-02)
————————————————–
– Fixed waste size image generation for non-zero kerf cuts in 1D cutting.

Version 4.5.5 (2021-07-31)
————————————————–
– Fixed cutting bigger parts first from limited stocks.
– Fixed issue with generating waste parts that violated minimal waste restrictions.

Version 4.5.4 (2021-05-26)
————————————————–
– Fixed stack overflow error of linear cutting for huge stocks with up to 5000 parts.

Version 4.5.3 (2021-05-08)
————————————————–
– Improved performance of linear cutting for huge stocks with more than 100 parts.
– Added internal part sorting to get more uniform layouts for 2D optimization.

Version 4.5.2 (2021-04-09)
————————————————–
– Fixed generating guillotine cuts for MaxCutLevel less than 6.

Version 4.5.1 (2021-03-28)
————————————————–
– Improved optimization for MaxCutLevel less than 6.

Version 4.5.0 (2021-02-17)
————————————————–
– Added output parameter aLevel for getting cuts methods (GetCut, GetStockCut, GetStockTrimCut).
– Added export of panel cutting layouts to Pattern Exchange Format (PTX) file for CNC saw machines.

Version 4.4.4 (2021-01-10)
————————————————–
– Improved rectangle optimization for project with less than 250 parts.

Version 4.4.3 (2020-11-25)
————————————————–
– Improved linear stock selection for incomplete optimization.

Version 4.4.2 (2020-10-06)
————————————————–
– Fixed stock utilization calculation

Version 4.4.1 (2020-07-15)
————————————————–
– Fixed layout ratio calculation (method GetLayoutFillRatio())

Version 4.4.0 (2020-07-11)
————————————————–
– Fixed detection of layout pattern and combining them.
– Fixed calculation with LinearMaxSizePerStock for angled linear cuts.

Version 4.3.2 (2020-05-11)
————————————————–
– Fixed minimal waste size limitation for linear optimization.

Version 4.3.1 (2020-05-05)
————————————————–
– Improved flipping linear parts optimization.

Version 4.2.0 (2020-02-24)
————————————————–
– Added support of linear waste stocks.
– Added allowing flipping linear parts during the calculation.

Version 4.1.4 (2019-12-09)
————————————————–
– Added checks against linear cases with all part violating non-zero minimal waste size.

Version 4.1.3 (2019-05-17)
————————————————–
– Fixed calculation error with non-zero minimal waste size.

Version 4.1.2 (2019-05-11)
————————————————–
– Added checks for stock length and height against trim sizes to avoid stocks less than both trims combined.

Version 4.1.1 (2019-04-19)
————————————————–
– Fixed utilization rate calculation for linear cutting with angles.

Version 4.1.0 (2019-04-11)
————————————————–
– Improved optimization for the last long sheet.

Version 4.0.5 (2019-01-18)
————————————————–
– Improved optimization for single sheet size.

Version 4.0.0 (2018-10-10)
————————————————–
– Added new license registration methods:
RegisterComputerLicenseKey(<HardwareCode>, <License_Key>);
LoadRegisteredComputerLicenseKey();

Version 3.9.7 (2018-10-07)
————————————————–
– Fixed generation of waste parts for multiple stock panels.

Version 3.9.6 (2018-09-24)
————————————————–
– Improved linear angle cuts optimization.

Version 3.9.5 (2018-08-28)
————————————————–
– Added callback function to stop the calculation.

Version 3.8.0 (2018-06-05)
————————————————–
– Added new optimization algorithm for simple (Level 2) cutting method.

Version 3.7.6 (2018-05-21)
————————————————–
– Improved the last strip generation to avoid extra sheet.

Version 3.7.5 (2018-05-01)
————————————————–
– Fixed waste part generation for linear cutting with trims.

Version 3.7.4 (2018-04-26)
————————————————–
– Improved performance for linear cutting with non-zero LinearMaxSizePerStock property.

Version 3.7.3 (2018-04-13)
————————————————–
– Improved cutting optimization for level 2 and 3.

Version 3.7.2 (2018-03-31)
————————————————–
– Added method ExportCutsToDXF() to get list of cutting planes in DXF file.

Version 3.7.1 (2018-03-20)
————————————————–
– Fixed bottom and right side cut-off problem for linear cutting images.

Version 3.7.0 (2018-02-24)
————————————————–
– Implemented new sorting parts algorithm to produce layout with more even parts distribution.

Version 3.6.5 (2018-02-24)
————————————————–
– Improved comparison algorithm for parts with high precisions.

Version 3.6.4 (2018-02-20)
————————————————–
– Fixed calculation of waste part areas for parts with high precisions.

Version 3.6.3 (2017-11-20)
————————————————–
– Added post-processing step to select the smallest stock for layouts placed on bigger stocks.

Version 3.6.2 (2017-11-10)
————————————————–
– Improved performance.

Version 3.6.1 (2017-10-31)
————————————————–
– Improved minimize layout algorithm.

Version 3.6.0 (2017-08-26)
————————————————–
– Improved filling internal area with the same part sizes.

Version 3.5.3 (2017-08-14)
————————————————–
– Fixed calculation to avoid big waste area at the last two sheets.

Version 3.5.2 (2017-07-31)
————————————————–
– Added support for a maximum decimal point to improve numeric precision (MaxDecimalPoint).

Version 3.5.0 (2017-06-05)
————————————————–
– Added support for a maximum different linear parts cut from one stock (LinearMaxSizePerStock and LinearMaxSizePerStockThreshold).

Version 3.3.0 (2017-02-16)
————————————————–
– Added prioritization algorithm to utilize big parts first to avoid situation when there is no big stocks that such parts can be cut of.

Version 3.2.0 (2017-02-04)
————————————————–
– Added roll mode for the methods SetVerticalCutDirection() and SetHorizontalCutDirection().
It’s suitable for roll (stripe) cutting. If aRoolMode is True then it ensures the first cut is made completely from
one side of the stock to the opposite one.

Version 3.1.3 (2017-01-08)
————————————————–
– Added support of un-used parts in GetResultPart and GetResultLinearPart.

Version 3.1.2 (2016-12-15)
————————————————–
– Fixed GetResultPart and GetResultLinearPart to return false for indices out of range.

Version 3.1.1 (2016-10-16)
————————————————–
– Fixed export of angled linear stock layouts.

Version 3.1.0 (2016-10-15)
————————————————–
– Added methods to export linear stock layout (CreateLinearStockImage).

Version 3.0.2 (2016-09-08)
————————————————–
– improved optimization for mixed rotatable and non-rotatable parts.

Version 3.0.1 (2016-08-04)
————————————————–
– fixed automated part IDs generation for CreateStockImage()

 

لینک های دانلود

فایل کتابخانه CutGLib 4.9.4 دانلود فایل

فایل راهنمای کتابخانه CutGLib دانلود فایل

نمونه سورس کدهای کتابخانه CutGLib دانلود فایل

نمونه برنامه نوشته شده با کتابخانه CutGLib دانلود فایل

رمز فایل ها : samisoft.ir

توجه : اگر با زبان های برنامه نویسی آشنایی ندارید میتوانید از نرم افزارهای معرفی شده در این پست استفاده کنید.

درباره ی سامان بهنام

مهندس عمران ، پایه 2 سازمان نظام مهندسی ساختمان ، برنامه نويس و توسعه دهنده نرم افزارهای تحت وب ، ویندوز و اندروید که در این سایت و کانال تلگرام civil_Tools@ و صفحه اینستاگرام samisoft.ir تجربیاتش را در حوزه نرم افزار منتشر می کند.

4 دیدگاه

  1. سلام
    برای تهیه لایسنس دائمی راهنمایی می فرمایید.
    ممنون

  2. با سلام چطور میتونم لایسنس دایمی این کتابخانه رو تهیه کنم

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *

error: Alert: Content selection is disabled!!