DisplayPipeline

References
public sealed class DisplayPipeline

The display pipeline calls events during specific phases of drawing During the drawing of a single frame the events are called in the following order.

[Begin Drawing of a Frame]
  • CalculateBoundingBox
  • CalculateClippingPanes
  • SetupFrustum
  • SetupLighting
  • InitializeFrameBuffer
  • DrawBackground
  • If this is a layout and detail objects exist the channels are called in the same order for each detail object (drawn as a nested viewport)
  • PreDrawObjects
  • For Each Visible Non Highlighted Object
  • PostDrawObjects - depth writing/testing on
  • DrawForeGround - depth writing/testing off
  • For Each Visible Highlighted Object
  • PostProcessFrameBuffer (If a delegate exists that requires this)
  • DrawOverlay (if Rhino is in a feedback mode)
[End of Drawing of a Frame]

NOTE: There may be multiple DrawObject calls for a single object. An example of when this could happen would be with a shaded sphere. The shaded mesh is first drawn and these channels would be processed; then at a later time the isocurves for the sphere would be drawn.

Properties

ActiveObject

#Since v6.7
public RhinoObject ActiveObject { get; }

ActiveObjectNestingLevel

#Since v6.7
public int ActiveObjectNestingLevel { get; }

ActiveObjectNestingStack

#Since v6.7
public RhinoObject[] ActiveObjectNestingStack { get; }

ActiveTopLevelObject

#Since v6.7
public RhinoObject ActiveTopLevelObject { get; }

DefaultCurveThickness

#Since v5.0
public int DefaultCurveThickness { get; }
Gets the curve thickness as defined by the current display mode. Note: this only applies to curve objects, Brep and Mesh wires may have different settings.

DepthMode

#Since v5.0
public DepthMode DepthMode { get; set; }

DisplayPipelineAttributes

#Since v5.3
public DisplayPipelineAttributes DisplayPipelineAttributes { get; }

DpiScale

#Since v6.0
public float DpiScale { get; }
Scale factor used for high resolution displays. When a monitor that this pipeline is drawing to is at a DPI of 96, this value is one. On high DPI monitors, this value will commonly be greater than one.

DrawingGrips

#Since v5.0
public bool DrawingGrips { get; }
Gets a value that indicates whether the pipeline is currently in a grip drawing operation.

DrawingSurfaces

#Since v5.0
public bool DrawingSurfaces { get; }
Gets a value that indicates whether the pipeline is currently in a surface drawing operation. Surface drawing means draw the shaded triangles of a mesh representing the surface (mesh, extrusion, or brep). This is useful when inside of a draw event or display conduit to check and see if the geometry is about to be drawn as a shaded set of triangles representing the geometry. See DrawingWires to check and see if the wireframe representation of the geometry is going to be drawn.

DrawingWires

#Since v5.0
public bool DrawingWires { get; }
Gets a value that indicates whether the pipeline is currently in a curve drawing operation. This is useful when inside of a draw event or display conduit to check and see if the geometry is about to be drawn is going to be drawing the wire representation of the geometry (mesh, extrusion, or brep). See DrawingSurfaces to check and see if the shaded mesh representation of the geometry is going to be drawn.

FrameBuffer

#Since v6.0
public Bitmap FrameBuffer { get; }
Gets the contents of the frame buffer that this pipeline is drawing to.

FrameSize

#Since v5.0
public Size FrameSize { get; }
Gets the size of the frame buffer that this pipeline is drawing to.

IsDynamicDisplay

#Since v5.0
public bool IsDynamicDisplay { get; }
Gets a value that indicates whether the viewport is in Dynamic Display state. Dynamic display is the state a viewport is in when it is rapidly redrawing because of an operation like panning or rotating. The pipeline will drop some level of detail while inside a dynamic display state to keep the frame rate as high as possible.

IsInViewCapture

#Since v6.0
public bool IsInViewCapture { get; }
Gets a value that indicates whether this pipeline is currently drawing for ViewCaptureToFile or ViewCaptureToClipboard

IsOpen

#Since v7.0
public bool IsOpen { get; }
Is true of the pipeline is open, false otherwise.

IsOpenGL

#Since v5.0
public bool IsOpenGL { get; }
Gets a value indicating whether or not this pipeline is drawing into an OpenGL context.

IsPrinting

#Since v5.0
public bool IsPrinting { get; }
Gets a value that indicates whether this pipeline is currently drawing for printing purposes.

IsStereoMode

#Since v5.0
public bool IsStereoMode { get; }
Gets a value that indicates whether this pipeline is currently using an engine that is performing stereo style drawing. Stereo drawing is for providing an "enhanced 3-D" effect through stereo viewing devices.

ModelTransform

#Since v5.0
public Transform ModelTransform { get; set; }
Gets or sets the current model transformation that is applied to vertices when drawing.

ModelTransformIsIdentity

#Since v5.0
public bool ModelTransformIsIdentity { get; }
Gets a value that indicates whether the Model Transform is an Identity transformation.

NestLevel

#Since v5.0
public int NestLevel { get; }
Gets the current nested viewport drawing level. This is used to know if you are currently inside the drawing of a nested viewport (detail object in Rhino).

Nest level = 0 Drawing is occurring in a standard Rhino viewport or on the page viewport.

Nest level = 1 Drawing is occurring inside a detail view object.

RenderPass

#Since v5.0
public int RenderPass { get; }
Gets the current pass that the pipeline is in for drawing a frame. Typically drawing a frame requires a single pass through the DrawFrameBuffer function, but some special display effects can be achieved through drawing with multiple passes.

ShadingRequired

#Since v5.0
public bool ShadingRequired { get; set; }
Gets or sets the "ShadingRequired" flag. This flag gets set inside the pipeline when a request is made to draw a shaded mesh but the current render engine doesn't support shaded mesh drawing...at this point the redraw mechanism will make sure everything will work the next time around.

StereoProjection

#Since v5.0
public int StereoProjection { get; }
Gets the current stereo projection if stereo mode is on.

0 = left

1 = right

If stereo mode is not enables, this property always returns 0.

SupportsShading

#Since v5.0
public bool SupportsShading { get; }
Gets whether or not this pipeline supports shaded meshes.

Technology

#Since v8.35
public DisplayTechnology Technology { get; }
Get the GPU technology that this pipeline is actively using

Viewport

#Since v5.0
public RhinoViewport Viewport { get; }

ZBiasMode

#Since v5.0
public ZBiasMode ZBiasMode { get; set; }

Methods

AddClippingPlane

#Since v6.3
public int AddClippingPlane(Point3d point, Vector3d normal)
Add a clipping plane to be used during the drawing of this frame
point (Point3d)point on the plane
normal (Vector3d)vector perpendicular to the plane
index for the added clipping plane

AvailableOpenGLVersion

#Since v6.21
[CLSCompliant(false)] public static uint AvailableOpenGLVersion(out bool coreProfile)
If Rhino is using OpenGL for display, this function will return major.minor version of OpenGL available for this instance of Rhino
coreProfile (out bool)If true, OpenGL is being used in "core profile" mode
major version * 10 + minor version For example, OpenGL 4.5 returns 45

ClearFrameBuffer

#Since v8.0
public void ClearFrameBuffer(Color color)
Fill the frame buffer with a single color. This function also clears the depth buffer for engines that support depth buffered drawing.
color (Color)the color to fill the frame buffer with

Clone

#Since v7.0
public DisplayPipeline Clone(RhinoViewport viewport)
Clones the pipeline. Creates an identical copy of "this" pipeline. Copies all conduits from "this" pipeline to the new pipeline.
viewport (RhinoViewport)
The newly cloned pipeline if successful, null otherwise. or failed to close.

Close

#Since v7.0
public bool Close()
Closes the pipeline.
True if the pipeline was closed, false if it was already closed or failed to close.

CullControlPolygon

#Since v5.0
public static bool CullControlPolygon()
Returns a value indicating if only points on the side of the surface that face the camera are displayed.
true if back faces of surface and mesh control polygons are culled. This value is determined by the _CullControlPolygon command.

Draw2dLine

#Since v6.0
public void Draw2dLine(Point from, Point to, Color color, float thickness)
from (Point)
to (Point)
color (Color)
thickness (float)

Draw2dLine

#Since v9.0
public void Draw2dLine(Point2f from, Point2f to, DisplayPen pen)
Draws a line whose coordinates are viewport pixels rather than world units. The origin is the top left of the frame, with y increasing downwards - the same space Draw2dText and DrawBitmap work in.
from (Point2f)Start of the line, in screen coordinates.
to (Point2f)End of the line, in screen coordinates.
pen (DisplayPen)Pen to stroke the line with.

Draw2dLine

#Since v6.0
public void Draw2dLine(PointF from, PointF to, Color color, float thickness)
from (PointF)
to (PointF)
color (Color)
thickness (float)

Draw2dLine

#Since v9.0
public void Draw2dLine(PointF from, PointF to, DisplayPen pen)
Draws a line whose coordinates are viewport pixels rather than world units. The origin is the top left of the frame, with y increasing downwards - the same space Draw2dText and DrawBitmap work in.
from (PointF)Start of the line, in screen coordinates.
to (PointF)End of the line, in screen coordinates.
pen (DisplayPen)Pen to stroke the line with.

Draw2dPolyline

#Since v9.0
public void Draw2dPolyline(Point2f[] points, DisplayPen pen, bool closed)
Draws a polyline whose coordinates are viewport pixels rather than world units. The origin is the top left of the frame, with y increasing downwards - the same space Draw2dText and DrawBitmap work in.
points (Point2f[])The polyline vertices, in screen coordinates. Fewer than two draws nothing.
pen (DisplayPen)Pen to stroke the polyline with.
closed (bool)When true the polyline is closed back to its first point as part of the same figure, so that corner is stroked as a join rather than as two loose ends. Do not repeat the first point at the end when passing true.

