C# Class Revit.SDK.Samples.ShaftHolePuncher.CS.ProfileNull

ProfileNull class contains method to draw a coordinate system, and contains method used to create Shaft Opening
Inheritance: Profile
Exibir arquivo Open project: AMEE/revit Class Usage Examples

Public Methods

Method Description
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

Private Methods

Method Description
GetLevels ( ) : void

get level1 and level2 used to create shaft opening

Method Details

Compute3DTo2DMatrix() public method

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
return Matrix4

ComputeScaleMatrix() public method

calculate the matrix for scale
public ComputeScaleMatrix ( Size size ) : Matrix4
size System.Drawing.Size pictureBox size
return Matrix4

CreateOpening() public method

Create Shaft Opening
public CreateOpening ( List points ) : Opening
points List points used to create Opening
return Opening

Draw2D() public method

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
return void

ProfileNull() public method

constructor
public ProfileNull ( ExternalCommandData commandData ) : System
commandData ExternalCommandData object which contains reference of Revit Application
return System

Transform2DTo3D() public method

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
return List