- nuova libreria Optalog 2021.
This commit is contained in:
DarioS
2021-12-06 16:51:15 +01:00
parent 42e5b6d85e
commit a663d86a9e
7 changed files with 296 additions and 16 deletions
+126 -14
View File
@@ -53,7 +53,7 @@ extern "C" {
CNS_BadSheetPrices = 15,
CNS_BadCommonCutGaps = 16,
CNS_PhysicalKeyNotFound = 17,
CNS_IncompatibleFeatures = 18
} CNS_ComputationStatus;
typedef enum {
@@ -573,7 +573,7 @@ extern "C" {
/**
* When a sheet is not a rectangle, left, right, bottom, top gaps will be applied on
* the sheet bounding box and border_gap will be applied on sheet geometry
* the sheet bounding box and irregular_border_gap will be applied on sheet geometry
*/
CNS_EXPORT void CNS_API CNS_SetNonRectangularSheetGaps(CNS_SheetPtr sheet,
@@ -770,6 +770,33 @@ extern "C" {
double min_dimension,
double min_area,
double unusable_ratio);
/**
* Control of part priorities.
*
* By default, priorities are not strict, if parts with high priority can not be nested a part with
* a lower priorities will be nested.
* In case of strict priorities, parts with lower priority will be nested only when all the parts of
* higher priorities will have been nested.
*
* Note: this function may degrades the performance of the nesting.
*/
CNS_EXPORT void CNS_API
CNS_SetStrictPrioritiesOnParts(CNS_LaunchingOrderPtr order, int strict);
/**
* Control of part priorities position.
*
* By default, parts with high priority will be nested in the first sheets,
* however they may not be nested near to the origin. This parameter enable to
* nest high priority parts near to the origin.
*
* Note: this function may degrades the performance of the nesting.
*/
CNS_EXPORT void CNS_API
CNS_SetOriginPrioritiesOnParts(CNS_LaunchingOrderPtr order, int enable);
/* =====================================================================================
*
@@ -967,6 +994,16 @@ extern "C" {
*/
CNS_EXPORT void CNS_API CNS_SetShearMode(CNS_LaunchingOrderPtr order, int shear);
/**
* Enable guillotine shear mode with rows patterns.
*/
CNS_EXPORT void CNS_API CNS_SetShearRowMode(CNS_LaunchingOrderPtr order, int shear);
/**
* Enable guillotine shear mode with columns patterns.
*/
CNS_EXPORT void CNS_API CNS_SetShearColumnMode(CNS_LaunchingOrderPtr order, int shear);
/**
* Set shear gap.
*
@@ -975,6 +1012,14 @@ extern "C" {
*/
CNS_EXPORT void CNS_API CNS_SetShearGap(CNS_LaunchingOrderPtr order, double shear_gap);
/**
* Set maximum shear length.
*
* Some shear machines can have a limited size of maximum shear length.
*/
CNS_EXPORT void CNS_API CNS_SetShearMaxLength(CNS_LaunchingOrderPtr order,
double shear_max_length);
/**
* Repulse parts from borders.
*
@@ -999,6 +1044,29 @@ extern "C" {
CNS_EXPORT void CNS_API CNS_SetCommonCutMode(CNS_LaunchingOrderPtr launching_order,
int enable, double common_cut_gap);
/**
* EXPERIMENTAL
* Enable or disable common cut between different parts
*
* This experimental mode allows to generate common cut between different parts.
* This function must be called instead of CNS_SetCommonCutMode in order to generate
* nestings with common cut on different parts.
*
* This mode is useful if you have a large set of different parts with small quantities and long
* straight edges that could be cut in common cut. In this case, this common cut mode allows
* to save both cutting time and material.
*
* Note: this mode does not take into account limits given by functions
* CNS_SetPartCommonCutMaxBlockSize
*/
CNS_EXPORT void CNS_API
CNS_SetCommonCutDifferentPartMode(CNS_LaunchingOrderPtr order,
int common_cut,
double common_cut_gap);
/**
* Enable or disable common cut on a specific part.
*
@@ -1008,17 +1076,14 @@ extern "C" {
CNS_EXPORT void CNS_API CNS_SetPartCommonCutMode(CNS_PartPtr part, int enable);
/**
*
* Enable or disable common cut with hole boundaries.
*
* In some circumstances it may be forbidden to nest in common cut with hole boundaries. By
* default, it is allowed to do common cut with hole boundaries.
*/
typedef enum
{
CNS_SameCommonCutPattern = 0,
CNS_Rot180LinePattern = 1,
CNS_Rot180ColumnPattern = 2,
CNS_FlipYLinePattern = 3,
CNS_FlipXColumnPattern = 4,
CNS_FlipFullPattern = 5
} CNS_CommonCutPattern;
CNS_EXPORT void CNS_API CNS_SetCommonCutOnHoles(CNS_LaunchingOrderPtr order,
int common_cut_on_holes_boundary);
/**
* Controlling common line cutting safety.
@@ -1077,6 +1142,15 @@ extern "C" {
CNS_CommonCutLeadin leadin_type,
int no_holes,
int only_bi_module);
/**
* Perfect alignment of common cuts.
*
* It some cases, it is only possible to align same length and perfect alignment of common cuts.
* This limits the number of possible common cuts.
*/
CNS_EXPORT void CNS_API CNS_SetCommonCutPerfectAlignment(CNS_LaunchingOrderPtr launching_order,
int enable);
/**
* Common cut objective settings (favor common cut or material usage).
@@ -1123,6 +1197,19 @@ extern "C" {
CNS_EXPORT void CNS_API
CNS_SetCommonCutMaxBlockSize(CNS_LaunchingOrderPtr launching_order, double max_block_size);
/**
* Limit the size of common cut blocks to a maximum dimension in x and in y.
*
* If parts are cut in common cut, this can lead to very big blocks. Those big blocks lead to
* skeleton rigidity problems. It is possible to limit their maximum size.
* @param max_block_size_x the maximum size of common cut block in x
* @param max_block_size_y the maximum size of common cut block in y
*/
CNS_EXPORT void CNS_API
CNS_SetCommonCutMaxBlockSizeXY(CNS_LaunchingOrderPtr launching_order,
double max_block_size_x,
double max_block_size_y);
/**
* Limit the size of common cut blocks to a maximum number of parts.
*
@@ -1208,8 +1295,10 @@ extern "C" {
CNS_TorchWeakCuttingPreference = 1, // give some light preference for cutting time
// vs losing material
CNS_TorchAverageCuttingPreference = 2, // more preference for cutting time
CNS_TorchStrongCuttingPreference = 3 // return solutions that strongly favor cutting
CNS_TorchStrongCuttingPreference = 3, // return solutions that strongly favor cutting
// time
CNS_TorchExtremeCuttingPreference = 4 //use multiple torches as much as possible
// even at hight material cost
} CNS_MultiTorchCuttingPreference;
/**
@@ -1229,6 +1318,29 @@ extern "C" {
CNS_MultiTorchCuttingPreference cutting_preference,
int manual_torch_move);
typedef enum
{
//Change torch distance inside a nesting as often as needed
//usually because the change is done by the machine CN during the cut
//equivalent to manual_torch_move = 0
CNS_TorchDistanceAutomatic = 0,
//Change torch distance inside a nesting only
//if it allows to cut more parts together
CNS_TorchDistanceFewChanges = 1,
//Try to find the best distance for cutting a nesting plate
//and avoid changing torch distance inside a nesting,
//usually because this operation is manual and takes time
//equivalent to manual_torch_move = 1
CNS_TorchDistanceManual = 2,
} CNS_MultiTorchTorchDistancePreference;
CNS_EXPORT void CNS_API
CNS_SetMultiTorchCuttingPreferenceDistancePreference(CNS_LaunchingOrderPtr launching_order,
CNS_MultiTorchCuttingPreference cutting_preference,
CNS_MultiTorchTorchDistancePreference distance_preference);
/**
* Advance control of the trade off between material, cutting time cost and moving torch cost
* by giving real material cost and cutting time cost to obtain the best result (minimize cost).
@@ -1381,7 +1493,7 @@ extern "C" {
CNS_EXPORT const char * CNS_API CNS_GetMajorVersion();
CNS_EXPORT const char * CNS_API CNS_GetBuildDate();
CNS_EXPORT const char * CNS_API CNS_GetBuildVersion();
CNS_EXPORT const char * CNS_API CNS_GetBuildVersionNumber();
#ifdef __cplusplus
+57
View File
@@ -0,0 +1,57 @@
#ifndef CNS_RESTRICTED_ZONE_H
#define CNS_RESTRICTED_ZONE_H
#include "cns.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct CNS_RestrictedZoneConstraint * CNS_RestrictedZoneConstraintPtr ;
/**
* Creates a zone restriction constraint.
* This constraint forces a given set of parts to be nested inside restricted zones on the sheet
* and not anywhere on the whole sheet.
*/
CNS_EXPORT CNS_RestrictedZoneConstraintPtr CNS_API
CNS_CreateRestrictedZoneConstraint(CNS_LaunchingOrderPtr order);
/**
* Define a zone in the sheet where parts can be nested according to the constraint.
* Calling the function several times on the same sheet will allow all the defined zones.
*/
CNS_EXPORT void CNS_API CNS_SheetAddRestrictedZone(
CNS_RestrictedZoneConstraintPtr constraint,
CNS_SheetPtr sheet,
unsigned number_of_elements,
const CNS_Element * elements);
/**
* Same as CNS_SheetAddRestrictedZone with simplified API for rectangular zones
*/
CNS_EXPORT void CNS_API CNS_SheetAddBoxRestrictedZone(
CNS_RestrictedZoneConstraintPtr constraint,
CNS_SheetPtr sheet,
CNS_Point bottom_left, CNS_Point top_right);
/**
* Set restriction constraint on the part.
* This part will be restricted to specific sheet zones that were
* added using CNS_SheetAddRestrictedZone
*/
CNS_EXPORT void CNS_API CNS_SetZoneRestrictedPart(
CNS_RestrictedZoneConstraintPtr constraint,
CNS_PartPtr part);
CNS_EXPORT void CNS_API CNS_ForcePartOnBottomBorder(CNS_PartPtr part);
#ifdef __cplusplus
}
#endif
#endif
+1 -2
View File
@@ -15,14 +15,13 @@ extern "C" {
* A tooling contour can also be nested outside of sheet boundaries
* This function can be called multiple times, all the tooling contours added will be unioned
*/
CNS_EXPORT void CNS_API CNS_AddToolPathToPart(CNS_PartPtr part,
unsigned number_of_elements,
const CNS_Element * elements);
/**
* Add a hole in a tooling contour
*/
CNS_EXPORT void CNS_API CNS_AddHoleInToolPath(CNS_PartPtr part,
unsigned number_of_elements,
const CNS_Element * elements);
+56
View File
@@ -210,6 +210,14 @@ EXPORTS
CNS_SetLocalEngineThreads@12 @269 NONAME
CNS_EnableMessageBoxAssert = CNS_EnableMessageBoxAssert@4 @270 NONAME
CNS_EnableMessageBoxAssert@4 @271 NONAME
CNS_CreateRestrictedZoneConstraint = CNS_CreateRestrictedZoneConstraint@4 @278 NONAME
CNS_CreateRestrictedZoneConstraint@4 @279 NONAME
CNS_SetZoneRestrictedPart = CNS_SetZoneRestrictedPart@8 @280 NONAME
CNS_SetZoneRestrictedPart@8 @281 NONAME
CNS_SheetAddBoxRestrictedZone = CNS_SheetAddBoxRestrictedZone@40 @282 NONAME
CNS_SheetAddBoxRestrictedZone@40 @283 NONAME
CNS_SheetAddRestrictedZone = CNS_SheetAddRestrictedZone@16 @284 NONAME
CNS_SheetAddRestrictedZone@16 @285 NONAME
CNS_SetPriorityInterpenetration = CNS_SetPriorityInterpenetration@16 @286 NONAME
CNS_SetPriorityInterpenetration@16 @287 NONAME
CNS_SetStrictPrioritiesOnParts = CNS_SetStrictPrioritiesOnParts@8 @288 NONAME
@@ -224,6 +232,8 @@ EXPORTS
CNS_SetSpecificSheetOrigin@8 @299 NONAME
CNS_SetSpecificSheetObjective = CNS_SetSpecificSheetObjective@8 @300 NONAME
CNS_SetSpecificSheetObjective@8 @301 NONAME
CNS_ForcePartOnBottomBorder = CNS_ForcePartOnBottomBorder@4 @302 NONAME
CNS_ForcePartOnBottomBorder@4 @303 NONAME
CNS_SetShearRepulseFromBorders = CNS_SetShearRepulseFromBorders@8 @304 NONAME
CNS_SetShearRepulseFromBorders@8 @305 NONAME
CNS_AddDefectFromNestedPart = CNS_AddDefectFromNestedPart@36 @306 NONAME
@@ -256,3 +266,49 @@ EXPORTS
CNS_AllowToolsOutsideSheet@8 @365 NONAME
CNS_SetNonRectangularSheetGaps=CNS_SetNonRectangularSheetGaps@44 @366 NONAME
CNS_SetNonRectangularSheetGaps@44 @367 NONAME
CNS_SetMultitorchHalfDistanceOnly = CNS_SetMultitorchHalfDistanceOnly@4 @370 NONAME
CNS_SetMultitorchHalfDistanceOnly@4 @371 NONAME
CNS_SetCommonCutDifferentPartMode=CNS_SetCommonCutDifferentPartMode@16 @372 NONAME
CNS_SetCommonCutDifferentPartMode@16 @373 NONAME
CNS_SetOriginPrioritiesOnParts=CNS_SetOriginPrioritiesOnParts@8 @374 NONAME
CNS_SetOriginPrioritiesOnParts@8 @375 NONAME
CNS_SetCommonCutMaxBlockSizeXY = CNS_SetCommonCutMaxBlockSizeXY@20 @376 NONAME
CNS_SetCommonCutMaxBlockSizeXY@20 @377 NONAME
CNS_LaunchBasicLocalComputation = CNS_LaunchBasicLocalComputation@12 @382 NONAME
CNS_LaunchBasicLocalComputation@12 @383 NONAME
CNS_BetterPartInsideHole=CNS_BetterPartInsideHole@4 @384 NONAME
CNS_BetterPartInsideHole@4 @385 NONAME
CNS_ChangePartQuantity = CNS_ChangePartQuantity@8 @386 NONAME
CNS_ChangePartQuantity@8 @387 NONAME
CNS_SetMultiTorchCuttingPreferenceDistancePreference = CNS_SetMultiTorchCuttingPreferenceDistancePreference@12 @390 NONAME
CNS_SetMultiTorchCuttingPreferenceDistancePreference@12 @391 NONAME
CNS_SetCommonCutOnHoles = CNS_SetCommonCutOnHoles@8 @394 NONAME
CNS_SetCommonCutOnHoles@8 @395 NONAME
CNS_ForceInflateSimplify = CNS_ForceInflateSimplify@8 @398 NONAME
CNS_ForceInflateSimplify@8 @399 NONAME
CNS_SetPriorityCompleteSet = CNS_SetPriorityCompleteSet@8 @400 NONAME
CNS_SetPriorityCompleteSet@8 @401 NONAME
CNS_SetGlobalInterpenetration = CNS_SetGlobalInterpenetration@8 @406 NONAME
CNS_SetGlobalInterpenetration@8 @407 NONAME
CNS_GetBuildVersionNumber = CNS_GetBuildVersionNumber@0 @408 NONAME
CNS_GetBuildVersionNumber@0 @409 NONAME
CNS_SetShearRowMode = CNS_SetShearRowMode@8 @410 NONAME
CNS_SetShearRowMode@8 @411 NONAME
CNS_SetShearColumnMode = CNS_SetShearColumnMode@8 @412 NONAME
CNS_SetShearColumnMode@8 @413 NONAME
CNS_SetCommonCutPerfectAlignment = CNS_SetCommonCutPerfectAlignment@8 @424 NONAME
CNS_SetCommonCutPerfectAlignment@8 @425 NONAME
CNS_NewArrayHelper = CNS_NewArrayHelper@0 @426 NONAME
CNS_NewArrayHelper@0 @427 NONAME
CNS_DeleteArrayHelper = CNS_DeleteArrayHelper@4 @428 NONAME
CNS_DeleteArrayHelper@4 @429 NONAME
CNS_ArrayHelperAddPoint = CNS_ArrayHelperAddPoint@20 @430 NONAME
CNS_ArrayHelperAddPoint@20 @431 NONAME
CNS_ArrayHelperGetPoints = CNS_ArrayHelperGetPoints@4 @432 NONAME
CNS_ArrayHelperGetPoints@4 @433 NONAME
CNS_ArrayHelperAddElement = CNS_ArrayHelperAddElement@28 @434 NONAME
CNS_ArrayHelperAddElement@28 @435 NONAME
CNS_ArrayHelperGetElements = CNS_ArrayHelperGetElements@4 @436 NONAME
CNS_ArrayHelperGetElements@4 @437 NONAME
CNS_SetShearMaxLength = CNS_SetShearMaxLength@12 @446 NONAME
CNS_SetShearMaxLength@12 @447 NONAME
Binary file not shown.
+56
View File
@@ -210,6 +210,14 @@ EXPORTS
CNS_SetLocalEngineThreads@12 @269 NONAME
CNS_EnableMessageBoxAssert = CNS_EnableMessageBoxAssert@4 @270 NONAME
CNS_EnableMessageBoxAssert@4 @271 NONAME
CNS_CreateRestrictedZoneConstraint = CNS_CreateRestrictedZoneConstraint@4 @278 NONAME
CNS_CreateRestrictedZoneConstraint@4 @279 NONAME
CNS_SetZoneRestrictedPart = CNS_SetZoneRestrictedPart@8 @280 NONAME
CNS_SetZoneRestrictedPart@8 @281 NONAME
CNS_SheetAddBoxRestrictedZone = CNS_SheetAddBoxRestrictedZone@40 @282 NONAME
CNS_SheetAddBoxRestrictedZone@40 @283 NONAME
CNS_SheetAddRestrictedZone = CNS_SheetAddRestrictedZone@16 @284 NONAME
CNS_SheetAddRestrictedZone@16 @285 NONAME
CNS_SetPriorityInterpenetration = CNS_SetPriorityInterpenetration@16 @286 NONAME
CNS_SetPriorityInterpenetration@16 @287 NONAME
CNS_SetStrictPrioritiesOnParts = CNS_SetStrictPrioritiesOnParts@8 @288 NONAME
@@ -224,6 +232,8 @@ EXPORTS
CNS_SetSpecificSheetOrigin@8 @299 NONAME
CNS_SetSpecificSheetObjective = CNS_SetSpecificSheetObjective@8 @300 NONAME
CNS_SetSpecificSheetObjective@8 @301 NONAME
CNS_ForcePartOnBottomBorder = CNS_ForcePartOnBottomBorder@4 @302 NONAME
CNS_ForcePartOnBottomBorder@4 @303 NONAME
CNS_SetShearRepulseFromBorders = CNS_SetShearRepulseFromBorders@8 @304 NONAME
CNS_SetShearRepulseFromBorders@8 @305 NONAME
CNS_AddDefectFromNestedPart = CNS_AddDefectFromNestedPart@36 @306 NONAME
@@ -256,3 +266,49 @@ EXPORTS
CNS_AllowToolsOutsideSheet@8 @365 NONAME
CNS_SetNonRectangularSheetGaps=CNS_SetNonRectangularSheetGaps@44 @366 NONAME
CNS_SetNonRectangularSheetGaps@44 @367 NONAME
CNS_SetMultitorchHalfDistanceOnly = CNS_SetMultitorchHalfDistanceOnly@4 @370 NONAME
CNS_SetMultitorchHalfDistanceOnly@4 @371 NONAME
CNS_SetCommonCutDifferentPartMode=CNS_SetCommonCutDifferentPartMode@16 @372 NONAME
CNS_SetCommonCutDifferentPartMode@16 @373 NONAME
CNS_SetOriginPrioritiesOnParts=CNS_SetOriginPrioritiesOnParts@8 @374 NONAME
CNS_SetOriginPrioritiesOnParts@8 @375 NONAME
CNS_SetCommonCutMaxBlockSizeXY = CNS_SetCommonCutMaxBlockSizeXY@20 @376 NONAME
CNS_SetCommonCutMaxBlockSizeXY@20 @377 NONAME
CNS_LaunchBasicLocalComputation = CNS_LaunchBasicLocalComputation@12 @382 NONAME
CNS_LaunchBasicLocalComputation@12 @383 NONAME
CNS_BetterPartInsideHole=CNS_BetterPartInsideHole@4 @384 NONAME
CNS_BetterPartInsideHole@4 @385 NONAME
CNS_ChangePartQuantity = CNS_ChangePartQuantity@8 @386 NONAME
CNS_ChangePartQuantity@8 @387 NONAME
CNS_SetMultiTorchCuttingPreferenceDistancePreference = CNS_SetMultiTorchCuttingPreferenceDistancePreference@12 @390 NONAME
CNS_SetMultiTorchCuttingPreferenceDistancePreference@12 @391 NONAME
CNS_SetCommonCutOnHoles = CNS_SetCommonCutOnHoles@8 @394 NONAME
CNS_SetCommonCutOnHoles@8 @395 NONAME
CNS_ForceInflateSimplify = CNS_ForceInflateSimplify@8 @398 NONAME
CNS_ForceInflateSimplify@8 @399 NONAME
CNS_SetPriorityCompleteSet = CNS_SetPriorityCompleteSet@8 @400 NONAME
CNS_SetPriorityCompleteSet@8 @401 NONAME
CNS_SetGlobalInterpenetration = CNS_SetGlobalInterpenetration@8 @406 NONAME
CNS_SetGlobalInterpenetration@8 @407 NONAME
CNS_GetBuildVersionNumber = CNS_GetBuildVersionNumber@0 @408 NONAME
CNS_GetBuildVersionNumber@0 @409 NONAME
CNS_SetShearRowMode = CNS_SetShearRowMode@8 @410 NONAME
CNS_SetShearRowMode@8 @411 NONAME
CNS_SetShearColumnMode = CNS_SetShearColumnMode@8 @412 NONAME
CNS_SetShearColumnMode@8 @413 NONAME
CNS_SetCommonCutPerfectAlignment = CNS_SetCommonCutPerfectAlignment@8 @424 NONAME
CNS_SetCommonCutPerfectAlignment@8 @425 NONAME
CNS_NewArrayHelper = CNS_NewArrayHelper@0 @426 NONAME
CNS_NewArrayHelper@0 @427 NONAME
CNS_DeleteArrayHelper = CNS_DeleteArrayHelper@4 @428 NONAME
CNS_DeleteArrayHelper@4 @429 NONAME
CNS_ArrayHelperAddPoint = CNS_ArrayHelperAddPoint@20 @430 NONAME
CNS_ArrayHelperAddPoint@20 @431 NONAME
CNS_ArrayHelperGetPoints = CNS_ArrayHelperGetPoints@4 @432 NONAME
CNS_ArrayHelperGetPoints@4 @433 NONAME
CNS_ArrayHelperAddElement = CNS_ArrayHelperAddElement@28 @434 NONAME
CNS_ArrayHelperAddElement@28 @435 NONAME
CNS_ArrayHelperGetElements = CNS_ArrayHelperGetElements@4 @436 NONAME
CNS_ArrayHelperGetElements@4 @437 NONAME
CNS_SetShearMaxLength = CNS_SetShearMaxLength@12 @446 NONAME
CNS_SetShearMaxLength@12 @447 NONAME
Binary file not shown.