Skip to main content

Edge

Edge

This file contains edge functionality, you can create edge, delete an edge, update edge points etc...

BwApiEdgeCreateAsPolyline

Creates a new edge (base size).

Python

BwApi.EdgeCreateAsPolyline(garmentId, shapeId, beforeEdgeId, optimized, points)

C++

BwApiEdgeCreateAsPolyline(garmentId, shapeId, beforeEdgeId, optimized, points, newEdgeId);

C#

BwApi.EdgeCreateAsPolyline(garmentId, shapeId, beforeEdgeId, optimized, points);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

shapeId

Existing shape ID.

In

beforeEdgeId

Place in edge order in which to insert the new edge, -1 for insertion at the end of the edge list.

In

optimized

Boolean (1/0) if the creation of the edge should optimized the number of the points.

In

points

Array of BwApiPoint that represent the edge's points.

Out

newEdgeId

ID of the newly created edge ID.

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiEdgeCreate

DEPRECATED - Use BwApiEdgeCreateAsPolyline.

Python

BwApi.EdgeCreate()

C++

BwApiEdgeCreate();

C#

BwApi.EdgeCreate();

---

BwApiEdgeCreateAsBezier

Creates a new edge with Bezier points (base size).

Python

BwApi.EdgeCreateAsBezier(garmentId, shapeId, beforeEdgeId, points)

C++

BwApiEdgeCreateAsBezier(garmentId, shapeId, beforeEdgeId, points, newEdgeId);

C#

BwApi.EdgeCreateAsBezier(garmentId, shapeId, beforeEdgeId, points);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

shapeId

Existing shape ID.

In

beforeEdgeId

Place in edge order in which to insert the new edge, -1 for insertion at the end of the edge list.

In

points

Array of BwApiBezierPoint that represents.

Out

newEdgeId

ID of the newly created edge ID.

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiEdgeDelete

Delete an edge from a shape.

Python

BwApi.EdgeDelete(garmentId, shapeId, edgeId)

C++

BwApiEdgeDelete(garmentId, shapeId, edgeId);

C#

