C# Класс Revit.SDK.Samples.ObjectViewer.CS.Sketch3D

provide methods to draw objects
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Draw ( Graphics graphics ) : void

draw the line contain in m_lines in 2d Preview

MoveX ( bool left ) : void

move view in horizontal direction

MoveY ( bool up ) : void

move view in vertical direction

Sketch3D ( Graphics3DData data3D, Graphics2DData data2D ) : System

The default constructor

Zoom ( bool zoomIn ) : void

zoom the displayed drawing in canvas

Приватные методы

Метод Описание
Calculate2DTransform ( ) : void

calculate the transform between canvas and 2D geometry objects

Calculate3DTransform ( ) : void

calculate the transform between canvas and 3D geometry objects

CalculateCanvasRegion ( float previewWidth, float previewHeigh, RectangleF bbox ) : System.Drawing.PointF[]

get the display region, adjust the proportion and location

DataUpdateViewEvent ( ) : void

update according data when 3D data is updated

DrawCurves ( Graphics graphics, List curves, Matrix transform, Pen pen ) : void

Draw curves

Initialize2DData ( ) : void

initialize 2D drawing data

Initialize3DData ( ) : void

initialize 3D drawing data

PreTreatBBox ( RectangleF bbox ) : RectangleF

pretreat BBoundingBox so that its height or width will be bigger than zero

ToBoundingBox2D ( BoundingBoxXYZ bbox3D ) : RectangleF

Get X and Y data of 3D BoundingBox to creat a 2D BoundingBox

UpdateDataAndEvent ( ) : void

update drawing data according and related Event

Описание методов

Draw() публичный Метод

draw the line contain in m_lines in 2d Preview
public Draw ( Graphics graphics ) : void
graphics System.Drawing.Graphics Graphics to draw
Результат void

MoveX() публичный Метод

move view in horizontal direction
public MoveX ( bool left ) : void
left bool left or right
Результат void

MoveY() публичный Метод

move view in vertical direction
public MoveY ( bool up ) : void
up bool up or down
Результат void

Sketch3D() публичный Метод

The default constructor
public Sketch3D ( Graphics3DData data3D, Graphics2DData data2D ) : System
data3D Graphics3DData a list contain all the 3d data
data2D Graphics2DData a list contain all the 3d data
Результат System

Zoom() публичный Метод

zoom the displayed drawing in canvas
public Zoom ( bool zoomIn ) : void
zoomIn bool true for zoom in, false for zoom out
Результат void