Draw2dPolyline

#Since v9.0
public void Draw2dPolyline(Point2f[] points, DisplayPen pen)
Draws a polyline whose coordinates are viewport pixels rather than world units. The origin is the top left of the frame, with y increasing downwards - the same space Draw2dText and DrawBitmap work in.
points (Point2f[])The polyline vertices, in screen coordinates. Fewer than two draws nothing.
pen (DisplayPen)Pen to stroke the polyline with.

Draw2dRectangle

#Since v5.10
public void Draw2dRectangle(Rectangle rectangle, Color strokeColor, int thickness, Color fillColor)
rectangle (Rectangle)
strokeColor (Color)
thickness (int)
fillColor (Color)

Draw2dText

#Since v5.0
public void Draw2dText(string text, Color color, Point2d screenCoordinate, bool middleJustified, int height, string fontface)
Draws 2D text on the viewport.
text (string)the string to draw.
color (Color)text color.
screenCoordinate (Point2d)definition point in screen coordinates (0,0 is top-left corner)
middleJustified (bool)if true text is centered around the definition point, otherwise it is lower-left justified.
height (int)height in pixels (good default is 12)
fontface (string)font name (good default is "Arial")

Draw2dText

#Since v5.0
public void Draw2dText(string text, Color color, Point2d screenCoordinate, bool middleJustified, int height)
Draws 2D text on the viewport.
text (string)the string to draw.
color (Color)text color.
screenCoordinate (Point2d)definition point in screen coordinates (0,0 is top-left corner)
middleJustified (bool)if true text is centered around the definition point, otherwise it is lower-left justified.
height (int)height in pixels (good default is 12)

Draw2dText

#ExampleSince v5.0
public void Draw2dText(string text, Color color, Point2d screenCoordinate, bool middleJustified)
Draws 2D text on the viewport.
text (string)the string to draw.
color (Color)text color.
screenCoordinate (Point2d)definition point in screen coordinates (0,0 is top-left corner)
middleJustified (bool)if true text is centered around the definition point, otherwise it is lower-left justified.

Draw2dText

#Since v9.0
public void Draw2dText(string text, Color color, Point2d screenCoordinate, TextHorizontalAlignment horizontalAlignment, TextVerticalAlignment verticalAlignment, float height, string fontface, bool bold, bool italic, bool underline, bool strikethrough, bool applyKerning)
Draws 2D text on the viewport.
text (string)The string to draw.
color (Color)Text color.
screenCoordinate (Point2d)Definition point in screen coordinates (0,0 is top-left corner). The alignment attaches to this point.
horizontalAlignment (TextHorizontalAlignment)Where the definition point sits across the text's horizontal advance.
verticalAlignment (TextVerticalAlignment)Where the definition point sits down the text's lines. BottomOfTop puts the first line's baseline on the point; Top puts the top of a capital there, which is what the middleJustified=false overloads draw.
height (float)Height in pixels (good default is 12).
fontface (string)Font name (good default is "Arial").
bold (bool)If true, the bold face of the font family is used.
italic (bool)If true, the italic face of the font family is used.
underline (bool)If true, the text is underlined.
strikethrough (bool)If true, the text is struck through.
applyKerning (bool)If true, the font's kerning pairs are used to space the glyphs.

Draw2dText

#Since v5.0
public void Draw2dText(string text, Color color, Point3d worldCoordinate, bool middleJustified, int height, string fontface)
Draws 2D text on the viewport.
text (string)The string to draw.
color (Color)Text color.
worldCoordinate (Point3d)Definition point in world coordinates.
middleJustified (bool)If true text is centered around the definition point, otherwise it is lower-left justified.
height (int)Height in pixels (good default is 12).
fontface (string)Font name (good default is "Arial").

Draw2dText

#Since v5.0
public void Draw2dText(string text, Color color, Point3d worldCoordinate, bool middleJustified, int height)
Draws 2D text on the viewport.
text (string)the string to draw.
color (Color)text color.
worldCoordinate (Point3d)definition point in world coordinates.
middleJustified (bool)if true text is centered around the definition point, otherwise it is lower-left justified.
height (int)height in pixels (good default is 12)

Draw2dText

#Since v5.0
public void Draw2dText(string text, Color color, Point3d worldCoordinate, bool middleJustified)
Draws 2D text on the viewport.
text (string)the string to draw.
color (Color)text color.
worldCoordinate (Point3d)definition point in world coordinates.
middleJustified (bool)if true text is centered around the definition point, otherwise it is lower-left justified.

Draw2dText

#Since v9.0
public void Draw2dText(string text, Color color, Point3d worldCoordinate, TextHorizontalAlignment horizontalAlignment, TextVerticalAlignment verticalAlignment, float height, string fontface, bool bold, bool italic, bool underline, bool strikethrough, bool applyKerning)
Draws 2D text on the viewport.
text (string)The string to draw.
color (Color)Text color.
worldCoordinate (Point3d)Definition point in world coordinates. The alignment attaches to this point.
horizontalAlignment (TextHorizontalAlignment)Where the definition point sits across the text's horizontal advance.
verticalAlignment (TextVerticalAlignment)Where the definition point sits down the text's lines. BottomOfTop puts the first line's baseline on the point; Top puts the top of a capital there, which is what the middleJustified=false overloads draw.
height (float)Height in pixels (good default is 12).
fontface (string)Font name (good default is "Arial").
bold (bool)If true, the bold face of the font family is used.
italic (bool)If true, the italic face of the font family is used.
underline (bool)If true, the text is underlined.
strikethrough (bool)If true, the text is struck through.
applyKerning (bool)If true, the font's kerning pairs are used to space the glyphs.

Draw3dText

#Since v6.4
public void Draw3dText(string text, Color color, Plane textPlane, double height, string fontface, bool bold, bool italic, TextHorizontalAlignment horizontalAlignment, TextVerticalAlignment verticalAlignment)
text (string)
color (Color)
textPlane (Plane)
height (double)
fontface (string)
bold (bool)
italic (bool)
horizontalAlignment (TextHorizontalAlignment)
verticalAlignment (TextVerticalAlignment)

Draw3dText

#Since v6.0
public void Draw3dText(string text, Color color, Plane textPlane, double height, string fontface, bool bold, bool italic)
text (string)
color (Color)
textPlane (Plane)
height (double)
fontface (string)
bold (bool)
italic (bool)

Draw3dText

#Since v5.0
public void Draw3dText(string text, Color color, Plane textPlane, double height, string fontface)
text (string)
color (Color)
textPlane (Plane)
height (double)
fontface (string)

Draw3dText

#Since v5.0
public void Draw3dText(Text3d text, Color color, Plane textPlane)
Draws 3d text with a different plane than what is defined in the Text3d class.
text (Text3d)The string to draw.
color (Color)Text color.
textPlane (Plane)The plane for the text object.

Draw3dText

#Since v5.0
public void Draw3dText(Text3d text, Color color, Point3d textPlaneOrigin)
Draws 3d text using the Text3d plane with an adjusted origin.
text (Text3d)The string to draw.
color (Color)Text color.
textPlaneOrigin (Point3d)The origin of the plane to draw.

Draw3dText

#Since v5.0
public void Draw3dText(Text3d text, Color color)
text (Text3d)
color (Color)

DrawActivePoint

#Since v6.0
public void DrawActivePoint(Point3d point)
Draws a point in style used during "GetPoint" operations
point (Point3d)Location of the point in world coordinates

DrawAnnotation

#Since v6.0
public void DrawAnnotation(AnnotationBase annotation, Color color)
annotation (AnnotationBase)
color (Color)

DrawAnnotation

#Since v9.0
public void DrawAnnotation(AnnotationBase annotation, RhinoObject parentObject, Color color)
Draws an annotation geometry while evaluating any embedded text fields (e.g. %<Date>%, %<DocumentText("...")>%) against the supplied parent RhinoObject. Intended for preview conduits that draw a modified copy of an annotation's geometry while the user is editing it — the regular geometry-only overload skips field evaluation because it has no display cache to anchor to.
annotation (AnnotationBase)
parentObject (RhinoObject)
color (Color)

DrawAnnotationArrowhead

#Since v6.0
public void DrawAnnotationArrowhead(Arrowhead arrowhead, Transform xform, Color color)
arrowhead (Arrowhead)
xform (Transform)
color (Color)

DrawArc

#Since v5.0
public void DrawArc(Arc arc, Color color, int thickness)
Draw a single arc object.
arc (Arc)Arc to draw.
color (Color)Color to draw with.
thickness (int)Thickness (in pixels) of arc.

DrawArc

#Since v5.0
public void DrawArc(Arc arc, Color color)
Draw a single arc object.
arc (Arc)Arc to draw.
color (Color)Color to draw with.

DrawArrow

#ExampleSince v5.0
public void DrawArrow(Line line, Color color, double screenSize, double relativeSize)
Draws a single arrow object. An arrow consists of a Shaft and an Arrow head at the end of the shaft.
line (Line)Arrow shaft.
color (Color)Color of arrow.
screenSize (double)If screenSize != 0.0 then the size (in screen pixels) of the arrow head will be equal to screenSize.
relativeSize (double)If relativeSize != 0.0 and screen size == 0.0 the size of the arrow head will be proportional to the arrow shaft length.

DrawArrow

#Since v5.0
public void DrawArrow(Line line, Color color)
Draws a single arrow object. An arrow consists of a Shaft and an Arrow head at the end of the shaft.
line (Line)Arrow shaft.
color (Color)Color of arrow.

