    

 ## On this page

  

 

 # Class ContactAPI

 Last update: 09.03.2026 

<a id="VM_API_Pre_ContactAPI"></a>

Namespace: [VM.API.Pre](VM.API.Pre.md)  
Assembly: VM.API.Pre.dll

This class implements APIs for contact classes.

```csharp
public static class ContactAPI

```

#### Inheritance

object ← [ContactAPI](VM.API.Pre.ContactAPI.md)

#### Extension Methods

[LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkProperties_System_Object_VM_Models_Pre_LinkPropertyType_), [LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkPropertiesAndValues_System_Object_VM_Models_Pre_LinkPropertyType_), [LinkPropertyItemCache.GetLinkedObjects&lt;T&gt;(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkedObjects__1_System_Object_VM_Models_Pre_LinkPropertyType_)

## Methods

### <a id="VM_API_Pre_ContactAPI_CreateAutoContact_VM_Managed_DAFUL_SubSystemDocument_System_Collections_Generic_IEnumerable_VM_API_Pre_Obj__System_Nullable_VM_Models_Pre_ExpressionValueVariable__System_String_"></a> CreateAutoContact(SubSystemDocument, IEnumerable&lt;Obj&gt;, ExpressionValueVariable?, string)

```csharp
[NotNull(new string[] { "subSystemDocument", "objectList" })]
public static Obj CreateAutoContact(this SubSystemDocument subSystemDocument, IEnumerable<Obj> objectList, ExpressionValueVariable? maximumDistance = null, string name = "")

```

#### Parameters

`subSystemDocument` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

`objectList` IEnumerable&lt;[Obj](VM.API.Pre.Obj.md)&gt;

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

`name` string

#### Returns

[Obj](VM.API.Pre.Obj.md)

### <a id="VM_API_Pre_ContactAPI_CreateCVCV_VM_Managed_DAFUL_SubSystemDocument_VM_API_Pre_Obj_VM_API_Pre_Obj_System_String_VM_API_Pre_FrictionContact_System_Nullable_VM_Models_Pre_ExpressionValueVariable__System_Nullable_VM_Models_Pre_ExpressionValueVariable__System_Nullable_VM_Models_Pre_ExpressionValueVariable__"></a> CreateCVCV(SubSystemDocument, Obj, Obj, string, FrictionContact, ExpressionValueVariable?, ExpressionValueVariable?, ExpressionValueVariable?)

```csharp
[NotNull(new string[] { "subSystemDocument" })]
[NotNullObj(new string[] { "baseCurveset", "actionCurveset" })]
[MatchTypeObj(new object[] { "baseCurveset", typeof(IContactableRigid2D), "actionCurveset", typeof(IContactableRigid2D) })]
public static Obj CreateCVCV(this SubSystemDocument subSystemDocument, Obj baseCurveset, Obj actionCurveset, string name = "", FrictionContact friction = null, ExpressionValueVariable? baseClearance = null, ExpressionValueVariable? actionClearance = null, ExpressionValueVariable? stiffScaleFactor = null)

```

#### Parameters

`subSystemDocument` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

`baseCurveset` [Obj](VM.API.Pre.Obj.md)

`actionCurveset` [Obj](VM.API.Pre.Obj.md)

`name` string

`friction` [FrictionContact](VM.API.Pre.FrictionContact.md)

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

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

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

#### Returns

[Obj](VM.API.Pre.Obj.md)

### <a id="VM_API_Pre_ContactAPI_CreateColorCurveSet_VM_Managed_DAFUL_SubSystemDocument_VM_API_Pre_Obj_System_Collections_Generic_IEnumerable_System_Drawing_Color__System_String_"></a> CreateColorCurveSet(SubSystemDocument, Obj, IEnumerable&lt;Color&gt;, string)

```csharp
[NotNull(new string[] { "subSystemDocument", "colors" })]
[NotNullObj(new string[] { "body" })]
public static Obj CreateColorCurveSet(this SubSystemDocument subSystemDocument, Obj body, IEnumerable<Color> colors, string name = "")

```

#### Parameters

`subSystemDocument` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

`body` [Obj](VM.API.Pre.Obj.md)

`colors` IEnumerable&lt;Color&gt;

`name` string

#### Returns

[Obj](VM.API.Pre.Obj.md)

### <a id="VM_API_Pre_ContactAPI_CreateColorCurveSet_VM_Managed_DAFUL_PartDocument_VM_API_Pre_Obj_System_Collections_Generic_IEnumerable_System_Drawing_Color__System_String_"></a> CreateColorCurveSet(PartDocument, Obj, IEnumerable&lt;Color&gt;, string)

Create  by color.

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

```

#### Parameters

`document` [PartDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/PartDocument.cs)

The  to create a curve set by color.

`body` [Obj](VM.API.Pre.Obj.md)

The body of a curve set.

`colors` IEnumerable&lt;Color&gt;

The colors of edges.

`name` string

The name of a curve set. If empty, default name starts with 'CURVESET' will be generated and used.

#### Returns

[Obj](VM.API.Pre.Obj.md)

The new  object created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'document', 'colors', 'body' argument is null.

ArgumentException

Will be thrown if the type of 'body' is not equal to  and .

### <a id="VM_API_Pre_ContactAPI_CreateColorFaceSet_VM_Managed_DAFUL_SubSystemDocument_VM_API_Pre_Obj_System_Collections_Generic_IEnumerable_System_Drawing_Color__System_String_"></a> CreateColorFaceSet(SubSystemDocument, Obj, IEnumerable&lt;Color&gt;, string)

```csharp
[NotNull(new string[] { "subSystemDocument", "colors" })]
[NotNullObj(new string[] { "body" })]
public static Obj CreateColorFaceSet(this SubSystemDocument subSystemDocument, Obj body, IEnumerable<Color> colors, string name = "")

```

#### Parameters

`subSystemDocument` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

`body` [Obj](VM.API.Pre.Obj.md)

`colors` IEnumerable&lt;Color&gt;

`name` string

#### Returns

[Obj](VM.API.Pre.Obj.md)

### <a id="VM_API_Pre_ContactAPI_CreateColorFaceSet_VM_Managed_DAFUL_PartDocument_VM_API_Pre_Obj_System_Collections_Generic_IEnumerable_System_Drawing_Color__System_String_"></a> CreateColorFaceSet(PartDocument, Obj, IEnumerable&lt;Color&gt;, string)

Create  by color.

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

```

#### Parameters

`document` [PartDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/PartDocument.cs)

The  to create a face set by color.

`body` [Obj](VM.API.Pre.Obj.md)

The body of a face set.

`colors` IEnumerable&lt;Color&gt;

The colors of faces.

`name` string

The name of a face set. If empty, default name starts with 'FACESET\_' will be generated and used.

#### Returns

[Obj](VM.API.Pre.Obj.md)

The new  object created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'document', 'colors', 'body' argument is null.

ArgumentException

Will be thrown if the type of 'body' is not equal to  and .

### <a id="VM_API_Pre_ContactAPI_CreateContactTolerance_VM_Managed_DAFUL_SubSystemDocument_System_Collections_Generic_IEnumerable_VM_API_Pre_Obj__"></a> CreateContactTolerance(SubSystemDocument, IEnumerable&lt;Obj&gt;)

Create contact tolerance.

```csharp
[NotNull(new string[] { "subSystemDocument", "objectList" })]
public static void CreateContactTolerance(this SubSystemDocument subSystemDocument, IEnumerable<Obj> objectList)

```

#### Parameters

`subSystemDocument` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

The  to create contact tolerances.

`objectList` IEnumerable&lt;[Obj](VM.API.Pre.Obj.md)&gt;

The object list of contacts.

#### Exceptions

ArgumentNullException

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

ArgumentException

Will be thrown if the type of 'objectList' is not equal to .

### <a id="VM_API_Pre_ContactAPI_CreateCurveSet_VM_Managed_DAFUL_SubSystemDocument_System_Collections_Generic_IEnumerable_VM_API_Pre_Obj__System_String_"></a> CreateCurveSet(SubSystemDocument, IEnumerable&lt;Obj&gt;, string)

```csharp
[NotNull(new string[] { "subSystemDocument", "edges" })]
public static Obj CreateCurveSet(this SubSystemDocument subSystemDocument, IEnumerable<Obj> edges, string name = "")

```

#### Parameters

`subSystemDocument` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

`edges` IEnumerable&lt;[Obj](VM.API.Pre.Obj.md)&gt;

`name` string

#### Returns

[Obj](VM.API.Pre.Obj.md)

### <a id="VM_API_Pre_ContactAPI_CreateCurveSet_VM_Managed_DAFUL_SubSystemDocument_System_String_VM_API_Pre_Obj_System_String_"></a> CreateCurveSet(SubSystemDocument, string, Obj, string)

```csharp
[NotNull(new string[] { "subSystemDocument" })]
[NotNullObj(new string[] { "body" })]
[ExistFile(new string[] { "filePath" })]
public static Obj CreateCurveSet(this SubSystemDocument subSystemDocument, string filePath, Obj body, string name = "")

```

#### Parameters

`subSystemDocument` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

`filePath` string

`body` [Obj](VM.API.Pre.Obj.md)

`name` string

#### Returns

[Obj](VM.API.Pre.Obj.md)

### <a id="VM_API_Pre_ContactAPI_CreateCurveSet_VM_Managed_DAFUL_PartDocument_System_Collections_Generic_IEnumerable_VM_API_Pre_Obj__System_String_"></a> CreateCurveSet(PartDocument, IEnumerable&lt;Obj&gt;, string)

Create

```csharp
[NotNull(new string[] { "document", "edges" })]
public static Obj CreateCurveSet(this PartDocument document, IEnumerable<Obj> edges, string name = "")

```

#### Parameters

`document` [PartDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/PartDocument.cs)

The  to create a curve set by edges.

`edges` IEnumerable&lt;[Obj](VM.API.Pre.Obj.md)&gt;

The edges of a curve set.

`name` string

The name of a curve set. If empty, default name starts with 'CURVESET' will be generated and used.

#### Returns

[Obj](VM.API.Pre.Obj.md)

The new  object created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'document', 'edges' argument is null.

ArgumentException

Will be thrown if the type of 'edges' is not equal to .

### <a id="VM_API_Pre_ContactAPI_CreateCurveSet_VM_Managed_DAFUL_PartDocument_System_String_VM_API_Pre_Obj_System_String_"></a> CreateCurveSet(PartDocument, string, Obj, string)

Create

```csharp
[NotNull(new string[] { "document" })]
[NotNullObj(new string[] { "body" })]
[ExistFile(new string[] { "filePath" })]
public static Obj CreateCurveSet(this PartDocument document, string filePath, Obj body, string name = "")

```

#### Parameters

`document` [PartDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/PartDocument.cs)

The  to create a curve set by file import.

`filePath` string

The file path about points of a curve set.

`body` [Obj](VM.API.Pre.Obj.md)

The body of a curve set.

`name` string

The name of a curve set. If empty, default name starts with 'CURVESET' will be generated and used.

#### Returns

[Obj](VM.API.Pre.Obj.md)

The new  object created by this API.

#### Exceptions

ArgumentNullException

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

ArgumentException

Will be thrown if the type of 'body' is not equal to  and .

### <a id="VM_API_Pre_ContactAPI_CreateCylinderToMultiCurveContact_VM_Managed_DAFUL_SubSystemDocument_System_Collections_Generic_IEnumerable_VM_API_Pre_Obj__VM_API_Pre_Obj_System_String_"></a> CreateCylinderToMultiCurveContact(SubSystemDocument, IEnumerable&lt;Obj&gt;, Obj, string)

```csharp
[NotNull(new string[] { "subSystemDocument", "baseGeomerty" })]
[NotNullObj(new string[] { "actionGeomerty" })]
public static Obj CreateCylinderToMultiCurveContact(this SubSystemDocument subSystemDocument, IEnumerable<Obj> baseGeomerty, Obj actionGeomerty, string name = "")

```

#### Parameters

`subSystemDocument` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

`baseGeomerty` IEnumerable&lt;[Obj](VM.API.Pre.Obj.md)&gt;

`actionGeomerty` [Obj](VM.API.Pre.Obj.md)

`name` string

#### Returns

[Obj](VM.API.Pre.Obj.md)

### <a id="VM_API_Pre_ContactAPI_CreateCylinderToMultiCurveContact_VM_Managed_DAFUL_SubSystemDocument_System_Collections_Generic_IEnumerable_VM_API_Pre_Obj__VM_API_Pre_Obj_VM_Vector_VM_Vector_System_Nullable_VM_Models_Pre_ExpressionValueVariable__System_String_"></a> CreateCylinderToMultiCurveContact(SubSystemDocument, IEnumerable&lt;Obj&gt;, Obj, Vector, Vector, ExpressionValueVariable?, string)

```csharp
[NotNull(new string[] { "subSystemDocument", "baseGeomerty" })]
[NotNullObj(new string[] { "actionGeomerty" })]
public static Obj CreateCylinderToMultiCurveContact(this SubSystemDocument subSystemDocument, IEnumerable<Obj> baseGeomerty, Obj actionGeomerty, Vector bottomPosition, Vector topPosition, ExpressionValueVariable? radius = null, string name = "")

```

#### Parameters

`subSystemDocument` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

`baseGeomerty` IEnumerable&lt;[Obj](VM.API.Pre.Obj.md)&gt;

`actionGeomerty` [Obj](VM.API.Pre.Obj.md)

`bottomPosition` Vector

`topPosition` Vector

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

`name` string

#### Returns

[Obj](VM.API.Pre.Obj.md)

### <a id="VM_API_Pre_ContactAPI_CreateExtractFaceSet_VM_Managed_DAFUL_SubSystemDocument_VM_API_Pre_Obj_VM_API_Pre_Obj_System_Nullable_VM_Models_Pre_ExpressionValueVariable__System_String_System_Boolean_System_String_System_Boolean_"></a> CreateExtractFaceSet(SubSystemDocument, Obj, Obj, ExpressionValueVariable?, string, bool, string, bool)

```csharp
[NotNull(new string[] { "subSystemDocument" })]
[NotNullObj(new string[] { "firstBody", "secondBody" })]
public static void CreateExtractFaceSet(this SubSystemDocument subSystemDocument, Obj firstBody, Obj secondBody, ExpressionValueVariable? unused = null, string firstFacesetName = "", bool splitFirstBody = false, string secondFacesetName = "", bool splitSecondBody = false)

```

#### Parameters

`subSystemDocument` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

`firstBody` [Obj](VM.API.Pre.Obj.md)

`secondBody` [Obj](VM.API.Pre.Obj.md)

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

`firstFacesetName` string

`splitFirstBody` bool

`secondFacesetName` string

`splitSecondBody` bool

### <a id="VM_API_Pre_ContactAPI_CreateExtractFaceSet_VM_Managed_DAFUL_SubSystemDocument_System_Collections_Generic_IEnumerable_VM_API_Pre_Obj__VM_API_Pre_Obj_System_Nullable_VM_Models_Pre_ExpressionValueVariable__System_String_System_Boolean_System_String_System_Boolean_"></a> CreateExtractFaceSet(SubSystemDocument, IEnumerable&lt;Obj&gt;, Obj, ExpressionValueVariable?, string, bool, string, bool)

```csharp
[NotNull(new string[] { "subSystemDocument", "faces" })]
[NotNullObj(new string[] { "secondBody" })]
public static void CreateExtractFaceSet(this SubSystemDocument subSystemDocument, IEnumerable<Obj> faces, Obj secondBody, ExpressionValueVariable? tolerance = null, string firstFacesetName = "", bool splitFirstBody = false, string secondFacesetName = "", bool splitSecondBody = false)

```

#### Parameters

`subSystemDocument` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

`faces` IEnumerable&lt;[Obj](VM.API.Pre.Obj.md)&gt;

`secondBody` [Obj](VM.API.Pre.Obj.md)

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

`firstFacesetName` string

`splitFirstBody` bool

`secondFacesetName` string

`splitSecondBody` bool

### <a id="VM_API_Pre_ContactAPI_CreateFaceSet_VM_Managed_DAFUL_SubSystemDocument_System_Collections_Generic_IEnumerable_VM_API_Pre_Obj__System_String_"></a> CreateFaceSet(SubSystemDocument, IEnumerable&lt;Obj&gt;, string)

```csharp
[NotNull(new string[] { "subSystemDocument", "faces" })]
public static Obj CreateFaceSet(this SubSystemDocument subSystemDocument, IEnumerable<Obj> faces, string name = "")

```

#### Parameters

`subSystemDocument` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

`faces` IEnumerable&lt;[Obj](VM.API.Pre.Obj.md)&gt;

`name` string

#### Returns

[Obj](VM.API.Pre.Obj.md)

### <a id="VM_API_Pre_ContactAPI_CreateFaceSet_VM_Managed_DAFUL_PartDocument_System_Collections_Generic_IEnumerable_VM_API_Pre_Obj__System_String_"></a> CreateFaceSet(PartDocument, IEnumerable&lt;Obj&gt;, string)

Create

```csharp
[NotNull(new string[] { "document", "faces" })]
public static Obj CreateFaceSet(this PartDocument document, IEnumerable<Obj> faces, string name = "")

```

#### Parameters

`document` [PartDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/PartDocument.cs)

The  to create a face set.

`faces` IEnumerable&lt;[Obj](VM.API.Pre.Obj.md)&gt;

The faces of a face set.

`name` string

The name of a face set. If empty, default name starts with 'FACESET\_' will be generated and used.

#### Returns

[Obj](VM.API.Pre.Obj.md)

The new  object created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'document', 'faces' argument is null.

ArgumentException

Will be thrown if the type of 'faces' is not equal to .

### <a id="VM_API_Pre_ContactAPI_CreateGeneralContact_VM_Models_Pre_IDocument_VM_API_Pre_Obj_VM_API_Pre_Obj_System_String_"></a> CreateGeneralContact(IDocument, Obj, Obj, string)

```csharp
[NotNull(new string[] { "document" })]
[NotNullObj(new string[] { "baseEntity", "actionEntity" })]
public static Obj CreateGeneralContact(this IDocument document, Obj baseEntity, Obj actionEntity, string contactName = "")

```

#### Parameters

`document` IDocument

`baseEntity` [Obj](VM.API.Pre.Obj.md)

`actionEntity` [Obj](VM.API.Pre.Obj.md)

`contactName` string

#### Returns

[Obj](VM.API.Pre.Obj.md)

### <a id="VM_API_Pre_ContactAPI_CreateGeneralContactWithFaces_VM_Models_Pre_IDocument_System_Collections_Generic_IEnumerable_VM_API_Pre_Obj__System_Collections_Generic_IEnumerable_VM_API_Pre_Obj__System_String_"></a> CreateGeneralContactWithFaces(IDocument, IEnumerable&lt;Obj&gt;, IEnumerable&lt;Obj&gt;, string)

```csharp
[NotNull(new string[] { "document", "baseFaces", "actionFaces" })]
public static Obj CreateGeneralContactWithFaces(this IDocument document, IEnumerable<Obj> baseFaces, IEnumerable<Obj> actionFaces, string contactName = "")

```

#### Parameters

`document` IDocument

`baseFaces` IEnumerable&lt;[Obj](VM.API.Pre.Obj.md)&gt;

`actionFaces` IEnumerable&lt;[Obj](VM.API.Pre.Obj.md)&gt;

`contactName` string

#### Returns

[Obj](VM.API.Pre.Obj.md)

### <a id="VM_API_Pre_ContactAPI_CreateMbyNContact_VM_Managed_DAFUL_SubSystemDocument_System_Collections_Generic_IEnumerable_VM_API_Pre_Obj__System_Collections_Generic_IEnumerable_VM_API_Pre_Obj__System_String_"></a> CreateMbyNContact(SubSystemDocument, IEnumerable&lt;Obj&gt;, IEnumerable&lt;Obj&gt;, string)

Create

```csharp
[NotNull(new string[] { "subSystemDocument", "baseGeomerty", "actionGeomerty" })]
public static Obj CreateMbyNContact(this SubSystemDocument subSystemDocument, IEnumerable<Obj> baseGeomerty, IEnumerable<Obj> actionGeomerty, string name = "")

```

#### Parameters

`subSystemDocument` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

The  to create M by N contacts.

`baseGeomerty` IEnumerable&lt;[Obj](VM.API.Pre.Obj.md)&gt;

The base geomerty of M by N contacts.

`actionGeomerty` IEnumerable&lt;[Obj](VM.API.Pre.Obj.md)&gt;

The action geomerty of M by N contacts.

`name` string

The name of M by N contacts. If empty, default name starts with 'MbyN' will be generated and used.

#### Returns

[Obj](VM.API.Pre.Obj.md)

The new  object created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'subSystemDocument', 'baseGeomerty', 'actionGeomerty' argument is null.

ArgumentException

Will be thrown if the type of 'baseGeomerty', 'actionGeomerty' is not equal to  and .

### <a id="VM_API_Pre_ContactAPI_CreateMultiCurveToMultiCurveContact_VM_Managed_DAFUL_SubSystemDocument_System_Collections_Generic_IEnumerable_VM_API_Pre_Obj__System_Collections_Generic_IEnumerable_VM_API_Pre_Obj__System_String_"></a> CreateMultiCurveToMultiCurveContact(SubSystemDocument, IEnumerable&lt;Obj&gt;, IEnumerable&lt;Obj&gt;, string)

```csharp
[NotNull(new string[] { "subSystemDocument", "baseGeomerty", "actionGeomerty" })]
public static Obj CreateMultiCurveToMultiCurveContact(this SubSystemDocument subSystemDocument, IEnumerable<Obj> baseGeomerty, IEnumerable<Obj> actionGeomerty, string name = "")

```

#### Parameters

`subSystemDocument` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

`baseGeomerty` IEnumerable&lt;[Obj](VM.API.Pre.Obj.md)&gt;

`actionGeomerty` IEnumerable&lt;[Obj](VM.API.Pre.Obj.md)&gt;

`name` string

#### Returns

[Obj](VM.API.Pre.Obj.md)

### <a id="VM_API_Pre_ContactAPI_CreateNCombinationContact_VM_Managed_DAFUL_SubSystemDocument_System_Collections_Generic_IEnumerable_VM_API_Pre_Obj__System_String_"></a> CreateNCombinationContact(SubSystemDocument, IEnumerable&lt;Obj&gt;, string)

Create

```csharp
[NotNull(new string[] { "subSystemDocument", "geomerty" })]
public static Obj CreateNCombinationContact(this SubSystemDocument subSystemDocument, IEnumerable<Obj> geomerty, string name = "")

```

#### Parameters

`subSystemDocument` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

The  to create N combination contacts.

`geomerty` IEnumerable&lt;[Obj](VM.API.Pre.Obj.md)&gt;

The geomerty of N combination contacts.

`name` string

The name of N combination contacts. If empty, default name starts with 'NCombi' will be generated and used.

#### Returns

[Obj](VM.API.Pre.Obj.md)

The new  object created by this API.

#### Exceptions

ArgumentNullException

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

ArgumentException

Will be thrown if the type of 'geomerty' is not equal to  and .

### <a id="VM_API_Pre_ContactAPI_CreatePTCV_VM_Managed_DAFUL_SubSystemDocument_VM_API_Pre_Obj_VM_API_Pre_Obj_VM_Vector_System_String_VM_API_Pre_Relative_VM_API_Pre_FrictionContact_System_Nullable_VM_Models_Pre_ExpressionValueVariable__System_Nullable_VM_Models_Pre_ExpressionValueVariable__"></a> CreatePTCV(SubSystemDocument, Obj, Obj, Vector, string, Relative, FrictionContact, ExpressionValueVariable?, ExpressionValueVariable?)

```csharp
[NotNull(new string[] { "subSystemDocument" })]
[NotNullObj(new string[] { "baseCurveset", "actionBody" })]
[MatchTypeObj(new object[] { "baseCurveset", typeof(IContactableRigid2D), "actionBody", typeof(IConnectable) })]
public static Obj CreatePTCV(this SubSystemDocument subSystemDocument, Obj baseCurveset, Obj actionBody, Vector actionPosition, string name = "", Relative relative = null, FrictionContact friction = null, ExpressionValueVariable? baseClearance = null, ExpressionValueVariable? stiffScaleFactor = null)

```

#### Parameters

`subSystemDocument` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

`baseCurveset` [Obj](VM.API.Pre.Obj.md)

`actionBody` [Obj](VM.API.Pre.Obj.md)

`actionPosition` Vector

`name` string

`relative` [Relative](VM.API.Pre.Relative.md)

`friction` [FrictionContact](VM.API.Pre.FrictionContact.md)

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

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

#### Returns

[Obj](VM.API.Pre.Obj.md)

### <a id="VM_API_Pre_ContactAPI_CreateSphereToMultiCurveContact_VM_Managed_DAFUL_SubSystemDocument_System_Collections_Generic_IEnumerable_VM_API_Pre_Obj__VM_API_Pre_Obj_System_String_"></a> CreateSphereToMultiCurveContact(SubSystemDocument, IEnumerable&lt;Obj&gt;, Obj, string)

```csharp
[NotNull(new string[] { "subSystemDocument", "baseGeomerty" })]
[NotNullObj(new string[] { "actionGeomerty" })]
public static Obj CreateSphereToMultiCurveContact(this SubSystemDocument subSystemDocument, IEnumerable<Obj> baseGeomerty, Obj actionGeomerty, string name = "")

```

#### Parameters

`subSystemDocument` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

`baseGeomerty` IEnumerable&lt;[Obj](VM.API.Pre.Obj.md)&gt;

`actionGeomerty` [Obj](VM.API.Pre.Obj.md)

`name` string

#### Returns

[Obj](VM.API.Pre.Obj.md)

### <a id="VM_API_Pre_ContactAPI_CreateSphereToMultiCurveContact_VM_Managed_DAFUL_SubSystemDocument_System_Collections_Generic_IEnumerable_VM_API_Pre_Obj__VM_API_Pre_Obj_VM_Vector_System_Nullable_VM_Models_Pre_ExpressionValueVariable__System_String_"></a> CreateSphereToMultiCurveContact(SubSystemDocument, IEnumerable&lt;Obj&gt;, Obj, Vector, ExpressionValueVariable?, string)

```csharp
[NotNull(new string[] { "subSystemDocument", "baseGeomerty" })]
[NotNullObj(new string[] { "actionGeomerty" })]
public static Obj CreateSphereToMultiCurveContact(this SubSystemDocument subSystemDocument, IEnumerable<Obj> baseGeomerty, Obj actionGeomerty, Vector centerPosition, ExpressionValueVariable? radius = null, string name = "")

```

#### Parameters

`subSystemDocument` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

`baseGeomerty` IEnumerable&lt;[Obj](VM.API.Pre.Obj.md)&gt;

`actionGeomerty` [Obj](VM.API.Pre.Obj.md)

`centerPosition` Vector

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

`name` string

#### Returns

[Obj](VM.API.Pre.Obj.md)