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

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

This class implements APIs for [BoundaryCondition](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.Flexible.BoundaryCondition.md), [RigidBodyElementSingle](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.MeshFree.RigidBodyElementSingle.md), [RigidBodyElementPair](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.MeshFree.RigidBodyElementPair.md),  [Range](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.Range.md) class.

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

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[EFConstraintAPI](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.API.Pre.EasyFlex.EFConstraintAPI.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

### CreateBoundaryConditionWithColor(SubSystemDocument, Obj, IEnumerable\<Color>, ExpressionValueVariable?, ExpressionValueVariable?, ExpressionValueVariable?, Obj?, string)

```csharp theme={null}
[NotNull(new string[] { "document", "colors" })]
[NotNullObj(new string[] { "body" })]
[MatchTypeObj(new object[] { "body", typeof(SolidBody) })]
public static Obj CreateBoundaryConditionWithColor(this SubSystemDocument document, Obj body, IEnumerable<Color> colors, ExpressionValueVariable? pointX = null, ExpressionValueVariable? pointY = null, ExpressionValueVariable? pointZ = null, Obj? referenceFrame = null, string name = "")
```

#### Parameters

`document` SubSystemDocument

`body` Obj

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

`pointX` ExpressionValueVariable?

`pointY` ExpressionValueVariable?

`pointZ` ExpressionValueVariable?

`referenceFrame` Obj?

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

#### Returns

Obj

### CreateBoundaryConditionWithFaces(SubSystemDocument, IEnumerable\<Obj>, ExpressionValueVariable?, ExpressionValueVariable?, ExpressionValueVariable?, Obj?, string)

```csharp theme={null}
[NotNull(new string[] { "document", "baseGeometry" })]
public static Obj CreateBoundaryConditionWithFaces(this SubSystemDocument document, IEnumerable<Obj> baseGeometry, ExpressionValueVariable? pointX = null, ExpressionValueVariable? pointY = null, ExpressionValueVariable? pointZ = null, Obj? referenceFrame = null, string name = "")
```

#### Parameters

`document` SubSystemDocument

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

`pointX` ExpressionValueVariable?

`pointY` ExpressionValueVariable?

`pointZ` ExpressionValueVariable?

`referenceFrame` Obj?

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

#### Returns

Obj

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

```csharp theme={null}
[NotNull(new string[] { "document" })]
[NotNullObj(new string[] { "baseGeometry" })]
[MatchTypeObj(new object[] { "baseGeometry", typeof(IContactableRigid3D) })]
public static Obj CreateBoundaryConditionWithFaceset(this SubSystemDocument document, Obj baseGeometry, ExpressionValueVariable? pointX = null, ExpressionValueVariable? pointY = null, ExpressionValueVariable? pointZ = null, Obj? referenceFrame = null, string name = "")
```

#### Parameters

`document` SubSystemDocument

`baseGeometry` Obj

`pointX` ExpressionValueVariable?

`pointY` ExpressionValueVariable?

`pointZ` ExpressionValueVariable?

`referenceFrame` Obj?

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

#### Returns

Obj

### CreateRange(SubSystemDocument, Obj, Vector, Vector, ExpressionValueVariable?, string)

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

```csharp theme={null}
[NotNull(new string[] { "subSystemDocument" })]
[NotNullObj(new string[] { "body" })]
[MatchTypeObj(new object[] { "body", typeof(SolidBody) })]
[NotZeroMagnitude(new string[] { "normalDirectionOfRange" })]
public static Obj CreateRange(this SubSystemDocument subSystemDocument, Obj body, Vector point, Vector normalDirectionOfRange, ExpressionValueVariable? radius = null, string name = "")
```

#### Parameters

`subSystemDocument` SubSystemDocument

The [SubSystemDocument](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.DAFUL.SubSystemDocument.md) to create the range.

`body` Obj

The body of the range.

`point` Vector

The point of the range.

`normalDirectionOfRange` Vector

The normal direction of the range.

`radius` ExpressionValueVariable?

The radius of the range.

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

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

#### Returns

Obj

the new General object created by this API.

#### Exceptions

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

Will be thrown if 'subSystemDocument', 'body' argument is null.

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

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

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

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

### CreateRigidBodyElementPairWithColor(SubSystemDocument, Obj, IEnumerable\<Color>, Obj, IEnumerable\<Color>, Vector, string)

```csharp theme={null}
[NotNull(new string[] { "document" })]
[NotNullObj(new string[] { "baseBody", "actionBody" })]
[MatchTypeObj(new object[] { "baseBody", typeof(SolidBody), "actionBody", typeof(SolidBody) })]
public static Obj CreateRigidBodyElementPairWithColor(this SubSystemDocument document, Obj baseBody, IEnumerable<Color> baseColors, Obj actionBody, IEnumerable<Color> actionColors, Vector point, string name = "")
```

#### Parameters

`document` SubSystemDocument

`baseBody` Obj

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

`actionBody` Obj

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

`point` Vector

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

#### Returns

Obj

### CreateRigidBodyElementPairWithColor(PartDocument, Obj, IEnumerable\<Color>, Obj, IEnumerable\<Color>, Vector, string)

```csharp theme={null}
[NotNull(new string[] { "document" })]
[NotNullObj(new string[] { "baseBody", "actionBody" })]
public static Obj CreateRigidBodyElementPairWithColor(this PartDocument document, Obj baseBody, IEnumerable<Color> baseColors, Obj actionBody, IEnumerable<Color> actionColors, Vector point, string name = "")
```

#### Parameters

`document` PartDocument

`baseBody` Obj

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

`actionBody` Obj

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

`point` Vector

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

#### Returns

Obj

### CreateRigidBodyElementPairWithFaces(IDocument, IEnumerable\<Obj>, IEnumerable\<Obj>, Vector, string)

```csharp theme={null}
[NotNull(new string[] { "document", "baseGeometry", "actionGeometry" })]
public static Obj CreateRigidBodyElementPairWithFaces(this IDocument document, IEnumerable<Obj> baseGeometry, IEnumerable<Obj> actionGeometry, Vector point, string name = "")
```

#### Parameters

`document` IDocument

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

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

`point` Vector

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

#### Returns

Obj

### CreateRigidBodyElementPairWithFaceset(IDocument, Obj, Obj, Vector, string)

```csharp theme={null}
[NotNull(new string[] { "document" })]
[NotNullObj(new string[] { "baseGeometry", "actionGeometry" })]
[MatchTypeObj(new object[] { "baseGeometry", typeof(IContactableRigid3D), "actionGeometry", typeof(IContactableRigid3D) })]
public static Obj CreateRigidBodyElementPairWithFaceset(this IDocument document, Obj baseGeometry, Obj actionGeometry, Vector point, string name = "")
```

#### Parameters

`document` IDocument

`baseGeometry` Obj

`actionGeometry` Obj

`point` Vector

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

#### Returns

Obj

### CreateRigidBodyElementWithColor(SubSystemDocument, Obj, IEnumerable\<Color>, Vector, string)

```csharp theme={null}
[NotNull(new string[] { "document", "colors" })]
[NotNullObj(new string[] { "body" })]
[MatchTypeObj(new object[] { "body", typeof(SolidBody) })]
public static Obj CreateRigidBodyElementWithColor(this SubSystemDocument document, Obj body, IEnumerable<Color> colors, Vector point, string name = "")
```

#### Parameters

`document` SubSystemDocument

`body` Obj

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

`point` Vector

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

#### Returns

Obj

### CreateRigidBodyElementWithColor(PartDocument, Obj, IEnumerable\<Color>, Vector, string)

```csharp theme={null}
[NotNull(new string[] { "document", "colors" })]
[NotNullObj(new string[] { "body" })]
public static Obj CreateRigidBodyElementWithColor(this PartDocument document, Obj body, IEnumerable<Color> colors, Vector point, string name = "")
```

#### Parameters

`document` PartDocument

`body` Obj

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

`point` Vector

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

#### Returns

Obj

### CreateRigidBodyElementWithFaces(IDocument, IEnumerable\<Obj>, Vector, string)

```csharp theme={null}
[NotNull(new string[] { "document", "baseGeometry" })]
public static Obj CreateRigidBodyElementWithFaces(this IDocument document, IEnumerable<Obj> baseGeometry, Vector point, string name = "")
```

#### Parameters

`document` IDocument

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

`point` Vector

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

#### Returns

Obj

### CreateRigidBodyElementWithFaceset(IDocument, Obj, Vector, string)

```csharp theme={null}
[NotNull(new string[] { "document" })]
[NotNullObj(new string[] { "baseGeometry" })]
[MatchTypeObj(new object[] { "baseGeometry", typeof(IContactableRigid3D) })]
public static Obj CreateRigidBodyElementWithFaceset(this IDocument document, Obj baseGeometry, Vector point, string name = "")
```

#### Parameters

`document` IDocument

`baseGeometry` Obj

`point` Vector

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

#### Returns

Obj
