    

 ## On this page

  

 

 #  Class Canvas

 Last update: 16.07.2025 

Namespace: [VM.CAD.Kernel.Render](VM.CAD.Kernel.Render.md)  
Assembly: VM.CAD.Kernel.dll

```csharp
public sealed class Canvas : KernelObject, IDrawReference

```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← [KernelObject](VM.CAD.Kernel.KernelObject.md) ← [Canvas](VM.CAD.Kernel.Render.Canvas.md)

#### Implements

[IDrawReference](VM.CAD.Kernel.Render.IDrawReference.md)

#### Inherited Members

[KernelObject.Dispose()](VM.CAD.Kernel.KernelObject.md#VM_CAD_Kernel_KernelObject_Dispose), [KernelObject.Key](VM.CAD.Kernel.KernelObject.md#VM_CAD_Kernel_KernelObject_Key)

#### 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(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkedObjects__1_System_Object_VM_Models_Pre_LinkPropertyType_)

## Properties

### <a id="VM_CAD_Kernel_Render_Canvas_BackplaneCull"></a> BackplaneCull

Sets the back plane cull.

```csharp
public bool BackplaneCull { set; }

```

#### Property Value

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

### <a id="VM_CAD_Kernel_Render_Canvas_Color"></a> Color

Sets the color.

```csharp
public Color Color { set; }

```

#### Property Value

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

### <a id="VM_CAD_Kernel_Render_Canvas_Document"></a> Document

Gets the Document

```csharp
public IDocument3D Document { get; }

```

#### Property Value

IDocument3D

### <a id="VM_CAD_Kernel_Render_Canvas_LightInterpolationOption"></a> LightInterpolationOption

Sets the light interpolation option.

```csharp
public LightInterpolationOptionType LightInterpolationOption { set; }

```

#### Property Value

[LightInterpolationOptionType](VM.CAD.Kernel.Render.LightInterpolationOptionType.md)

### <a id="VM_CAD_Kernel_Render_Canvas_LineShape"></a> LineShape

Sets the line shape.

```csharp
public LineType LineShape { set; }

```

#### Property Value

[LineType](VM.CAD.Kernel.Render.LineType.md)

### <a id="VM_CAD_Kernel_Render_Canvas_LineWeight"></a> LineWeight

Sets the line weight.

```csharp
public double LineWeight { set; }

```

#### Property Value

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

### <a id="VM_CAD_Kernel_Render_Canvas_TextSize"></a> TextSize

Set the text size.

```csharp
public double TextSize { set; }

```

#### Property Value

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

### <a id="VM_CAD_Kernel_Render_Canvas_Transparency"></a> Transparency

Sets the transparency.

```csharp
public double Transparency { set; }

```

#### Property Value

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

### <a id="VM_CAD_Kernel_Render_Canvas_WireframeMode"></a> WireframeMode

Sets the wire frame mode.

```csharp
public bool WireframeMode { set; }

```

#### Property Value

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

## Methods

### <a id="VM_CAD_Kernel_Render_Canvas_AppendModellingMatrix_VM_TMatrix_"></a> AppendModellingMatrix(TMatrix)

Append modelling matrix.

```csharp
public void AppendModellingMatrix(TMatrix mat)

```

#### Parameters

`mat` TMatrix

The transformation matrix

### <a id="VM_CAD_Kernel_Render_Canvas_Clear"></a> Clear()

Clear canvas.

```csharp
public void Clear()

```

### <a id="VM_CAD_Kernel_Render_Canvas_Create_VM_Models_Pre_IDocument3D_System_Boolean_"></a> Create(IDocument3D, bool)

Create a new instance of the  class

```csharp
public static Canvas Create(IDocument3D doc, bool ThreadSafeCanvas = true)

```

#### Parameters

`doc` IDocument3D

The document

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

true if to create thread-safe canvas, otherwise false.

#### Returns

[Canvas](VM.CAD.Kernel.Render.Canvas.md)

### <a id="VM_CAD_Kernel_Render_Canvas_Create_System_UIntPtr_VM_Models_Pre_IDocument3D_System_Boolean_"></a> Create(UIntPtr, IDocument3D, bool)

Create a new instance of the  class

```csharp
public static Canvas Create(UIntPtr key, IDocument3D doc, bool ThreadSafeCanvas = true)

```

#### Parameters

`key` [UIntPtr](https://learn.microsoft.com/dotnet/api/system.uintptr)

The key of the canvas

`doc` IDocument3D

The document

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

true if to create thread-safe canvas, otherwise false.

#### Returns

[Canvas](VM.CAD.Kernel.Render.Canvas.md)

### <a id="VM_CAD_Kernel_Render_Canvas_DisplayTheFront_System_Double_"></a> DisplayTheFront(double)

Display front above all.

```csharp
public void DisplayTheFront(double dDepthRange = -1)

```

#### Parameters

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

The depth range. If it is negative value, default value will be used.

### <a id="VM_CAD_Kernel_Render_Canvas_DrawArc_VM_Vector_VM_Vector_VM_Vector_"></a> DrawArc(Vector, Vector, Vector)

Draw arc.

```csharp
public UIntPtr DrawArc(Vector vecFirst, Vector vecSecond, Vector vecThird)

```

#### Parameters

`vecFirst` Vector

The first point

`vecSecond` Vector

The second point

`vecThird` Vector

The third point

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawArrow_VM_Vector_VM_Vector_System_Double_"></a> DrawArrow(Vector, Vector, double)

Draw arrow.

```csharp
public UIntPtr DrawArrow(Vector vecStart, Vector vecEnd, double dArrowSize = -1)

```

#### Parameters

`vecStart` Vector

The start point

`vecEnd` Vector

The end point

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

The arrow size. If dArrowSize is negative or zero value, default value will be used.

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawCircle_VM_Vector_System_Double_VM_Vector_System_Boolean_"></a> DrawCircle(Vector, double, Vector, bool)

Draw circle.

```csharp
public UIntPtr DrawCircle(Vector vecCenter, double dRad, Vector vecNormal, bool bFill = false)

```

#### Parameters

`vecCenter` Vector

The center point

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

The radius

`vecNormal` Vector

The normal vector

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

The fill flag

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawCylinder_VM_Vector_VM_Vector_System_Double_System_Boolean_System_Boolean_"></a> DrawCylinder(Vector, Vector, double, bool, bool)

Draw cylinder.

```csharp
public UIntPtr DrawCylinder(Vector vecStart, Vector vecEnd, double dRad, bool bFirstCap = true, bool bSecondCap = true)

```

#### Parameters

`vecStart` Vector

The start point

`vecEnd` Vector

The end point

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

The radius

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

if first cap and second cap is true, "both"; if first cap is true and second cap is false, "first"; if first cap is false and second cap is true, "second"; if first cap and second cap is false, "none"

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

if first cap and second cap is true, "both"; if first cap is true and second cap is false, "first"; if first cap is false and second cap is true, "second"; if first cap and second cap is false, "none"

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawCylinder_VM_Vector_VM_Vector_System_Double_System_String_"></a> DrawCylinder(Vector, Vector, double, string)

Draw cylinder.

```csharp
public UIntPtr DrawCylinder(Vector vecStart, Vector vecEnd, double dRad, string strCapOption)

```

#### Parameters

`vecStart` Vector

The start point

`vecEnd` Vector

The end point

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

The radius

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

String specifying which ends to cap, either "first", "second", "none", or "both"

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawDimension_VM_Vector_System_String_"></a> DrawDimension(Vector, string)

Draws the dimension.

```csharp
public UIntPtr DrawDimension(Vector vecCenter, string strText)

```

#### Parameters

`vecCenter` Vector

The center position.

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

The string text.

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawIcon_VM_CAD_Kernel_Render_IconInfo_"></a> DrawIcon(IconInfo)

Draw icon.

```csharp
public void DrawIcon(IconInfo iconInfo)

```

#### Parameters

`iconInfo` [IconInfo](VM.CAD.Kernel.Render.IconInfo.md)

The icon information

### <a id="VM_CAD_Kernel_Render_Canvas_DrawIcon_VM_CAD_Kernel_Render_IconInfo_System_Double_"></a> DrawIcon(IconInfo, double)

Draw icon.

```csharp
public void DrawIcon(IconInfo iconInfo, double dScale)

```

#### Parameters

`iconInfo` [IconInfo](VM.CAD.Kernel.Render.IconInfo.md)

The icon information

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

The scale

### <a id="VM_CAD_Kernel_Render_Canvas_DrawLine_VM_Vector_VM_Vector_"></a> DrawLine(Vector, Vector)

Draw line.

```csharp
public UIntPtr DrawLine(Vector vecStart, Vector vecEnd)

```

#### Parameters

`vecStart` Vector

The start point

`vecEnd` Vector

The end point

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawMarker_VM_Vector_"></a> DrawMarker(Vector)

Draw marker.

```csharp
public UIntPtr DrawMarker(Vector vecCenter)

```

#### Parameters

`vecCenter` Vector

The center point

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawMesh_System_Int32_System_Int32_System_Collections_Generic_ICollection_VM_Vector__"></a> DrawMesh(int, int, ICollection)

Draw mesh.

```csharp
public UIntPtr DrawMesh(int nRows, int nColumns, ICollection<vector> points)

```

#### Parameters

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

The rows numner

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

The columns number

`points` [ICollection](https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1)

The collection of points

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawMesh_System_Int32_System_Int32_VM_Vector___"></a> DrawMesh(int, int, Vector\[\])

Draw mesh.

```csharp
public UIntPtr DrawMesh(int nRows, int nColumns, Vector[] points)

```

#### Parameters

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

The rows numner

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

The columns number

`points` Vector\[\]

The array of points

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawNurbs_System_Int32_System_Int32_System_Int32_System_Int32_System_Collections_Generic_ICollection_VM_Vector__System_Collections_Generic_ICollection_System_Single__System_Collections_Generic_ICollection_System_Single__System_Collections_Generic_ICollection_System_Single__"></a> DrawNurbs(int, int, int, int, ICollection, ICollection, ICollection, ICollection)

Draw nurbs.

```csharp
public UIntPtr DrawNurbs(int u_degree, int v_degree, int u_count, int v_count, ICollection<vector> ctrlPts, ICollection<float> weights, ICollection<float> u_knots, ICollection<float> v_knots)

```

#### Parameters

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

Degree of the surface in the u direction

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

Degree of the surface in the v direction

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

Number of valid control points in the u direction

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

Number of valid control points in the v direction

`ctrlPts` [ICollection](https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1)

Vector of x-y-z triplets for the coordinates of the control points

`weights` [ICollection](https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1)[float](https://learn.microsoft.com/dotnet/api/system.single)&amp;gt;

Control point weights

`u_knots` [ICollection](https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1)[float](https://learn.microsoft.com/dotnet/api/system.single)&amp;gt;

Knot sequence in the u direction

`v_knots` [ICollection](https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1)[float](https://learn.microsoft.com/dotnet/api/system.single)&amp;gt;

Knot sequence in the v direction

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawNurbs_System_Int32_System_Int32_System_Int32_System_Int32_VM_Vector___System_Single___System_Single___System_Single___"></a> DrawNurbs(int, int, int, int, Vector\[\], float\[\], float\[\], float\[\])

Draw nurbs.

```csharp
public UIntPtr DrawNurbs(int u_degree, int v_degree, int u_count, int v_count, Vector[] ctrlPts, float[] weights, float[] u_knots, float[] v_knots)

```

#### Parameters

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

Degree of the surface in the u direction

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

Degree of the surface in the v direction

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

Number of valid control points in the u direction

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

Number of valid control points in the v direction

`ctrlPts` Vector\[\]

Vector of x-y-z triplets for the coordinates of the control points

`weights` [float](https://learn.microsoft.com/dotnet/api/system.single)\[\]

Control point weights

`u_knots` [float](https://learn.microsoft.com/dotnet/api/system.single)\[\]

Knot sequence in the u direction

`v_knots` [float](https://learn.microsoft.com/dotnet/api/system.single)\[\]

Knot sequence in the v direction

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawPolygon_System_Collections_Generic_ICollection_VM_Vector__"></a> DrawPolygon(ICollection)

Draw polygon.

```csharp
public UIntPtr DrawPolygon(ICollection<vector> colPoint)

```

#### Parameters

`colPoint` [ICollection](https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1)

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawPolygon_VM_Vector___"></a> DrawPolygon(Vector\[\])

Draw polygon.

```csharp
public UIntPtr DrawPolygon(Vector[] arPoint)

```

#### Parameters

`arPoint` Vector\[\]

The array of points

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawPolyline_System_Collections_Generic_ICollection_VM_Vector__"></a> DrawPolyline(ICollection)

Draw polyline.

```csharp
public UIntPtr DrawPolyline(ICollection<vector> colPoint)

```

#### Parameters

`colPoint` [ICollection](https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1)

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawPolyline_VM_Vector___"></a> DrawPolyline(Vector\[\])

Draw polyline.

```csharp
public UIntPtr DrawPolyline(Vector[] arPoint)

```

#### Parameters

`arPoint` Vector\[\]

The array of points

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawShell_System_Collections_Generic_ICollection_VM_Vector__System_Collections_Generic_ICollection_System_Int32__System_Double_"></a> DrawShell(ICollection, ICollection, double)

Draw shell.

```csharp
public UIntPtr DrawShell(ICollection<vector> points, ICollection<int> connectivities, double dScale = 1)

```

#### Parameters

`points` [ICollection](https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1)

The collection of points.

`connectivities` [ICollection](https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1)[int](https://learn.microsoft.com/dotnet/api/system.int32)&amp;gt;

The collection of connectivities.

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

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawShell_VM_Vector___System_Int32___System_Double_"></a> DrawShell(Vector\[\], int\[\], double)

Draw shell.

```csharp
public UIntPtr DrawShell(Vector[] points, int[] connectivities, double dScale = 1)

```

#### Parameters

`points` Vector\[\]

The array of points.

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

The array of connectivities.

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

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawShellWithFaceNormal_System_Collections_Generic_ICollection_VM_Vector__System_Collections_Generic_ICollection_System_Int32__System_Collections_Generic_ICollection_VM_Vector__"></a> DrawShellWithFaceNormal(ICollection, ICollection, ICollection)

Draw shell with face normal.

```csharp
public UIntPtr DrawShellWithFaceNormal(ICollection<vector> points, ICollection<int> connectivities, ICollection<vector> faceNormals = null)

```

#### Parameters

`points` [ICollection](https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1)

The collection of points.

`connectivities` [ICollection](https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1)[int](https://learn.microsoft.com/dotnet/api/system.int32)&amp;gt;

The collection of connectivities.

`faceNormals` [ICollection](https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1)

The collection of face normal vectors.

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawShellWithFaceNormal_VM_Vector___System_Int32___VM_Vector___"></a> DrawShellWithFaceNormal(Vector\[\], int\[\], Vector\[\])

Draw shell with face normal.

```csharp
public UIntPtr DrawShellWithFaceNormal(Vector[] points, int[] connectivities, Vector[] faceNormals = null)

```

#### Parameters

`points` Vector\[\]

The array of points.

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

The array of connectivities.

`faceNormals` Vector\[\]

The array of face normal vectors.

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawShellWithVertexNormal_System_Collections_Generic_ICollection_VM_Vector__System_Collections_Generic_ICollection_System_Int32__System_Collections_Generic_ICollection_VM_Vector__"></a> DrawShellWithVertexNormal(ICollection, ICollection, ICollection)

Draw shell with vertex normal.

```csharp
public UIntPtr DrawShellWithVertexNormal(ICollection<vector> points, ICollection<int> connectivities, ICollection<vector> vertexNormals = null)

```

#### Parameters

`points` [ICollection](https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1)

The collection of points.

`connectivities` [ICollection](https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1)[int](https://learn.microsoft.com/dotnet/api/system.int32)&amp;gt;

The collection of connectivities.

`vertexNormals` [ICollection](https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1)

The collection of vertex normal vectors.

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawShellWithVertexNormal_VM_Vector___System_Int32___VM_Vector___"></a> DrawShellWithVertexNormal(Vector\[\], int\[\], Vector\[\])

Draw shell with vertex normal.

```csharp
public UIntPtr DrawShellWithVertexNormal(Vector[] points, int[] connectivities, Vector[] vertexNormals = null)

```

#### Parameters

`points` Vector\[\]

The array of points.

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

The array of connectivities.

`vertexNormals` Vector\[\]

The array of vertex normal vectors.

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawSphere_VM_Vector_System_Double_"></a> DrawSphere(Vector, double)

```csharp
public UIntPtr DrawSphere(Vector vecCenter, double dRad)

```

#### Parameters

`vecCenter` Vector

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

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawSphere_VM_Vector_System_Double_VM_Vector_VM_Vector_"></a> DrawSphere(Vector, double, Vector, Vector)

```csharp
public UIntPtr DrawSphere(Vector vecCenter, double dRad, Vector vecAxis, Vector vecOrtho)

```

#### Parameters

`vecCenter` Vector

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

`vecAxis` Vector

`vecOrtho` Vector

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawText_VM_Vector_System_String_"></a> DrawText(Vector, string)

```csharp
public UIntPtr DrawText(Vector vecCenter, string strText)

```

#### Parameters

`vecCenter` Vector

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

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawWireCylinder_VM_Vector_VM_Vector_System_Double_"></a> DrawWireCylinder(Vector, Vector, double)

Draw cylinder with face.

```csharp
public UIntPtr DrawWireCylinder(Vector vecStart, Vector vecEnd, double dRad)

```

#### Parameters

`vecStart` Vector

The start point

`vecEnd` Vector

The end point

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

The radius

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawWireSphere_VM_Vector_System_Double_"></a> DrawWireSphere(Vector, double)

```csharp
public UIntPtr DrawWireSphere(Vector vecCenter, double dRad)

```

#### Parameters

`vecCenter` Vector

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

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_DrawWireSphere_VM_Vector_System_Double_VM_Vector_VM_Vector_"></a> DrawWireSphere(Vector, double, Vector, Vector)

```csharp
public UIntPtr DrawWireSphere(Vector vecCenter, double dRad, Vector vecAxis, Vector vecOrtho)

```

#### Parameters

`vecCenter` Vector

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

`vecAxis` Vector

`vecOrtho` Vector

#### Returns

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

### <a id="VM_CAD_Kernel_Render_Canvas_EndGeometryEdit"></a> EndGeometryEdit()

End geometry for edit.

```csharp
public void EndGeometryEdit()

```

### <a id="VM_CAD_Kernel_Render_Canvas_FastDrawShell_System_UIntPtr_System_UInt64_System_UIntPtr_System_UInt64_System_Double_"></a> FastDrawShell(UIntPtr, ulong, UIntPtr, ulong, double)

Draw shell (fast).

```csharp
public void FastDrawShell(UIntPtr points, ulong nPoints, UIntPtr connectivities, ulong nConnectivities, double dScale)

```

#### Parameters

`points` [UIntPtr](https://learn.microsoft.com/dotnet/api/system.uintptr)

The points array

`nPoints` [ulong](https://learn.microsoft.com/dotnet/api/system.uint64)

The number of points

`connectivities` [UIntPtr](https://learn.microsoft.com/dotnet/api/system.uintptr)

The connectivities array

`nConnectivities` [ulong](https://learn.microsoft.com/dotnet/api/system.uint64)

The number of connectivities

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

The scale

### <a id="VM_CAD_Kernel_Render_Canvas_FastDrawShellWithFaceNormal_System_UIntPtr_System_UInt64_System_UIntPtr_System_UInt64_"></a> FastDrawShellWithFaceNormal(UIntPtr, ulong, UIntPtr, ulong)

Draw shell with face normal (fast).

```csharp
public void FastDrawShellWithFaceNormal(UIntPtr points, ulong nPoints, UIntPtr connectivities, ulong nConnectivities)

```

#### Parameters

`points` [UIntPtr](https://learn.microsoft.com/dotnet/api/system.uintptr)

The points array

`nPoints` [ulong](https://learn.microsoft.com/dotnet/api/system.uint64)

The number of points

`connectivities` [UIntPtr](https://learn.microsoft.com/dotnet/api/system.uintptr)

The connectivities array

`nConnectivities` [ulong](https://learn.microsoft.com/dotnet/api/system.uint64)

The number of connectivities

### <a id="VM_CAD_Kernel_Render_Canvas_GetExtension__1"></a> GetExtension()

Get canvas extension

```csharp
public T GetExtension<t>() where T : KernelExtension

```

#### Returns

T

The canvas extension

#### Type Parameters

`T`

The type of the canvas extension

### <a id="VM_CAD_Kernel_Render_Canvas_GetExtension__1_System_String_"></a> GetExtension(string)

Get canvas extension

```csharp
public T GetExtension<t>(string strExtensionName) where T : KernelExtension

```

#### Parameters

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

The name of the canvas extension.

#### Returns

T

The canvas extension

#### Type Parameters

`T`

The type of the canvas extension

### <a id="VM_CAD_Kernel_Render_Canvas_GetSubCanvas_System_String_"></a> GetSubCanvas(string)

Get sub canvas.

```csharp
public Canvas GetSubCanvas(string strCanvasName)

```

#### Parameters

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

The canvas name

#### Returns

[Canvas](VM.CAD.Kernel.Render.Canvas.md)

### <a id="VM_CAD_Kernel_Render_Canvas_IgnoreDepthTest"></a> IgnoreDepthTest()

Ignore depth test.

```csharp
public void IgnoreDepthTest()

```

### <a id="VM_CAD_Kernel_Render_Canvas_SetMarkerSymbol_VM_CAD_Kernel_Render_MarkerType_System_Double_"></a> SetMarkerSymbol(MarkerType, double)

Set marker symbol.

```csharp
public void SetMarkerSymbol(MarkerType type, double dSize = -1)

```

#### Parameters

`type` [MarkerType](VM.CAD.Kernel.Render.MarkerType.md)

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

The marker size. If it is negative value, default value will be used.

### <a id="VM_CAD_Kernel_Render_Canvas_SetModellingMatrix_VM_TMatrix_"></a> SetModellingMatrix(TMatrix)

Set modelling matrix.

```csharp
public void SetModellingMatrix(TMatrix mat)

```

#### Parameters

`mat` TMatrix

The transformation matrix

### <a id="VM_CAD_Kernel_Render_Canvas_SetScale_System_Double_System_Double_System_Double_"></a> SetScale(double, double, double)

Set scale.

```csharp
public void SetScale(double dX, double dY, double dZ)

```

#### Parameters

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

The X coordinate of scale

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

The Y coordinate of scale

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

The Z coordinate of scale

### <a id="VM_CAD_Kernel_Render_Canvas_SetWireframeMode_System_Boolean_System_Boolean_"></a> SetWireframeMode(bool, bool)

Set wireframe mode.

```csharp
public void SetWireframeMode(bool bWireframe, bool bVisibleEdge)

```

#### Parameters

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

Whether use wire frame mode

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

Whether visible edge

### <a id="VM_CAD_Kernel_Render_Canvas_StartGeometryEdit_System_UIntPtr_"></a> StartGeometryEdit(UIntPtr)

Start geometry for edit.

```csharp
public void StartGeometryEdit(UIntPtr pKeyGeom)

```

#### Parameters

`pKeyGeom` [UIntPtr](https://learn.microsoft.com/dotnet/api/system.uintptr)

The geometry key

### <a id="VM_CAD_Kernel_Render_Canvas_TrimNurbs_System_Int32_System_Int32_System_Collections_Generic_ICollection_VM_Vector__System_Collections_Generic_ICollection_System_Single__System_Collections_Generic_ICollection_System_Single__System_Double_System_Double_"></a> TrimNurbs(int, int, ICollection, ICollection, ICollection, double, double)

Trim nurbs.

```csharp
public void TrimNurbs(int degree, int cpcount, ICollection<vector> ctrlPts, ICollection<float> weights, ICollection<float> knots, double start_u, double end_u)

```

#### Parameters

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

Degree of the curve

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

Number of valid points in control\_points

`ctrlPts` [ICollection](https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1)

The points

`weights` [ICollection](https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1)[float](https://learn.microsoft.com/dotnet/api/system.single)&amp;gt;

Control point weights

`knots` [ICollection](https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1)[float](https://learn.microsoft.com/dotnet/api/system.single)&amp;gt;

Knot sequence

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

Start parameter

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

End parameter

### <a id="VM_CAD_Kernel_Render_Canvas_TrimNurbs_System_Int32_System_Int32_VM_Vector___System_Single___System_Single___System_Double_System_Double_"></a> TrimNurbs(int, int, Vector\[\], float\[\], float\[\], double, double)

Trim nurbs.

```csharp
public void TrimNurbs(int degree, int cpcount, Vector[] ctrlPts, float[] weights, float[] knots, double start_u, double end_u)

```

#### Parameters

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

Degree of the curve

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

Number of valid points in control\_points

`ctrlPts` Vector\[\]

The points

`weights` [float](https://learn.microsoft.com/dotnet/api/system.single)\[\]

Control point weights

`knots` [float](https://learn.microsoft.com/dotnet/api/system.single)\[\]

Knot sequence

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

Start parameter

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

End parameter