Skip to main content

Create Shape

Create Shape SamplePlugin Create Shape Delete Shape Create Shape Shapes are what you combine together to create a garment. Use the Sh...

Updated over 2 months ago

Create Shape

Shapes are what you combine together to create a garment. Use the Shape API to create, delete shapes and so on.

For more information about the feature, please visit here.

To learn more about the rest of the API, please refer to Shape in the repository.

Sample Plugin

Sample plugin for garment creation is available here

Create Shape

The code snippet below shows how to create a new shape.
After the shape creation, there will be no representation of this shape in the system until you add edges to this shape. For more information, refer to Create Edge.

Code Snippet

Python C++ C#

Python

shapeId = BwApi.ShapeCreate(garmentId)

C++

int shapeId = 0;
BwApiShapeCreate(garmentId, &shapeId);

C#

int shapeId = 0;
BwApi.ShapeCreate(garmentId, out shapeId);

Delete Shape

The code snippet below shows how to delete an existing shape.

Code Snippet

Note: deleting a shape deletes all the edges associated with the shape.

Python C++ C#

Python

BwApi.ShapeDelete(garmentId, shapeId)

C++

BwApiShapeDelest(garmentId, shapeId);

C#

BwApi.ShapeDelete(garmentId, shapeId);
Did this answer your question?