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

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

This class is to represent the CAD Operation.

```csharp theme={null}
public class CADOperation
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[CADOperation](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.CADOperation.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_)

## Constructors

### CADOperation()

```csharp theme={null}
public CADOperation()
```

## Methods

### BuildBody(Body)

```csharp theme={null}
public static void BuildBody(Body body)
```

#### Parameters

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

### CheckValidationAboutBuild(Body, string)

```csharp theme={null}
public static bool CheckValidationAboutBuild(Body body, string strXml)
```

#### Parameters

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

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

#### Returns

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

### DeleteBuilder(List\<ObjectBase>, Document, bool)

```csharp theme={null}
public static void DeleteBuilder(List<ObjectBase> lstDeletedBuilder, Document doc, bool bModified)
```

#### Parameters

`lstDeletedBuilder` [List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)\<[ObjectBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.ObjectBase.md)>

`doc` [Document](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.Document.md)

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

### GetBodyFaces(Body, ICollection\<int>)

```csharp theme={null}
public static List<Face> GetBodyFaces(Body bd, ICollection<int> Colors)
```

#### Parameters

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

`Colors` [ICollection](https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1)\<[int](https://learn.microsoft.com/dotnet/api/system.int32)>

#### Returns

[List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)\<[Face](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Face.md)>

### GetBodyFaces(Body)

```csharp theme={null}
public static List<Face> GetBodyFaces(Body bd)
```

#### Parameters

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

#### Returns

[List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)\<[Face](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Face.md)>

### GetBodyNameAttribute(Body)

```csharp theme={null}
public static string GetBodyNameAttribute(Body body)
```

#### Parameters

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

#### Returns

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

### GetBoundingBox(Body, TMatrix, ref Vector, ref Vector, BoxingMode)

```csharp theme={null}
public static bool GetBoundingBox(Body body, TMatrix matT, ref Vector vecMinPt, ref Vector vecMaxPt, BoxingMode boxingMode)
```

#### Parameters

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

`matT` TMatrix

`vecMinPt` Vector

`vecMaxPt` Vector

`boxingMode` [BoxingMode](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.BoxingMode.md)

#### Returns

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

### GetDefaultMaxPenetration(Face, ref double)

```csharp theme={null}
public static bool GetDefaultMaxPenetration(Face face, ref double dMaxPenetration)
```

#### Parameters

`face` [Face](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Face.md)

`dMaxPenetration` [double](https://learn.microsoft.com/dotnet/api/system.double)

#### Returns

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

### GetEdgeLength(Edge)

```csharp theme={null}
public static double GetEdgeLength(Edge edge)
```

#### Parameters

`edge` [Edge](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Edge.md)

#### Returns

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

### GetFaceArea(Face)

```csharp theme={null}
public static double GetFaceArea(Face face)
```

#### Parameters

`face` [Face](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Face.md)

#### Returns

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

### GetFacetInformationForFace(Face, ref VectorBase\[], ref int\[])

```csharp theme={null}
public static void GetFacetInformationForFace(Face face, ref VectorBase[] arPt, ref int[] arConnectivity)
```

#### Parameters

`face` [Face](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Face.md)

`arPt` [VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.VectorBase.md)\[]

`arConnectivity` [int](https://learn.microsoft.com/dotnet/api/system.int32)\[]

### GetManyTopologyColor(IEnumerable\<Topology>)

```csharp theme={null}
public static Dictionary<UIntPtr, Color> GetManyTopologyColor(IEnumerable<Topology> topologies)
```

#### Parameters

`topologies` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)\<[Topology](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Topology.md)>

#### Returns

[Dictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2)\<[UIntPtr](https://learn.microsoft.com/dotnet/api/system.uintptr), [Color](https://learn.microsoft.com/dotnet/api/system.drawing.color)>

### GetPiecewiseCurve(List\<Edge>, double, double, double, ref bool)

```csharp theme={null}
public static List<VectorBase> GetPiecewiseCurve(List<Edge> lstEdges, double dTol, double dLen, double dAngle, ref bool bCloseLoop)
```

#### Parameters

`lstEdges` [List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)\<[Edge](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Edge.md)>

`dTol` [double](https://learn.microsoft.com/dotnet/api/system.double)

`dLen` [double](https://learn.microsoft.com/dotnet/api/system.double)

`dAngle` [double](https://learn.microsoft.com/dotnet/api/system.double)

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

#### Returns

[List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)\<[VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.VectorBase.md)>

### GetPointAndDirectionFromFacet(Face, VectorBase, VectorBase)

```csharp theme={null}
public static bool GetPointAndDirectionFromFacet(Face face, VectorBase vecPoint, VectorBase vecDirection)
```

#### Parameters

`face` [Face](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Face.md)

`vecPoint` [VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.VectorBase.md)

`vecDirection` [VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.VectorBase.md)

#### Returns

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

### GetTopologyColor(Topology, ref Color)

```csharp theme={null}
public static bool GetTopologyColor(Topology topol, ref Color color)
```

#### Parameters

`topol` [Topology](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.CAD.Topology.md)

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

#### Returns

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

### GetVoidCount(Body)

```csharp theme={null}
public static int GetVoidCount(Body body)
```

#### Parameters

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

#### Returns

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### GetVoidPoints(Body, double\[], ref VectorBase\[])

```csharp theme={null}
public static int GetVoidPoints(Body body, double[] ardScale, ref VectorBase[] arPoints)
```

#### Parameters

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

`ardScale` [double](https://learn.microsoft.com/dotnet/api/system.double)\[]

`arPoints` [VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.VectorBase.md)\[]

#### Returns

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### RemoveDuplicatedEvent(Document)

```csharp theme={null}
public static void RemoveDuplicatedEvent(Document doc)
```

#### Parameters

`doc` [Document](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.Document.md)

### SetGeometryRepresentation(IDrawFacet, string, string, bool)

```csharp theme={null}
public static bool SetGeometryRepresentation(IDrawFacet facet, string strGeom, string strDefaultGeom, bool bUseRedraw)
```

#### Parameters

`facet` [IDrawFacet](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.IDrawFacet.md)

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

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

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

#### Returns

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

### SetNameAttribute(Body, string, bool, string)

```csharp theme={null}
public static void SetNameAttribute(Body body, string strName, bool bUseAttribute, string strOldName)
```

#### Parameters

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

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

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

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

### SetSelectionObject(Document3D)

```csharp theme={null}
public static void SetSelectionObject(Document3D doc)
```

#### Parameters

`doc` [Document3D](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r1/lib/VM.Managed.Document3D.md)
