a663d86a9e
- nuova libreria Optalog 2021.
58 lines
1.5 KiB
C
58 lines
1.5 KiB
C
#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
|