DrawArrow

#Since v9.0
public void DrawArrow(Line line, double headSize, Color color, float shaftWidth)
Draw a Grasshopper 2 style vector arrow. This method is relatively slow as it requires the construction of a DisplayPen and a PolylineCurve. However it is more accurate than other arrow drawing methods in that the tip of the drawn arrow is very close to the actual end of the line, the tip is always sharp, and the arrow head is resized to never be too small or large. Also note this method already takes into account logical pixel scaling.
line (Line)Vector shaft to draw.
headSize (double)Size of the head as a factor of arrow length. 0.1 would be a decent size.
color (Color)Color of arrow geometry.
shaftWidth (float)Width of arrow geometry. Note that the shaft is drawn using a method which only supports integer thicknesses and the arrow head is drawn thicker to counter the human perception of seeing angled lines thinner than they really are.

DrawArrowHead

#Since v5.0
public void DrawArrowHead(Point3d tip, Vector3d direction, Color color, double screenSize, double worldSize)
Draws a single arrow head.
tip (Point3d)Point of arrow head tip.
direction (Vector3d)Direction in which arrow head is pointing.
color (Color)Color of arrow head.
screenSize (double)If screenSize != 0.0, then the size (in screen pixels) of the arrow head will be equal to the screenSize.
worldSize (double)If worldSize != 0.0 and screen size == 0.0 the size of the arrow head will be equal to the number of units in worldSize.

DrawArrows

#Since v5.0
public void DrawArrows(IEnumerable<Line> lines, Color color)
Draws a collection of arrow objects. An arrow consists of a Shaft and an Arrow head at the end of the shaft.
lines (IEnumerable<Line>)Arrow shafts.
color (Color)Color of arrows.

DrawArrows

#Since v5.0
public void DrawArrows(Line[] lines, Color color)
Draws a collection of arrow objects. An arrow consists of a Shaft and an Arrow head at the end of the shaft.
lines (Line[])Arrow shafts.
color (Color)Color of arrows.

DrawBitmap

#Since v9.0
public void DrawBitmap(DisplayBitmap bitmap, int left, int top, int width, int height, Transform2d transform)
Draws a bitmap in screen coordinates, scaled to fit the given size, through a 2d transform.
Remarks: The transform is honoured by the shader based display engines. The GDI engine and the fixed function OpenGL fallback blit the image at a screen position and have no matrix to apply it with, so on those the bitmap is drawn untransformed.
bitmap (DisplayBitmap)bitmap to draw
left (int)where the left edge of the bitmap should appear in screen coordinates
top (int)where the top edge of the bitmap should appear in screen coordinates
width (int)width (in pixels) to draw the bitmap at
height (int)height (in pixels) to draw the bitmap at
transform (Transform2d)A 2d transform applied to the destination rectangle when the bitmap is drawn, in viewport pixels - the same space left, top, width and height are in. It moves the rectangle the image lands on and nothing else, so a rotation, a shear or a non-uniform scale all work and the image is resampled to suit.

DrawBitmap

#Since v9.0
public void DrawBitmap(DisplayBitmap bitmap, int left, int top, int width, int height)
Draws a bitmap in screen coordinates, scaled to fit the given size.
bitmap (DisplayBitmap)bitmap to draw
left (int)where the left edge of the bitmap should appear in screen coordinates
top (int)where the top edge of the bitmap should appear in screen coordinates
width (int)width (in pixels) to draw the bitmap at
height (int)height (in pixels) to draw the bitmap at

DrawBitmap

#ExampleSince v5.10
public void DrawBitmap(DisplayBitmap bitmap, int left, int top)
Draws a bitmap in screen coordinates
bitmap (DisplayBitmap)bitmap to draw
left (int)where top/left corner of bitmap should appear in screen coordinates
top (int)where top/left corner of bitmap should appear in screen coordinates

DrawBox

#Since v5.0
public void DrawBox(BoundingBox box, Color color, int thickness)
Draws the edges of a BoundingBox.
box (BoundingBox)Box to draw.
color (Color)Color to draw in.
thickness (int)Thickness (in pixels) of box edges.

DrawBox

#Since v5.0
public void DrawBox(BoundingBox box, Color color)
Draws the edges of a BoundingBox.
box (BoundingBox)Box to draw.
color (Color)Color to draw in.

DrawBox

#Since v5.0
public void DrawBox(Box box, Color color, int thickness)
Draws the edges of a Box object.
box (Box)Box to draw.
color (Color)Color to draw in.
thickness (int)Thickness (in pixels) of box edges.

DrawBox

#Since v5.0
public void DrawBox(Box box, Color color)
Draws the edges of a Box object.
box (Box)Box to draw.
color (Color)Color to draw in.

DrawBoxCorners

#Since v5.0
public void DrawBoxCorners(BoundingBox box, Color color, double size, int thickness)
Draws corner widgets of a world aligned bounding box.
box (BoundingBox)Box to draw.
color (Color)Color to draw with.
size (double)Size (in model units) of the corner widgets.
thickness (int)Thickness (in pixels) of the corner widgets.

DrawBoxCorners

#Since v5.0
public void DrawBoxCorners(BoundingBox box, Color color, double size)
Draws corner widgets of a world aligned bounding box.
box (BoundingBox)Box to draw.
color (Color)Color to draw with.
size (double)Size (in model units) of the corner widgets.

DrawBoxCorners

#Since v5.0
public void DrawBoxCorners(BoundingBox box, Color color)
Draws corner widgets of a world aligned bounding box. Widget size will be 5% of the Box diagonal.
box (BoundingBox)Box to draw.
color (Color)Color to draw with.

DrawBrepShaded

#Since v5.0
public void DrawBrepShaded(Brep brep, DisplayMaterial material)
Draws a shaded mesh representation of a brep.
brep (Brep)Brep to draw.
material (DisplayMaterial)Material to draw faces with.

DrawBrepWires

#Since v5.0
public void DrawBrepWires(Brep brep, Color color, int wireDensity)
Draws all the wireframe curves of a brep object.
brep (Brep)Brep to draw.
color (Color)Color of Wireframe curves.
wireDensity (int)"Density" of wireframe curves.

-1 = no internal wires.

0 = default internal wires.

>0 = custom high density.

DrawBrepWires

#Since v5.0
public void DrawBrepWires(Brep brep, Color color)
Draws all the wireframe curves of a brep object.
brep (Brep)Brep to draw.
color (Color)Color of Wireframe curves.

DrawCircle

#Since v5.0
public void DrawCircle(Circle circle, Color color, int thickness)
Draw a single circle object.
circle (Circle)Circle to draw.
color (Color)Color to draw with.
thickness (int)Thickness (in pixels) of circle.

DrawCircle

#ExampleSince v5.0
public void DrawCircle(Circle circle, Color color)
Draw a single circle object.
circle (Circle)Circle to draw.
color (Color)Color to draw with.

DrawClippingPlaneWires

#Since v9.0
public void DrawClippingPlaneWires(ClippingPlaneSurface clippingPlane, Color color)
Draw a cipping plane
clippingPlane (ClippingPlaneSurface)
color (Color)

DrawCone

#Since v5.0
public void DrawCone(Cone cone, Color color, int thickness)
Draw a wireframe cone.
cone (Cone)Cone to draw.
color (Color)Color to draw with.
thickness (int)Thickness (in pixels) of Cone wires.

DrawCone

#Since v5.0
public void DrawCone(Cone cone, Color color)
Draw a wireframe cone.
cone (Cone)Cone to draw.
color (Color)Color to draw with.

DrawConstructionPlane

#Since v5.0
public void DrawConstructionPlane(ConstructionPlane constructionPlane)
Draws a construction plane.
constructionPlane (ConstructionPlane)The construction plane to draw.

DrawCurvatureGraph

#Since v5.0
public void DrawCurvatureGraph(Curve curve, Color color, int hairScale, int hairDensity, int sampleDensity)
Draw a typical Rhino Curvature Graph.
curve (Curve)Base curve for curvature graph.
color (Color)Color of curvature graph.
hairScale (int)100 = true length, > 100 magnified, < 100 shortened.
hairDensity (int)>= 0 larger numbers = more hairs (good default is 1).
sampleDensity (int)Between 1 and 10. Higher numbers draw smoother outer curves. (good default is 2).

DrawCurvatureGraph

#Since v5.0
public void DrawCurvatureGraph(Curve curve, Color color, int hairScale)
Draw a typical Rhino Curvature Graph.
curve (Curve)Base curve for curvature graph.
color (Color)Color of curvature graph.
hairScale (int)100 = true length, > 100 magnified, < 100 shortened.

DrawCurvatureGraph

#Since v5.0
public void DrawCurvatureGraph(Curve curve, Color color)
Draw a typical Rhino Curvature Graph.
curve (Curve)Base curve for curvature graph.
color (Color)Color of curvature graph.

DrawCurvaturePreview

#Since v9.0
public void DrawCurvaturePreview(Brep brep, Color color)
Draws a Brep in Curvature Analysis preview.
brep (Brep)Brep to draw.
color (Color)Objct color.

DrawCurvaturePreview

#Since v9.0
public void DrawCurvaturePreview(Mesh mesh, Color color)
Draws a Mesh in Curvature Analysis preview.
mesh (Mesh)Mesh to draw.
color (Color)Objct color.

DrawCurve

#Since v5.0
public void DrawCurve(Curve curve, Color color, int thickness)
Draw a single Curve object.
curve (Curve)Curve to draw.
color (Color)Color to draw with.
thickness (int)Thickness (in pixels) of curve.

DrawCurve

#Since v5.0
public void DrawCurve(Curve curve, Color color)
Draw a single Curve object.
curve (Curve)Curve to draw.
color (Color)Color to draw with.

