> ## 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 BallPlacingAPI

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

This class implements APIs for ball placing.

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

#### Inheritance

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

#### Extension Methods

[LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/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-r2/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-r2/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkedObjects__1_System_Object_VM_Models_Pre_LinkPropertyType_)

## Methods

### CreateBall(BallInfo)

Create ball.

```csharp theme={null}
public static Obj CreateBall(BallInfo ballInfo)
```

#### Parameters

`ballInfo` BallInfo

The ball information to create ball.

#### Returns

Obj

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

#### Exceptions

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

Will be thrown if the Name of 'ballInfo' is null.

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

Will be thrown if the Radius of 'ballInfo' is equal to or less than 0.

### CreateBallPlacing(SubSystemDocument, string, PathType, string, ExpressionValueVariable?, ExpressionValueVariable?, Color?)

Create ball placing [BallPlacing](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.BallPlacing.md).

```csharp theme={null}
[NotNull(new string[] { "document" })]
[ExistFile(new string[] { "path" })]
public static Obj CreateBallPlacing(this SubSystemDocument document, string path, PathType pathType = PathType.Closed, string name = "", ExpressionValueVariable? ballRadius = null, ExpressionValueVariable? numberOfBall = null, Color? color = null)
```

#### Parameters

`document` SubSystemDocument

The document to create the ball placing.

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

The path to create the ball placing.

`pathType` PathType

The path type. The default value is Closed.

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

The name of the [BallPlacing](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.BallPlacing.md). If empty, default name starts with 'BallPlacing\_' will be generated and used.

`ballRadius` ExpressionValueVariable?

The ball radius. The default value is 2.

`numberOfBall` ExpressionValueVariable?

The number of ball. The default value is 25.

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

The color. The default value is '0xAAAABF'

#### Returns

Obj

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

#### Exceptions

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

Will be thrown if 'document', 'body' are null.

[FileNotFoundException](https://learn.microsoft.com/dotnet/api/system.io.filenotfoundexception)

Will be thrown if 'path' file path does not exist.

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

Will be thrown if the extension of 'path' is not 'csv'.

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

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

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

Will be thrown if 'numberOfBall' is less than 2 or greater than 999.

### CreateBallPlacingContact(SubSystemDocument, IEnumerable\<Obj>, Obj, string)

Create ball placing contact [BallPlacingContact](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.BallPlacingContact.md).

```csharp theme={null}
[NotNull(new string[] { "document", "baseGeometries" })]
[NotNullObj(new string[] { "ballPlacing" })]
[MatchTypeObj(new object[] { "ballPlacing", typeof(BallPlacing) })]
public static Obj CreateBallPlacingContact(this SubSystemDocument document, IEnumerable<Obj> baseGeometries, Obj ballPlacing, string name = "")
```

#### Parameters

`document` SubSystemDocument

The document to create the ball placing contact.

`baseGeometries` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)\<Obj>

The base geometries.

`ballPlacing` Obj

The ball placing.

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

The name of the [BallPlacingContact](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.BallPlacingContact.md). If empty, default name starts with 'BallPlacingContact\_' will be generated and used.

#### Returns

Obj

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

#### Exceptions

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

Will be thrown if 'document', 'baseGeometries', 'ballPlacing', 'ballPlacing' are null.

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

Will be thrown if item type of 'baseGeometries' is not [IContactable](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.IContactable.md).

### CreateBallScrew(SubSystemDocument, Vector, Vector, Vector, ExpressionValueVariable?, ExpressionValueVariable?, ExpressionValueVariable?, ExpressionValueVariable?, ExpressionValueVariable?, ExpressionValueVariable?, ExpressionValueVariable?, ExpressionValueVariable?, ExpressionValueVariable?, ScrewHandType, ExpressionValueVariable?, ExpressionValueVariable?, ExpressionValueVariable?, ExpressionValueVariable?, string)

```csharp theme={null}
[NotNull(new string[] { "document" })]
[NotZeroMagnitude(new string[] { "axisZ", "axisX" })]
public static Obj CreateBallScrew(this SubSystemDocument document, Vector shaftReferencePosition, Vector axisZ, Vector axisX, ExpressionValueVariable? shaftLength = null, ExpressionValueVariable? shaftScrewStartAngle = null, ExpressionValueVariable? shaftScrewStartPosition = null, ExpressionValueVariable? shaftScrewEndPosition = null, ExpressionValueVariable? nutLength = null, ExpressionValueVariable? nutOD = null, ExpressionValueVariable? nutStartPosition = null, ExpressionValueVariable? nutScrewStartPosition = null, ExpressionValueVariable? nutScrewEndPosition = null, ScrewHandType handOfScrew = ScrewHandType.Right, ExpressionValueVariable? lead = null, ExpressionValueVariable? shaftPCD = null, ExpressionValueVariable? nutPCD = null, ExpressionValueVariable? ballDiameter = null, string name = "")
```

#### Parameters

`document` SubSystemDocument

`shaftReferencePosition` Vector

`axisZ` Vector

`axisX` Vector

`shaftLength` ExpressionValueVariable?

`shaftScrewStartAngle` ExpressionValueVariable?

`shaftScrewStartPosition` ExpressionValueVariable?

`shaftScrewEndPosition` ExpressionValueVariable?

`nutLength` ExpressionValueVariable?

`nutOD` ExpressionValueVariable?

`nutStartPosition` ExpressionValueVariable?

`nutScrewStartPosition` ExpressionValueVariable?

`nutScrewEndPosition` ExpressionValueVariable?

`handOfScrew` [ScrewHandType](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.API.Pre.Links.ScrewHandType.md)

`lead` ExpressionValueVariable?

`shaftPCD` ExpressionValueVariable?

