C# Класс Revit.SDK.Samples.ShaftHolePuncher.CS.ProfileNull

ProfileNull class contains method to draw a coordinate system, and contains method used to create Shaft Opening
Наследование: Profile
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Compute3DTo2DMatrix ( ) : Matrix4

calculate the matrix used to transform 3D to 2D. because profile of shaft opening in Revit is 2d too, so we need do nothing but new a matrix

ComputeScaleMatrix ( Size size ) : Matrix4

calculate the matrix for scale

CreateOpening ( List points ) : Opening

Create Shaft Opening

Draw2D ( Graphics graphics, Pen pen, Matrix4 matrix4 ) : void

draw the coordinate system

ProfileNull ( ExternalCommandData commandData ) : System

constructor

Transform2DTo3D ( Point ps ) : List

move the points to the center and scale as user selected. profile of shaft opening in Revit is 2d too, so don't need transform points to 2d

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

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

get level1 and level2 used to create shaft opening

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

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

calculate the matrix used to transform 3D to 2D. because profile of shaft opening in Revit is 2d too, so we need do nothing but new a matrix
public Compute3DTo2DMatrix ( ) : Matrix4
Результат Matrix4

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

calculate the matrix for scale
public ComputeScaleMatrix ( Size size ) : Matrix4
size System.Drawing.Size pictureBox size
Результат Matrix4

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

Create Shaft Opening
public CreateOpening ( List points ) : Opening
points List points used to create Opening
Результат Opening

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

draw the coordinate system
public Draw2D ( Graphics graphics, Pen pen, Matrix4 matrix4 ) : void
graphics System.Drawing.Graphics form graphic
pen System.Drawing.Pen pen used to draw line in pictureBox
matrix4 Matrix4 Matrix used to transform 3d to 2d /// and make picture in right scale
Результат void

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

constructor
public ProfileNull ( ExternalCommandData commandData ) : System
commandData ExternalCommandData object which contains reference of Revit Application
Результат System

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

move the points to the center and scale as user selected. profile of shaft opening in Revit is 2d too, so don't need transform points to 2d
public Transform2DTo3D ( Point ps ) : List
ps System.Drawing.Point contain the points to be transformed
Результат List