DrawCurve

#Since v8.0
public void DrawCurve(Curve curve, DisplayPen pen)
curve (Curve)
pen (DisplayPen)

DrawCylinder

#Since v5.0
public void DrawCylinder(Cylinder cylinder, Color color, int thickness)
Draw a wireframe cylinder.
cylinder (Cylinder)Cylinder to draw.
color (Color)Color to draw with.
thickness (int)Thickness (in pixels) of cylinder wires.

DrawCylinder

#Since v5.0
public void DrawCylinder(Cylinder cylinder, Color color)
Draw a wireframe cylinder.
cylinder (Cylinder)Cylinder to draw.
color (Color)Color to draw with.

DrawDirectionArrow

#Since v5.0
public void DrawDirectionArrow(Point3d location, Vector3d direction, Color color)
location (Point3d)
direction (Vector3d)
color (Color)

DrawDot

#Since v6.0
public void DrawDot(float screenX, float screenY, string text, Color dotColor, Color textColor)
Draws a text dot in screen coordinates.
screenX (float)X coordinate (in pixels) of dot center.
screenY (float)Y coordinate (in pixels) of dot center.
text (string)Text content of dot.
dotColor (Color)Dot background color.
textColor (Color)Dot foreground color.

DrawDot

#Since v6.0
public void DrawDot(float screenX, float screenY, string text)
Draws a text dot in screen coordinates.
screenX (float)X coordinate (in pixels) of dot center.
screenY (float)Y coordinate (in pixels) of dot center.
text (string)Text content of dot.

DrawDot

#Since v5.0
public void DrawDot(Point3d worldPosition, string text, Color dotColor, Color textColor)
Draw a text dot in world coordinates.
worldPosition (Point3d)Location of dot in world coordinates.
text (string)Text content of dot.
dotColor (Color)Dot background color.
textColor (Color)Dot foreground color.

DrawDot

#Since v5.0
public void DrawDot(Point3d worldPosition, string text)
Draws a text dot in world coordinates.
worldPosition (Point3d)Location of dot in world coordinates.
text (string)Text content of dot.

DrawDot

#Since v6.0
public void DrawDot(TextDot dot, Color fillColor, Color textColor, Color borderColor)
Draw a text dot as defined by the text dot class
dot (TextDot)
fillColor (Color)
textColor (Color)
borderColor (Color)

DrawDottedLine

#Since v5.0
public void DrawDottedLine(Line line, Color color)
Draws a single dotted line.
line (Line)Line to draw.
color (Color)Color of line.

DrawDottedLine

#Since v5.0
public void DrawDottedLine(Point3d from, Point3d to, Color color)
Draws a single dotted line.
from (Point3d)Line start point.
to (Point3d)Line end point.
color (Color)Color of line.

DrawDottedPolyline

#Since v5.0
public void DrawDottedPolyline(IEnumerable<Point3d> points, Color color, bool close)
Draws a set of connected lines (polyline) in a dotted pattern (0x00001111).
points (IEnumerable<Point3d>)End points of each line segment.
color (Color)Color of polyline.
close (bool)Draw a line between the first and last points.

DrawDraftAnglePreview

#Since v9.0
public void DrawDraftAnglePreview(Brep brep, Color color)
Draws a Brep in Draft Angle preview.
brep (Brep)Brep to draw.
color (Color)Objct color.

DrawDraftAnglePreview

#Since v9.0
public void DrawDraftAnglePreview(Mesh mesh, Color color)
Draws a Mesh in Draft Angle preview.
mesh (Mesh)Mesh to draw.
color (Color)Objct color.

DraweInferencePoint

#Since v8.17
public void DraweInferencePoint(Point3d P, Color color)
Draw inference point used in gesture based snapping
P (Point3d)Location of point in world coordinates
color (Color)Color of the point

DrawEmapPreview

#Since v9.0
public void DrawEmapPreview(Brep brep, Color color, EmapAnalysisSettingsState settings)
Draws a Brep in Environment Map preview with a texture of your own, instead of the one in EmapAnalysisSettings.
brep (Brep)Brep to draw.
color (Color)Object color.
settings (EmapAnalysisSettingsState)Settings for this call only. Get a copy of the current ones from EmapAnalysisSettings.GetCurrentState() and change what you need. A null or empty EmapAnalysisSettingsState.FileName keeps the texture the application settings name.

DrawEmapPreview

#Since v9.0
public void DrawEmapPreview(Brep brep, Color color)
Draws a Brep in Environment Map preview.
brep (Brep)Brep to draw.
color (Color)Objct color.

DrawEmapPreview

#Since v9.0
public void DrawEmapPreview(Mesh mesh, Color color, EmapAnalysisSettingsState settings)
Draws a Mesh in Environment Map preview with a texture of your own, instead of the one in EmapAnalysisSettings.
mesh (Mesh)Mesh to draw.
color (Color)Object color.
settings (EmapAnalysisSettingsState)Settings for this call only. Get a copy of the current ones from EmapAnalysisSettings.GetCurrentState() and change what you need. A null or empty EmapAnalysisSettingsState.FileName keeps the texture the application settings name.

DrawEmapPreview

#Since v9.0
public void DrawEmapPreview(Mesh mesh, Color color)
Draws a Mesh in Environment Map preview.
mesh (Mesh)Mesh to draw.
color (Color)Objct color.

DrawExtrusionWires

#Since v6.0
public void DrawExtrusionWires(Extrusion extrusion, Color color, int wireDensity)
Draws all the wireframe curves of an extrusion object.
extrusion (Extrusion)Extrusion to draw.
color (Color)Color of Wireframe curves.
wireDensity (int)"Density" of wireframe curves.

-1 = no internal wires.

0 = default internal wires.

>0 = custom high density.

DrawExtrusionWires

#Since v6.0
public void DrawExtrusionWires(Extrusion extrusion, Color color)
Draws all the wireframe curves of an extrusion object.
extrusion (Extrusion)Extrusion to draw.
color (Color)Color of Wireframe curves.

DrawGradientHatch

#Since v7.0
public void DrawGradientHatch(Hatch hatch, Color color1, Color color2, Point3d point1, Point3d point2, bool linearGradient, float boundaryThickness, Color boundaryColor)
Draw a two point gradient filled hatch
hatch (Hatch)
color1 (Color)
color2 (Color)
point1 (Point3d)
point2 (Point3d)
linearGradient (bool)
boundaryThickness (float)
boundaryColor (Color)

DrawGradientHatch

#Since v8.0
public void DrawGradientHatch(Hatch hatch, IEnumerable<ColorStop> stops, Point3d point1, Point3d point2, bool linearGradient, float repeat, DisplayPen boundary, Color backgroundFillColor)
hatch (Hatch)
stops (IEnumerable<ColorStop>)
point1 (Point3d)
point2 (Point3d)
linearGradient (bool)
repeat (float)
boundary (DisplayPen)
backgroundFillColor (Color)

DrawGradientHatch

#Since v7.0
public void DrawGradientHatch(Hatch hatch, IEnumerable<ColorStop> stops, Point3d point1, Point3d point2, bool linearGradient, float repeat, float boundaryThickness, Color boundaryColor)
hatch (Hatch)
stops (IEnumerable<ColorStop>)
point1 (Point3d)
point2 (Point3d)
linearGradient (bool)
repeat (float)
boundaryThickness (float)
boundaryColor (Color)

DrawGradientLines

#Since v7.0
public void DrawGradientLines(IEnumerable<Line> lines, float strokeWidth, IEnumerable<ColorStop> stops, Point3d point1, Point3d point2, bool linearGradient, float repeat)
lines (IEnumerable<Line>)
strokeWidth (float)
stops (IEnumerable<ColorStop>)
point1 (Point3d)
point2 (Point3d)
linearGradient (bool)
repeat (float)

DrawGradientMesh

#Since v7.0
public void DrawGradientMesh(Mesh mesh, IEnumerable<ColorStop> stops, Point3d point1, Point3d point2, bool linearGradient, float repeat)
mesh (Mesh)
stops (IEnumerable<ColorStop>)
point1 (Point3d)
point2 (Point3d)
linearGradient (bool)
repeat (float)

DrawHatch

#Since v6.0
public void DrawHatch(Hatch hatch, Color hatchColor, Color boundaryColor)
hatch (Hatch)
hatchColor (Color)
boundaryColor (Color)

DrawHatch

#Since v8.0
public void DrawHatch(Hatch hatch, Color hatchColor, DisplayPen boundary, Color backgroundFillColor)
hatch (Hatch)
hatchColor (Color)
boundary (DisplayPen)
backgroundFillColor (Color)

DrawInferenceLine

#Since v8.17
public void DrawInferenceLine(Point3d P, Point3d O, Color color, InferenceLineType type)
Draw an inference line used in gesture based snapping
P (Point3d)First point used to define the line in world coordinates
O (Point3d)Second point used to define the line in world coordinates
color (Color)Color of line
type (DisplayPipeline.InferenceLineType)Type of line DisplayPipeline.InferenceLineType

DrawInstanceDefinition

#Since v7.15
public void DrawInstanceDefinition(InstanceDefinition instanceDefinition, Transform xform)
instanceDefinition (InstanceDefinition)The instance definition.
xform (Transform)The transformation.

DrawInstanceDefinition

#Since v7.15
public void DrawInstanceDefinition(InstanceDefinition instanceDefinition)
instanceDefinition (InstanceDefinition)The instance definition.

DrawInstanceDefinitionShaded

#Since v7.15
public void DrawInstanceDefinitionShaded(InstanceDefinition instanceDefinition, DisplayMaterial material, Transform xform)
Draws a shaded InstanceDefinition.
instanceDefinition (InstanceDefinition)The instance definition.
material (DisplayMaterial)Material to draw faces with.
xform (Transform)The transformation.