`nutPCD` ExpressionValueVariable?

`ballDiameter` ExpressionValueVariable?

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

#### Returns

Obj

### CreateSurfaceWithCurvesets(SubSystemDocument, string, Obj, Obj, Obj, ExpressionValueVariable?, ExpressionValueVariable?, string)

Create surface with curvesets [SurfaceWithCurvesets](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.SurfaceWithCurvesets.md).

```csharp theme={null}
[NotNull(new string[] { "document" })]
[ExistFile(new string[] { "path" })]
[NotNullObj(new string[] { "faceSet", "startCurveSet", "endCurveSet" })]
[MatchTypeObj(new object[] { "faceSet", typeof(SetFace), "startCurveSet", typeof(SetCurveForEdges), "endCurveSet", typeof(SetCurveForEdges) })]
public static Obj CreateSurfaceWithCurvesets(this SubSystemDocument document, string path, Obj faceSet, Obj startCurveSet, Obj endCurveSet, ExpressionValueVariable? numberOfSlice = null, ExpressionValueVariable? cuttingPlaneRadius = null, string name = "")
```

#### Parameters

`document` SubSystemDocument

The document to create the surface with curvesets.

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

The path to create the surface with curvesets.

`faceSet` Obj

The face set.

`startCurveSet` Obj

The start curveset.

`endCurveSet` Obj

The end curveset.

`numberOfSlice` ExpressionValueVariable?

The number of slice. The default value is 19.

`cuttingPlaneRadius` ExpressionValueVariable?

The radius of cutting plane. The default value is 10.

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

The name of the [SurfaceWithCurvesets](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.SurfaceWithCurvesets.md). If empty, default name starts with 'Surface\_With\_Curvesets\_' will be generated and used.

#### Returns

Obj

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

#### Exceptions

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

Will be thrown if 'document', 'faceSet', 'startCurveSet', 'endCurveSet' are null.

[FileNotFoundException](https://learn.microsoft.com/dotnet/api/system.io.filenotfoundexception)

Will be thrown if 'path' file path does not exist.

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

Will be thrown if the extension of 'path' is not 'csv'.

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

Will be thrown if Object of 'startCurveSet' and Object of 'endCurveSet' are the same.

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

Will be thrown if item type of 'faceSet' is not [SetFace](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.SetFace.md).

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

Will be thrown if item type of 'startCurveSet' is not [SetCurveForEdges](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.SetCurveForEdges.md).

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

Will be thrown if item type of 'endCurveSet' is not [SetCurveForEdges](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.SetCurveForEdges.md).

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

Will be thrown if 'numberOfSlice', 'cuttingPlaneRadius' values equal to or less than 0.

### DeleteBall(Obj)

Delete ball.

```csharp theme={null}
[NotNullObj(new string[] { "ball" })]
[MatchTypeObj(new object[] { "ball", typeof(SolidBody) })]
public static void DeleteBall(Obj ball)
```

#### Parameters

`ball` Obj

The ball to delete ball.

#### Exceptions

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

Will be thrown if 'ball' is null.

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

Will be thrown if item type of 'ball' is not [SolidBody](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.SolidBody.md).

### UpdateBall(Obj, BallInfo)

Update ball.

```csharp theme={null}
[NotNullObj(new string[] { "ball" })]
[MatchTypeObj(new object[] { "ball", typeof(SolidBody) })]
public static void UpdateBall(Obj ball, BallInfo ballInfo)
```

#### Parameters

`ball` Obj

The ball to update ball.

`ballInfo` BallInfo

The ball information to update ball.

#### Exceptions

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

Will be thrown if 'ball' is null.

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

Will be thrown if item type of 'ball' is not [SolidBody](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.SolidBody.md).

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

Will be thrown if the Name of 'ballInfo' is null.

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

Will be thrown if the Radius of 'ballInfo' is equal to or less than 0.

### UpdateFaceSet(Obj, ExpressionValueVariable, ExpressionValueVariable)

Update faceset.

```csharp theme={null}
[NotNullObj(new string[] { "faceset" })]
[MatchTypeObj(new object[] { "faceset", typeof(SetFace) })]
public static void UpdateFaceSet(Obj faceset, ExpressionValueVariable maximumPenetration, ExpressionValueVariable offset)
```

#### Parameters

`faceset` Obj

The faceset to update ball.

`maximumPenetration` ExpressionValueVariable

The maximum penetration.

`offset` ExpressionValueVariable

The offset.

#### Exceptions

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

Will be thrown if 'faceset' is null.

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

Will be thrown if item type of 'faceset' is not [SetFace](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.SetFace.md).

### UpdateSurfaceWithCurvesets(Obj, ExpressionValueVariable, ExpressionValueVariable, bool, ExpressionValueVariable)

Update surface with curvesets.

```csharp theme={null}
[NotNullObj(new string[] { "surfaceWithCurvesets" })]
[MatchTypeObj(new object[] { "surfaceWithCurvesets", typeof(SurfaceWithCurvesets) })]
public static void UpdateSurfaceWithCurvesets(this Obj surfaceWithCurvesets, ExpressionValueVariable maximumPenetration, ExpressionValueVariable offset, bool isUp, ExpressionValueVariable slice)
```

#### Parameters

`surfaceWithCurvesets` Obj

The surface with curvesets to update ball.

`maximumPenetration` ExpressionValueVariable

The maximum penetration.

`offset` ExpressionValueVariable

The offset.

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

The flag for up or down.

`slice` ExpressionValueVariable

The slice.

#### Exceptions

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

Will be thrown if 'surfaceWithCurvesets' is null.

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

Will be thrown if item type of 'surfaceWithCurvesets' is not [SurfaceWithCurvesets](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.SurfaceWithCurvesets.md).
