ClusterCreate
Creates a new cluster.
Python C++ C# VS Server
Python
BwApi.ClusterCreate(garmentId, view, location)
C++
BwApiClusterCreate(garmentId, view, location);
C#
BwApi.ClusterCreate(garmentId, view, location);
VS Server
{
"id": "API processing order number",
"function": "ClusterCreate",
"params": {
"garmentId": "value",
"view": "value",
"location": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | view | The silhouette view to use at it is display in the UI under Tools -> Arrange (see BwApiClusterSilhouetteView enum) |
In | location | The silhouette location within the selected view (see BwApiClusterSilhouetteLocation enum) |
Out | newClusterId | ID of the newly created cluster |
Error/success code (see BwApiErrorCodes enum).
Must immediately fill with valid shapes (at least one shape).
ClusterDelete
Delete a cluster.
Python C++ C# VS Server
Python
BwApi.ClusterDelete(garmentId, clusterId)
C++
BwApiClusterDelete(garmentId, clusterId);
C#
BwApi.ClusterDelete(garmentId, clusterId);
VS Server
{
"id": "API processing order number",
"function": "ClusterDelete",
"params": {
"garmentId": "value",
"clusterId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | clusterId | ID of the cluster to be deleted |
Error/success code (see BwApiErrorCodes enum).
ClusterShapeAdd
Add a shape to a cluster.
Python C++ C# VS Server
Python
BwApi.ClusterShapeAdd(garmentId, clusterId, shapeId)
C++
BwApiClusterShapeAdd(garmentId, clusterId, shapeId);
C#
BwApi.ClusterShapeAdd(garmentId, clusterId, shapeId);
VS Server
{
"id": "API processing order number",
"function": "ClusterShapeAdd",
"params": {
"garmentId": "value",
"clusterId": "value",
"shapeId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | clusterId | Existing cluster ID |
In | shapeId | The ID of the shape to be inserted to the cluster |
Error/success code (see BwApiErrorCodes enum).
ClusterShapeRemove
Remove a shape from a cluster.
Python C++ C# VS Server
Python
BwApi.ClusterShapeRemove(garmentId, clusterId, shapeId)
C++
BwApiClusterShapeRemove(garmentId, clusterId, shapeId);
C#
BwApi.ClusterShapeRemove(garmentId, clusterId, shapeId);
VS Server
{
"id": "API processing order number",
"function": "ClusterShapeRemove",
"params": {
"garmentId": "value",
"clusterId": "value",
"shapeId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | clusterId | Existing cluster ID |
In | shapeId | The ID of the shape to be removed from the cluster |
Error/success code (see BwApiErrorCodes enum).
ClusterShapeOffsetGet
Get the shape offset from the cluster hanging point.
Python C++ C# VS Server
Python
BwApi.ClusterShapeOffsetGet(garmentId, clusterId, shapeId)
C++
BwApiClusterShapeOffsetGet(garmentId, clusterId, shapeId);
C#
BwApi.ClusterShapeOffsetGet(garmentId, clusterId, shapeId);
VS Server
{
"id": "API processing order number",
"function": "ClusterShapeOffsetGet",
"params": {
"garmentId": "value",
"clusterId": "value",
"shapeId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | clusterId | Existing cluster ID |
In | shapeId | Shape ID within the selected cluster |
Out | offset | The offset from the cluster hanging point |
Error/success code (see BwApiErrorCodes enum).
ClusterShapeOffsetSet
Set the shape offset from the cluster hanging point.
Python C++ C# VS Server
Python
BwApi.ClusterShapeOffsetSet(garmentId, clusterId, shapeId, offset)
C++
BwApiClusterShapeOffsetSet(garmentId, clusterId, shapeId, offset);
C#
BwApi.ClusterShapeOffsetSet(garmentId, clusterId, shapeId, offset);
VS Server
{
"id": "API processing order number",
"function": "ClusterShapeOffsetSet",
"params": {
"garmentId": "value",
"clusterId": "value",
"shapeId": "value",
"offset": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | clusterId | Existing cluster ID |
In | shapeId | Shape ID within the selected cluster |
In | offset | The offset from the cluster hanging point |
Error/success code (see BwApiErrorCodes enum).
ClusterShapeOffsetGetEx
Get a cluster's offset value.
Python C++ C#
Python
BwApi.ClusterShapeOffsetGetEx(garmentId, clusterId, shapeId, sizeId)
C++
BwApiClusterShapeOffsetGetEx(garmentId, clusterId, shapeId, sizeId);
C#
BwApi.ClusterShapeOffsetGetEx(garmentId, clusterId, shapeId, sizeId);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | clusterId | Existing cluster ID |
In | shapeId | Existing shape ID |
In | sizeId | Existing size ID (-1 for current size) |
Out | offset | Return shape's offset in cluster |
Error/success code (see BwApiErrorCodes enum).
ClusterShapeOffsetSetEx
Set a cluster's offset value.
Python C++ C#
Python
BwApi.ClusterShapeOffsetSetEx(garmentId, clusterId, shapeId, sizeId, offset)
C++
BwApiClusterShapeOffsetSetEx(garmentId, clusterId, shapeId, sizeId, offset);
C#
BwApi.ClusterShapeOffsetSetEx(garmentId, clusterId, shapeId, sizeId, offset);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | clusterId | Existing cluster ID |
In | shapeId | Existing shape ID |
In | sizeId | Existing size ID (-1 for current size, -2 for all sizes) |
In | offset | New offset in cluster |
Error/success code (see BwApiErrorCodes enum).
ClusterShapeIds
Get a list of shape IDs within given the cluster ID.
Python C++ C# VS Server
Python
BwApi.ClusterShapeIds(garmentId, clusterId)
C++
BwApiClusterShapeIds(garmentId, clusterId);
C#
BwApi.ClusterShapeIds(garmentId, clusterId);
VS Server
{
"id": "API processing order number",
"function": "ClusterShapeIds",
"params": {
"garmentId": "value",
"clusterId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | clusterId | Existing cluster ID |
Out | shapeIds | Array of shape IDs within the selected cluster |
Error/success code (see BwApiErrorCodes enum).
ClusterSilhouetteGet
Get the cluster's silhouette view and location from the given cluster ID.
Python C++ C# VS Server
Python
BwApi.ClusterSilhouetteGet(garmentId, clusterId)
C++
BwApiClusterSilhouetteGet(garmentId, clusterId);
C#
BwApi.ClusterSilhouetteGet(garmentId, clusterId);
VS Server
{
"id": "API processing order number",
"function": "ClusterSilhouetteGet",
"params": {
"garmentId": "value",
"clusterId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | clusterId | Existing cluster ID |
Out | view | The cluster's silhouette view(see BwApiClusterSilhouetteView enum) |
Out | location | The cluster's silhouette location within the view (see BwApiClusterSilhouetteLocation enum) |
Error/success code (see BwApiErrorCodes enum).
ClusterWrapOverBodyGet
Get a cluster's wrap over body property.
Python C++ C# VS Server
Python
BwApi.ClusterWrapOverBodyGet(garmentId, clusterId)
C++
BwApiClusterWrapOverBodyGet(garmentId, clusterId);
C#
BwApi.ClusterWrapOverBodyGet(garmentId, clusterId);
VS Server
{
"id": "API processing order number",
"function": "ClusterWrapOverBodyGet",
"params": {
"garmentId": "value",
"clusterId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | clusterId | Existing cluster ID |
Out | wrapOverBody | Cluster's wrap over body type (see BwApiClusterWrapOverBody enum) |
Error/success code (see BwApiErrorCodes enum).
ClusterWrapOverBodySet
Set a cluster's wrap over body property.
Python C++ C# VS Server
Python
BwApi.ClusterWrapOverBodySet(garmentId, clusterId, wrapOverBody)
C++
BwApiClusterWrapOverBodySet(garmentId, clusterId, wrapOverBody);
C#
BwApi.ClusterWrapOverBodySet(garmentId, clusterId, wrapOverBody);
VS Server
{
"id": "API processing order number",
"function": "ClusterWrapOverBodySet",
"params": {
"garmentId": "value",
"clusterId": "value",
"wrapOverBody": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | clusterId | Existing cluster ID |
In | wrapOverBody | Cluster's wrap over type (see BwApiClusterWrapOverBody enum) |
Error/success code (see BwApiErrorCodes enum).
ClusterPropertiesGet
Get a cluster's properties such as symmetry, constrained area etc...
Python C++ C# VS Server
Python
BwApi.ClusterPropertiesGet(garmentId, clusterId)
C++
BwApiClusterPropertiesGet(garmentId, clusterId);
C#
BwApi.ClusterPropertiesGet(garmentId, clusterId);
VS Server
{
"id": "API processing order number",
"function": "ClusterPropertiesGet",
"params": {
"garmentId": "value",
"clusterId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | clusterId | Existing cluster ID |
Out | properties | Cluster's properties (see BwApiClusterProperties struct) |
Error/success code (see BwApiErrorCodes enum).
ClusterPropertiesSet
Set a cluster's properties such as symmetry, constrained area etc...
Python C++ C# VS Server
Python
BwApi.ClusterPropertiesSet(garmentId, clusterId)
C++
BwApiClusterPropertiesSet(garmentId, clusterId);
C#
BwApi.ClusterPropertiesSet(garmentId, clusterId);
VS Server
{
"id": "API processing order number",
"function": "ClusterPropertiesSet",
"params": {
"garmentId": "value",
"clusterId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | clusterId | Existing cluster ID |
Out | properties | Cluster's properties (see BwApiClusterProperties struct) |
Error/success code (see BwApiErrorCodes enum).
Since this will set all values within BwApiClusterProperties struct it is recommended to first call BwApiClusterPropertiesGet, change the parameter you want and call BwApiClusterPropertiesSet with the modified struct.
ClusterTransformationGet
Get a cluster's transformation properties.
Python C++ C# VS Server
Python
BwApi.ClusterTransformationGet(garmentId, clusterId)
C++
BwApiClusterTransformationGet(garmentId, clusterId);
C#
BwApi.ClusterTransformationGet(garmentId, clusterId);
VS Server
{
"id": "API processing order number",
"function": "ClusterTransformationGet",
"params": {
"garmentId": "value",
"clusterId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | clusterId | Existing cluster ID |
Out | transformation | Cluster's transformation |
Error/success code (see BwApiErrorCodes enum).
This function allow you to get the scale, offset and rotate properties.
ClusterTransformationSet
Set a cluster's transformation properties.
Python C++ C# VS Server
Python
BwApi.ClusterTransformationSet(garmentId, clusterId, transformation)
C++
BwApiClusterTransformationSet(garmentId, clusterId, transformation);
C#
BwApi.ClusterTransformationSet(garmentId, clusterId, transformation);
VS Server
{
"id": "API processing order number",
"function": "ClusterTransformationSet",
"params": {
"garmentId": "value",
"clusterId": "value",
"transformation": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | clusterId | Existing cluster ID |
In | transformation | Cluster's transformation |
Error/success code (see BwApiErrorCodes enum).
This function allows you to set the scale, offset and rotate properties.
Use BwApiClusterTransformationGet first to get the current values update the struct and then call BwApiClusterTransformationSet with the updated struct.