DrawInstanceDefinitionShaded

#Since v7.15
public void DrawInstanceDefinitionShaded(InstanceDefinition instanceDefinition, DisplayMaterial material)
Draws a shaded InstanceDefinition.
instanceDefinition (InstanceDefinition)The instance definition.
material (DisplayMaterial)Material to draw faces with.

DrawLight

#Since v8.4
public void DrawLight(Light light, Color wireframeColor)
Draws a light.
light (Light)The light to draw.
wireframeColor (Color)The wireframe color.

DrawLine

#Since v5.0
public void DrawLine(Line line, Color color, int thickness)
Draws a single line object.
line (Line)Line to draw.
color (Color)Color to draw line in.
thickness (int)Thickness (in pixels) of line.

DrawLine

#Since v5.0
public void DrawLine(Line line, Color color)
Draws a single line object.
line (Line)Line to draw.
color (Color)Color to draw line in.

DrawLine

#Since v8.0
public void DrawLine(Line line, DisplayPen pen)
line (Line)
pen (DisplayPen)

DrawLine

#Since v5.0
public void DrawLine(Point3d from, Point3d to, Color color, int thickness)
Draws a single line object.
from (Point3d)Line from point.
to (Point3d)Line to point.
color (Color)Color to draw line in.
thickness (int)Thickness (in pixels) of line.

DrawLine

#Since v5.0
public void DrawLine(Point3d from, Point3d to, Color color)
Draws a single line object.
from (Point3d)Line from point.
to (Point3d)Line to point.
color (Color)Color to draw line in.

DrawLineArrow

#Since v5.0
public void DrawLineArrow(Line line, Color color, int thickness, double size)
Draws an arrow made up of three line segments.
line (Line)Base line for arrow.
color (Color)Color of arrow.
thickness (int)Thickness (in pixels) of the arrow line segments.
size (double)Size (in world units) of the arrow tip lines.

DrawLineNoClip

#Since v7.1
public void DrawLineNoClip(Point3d from, Point3d to, Color color, int thickness)
Draws a single line object .This version of line drawing will draw the segments of the line that extend beyond the near and far planes of the view frustum with depths on those planes
from (Point3d)Line from point.
to (Point3d)Line to point.
color (Color)Color to draw line in.
thickness (int)Thickness (in pixels) of line.

DrawLines

#Since v5.0
public void DrawLines(IEnumerable<Line> lines, Color color, int thickness)
Draws a set of lines with a given color and thickness. If you want the fastest possible set of lines to be drawn, pass a Line[] for lines.
lines (IEnumerable<Line>)Lines to draw.
color (Color)Color to draw with.
thickness (int)Thickness (in pixels) of lines.

DrawLines

#Since v5.0
public void DrawLines(IEnumerable<Line> lines, Color color)
Draws a set of lines with a given color and thickness. If you want the fastest possible set of lines to be drawn, pass a Line[] for lines.
lines (IEnumerable<Line>)Lines to draw.
color (Color)Color to draw with.

DrawLines

#Since v8.0
public void DrawLines(Line[] lines, DisplayPen pen)
lines (Line[])
pen (DisplayPen)

DrawLinesNoClip

#Since v8.15
public void DrawLinesNoClip(IEnumerable<Line> lines, Color color, int thickness)
Draws a multiple lines. This version of line drawing will draw the segments of the line that extend beyond the near and far planes of the view frustum with depths on those planes
lines (IEnumerable<Line>)the lines to draw
color (Color)Color to draw lines in
thickness (int)Thickness (in pixels) of lines

DrawMarker