BwApi.EdgeDelete(garmentId, shapeId, edgeId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

shapeId

Existing shape ID.

In

edgeId

Edge ID to delete.

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiEdgePointsSetAsPolyline

Set an edge's points (base size).

Python

BwApi.EdgePointsSetAsPolyline(garmentId, shapeId, edgeId, optimized, points)

C++

BwApiEdgePointsSetAsPolyline(garmentId, shapeId, edgeId, optimized, points);

C#

BwApi.EdgePointsSetAsPolyline(garmentId, shapeId, edgeId, optimized, points);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

shapeId

Existing shape ID.

In

edgeId

Existing edge ID.

In

optimized

Boolean (1/0) if the creation of the edge should optimized the number of the points.

In

points

Array of BwApiPoint that represents the edge's points.

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiEdgePointsSet

DEPRECATED - Use BwApiEdgePointsSetAsPolyline.

Python

BwApi.EdgePointsSet()

C++

BwApiEdgePointsSet();

C#

BwApi.EdgePointsSet();

---

BwApiEdgePointsSetAsBezier

Set an edge's points as Bezier (base size).

Python

BwApi.EdgePointsSetAsBezier(garmentId, shapeId, edgeId)

C++

BwApiEdgePointsSetAsBezier(garmentId, shapeId, edgeId, points);

C#

BwApi.EdgePointsSetAsBezier(garmentId, shapeId, edgeId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

shapeId

Existing shape ID.

In

edgeId

Existing edge ID.

Out

points

Array of BwApiBezierPoint that represents the edge's points.

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiEdgePointsGet

Get an edge's points (current size).

Python

BwApi.EdgePointsGet(garmentId, shapeId, edgeId)

C++

BwApiEdgePointsGet(garmentId, shapeId, edgeId, points);

C#

BwApi.EdgePointsGet(garmentId, shapeId, edgeId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

shapeId

Existing shape ID.

In

edgeId

Existing edge ID.

Out

points

Array of BwApiPoint that represents the edge's points.

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiEdgePointsGetAsBezier

Get an edge's points as Bezier (current size).

Python

BwApi.EdgePointsGetAsBezier(garmentId, shapeId, edgeId, points)

C++

BwApiEdgePointsGetAsBezier(garmentId, shapeId, edgeId, points);

C#

BwApi.EdgePointsGetAsBezier(garmentId, shapeId, edgeId, points);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

shapeId

Existing shape ID.

In

edgeId

Existing edge ID.

In

points

Array of BwApiBezierPoint that represents the edge's points.

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiEdgeMaterialIdGet

Get an edge's material ID.

Python

BwApi.EdgeMaterialIdGet(garmentId, shapeId, edgeId)

C++

BwApiEdgeMaterialIdGet(garmentId, shapeId, edgeId, materialId);

C#

BwApi.EdgeMaterialIdGet(garmentId, shapeId, edgeId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

shapeId

Existing shape ID.

In

edgeId

Existing edge ID.

Out

materialId

Get the assigned material (seam/edge assignable trim) ID.

Returns: Error/success code (see BwApiErrorCodes enum).

Note: Each edge can have a material (seam/edge assignable trim) assigned to it. Use this function to get the edge material ID.

---

BwApiEdgeMaterialIdSet

Set an edge's material ID.

Python

BwApi.EdgeMaterialIdSet(garmentId, shapeId, edgeId, materialId)

C++

BwApiEdgeMaterialIdSet(garmentId, shapeId, edgeId, materialId);

C#

BwApi.EdgeMaterialIdSet(garmentId, shapeId, edgeId, materialId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

shapeId

Existing shape ID.

In

edgeId

Existing edge ID.

In

materialId

Assign material (seam) ID to this edge.

Returns: Error/success code (see BwApiErrorCodes enum).

Note: Each edge can have a material (seam) assign to it. Use this function to set the material (seam) ID.

---

BwApiEdgeSeamAllowanceGet

Get an edge's seam allowance.

Python

BwApi.EdgeSeamAllowanceGet(garmentId, shapeId, edgeId)

C++

BwApiEdgeSeamAllowanceGet(garmentId, shapeId, edgeId, seamAllowance);

C#

BwApi.EdgeSeamAllowanceGet(garmentId, shapeId, edgeId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

shapeId

Existing shape ID.

In

edgeId

Existing edge ID.

Out

seamAllowance

Get edge's seam allowance.

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiEdgeSeamAllowanceSet

Set an edge's seam allowance.

Python

BwApi.EdgeSeamAllowanceSet(garmentId, shapeId, edgeId, seamAllowance)

C++

BwApiEdgeSeamAllowanceSet(garmentId, shapeId, edgeId, seamAllowance);

C#

BwApi.EdgeSeamAllowanceSet(garmentId, shapeId, edgeId, seamAllowance);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

shapeId

Existing shape ID.

In

edgeId

Existing edge ID.

In

seamAllowance

Set edge's seam allowance.

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiEdgeLengthGet

Get an edge's length.

Python

BwApi.EdgeLengthGet(garmentId, shapeId, edgeId, sizeId)

C++

BwApiEdgeLengthGet(garmentId, shapeId, edgeId, sizeId, length);

C#

BwApi.EdgeLengthGet(garmentId, shapeId, edgeId, sizeId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

shapeId

Existing shape ID.

In

edgeId

Existing edge ID.

In

sizeId

Size of the garment.

Out

length

Get edge's length (see BwApiEdgePuffyProperties).

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiEdgeMirroredIdGet

Get an edge's mirrored ID.

Python

BwApi.EdgeMirroredIdGet(garmentId, shapeId, edgeId)

C++

BwApiEdgeMirroredIdGet(garmentId, shapeId, edgeId, mirroredEdgeId);

C#

BwApi.EdgeMirroredIdGet(garmentId, shapeId, edgeId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

shapeId

Existing shape ID.

In

edgeId

Existing edge ID.

Out

mirroredEdgeId

Mirrored edge ID.

Returns: Error/success code (see BwApiErrorCodes enum).

Note: This function only relevant for inner symmetry shapes.

---

BwApiEdgeMarkerGet

Get an approximate edge's marker from a given point.

Python

BwApi.EdgeMarkerGet(garmentId, shapeId, edgeId, point)

C++

BwApiEdgeMarkerGet(garmentId, shapeId, edgeId, point, marker);

C#

BwApi.EdgeMarkerGet(garmentId, shapeId, edgeId, point);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

shapeId

Existing shape ID.

In

edgeId

Existing edge ID.

In

point

The point to approximate from.

Out

marker

Marker size (From 0% to 100%).

Returns: Error/success code (see BwApiErrorCodes enum).

Note: The marker size is from the start point of the edge.

---

BwApiEdgeNameGet

Get an edge's name.

Python

BwApi.EdgeNameGet(garmentId, shapeId, edgeId)

C++

BwApiEdgeNameGet(garmentId, shapeId, edgeId, edgeName);

C#

BwApi.EdgeNameGet(garmentId, shapeId, edgeId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

shapeId

Existing shape ID.

In

edgeId

Existing edge ID.

Out

edgeName

Get the edge's name.

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiEdgeNameSet

Set an edge's name.

Python

BwApi.EdgeNameSet(garmentId, shapeId, edgeId, edgeName)

C++

BwApiEdgeNameSet(garmentId, shapeId, edgeId, edgeName);

C#

BwApi.EdgeNameSet(garmentId, shapeId, edgeId, edgeName);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

shapeId

Existing shape ID.

In

edgeId

Existing edge ID.

In

edgeName

Set the edge's name.

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiEdgeTextureOffsetGet

Get the texture offset for a given edge.

Python

BwApi.EdgeTextureOffsetGet(garmentId, shapeId, edgeId, materialId)

C++

BwApiEdgeTextureOffsetGet(garmentId, shapeId, edgeId, materialId, offset);

C#

BwApi.EdgeTextureOffsetGet(garmentId, shapeId, edgeId, materialId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

shapeId

Existing shape ID.

In

edgeId

Existing edge ID.

In

materialId

Existing material ID on the shape (this can also be group item in case the texture of the shape is group material).

Out

offset

Get edge's offset.

Returns: Error/success code (see BwApiErrorCodes enum).

Note: The offset is value from 0 to the length of the seam texture (Not the edge length).

---

BwApiEdgeTextureOffsetSet

Set the texture offset for a given edge.

Python

BwApi.EdgeTextureOffsetSet(garmentId, shapeId, edgeId, materialId, offset)

C++

BwApiEdgeTextureOffsetSet(garmentId, shapeId, edgeId, materialId, offset);

C#

BwApi.EdgeTextureOffsetSet(garmentId, shapeId, edgeId, materialId, offset);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

shapeId

Existing shape ID.

In

edgeId

Existing edge ID.

In

materialId

Existing material ID on the shape (this can also be group item in case the texture of the shape is group material).

In

offset

Edge's offset.

Returns: Error/success code (see BwApiErrorCodes enum).

Note: The offset is value from 0 to the length of the seam texture (Not the edge length).

---

BwApiEdgePropertiesGet

Get an edge's properties.

Python

BwApi.EdgePropertiesGet(garmentId, shapeId, edgeId)

C++

BwApiEdgePropertiesGet(garmentId, shapeId, edgeId, edgeProperties);

C#

BwApi.EdgePropertiesGet(garmentId, shapeId, edgeId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

shapeId

Existing shape ID.

In

edgeId

Existing edge ID.

Out

edgeProperties

JSON object as string that represents an edge object (see edge_properties.json schema).

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiEdgePropertiesSet

Set an edge's properties.

Python

BwApi.EdgePropertiesSet(garmentId, shapeId, edgeId, edgeProperties)

C++

BwApiEdgePropertiesSet(garmentId, shapeId, edgeId, edgeProperties);

C#

BwApi.EdgePropertiesSet(garmentId, shapeId, edgeId, edgeProperties);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

shapeId

Existing shape ID.

In

edgeId

Existing edge ID.

In

edgeProperties

JSON object as string that represents an edge object (see edge_properties.json schema).

Returns: Error/success code (see BwApiErrorCodes enum).

---

Did this answer your question?