> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class BodyAPI

Namespace: [VM.API.Pre](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.API.Pre)\
Assembly: VM.API.Pre.dll

This class implements APIs for [Body](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Body.md) class.

```csharp theme={null}
public static class BodyAPI
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[BodyAPI](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.API.Pre.BodyAPI.md)

#### Extension Methods

[LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkProperties_System_Object_VM_Models_Pre_LinkPropertyType_),
[LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkPropertiesAndValues_System_Object_VM_Models_Pre_LinkPropertyType_),
[LinkPropertyItemCache.GetLinkedObjects\<T>(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkedObjects__1_System_Object_VM_Models_Pre_LinkPropertyType_)

## Methods

### CreateMeshFileInPart(Obj, string, bool, FacetParameters?)

Generate mesh file with given [Body](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Body.md) entity.

```csharp theme={null}
[NotNullObj(new string[] { "body" })]
[NotNullOrEmpty(new string[] { "pathMeshFile" })]
[MatchTypeObj(new object[] { "body", typeof(Body) })]
public static void CreateMeshFileInPart(this Obj body, string pathMeshFile, bool addToModel = true, FacetParameters? facetParameters = null)
```

#### Parameters

`body` [Obj](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.API.Pre.Obj.md)

The [Body](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Body.md) to generate mesh file.

`pathMeshFile` [string](https://learn.microsoft.com/dotnet/api/system.string)

Generated mesh file path.

`addToModel` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

The flag that indicates adding new mesh file to the model.

`facetParameters` [FacetParameters](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.API.Pre.FacetParameters.md)?

Facet parameters. If it is not given, default values will be used.

#### Exceptions

[ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception)

Will be thrown if body or pathMeshFile arguments are empty.

[ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception)

Will be thrown if the type of 'body' is not [Body](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Body.md).

### CreatePartMarker(PartDocument, Obj, TMatrix, string)

Create [PartMarker](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.DAFUL.Builder.PartMarker.md)

```csharp theme={null}
[NotNullObj(new string[] { "body" })]
public static Obj CreatePartMarker(this PartDocument document, Obj body, TMatrix transform, string markerName = "")
```

#### Parameters

`document` PartDocument

The document to create a marker.

`body` [Obj](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.API.Pre.Obj.md)

The [Body](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Body.md) to create a marker.

`transform` TMatrix

The transformation matrix for a marker.

`markerName` [string](https://learn.microsoft.com/dotnet/api/system.string)

The name of the marker. If empty, default name starts with 'MK\_' will be generated and used.

#### Returns

[Obj](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.API.Pre.Obj.md)

the new [PartMarker](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.DAFUL.Builder.PartMarker.md) object created by this API.

#### Exceptions

[ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception)

Will be thrown if 'body' is null.

[ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception)

Will be thrown if the type of 'body' is not [IPartMarkerParent](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.IPartMarkerParent.md).

### CreateSolidBlock(PartDocument, Vector, ExpressionValueVariable, ExpressionValueVariable, ExpressionValueVariable, Color?)

Create [Body](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Body.md) with [SolidBlockSimple](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.DAFUL.Builder.SolidBlockSimple.md) builder.

```csharp theme={null}
[NotNull(new string[] { "document" })]
[GreaterThanZero(new string[] { "width", "height", "depth" })]
public static Obj CreateSolidBlock(this PartDocument document, Vector position, ExpressionValueVariable width, ExpressionValueVariable height, ExpressionValueVariable depth, Color? color = null)
```

#### Parameters

`document` PartDocument

The document to create the block solid body.

`position` Vector

The position to create the block solid body.

`width` ExpressionValueVariable

The width of the block.

`height` ExpressionValueVariable

The height of the block.

`depth` ExpressionValueVariable

The depth of the blodk.

`color` [Color](https://learn.microsoft.com/dotnet/api/system.drawing.color)?

The color of the new block geometry. The default value is '0xBFAAAA'

#### Returns

[Obj](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.API.Pre.Obj.md)

The new [Body](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Body.md) object that is created by this API.

#### Exceptions

[ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception)

Will be thrown if 'document' is null.

[ArgumentOutOfRangeException](https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception)

Will be thrown if 'width', 'height', 'depth' values are equal to or less than 0.

### CreateSolidBlock(PartDocument, Vector)

Create [Body](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Body.md) with [SolidBlockSimple](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.DAFUL.Builder.SolidBlockSimple.md) builder.

```csharp theme={null}
public static Obj CreateSolidBlock(this PartDocument document, Vector position)
```

#### Parameters

`document` PartDocument

The document to create the block solid body.

`position` Vector

The position to create the block solid body.

#### Returns

[Obj](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.API.Pre.Obj.md)

The new [Body](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Body.md) object created by this API.

### CreateSolidCylinder(PartDocument, Vector, Vector, ExpressionValueVariable, Color?)

Create [Body](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Body.md) with [SolidCylinderSimple](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.DAFUL.Builder.SolidCylinderSimple.md) builder.

```csharp theme={null}
[NotNull(new string[] { "document" })]
[GreaterThanZero(new string[] { "radius" })]
public static Obj CreateSolidCylinder(this PartDocument document, Vector bottomPosition, Vector topPosition, ExpressionValueVariable radius, Color? color = null)
```

#### Parameters

`document` PartDocument

The document to create the cylinder solid body.

`bottomPosition` Vector

The bottom position to create the cylinder solid body.

`topPosition` Vector

The top position to create the cylinder solid body.

`radius` ExpressionValueVariable

The radius of the cylinder.

`color` [Color](https://learn.microsoft.com/dotnet/api/system.drawing.color)?

The color of the new cylinder geometry. The default value is '0xBFAAAA'

#### Returns

[Obj](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.API.Pre.Obj.md)

The new [Body](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Body.md) object that is created by this API.

#### Exceptions

[ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception)

Will be thrown if 'document' is null.

[ArgumentOutOfRangeException](https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception)

Will be thrown if 'radius' value is equal to or less than 0.

[ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception)

Will be thrown if 'bottomPosition' is not equal to 'topPosition'.

### CreateSolidCylinder(PartDocument, Vector, Vector)

Create [Body](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Body.md) with [SolidCylinderSimple](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.DAFUL.Builder.SolidCylinderSimple.md) builder.

```csharp theme={null}
public static Obj CreateSolidCylinder(this PartDocument document, Vector bottomPosition, Vector topPosition)
```

#### Parameters

`document` PartDocument

The document to create the cylinder solid body.

`bottomPosition` Vector

The bottom position to create the cylinder solid body.

`topPosition` Vector

The top position to create the cylinder solid body.

#### Returns

[Obj](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.API.Pre.Obj.md)

The new [Body](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Body.md) object created by this API.

### CreateSolidSphere(PartDocument, Vector, ExpressionValueVariable, Color?)

Create [Body](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Body.md) with [BuilderSphereSimple](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.BuilderSphereSimple.md) builder.

```csharp theme={null}
[NotNull(new string[] { "document" })]
[GreaterThanZero(new string[] { "radius" })]
public static Obj CreateSolidSphere(this PartDocument document, Vector centerPosition, ExpressionValueVariable radius, Color? color = null)
```

#### Parameters

`document` PartDocument

The document to create the sphere solid body.

`centerPosition` Vector

The center position to create the sphere solid body.

`radius` ExpressionValueVariable

The radius of the sphere.

`color` [Color](https://learn.microsoft.com/dotnet/api/system.drawing.color)?

The color of the new sphere geometry. The default value is '0xBFAAAA'

#### Returns

[Obj](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.API.Pre.Obj.md)

The new [Body](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Body.md) object that is created by this API.

#### Exceptions

[ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception)

Will be thrown if 'document' is null.

[ArgumentOutOfRangeException](https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception)

Will be thrown if 'radius' value is equal to or less than 0.

### CreateSolidSphere(PartDocument, Vector)

Create [Body](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Body.md) with [BuilderSphereSimple](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.BuilderSphereSimple.md) builder.

```csharp theme={null}
public static Obj CreateSolidSphere(this PartDocument document, Vector centerPosition)
```

#### Parameters

`document` PartDocument

The document to create the sphere solid body.

`centerPosition` Vector

The center position to create the sphere solid body.

#### Returns

[Obj](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.API.Pre.Obj.md)

The new [Body](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Body.md) object created by this API.

### CreateSolidTriPlate(PartDocument, Vector, Vector, Vector, ExpressionValueVariable, Color?)

Create [Body](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Body.md) with [BuilderTriPlateSimple](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.BuilderTriPlateSimple.md) builder.

```csharp theme={null}
[NotNull(new string[] { "document" })]
[GreaterThanZero(new string[] { "height" })]
public static Obj CreateSolidTriPlate(this PartDocument document, Vector firstPosition, Vector secondPosition, Vector thirdPosition, ExpressionValueVariable height, Color? color = null)
```

#### Parameters

`document` PartDocument

The document to create the triplate solid body.

`firstPosition` Vector

The first position to create the triplate solid body.

`secondPosition` Vector

The second position to create the triplate solid body.

`thirdPosition` Vector

The third position to create the triplate solid body.

`height` ExpressionValueVariable

The height of the triplate.

`color` [Color](https://learn.microsoft.com/dotnet/api/system.drawing.color)?

The color of the new triplate geometry. The default value is '0xBFAAAA'

#### Returns

[Obj](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.API.Pre.Obj.md)

The new [SolidBody](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.DAFUL.SolidBody.md) object that is created by this API.

#### Exceptions

[ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception)

Will be thrown if 'document' is null.

[ArgumentOutOfRangeException](https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception)

Will be thrown if 'height' value is equal to or less than 0.

[ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception)

Will be thrown if the condition of triangle's crossproduct is not met.

### CreateSolidTriPlate(PartDocument, Vector, Vector, Vector)

Create [Body](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Body.md) with [BuilderTriPlateSimple](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.BuilderTriPlateSimple.md) builder.

```csharp theme={null}
public static Obj CreateSolidTriPlate(this PartDocument document, Vector firstPosition, Vector secondPosition, Vector thirdPosition)
```

#### Parameters

`document` PartDocument

The document to create the triplate solid body.

`firstPosition` Vector

The first position to create the triplate solid body.

`secondPosition` Vector

The second position to create the triplate solid body.

`thirdPosition` Vector

The third position to create the triplate solid body.

#### Returns

[Obj](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.API.Pre.Obj.md)

The new [Body](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Body.md) object created by this API.