#Since v5.0
public void DrawMarker(Point3d tip, Vector3d direction, Color color, int thickness, double size, double rotation)
Draws an arrow marker as a view-aligned widget.
tip (Point3d)Location of arrow tip point.
direction (Vector3d)Direction of arrow.
color (Color)Color of arrow widget.
thickness (int)Thickness of arrow widget lines.
size (double)Size (in pixels) of the arrow shaft.
rotation (double)Rotational angle adjustment (in radians, counter-clockwise of direction.

DrawMarker

#Since v5.0
public void DrawMarker(Point3d tip, Vector3d direction, Color color, int thickness, double size)
Draws an arrow marker as a view-aligned widget.
tip (Point3d)Location of arrow tip point.
direction (Vector3d)Direction of arrow.
color (Color)Color of arrow widget.
thickness (int)Thickness of arrow widget lines.
size (double)Size (in pixels) of the arrow shaft.

DrawMarker

#Since v5.0
public void DrawMarker(Point3d tip, Vector3d direction, Color color, int thickness)
Draws an arrow marker as a view-aligned widget.
tip (Point3d)Location of arrow tip point.
direction (Vector3d)Direction of arrow.
color (Color)Color of arrow widget.
thickness (int)Thickness of arrow widget lines.

DrawMarker

#Since v5.0
public void DrawMarker(Point3d tip, Vector3d direction, Color color)
Draws an arrow marker as a view-aligned widget.
tip (Point3d)Location of arrow tip point.
direction (Vector3d)Direction of arrow.
color (Color)Color of arrow widget.

DrawMeshesShaded

#Since v9.0
public void DrawMeshesShaded(IEnumerable<Mesh> meshes, GrasshopperDisplayMaterial material)
Draws a batch of meshes with the Grasshopper 2 ("G2") shaded display: a gradient-shaded look driven by a GrasshopperDisplayMaterial — a diffuse colour plus optional striping, stippling and dark-area desaturation — rather than a full DisplayMaterial. The whole batch is uploaded as one combined GPU buffer and shares one material; for per-mesh settings, call once per mesh instead.
Remarks:

The meshes are uploaded to the GPU on every redraw. Nothing is cached between frames, so every redraw re-uploads the whole batch. This is the dominant cost of the call and needs to be planned around: draw only the geometry you actually need, and prefer one batched call over many single-mesh calls.

Mesh requirements. Every mesh must have up-to-date single-precision vertices and vertex normals. The G2 shader reads those directly; a mesh that carries only double-precision vertices, or no normals, will render badly (missing geometry or flat/garbage shading). Compute the vertex normals and make sure the single-precision vertices are current before drawing if in doubt. Null entries in meshes are skipped.

Vertex colours. If a mesh has vertex colours, those colours are drawn in place of the material's diffuse colour, and GrasshopperDisplayMaterial.ShadeFalseColor decides whether they are shaded or drawn flat. Meshes without vertex colours are shaded from the material's diffuse colour alone.

Mixed meshes are safe. A batch is uploaded as one interleaved vertex buffer whose layout is the union of its meshes' attributes, and a mesh lacking an attribute the union has would be zero-filled for it, so a colourless mesh batched with a vertex-coloured one would draw black. This method therefore splits the meshes into groups that share the same attributes and draws one batch per group, so any mix may be passed in. Meshes keep their relative order within a group and the groups are drawn in order of first appearance; order between groups is not otherwise guaranteed.

meshes (IEnumerable<Mesh>)The meshes to draw as one batch. Each should have current single-precision vertices and vertex normals (see remarks); null entries are skipped.
material (GrasshopperDisplayMaterial)The G2 shaded settings to draw with. When null, default settings are used.

DrawMeshFalseColors

#Since v5.0
public void DrawMeshFalseColors(Mesh mesh)
Draws the mesh faces as false color patches. The mesh must have Vertex Colors defined for this to work.
mesh (Mesh)Mesh to draw.

DrawMeshShaded

#Since v9.0
public void DrawMeshShaded(Mesh mesh, Color diffuseMaterialColor, IsoDrawEffect zebraSettings)
Draws shaded mesh with isodraw settings applied (zebra)
mesh (Mesh)
diffuseMaterialColor (Color)
zebraSettings (IsoDrawEffect)

DrawMeshShaded

#Since v8.20
public void DrawMeshShaded(Mesh mesh, DisplayMaterial material, IEnumerable<int> faceIndices)
Draws the shaded faces of a given mesh.
mesh (Mesh)Mesh to draw.
material (DisplayMaterial)Material to draw faces with.
faceIndices (IEnumerable<int>)An enumeration of the indices of specific faces to draw.

DrawMeshShaded

#Since v5.0
public void DrawMeshShaded(Mesh mesh, DisplayMaterial material, int[] faceIndices)
Draws the shaded faces of a given mesh.
mesh (Mesh)Mesh to draw.
material (DisplayMaterial)Material to draw faces with.
faceIndices (int[])Indices of specific faces to draw.

DrawMeshShaded

#ExampleSince v5.0
public void DrawMeshShaded(Mesh mesh, DisplayMaterial material)
Draws the shaded faces of a given mesh.
mesh (Mesh)Mesh to draw.
material (DisplayMaterial)Material to draw faces with.

DrawMeshShaded

#Since v9.0
public void DrawMeshShaded(Mesh mesh, GrasshopperDisplayMaterial material)
Draws a single mesh with the Grasshopper 2 ("G2") shaded display. This is a convenience overload of DrawMeshesShaded(IEnumerable<Mesh>, GrasshopperDisplayMaterial); see it for the mesh requirements and vertex-colour handling.
Remarks:

The mesh is uploaded to the GPU on every redraw. Nothing is cached between frames, so every redraw re-uploads the mesh. When drawing more than one mesh, prefer a single batched DrawMeshesShaded(IEnumerable<Mesh>, GrasshopperDisplayMaterial) call over many single-mesh calls.

mesh (Mesh)The mesh to draw. Should have current single-precision vertices and vertex normals (see DrawMeshesShaded(IEnumerable<Mesh>, GrasshopperDisplayMaterial)).
material (GrasshopperDisplayMaterial)The G2 shaded settings to draw with. When null, default settings are used.

DrawMeshVertices

#Since v5.0
public void DrawMeshVertices(Mesh mesh, Color color)
Draws all the vertices in a given mesh.
mesh (Mesh)Mesh for vertex drawing.
color (Color)Color of mesh vertices.

DrawMeshWires

#Since v5.0
public void DrawMeshWires(Mesh mesh, Color color, int thickness)
Draws all the wires in a given mesh.
mesh (Mesh)Mesh for wire drawing.
color (Color)Color of mesh wires.
thickness (int)Thickness (in pixels) of mesh wires.

DrawMeshWires

#ExampleSince v5.0
public void DrawMeshWires(Mesh mesh, Color color)
Draws all the wires in a given mesh.
mesh (Mesh)Mesh for wire drawing.
color (Color)Color of mesh wires.

DrawObject

#ExampleSince v5.0
public void DrawObject(RhinoObject rhinoObject, Transform xform)
Draws a RhinoObject with an applied transformation.
rhinoObject (RhinoObject)The Rhino object.
xform (Transform)The transformation.

DrawObject

#Since v5.0
public void DrawObject(RhinoObject rhinoObject)
Draws a RhinoObject.
rhinoObject (RhinoObject)The Rhino object.

DrawParticles

#Since v5.0
public void DrawParticles(ParticleSystem particles, DisplayBitmap bitmap)
particles (ParticleSystem)
bitmap (DisplayBitmap)

DrawParticles

#Since v5.0
public void DrawParticles(ParticleSystem particles, DisplayBitmap[] bitmaps)
particles (ParticleSystem)
bitmaps (DisplayBitmap[])

DrawParticles

#Since v5.0
public void DrawParticles(ParticleSystem particles)
particles (ParticleSystem)

DrawPatternedLine

#Since v6.0
public void DrawPatternedLine(Line line, Color color, int pattern, int thickness)
Draws a single line with specified pattern.
line (Line)Line to draw.
color (Color)Color of line.
pattern (int)Pattern of the line (like 0x00001111 for dotted line).
thickness (int)Thickness (in pixels) of lines.

DrawPatternedLine

#Since v6.0
public void DrawPatternedLine(Point3d from, Point3d to, Color color, int pattern, int thickness)
Draws a single line with specified pattern.
from (Point3d)Line start point.
to (Point3d)Line end point.
color (Color)Color of line.
pattern (int)Pattern of the line (like 0x00001111 for dotted line).
thickness (int)Thickness (in pixels) of lines.

DrawPatternedPolyline

#Since v6.0
public void DrawPatternedPolyline(IEnumerable<Point3d> points, Color color, int pattern, int thickness, bool close)
Draws a set of connected lines (polyline) with specified pattern.
points (IEnumerable<Point3d>)End points of each line segment.
color (Color)Color of polyline.
pattern (int)Pattern to use for the line (like 0x00001111 for dotted).
thickness (int)Thickness (in pixels) of lines.
close (bool)Draw a line between the first and last points.

DrawPoint

#Since v5.0
public void DrawPoint(Point3d point, Color color)
Draws a point with a given radius, style and color.
point (Point3d)Location of point in world coordinates.
color (Color)Color of point.

DrawPoint

#Since v6.0
public void DrawPoint(Point3d point, PointStyle style, Color strokeColor, Color fillColor, float radius, float strokeWidth, float secondarySize, float rotationRadians, bool diameterIsInPixels, bool autoScaleForDpi)
point (Point3d)
style (PointStyle)
strokeColor (Color)
fillColor (Color)
radius (float)
strokeWidth (float)
secondarySize (float)
rotationRadians (float)
diameterIsInPixels (bool)
autoScaleForDpi (bool)

DrawPoint

#Since v6.0
public void DrawPoint(Point3d point, PointStyle style, float radius, Color color)
Draws a point with a given radius, style and color.
point (Point3d)Location of point in world coordinates.
style (PointStyle)Point display style.
radius (float)Point size in pixels.
color (Color)Color of point. If style is ControlPoint, this will be the border color.

DrawPoint

#Since v5.0
public void DrawPoint(Point3d point, PointStyle style, int radius, Color color)
Draws a point with a given radius, style and color.
point (Point3d)Location of point in world coordinates.
style (PointStyle)Point display style.
radius (int)Point size in pixels.
color (Color)Color of point. If style is ControlPoint, this will be the border color.

DrawPoint

#Since v6.0
public void DrawPoint(Point3d point)
Draws a point using the current display attribute size, style and color
point (Point3d)Location of point in world coordinates.

DrawPointCloud

#Since v6.0
public void DrawPointCloud(PointCloud cloud, float size, Color color)
Draws a point cloud.
cloud (PointCloud)Point cloud to draw.
size (float)Size of points.
color (Color)Color of points in the cloud, if the cloud has a color array this setting is ignored.

DrawPointCloud

#Since v6.0
public void DrawPointCloud(PointCloud cloud, float size)
Draws a point cloud.
cloud (PointCloud)Point cloud to draw, if the cloud has a color array, it will be used, otherwise the points will be black.
size (float)Size of points.

DrawPointCloud

#Since v5.0
public void DrawPointCloud(PointCloud cloud, int size, Color color)
Draws a point cloud.
cloud (PointCloud)Point cloud to draw.
size (int)Size of points.
color (Color)Color of points in the cloud, if the cloud has a color array this setting is ignored.

DrawPointCloud

#Since v5.0
public void DrawPointCloud(PointCloud cloud, int size)
Draws a point cloud.
cloud (PointCloud)Point cloud to draw, if the cloud has a color array, it will be used, otherwise the points will be black.
size (int)Size of points.

DrawPoints

#Since v8.0
public void DrawPoints(DisplayPointSet points, DisplayPointAttributes fallbackAttributes, DisplayPointAttributes overrideAttributes)
points (DisplayPointSet)
fallbackAttributes (DisplayPointAttributes)
overrideAttributes (DisplayPointAttributes)

DrawPoints

#Since v8.0
public void DrawPoints(DisplayPointSet points)
points (DisplayPointSet)

DrawPoints

#Since v6.0
public void DrawPoints(IEnumerable<Point3d> points, PointStyle style, Color strokeColor, Color fillColor, float radius, float strokeWidth, float secondarySize, float rotationRadians, bool diameterIsInPixels, bool autoScaleForDpi)
points (IEnumerable<Point3d>)
style (PointStyle)
strokeColor (Color)
fillColor (Color)
radius (float)
strokeWidth (float)
secondarySize (float)
rotationRadians (float)
diameterIsInPixels (bool)
autoScaleForDpi (bool)

DrawPoints

#Since v6.0
public void DrawPoints(IEnumerable<Point3d> points, PointStyle style, float radius, Color color)
Draw a set of points with a given radius, style and color.
points (IEnumerable<Point3d>)Location of points in world coordinates.
style (PointStyle)Point display style.
radius (float)Point size in pixels.
color (Color)Color of points. If style is ControlPoint, this will be the border color.

DrawPoints

#Since v5.0
public void DrawPoints(IEnumerable<Point3d> points, PointStyle style, int radius, Color color)
Draw a set of points with a given radius, style and color.
points (IEnumerable<Point3d>)Location of points in world coordinates.
style (PointStyle)Point display style.
radius (int)Point size in pixels.
color (Color)Color of points. If style is ControlPoint, this will be the border color.

DrawPolygon

#Since v5.0
public void DrawPolygon(IEnumerable<Point3d> points, Color color, bool filled)
Draws a filled, convex polygon from a collection of points.
points (IEnumerable<Point3d>)Collection of world coordinate points that are connected by lines to form a closed shape. Collection must contain at least 3 points.
color (Color)Color to draw with.
filled (bool)true if the closed area should be filled with color. false if you want to draw just the border of the closed shape.

DrawPolyline

#Since v5.0
public void DrawPolyline(IEnumerable<Point3d> polyline, Color color, int thickness)
Draws a single Polyline object.
polyline (IEnumerable<Point3d>)Polyline to draw.
color (Color)Color to draw in.
thickness (int)Thickness (in pixels) of the Polyline.

DrawPolyline

#Since v5.0
public void DrawPolyline(IEnumerable<Point3d> polyline, Color color)
Draws a single Polyline object.
polyline (IEnumerable<Point3d>)Polyline to draw.
color (Color)Color to draw in.

DrawRoundedRectangle

#Since v6.0
public void DrawRoundedRectangle(PointF center, float pixelWidth, float pixelHeight, float cornerRadius, Color strokeColor, float strokeWidth, Color fillColor)
center (PointF)
pixelWidth (float)
pixelHeight (float)
cornerRadius (float)
strokeColor (Color)
strokeWidth (float)
fillColor (Color)

DrawSphere

#Since v5.0
public void DrawSphere(Sphere sphere, Color color, int thickness)
Draw a wireframe sphere.
sphere (Sphere)Sphere to draw.
color (Color)Color to draw with.
thickness (int)Thickness (in pixels) of Sphere wires.

DrawSphere

#Since v5.0
public void DrawSphere(Sphere sphere, Color color)
Draw a wireframe sphere.
sphere (Sphere)Sphere to draw.
color (Color)Color to draw with.

DrawSprite

#Since v5.0
public void DrawSprite(DisplayBitmap bitmap, Point2d screenLocation, float size, Color blendColor)
bitmap (DisplayBitmap)
screenLocation (Point2d)
size (float)
blendColor (Color)

DrawSprite

#Since v5.0
public void DrawSprite(DisplayBitmap bitmap, Point2d screenLocation, float size)
bitmap (DisplayBitmap)
screenLocation (Point2d)
size (float)

DrawSprite

#Since v7.0
public void DrawSprite(DisplayBitmap bitmap, Point2d screenLocation, float width, float height)
Draw screen oriented image centered at 2d screen location
bitmap (DisplayBitmap)
screenLocation (Point2d)
width (float)
height (float)

DrawSprite

#Since v5.0
public void DrawSprite(DisplayBitmap bitmap, Point3d worldLocation, float size, bool sizeInWorldSpace)
bitmap (DisplayBitmap)
worldLocation (Point3d)
size (float)
sizeInWorldSpace (bool)

DrawSprite

#Since v5.0
public void DrawSprite(DisplayBitmap bitmap, Point3d worldLocation, float size, Color blendColor, bool sizeInWorldSpace)
bitmap (DisplayBitmap)
worldLocation (Point3d)
size (float)
blendColor (Color)
sizeInWorldSpace (bool)

DrawSprites

#Since v5.0
public void DrawSprites(DisplayBitmap bitmap, DisplayBitmapDrawList items, float size, bool sizeInWorldSpace)
bitmap (DisplayBitmap)
items (DisplayBitmapDrawList)
size (float)
sizeInWorldSpace (bool)

DrawSprites

#Since v5.0
public void DrawSprites(DisplayBitmap bitmap, DisplayBitmapDrawList items, float size, Vector3d translation, bool sizeInWorldSpace)
bitmap (DisplayBitmap)
items (DisplayBitmapDrawList)
size (float)
translation (Vector3d)
sizeInWorldSpace (bool)

DrawStereoFrameBuffer

#Since v6.8
[CLSCompliant(false)] public bool DrawStereoFrameBuffer(ViewportInfo viewportLeft, ViewportInfo viewportRight, out uint handleLeft, out uint handleRight)
Draws the viewport as seen from the left and the right eye viewports and returns the result as OpenGL texture handles.
viewportLeft (ViewportInfo)The viewport representing the left eye location and look direction.
viewportRight (ViewportInfo)The viewport representing the right eye location and look direction.
handleLeft (out uint)Will contain the OpenGL texture handle which references the left output color buffer.
handleRight (out uint)Will contain the OpenGL texture handle which references the right output color buffer.
true if drawing succeeded, false otherwise.

DrawSubDShaded

#Since v7.0
public void DrawSubDShaded(SubD subd, DisplayMaterial material)
Draw a shaded mesh representation of a SubD
subd (SubD)SubD to draw
material (DisplayMaterial)Material to draw faces with

DrawSubDWires

#Since v7.0
public void DrawSubDWires(SubD subd, Color color, float thickness)
Draws all the wireframe curves of a SubD object
subd (SubD)SubD to draw
color (Color)wire color
thickness (float)wire thickness

DrawSubDWires

#Since v8.11
public void DrawSubDWires(SubD subd, DisplayPen boundaryPen, DisplayPen smoothInteriorPen, DisplayPen creasePen, DisplayPen nonmanifoldPen)
Draws all the wireframe curves os a SubD object using different pens
subd (SubD)SubD to draw
boundaryPen (DisplayPen)Pen to use for boundary wires. If null, no boundary wires will be drawn
smoothInteriorPen (DisplayPen)Pen to use for smooth interior wires. If null, no smooth interior wires will be drawn
creasePen (DisplayPen)Pen to use for crease wires. If null, no crease wires will be drawn
nonmanifoldPen (DisplayPen)Pen to use for non-manifold wires. If null, no non-manifold wires will be drawn

DrawSurface

#Since v5.0
public void DrawSurface(Surface surface, Color wireColor, int wireDensity)
Draw wireframe display for a single surface.
surface (Surface)Surface to draw.
wireColor (Color)Color to draw with.
wireDensity (int)Thickness (in pixels) or wires to draw.

DrawSurfaceDirectionIndicators

#Since v9.0
public void DrawSurfaceDirectionIndicators(SurfaceDirectionIndicators directionIndicators)
Draw surface indicators
directionIndicators (SurfaceDirectionIndicators)

DrawText

#Since v6.0
public void DrawText(TextEntity text, Color color, double scale)
text (TextEntity)
color (Color)
scale (double)

DrawText

#Since v6.0
public void DrawText(TextEntity text, Color color, Transform xform)
text (TextEntity)
color (Color)
xform (Transform)

DrawText

#Since v6.0
public void DrawText(TextEntity text, Color color)
text (TextEntity)
color (Color)

DrawToBitmap

#Since v5.0
public static Bitmap DrawToBitmap(RhinoViewport viewport, int width, int height)
Draw a given viewport to an off-screen bitmap.
viewport (RhinoViewport)Viewport to draw.
width (int)Width of target image.
height (int)Height of target image.
A bitmap containing the given view, or null on error.

DrawTorus

#Since v5.0
public void DrawTorus(Torus torus, Color color, int thickness)
Draw a wireframe torus.
torus (Torus)Torus to draw.
color (Color)Color to draw with.
thickness (int)Thickness (in pixels) of torus wires.

DrawTorus

#Since v5.0
public void DrawTorus(Torus torus, Color color)
Draw a wireframe torus.
torus (Torus)Torus to draw.
color (Color)Color to draw with.

DrawZebraPreview

#Since v6.16
public void DrawZebraPreview(Brep brep, Color color)
Draws a shaded Brep with Zebra stripe preview.
brep (Brep)Brep to draw.
color (Color)Object color.

DrawZebraPreview

#Since v7.4
public void DrawZebraPreview(Mesh mesh, Color color)
Draws a shaded Mesh with Zebra stripe preview.
mesh (Mesh)Mesh to draw.
color (Color)Object color.

EnableClippingPlanes

#Since v5.0
public void EnableClippingPlanes(bool enable)
Enable or disable the Clipping Plane logic of the engine.
enable (bool)true to enable Clipping Planes, false to disable.

EnableColorWriting

#Since v5.0
public void EnableColorWriting(bool enable)
Enable or disable the ColorWriting behavior of the engine.
enable (bool)true to enable ColorWriting, false to disable.

EnableDepthTesting

#Since v5.0
public void EnableDepthTesting(bool enable)
Enable or disable the DepthTesting behavior of the engine. When DepthTesting is disabled, objects in front will no longer occlude objects behind them.
enable (bool)true to enable DepthTesting, false to disable.

EnableDepthWriting

#Since v5.0
public void EnableDepthWriting(bool enable)
Enable or disable the DepthWriting behavior of the engine. When DepthWriting is disabled, drawn geometry does not affect the Z-Buffer.
enable (bool)true to enable DepthWriting, false to disable.

EnableLighting

#Since v5.0
public void EnableLighting(bool enable)
Enable or disable the Lighting logic of the engine.
enable (bool)true to enable Lighting, false to disable.

Flush

#Since v7.0
public void Flush()
Force the pipeline to immediately flush any cached geometry to the display

GetDirect3d11Device

#Since v9.0
public nint GetDirect3d11Device()
If the pipeline is running on top of Direct3D 11, this function will return a pointer to the ID3D11Device being used. IntPtr.Zero is returned if the pipeline is running on some other GPU technology. NOTE: AddRef is NOT called on this IUnknown instance.
Pointer to an ID3D11Device, or IntPtr.Zero.

GetDirect3d11DeviceContext

#Since v9.0
public nint GetDirect3d11DeviceContext()
If the pipeline is running on top of Direct3D 11, this function will return a pointer to the ID3D11DeviceContext1 actively being used. IntPtr.Zero is returned if the pipeline is running on some other GPU technology. NOTE: AddRef is NOT called on this IUnknown instance.
Pointer to an ID3D11DeviceContext1, or IntPtr.Zero.

GetDrawListSerialNumbers

#Since v7.0
[CLSCompliant(false)] public static void GetDrawListSerialNumbers(out uint modelSerialNumber, out uint pageSerialNumber)
Gets the current model and page view draw list serial numbers, which can be used to determine if a model or page view needs to be redrawn.
modelSerialNumber (out uint)The current model draw list serial number.
pageSerialNumber (out uint)The current page view draw list serial number.

GetLights

#Since v6.3
public Light[] GetLights()
Get lights that this pipeline is current using

GetOpenGLCameraToClip

#Since v6.0
public float[] GetOpenGLCameraToClip()
Get an array of 16 floats that represents the "camera" to "clip" coordinate transformation in OpenGL's right handed coordinate system

GetOpenGLWorldToCamera

#Since v6.0
public float[] GetOpenGLWorldToCamera(bool includeModelTransform)
Get an array of 16 floats that represents the "world" to "camera" coordinate transformation in OpenGL's right handed coordinate system
includeModelTransform (bool)

GetOpenGLWorldToClip

#Since v6.0
public float[] GetOpenGLWorldToClip(bool includeModelTransform)
Get an array of 16 floats that represents the "world" to "clip" coordinate transformation in OpenGL's right handed coordinate system
includeModelTransform (bool)

InterruptDrawing

#Since v5.0
public bool InterruptDrawing()
Tests to see if the pipeline should stop drawing more geometry and just show what it has so far. If a drawing operation is taking a long time, this function will return true and tell Rhino it should just finish up and show the frame buffer. This is used in dynamic drawing operations.
true if the pipeline should stop attempting to draw more geometry and just show the frame buffer.

IsActive

#Since v5.0
public bool IsActive(RhinoObject rhinoObject)
Determines if an object can be visible in this viewport based on it's object type and display attributes. This test does not check for visibility based on location of the object. NOTE: Use CRhinoDisplayPipeline::IsVisible() to perform "visibility" tests based on location (is some part of the object in the view frustum). Use CRhinoDisplayPipeline::IsActive() to perform "visibility" tests based on object type.
rhinoObject (RhinoObject)Object to test.
true if this object can be drawn in the pipeline's viewport based on it's object type and display attributes.

IsInTiledDraw

#Since v8.2
public bool IsInTiledDraw(out Size fullSize, out Rectangle currentTile)
Returns true if the currently drawn frame is part of a tiled capture. Tiled captures are performed when creating large raster outputs.
fullSize (out Size)Final full size area that is being created
currentTile (out Rectangle)What portion of the fullSize area that is currently being drawn
true if a tiled capture is being performed. If false, the fullSize parameter will have the same size as currentTile

IsVisible

#Since v5.0
public bool IsVisible(BoundingBox bbox)
Test a given box for visibility inside the view frustum under the current viewport and model transformation settings.
bbox (BoundingBox)Box to test for visibility.
true if at least some portion of the box is visible, false if not.

IsVisible

#Since v5.0
public bool IsVisible(Point3d worldCoordinate)
Test a given 3d world coordinate point for visibility inside the view frustum under the current viewport and model transformation settings.
worldCoordinate (Point3d)Point to test for visibility.
true if the point is visible, false if it is not.

IsVisible

#Since v5.0
public bool IsVisible(RhinoObject rhinoObject)
Test a given object for visibility inside the view frustum under the current viewport and model transformation settings. This function calls a virtual IsVisibleFinal function that sub-classed pipelines can add extra tests to. In the base class, this test only tests visibility based on the objects world coordinates location and does not pay attention to the object's attributes. NOTE: Use CRhinoDisplayPipeline::IsVisible() to perform "visibility" tests based on location (is some part of the object in the view frustum). Use CRhinoDisplayPipeline::IsActive() to perform "visibility" tests based on object type.
rhinoObject (RhinoObject)Object to test.
true if the object is visible, false if not.

MakeDefaultOpenGLContextCurrent

#Since v7.0
public static bool MakeDefaultOpenGLContextCurrent()
Make a "default" OpenGL context current

Measure2dText

#Since v5.10
public Rectangle Measure2dText(string text, Point2d definitionPoint, bool middleJustified, double rotationRadians, int height, string fontFace)
Determines screen rectangle that would be drawn to using the Draw2dText(..) function with the same parameters.
text (string)text to measure.
definitionPoint (Point2d)either lower-left or middle of text.
middleJustified (bool)true=middle justified. false=lower-left justified.
rotationRadians (double)text rotation in radians
height (int)height in pixels (good default is 12)
fontFace (string)font name (good default is "Arial")
rectangle in the viewport's screen coordinates on success.

Open

#Since v7.0
public bool Open()
Opens the pipeline.
True if the pipeline was opened, false if it was already open or failed to open.

PopClipTesting

#Since v5.0 Obsolete v6.0
public void PopClipTesting()
obsoleteUse PopDepthTesting
Pop a ClipTesting flag off the engine's stack.

PopCullFaceMode

#Since v5.0
public void PopCullFaceMode()
Pop a FaceCull flag off the engine's stack.

PopDepthTesting

#Since v5.0
public void PopDepthTesting()
Pop a DepthTesting flag off the engine's stack.

PopDepthWriting

#Since v5.0
public void PopDepthWriting()
Pop a DepthWriting flag off the engine's stack.

PopModelTransform

#Since v5.0
public void PopModelTransform()
Pop a model transformation off the engine's model transform stack.

PopProjection

#Since v8.0
public void PopProjection()
Pop a view projection off this pipelines projection stack

Push2dProjection

#Since v8.0
public void Push2dProjection()
Push the current view projection and set the viewport up to be a simple 2D top projection where the camera frustum matches the same size as the screen port. This allows geometry draw functions to act like they are working with typical 2d graphics APIs on a window

PushClipTesting

#Since v5.0 Obsolete v6.0
public void PushClipTesting(bool enable)
obsoleteUse PushDepthTesting
Push a ClipTesting flag on the engine's stack.
enable (bool)ClipTesting flag.

PushCullFaceMode

#Since v5.0
public void PushCullFaceMode(CullFaceMode mode)
Push a FaceCull flag on the engine's stack.
mode (CullFaceMode)FaceCull flag.

PushDepthTesting

#Since v5.0
public void PushDepthTesting(bool enable)
Push a DepthTesting flag on the engine's stack.
enable (bool)DepthTesting flag.

PushDepthWriting

#Since v5.0
public void PushDepthWriting(bool enable)
Push a DepthWriting flag on the engine's stack.
enable (bool)DepthWriting flag.

PushModelTransform

#Since v5.0
public void PushModelTransform(Transform xform)
Push a model transformation on the engine's model transform stack.
xform (Transform)Transformation to push.

RemoveClippingPlane

#Since v6.3
public void RemoveClippingPlane(int index)
Remove a clipping plane from the pipeline for this frame
index (int)

SetupDisplayMaterial

#Since v8.0
public DisplayMaterial SetupDisplayMaterial(Color color)
color (Color)

SetupDisplayMaterial

#Since v8.0
public DisplayMaterial SetupDisplayMaterial(RhinoDoc doc, RhinoObject rhinoObject, ObjectAttributes attributes, Transform instanceTransform)
Sets up a display material.
doc (RhinoDoc)The active document.
rhinoObject (RhinoObject)The Rhino object.
attributes (ObjectAttributes)The object attributes.
instanceTransform (Transform)The instance object transformation.
A display material if successful, null otherwise.

SetupDisplayMaterial

#Since v8.0
public DisplayMaterial SetupDisplayMaterial(RhinoDoc doc, RhinoObject rhinoObject, ObjectAttributes attributes)
Sets up a display material.
doc (RhinoDoc)The active document.
rhinoObject (RhinoObject)The Rhino object.
attributes (ObjectAttributes)The object attributes.
A display material if successful, null otherwise.

SetupDisplayMaterial

#Since v8.0
public DisplayMaterial SetupDisplayMaterial(RhinoDoc doc, RhinoObject rhinoObject)
Sets up a display material.
doc (RhinoDoc)The active document.
rhinoObject (RhinoObject)The Rhino object.
A display material if successful, null otherwise.

SupportedMultisamlpleModes

#Since v9.0
public static int[] SupportedMultisamlpleModes(DisplayTechnology technology)
Multisample modes available
technology (DisplayTechnology)

Events

CalculateBoundingBox

#Since v5.0
public static event EventHandler<CalculateBoundingBoxEventArgs> CalculateBoundingBox

CalculateBoundingBoxZoomExtents

#Since v5.0
public static event EventHandler<CalculateBoundingBoxEventArgs> CalculateBoundingBoxZoomExtents
Calculate a bounding to include in the Zoom Extents command.

DisplayModeChanged

#Since v6.18
public static event EventHandler<DisplayModeChangedEventArgs> DisplayModeChanged

DrawForeground

#Since v5.0
public static event EventHandler<DrawEventArgs> DrawForeground
Called after all non-highlighted objects have been drawn and PostDrawObjects has been called. Depth writing and testing are turned OFF. If you want to draw with depth writing/testing, see PostDrawObjects.
Remarks: This event is actually passed a DrawForegroundEventArgs, but we could not change the event declaration without breaking the SDK. Cast to a DrawForegroundEventArgs if you need it.

DrawOverlay

#Since v5.0
public static event EventHandler<DrawEventArgs> DrawOverlay
If Rhino is in a feedback mode, the draw overlay call allows for temporary geometry to be drawn on top of everything in the scene. This is similar to the dynamic draw routine that occurs with custom get point.

InitFrameBuffer

#Since v6.18
public static event EventHandler<InitFrameBufferEventArgs> InitFrameBuffer

ObjectCulling

#Since v5.3
public static event EventHandler<CullObjectEventArgs> ObjectCulling

PostDrawObject

#Since v7.0
public static event EventHandler<DrawObjectEventArgs> PostDrawObject
Called right after an individual object has been drawn. NOTE: Do not use this event unless you absolutely need to. It is called for every object in the document and can slow display down if a large number of objects exist in the document

PostDrawObjects

#Since v5.0
public static event EventHandler<DrawEventArgs> PostDrawObjects
Called after all non-highlighted objects have been drawn. Depth writing and testing are still turned on. If you want to draw without depth writing/testing, see DrawForeground.

PostProcessFrameBuffer

#
public static event EventHandler<PostProcessFrameBufferEventArgs> PostProcessFrameBuffer
Called after the frame has been drawn, with the finished frame available to be read. Use this to record or stream a viewport: PostProcessFrameBufferEventArgs.TryCopyFrameBuffer(nint, int, int) copies the frame that was just drawn, and never redraws the scene.

Every frame drawn while this event is subscribed costs an extra frame buffer read back, whether or not the handler reads anything. Unsubscribe as soon as the frames are no longer needed.

The handler runs on the thread that drew the frame and holds up the next one. Copy the pixels here and do the rest of the work somewhere else.

PreDrawObject

#Since v5.0
public static event EventHandler<DrawObjectEventArgs> PreDrawObject
Called right before an individual object is being drawn. NOTE: Do not use this event unless you absolutely need to. It is called for every object in the document and can slow display down if a large number of objects exist in the document

PreDrawObjects

#Since v5.0
public static event EventHandler<DrawEventArgs> PreDrawObjects
Called before objects are been drawn. Depth writing and testing are on.

PreDrawTransparentObjects

#Since v6.12
public static event EventHandler<DrawEventArgs> PreDrawTransparentObjects
Called before transparent objects have been drawn. Depth writing and testing are on.

ViewportProjectionChanged

#Since v6.18
public static event EventHandler<DrawEventArgs> ViewportProjectionChanged
Called when the projection changes for a viewport being drawn.