> ## 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/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/lib/VM.Managed.DAFUL.Flexible.BoundaryCondition.md), [RigidBodyElementSingle](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.MeshFree.RigidBodyElementSingle.md), [RigidBodyElementPair](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.MeshFree.RigidBodyElementPair.md),  [Range](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.DAFUL.Range.md) class.

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

#### Inheritance

object ←
[EFConstraintAPI](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/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/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/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/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](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

`body` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

`colors` IEnumerable\<Color>

`pointX` [ExpressionValueVariable](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/Pre/Data/VM.Models.Pre/Models/ExpressionValueVariable.cs)?

`pointY` [ExpressionValueVariable](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/Pre/Data/VM.Models.Pre/Models/ExpressionValueVariable.cs)?

`pointZ` [ExpressionValueVariable](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/Pre/Data/VM.Models.Pre/Models/ExpressionValueVariable.cs)?

`referenceFrame` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)?

`name` string

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

### 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](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

`baseGeometry` IEnumerable\<[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)>

`pointX` [ExpressionValueVariable](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/Pre/Data/VM.Models.Pre/Models/ExpressionValueVariable.cs)?

`pointY` [ExpressionValueVariable](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/Pre/Data/VM.Models.Pre/Models/ExpressionValueVariable.cs)?

`pointZ` [ExpressionValueVariable](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/Pre/Data/VM.Models.Pre/Models/ExpressionValueVariable.cs)?

`referenceFrame` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)?

`name` string

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

### 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](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

`baseGeometry` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

`pointX` [ExpressionValueVariable](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/Pre/Data/VM.Models.Pre/Models/ExpressionValueVariable.cs)?

`pointY` [ExpressionValueVariable](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/Pre/Data/VM.Models.Pre/Models/ExpressionValueVariable.cs)?

`pointZ` [ExpressionValueVariable](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/Pre/Data/VM.Models.Pre/Models/ExpressionValueVariable.cs)?

`referenceFrame` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)?

`name` string

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

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

Create [Range](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/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](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

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

`body` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The body of the range.

`point` Vector

The point of the range.

`normalDirectionOfRange` Vector

The normal direction of the range.

`radius` [ExpressionValueVariable](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/Pre/Data/VM.Models.Pre/Models/ExpressionValueVariable.cs)?

The radius of the range.

`name` string

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

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

the new General object created by this API.

#### Exceptions

ArgumentNullException

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

ArgumentException

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

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](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

`baseBody` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

`baseColors` IEnumerable\<Color>

`actionBody` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

`actionColors` IEnumerable\<Color>

`point` Vector

`name` string

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

### 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](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/PartDocument.cs)

`baseBody` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

`baseColors` IEnumerable\<Color>

`actionBody` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

`actionColors` IEnumerable\<Color>

`point` Vector

`name` string

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

### 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\<[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)>

`actionGeometry` IEnumerable\<[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)>

`point` Vector

`name` string

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

### 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](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

`actionGeometry` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

`point` Vector

`name` string

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

### 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](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

`body` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

`colors` IEnumerable\<Color>

`point` Vector

`name` string

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

### 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](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/PartDocument.cs)

`body` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

`colors` IEnumerable\<Color>

`point` Vector

`name` string

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

### 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\<[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)>

`point` Vector

`name` string

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

### 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](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

`point` Vector

`name` string

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)
