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
Afficher le fichier Open project: AMEE/revit Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
GetLevels ( ) : void

get level1 and level2 used to create shaft opening

Method Details

Compute3DTo2DMatrix() public méthode

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
Résultat Matrix4

ComputeScaleMatrix() public méthode

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

CreateOpening() public méthode

Create Shaft Opening
public CreateOpening ( List points ) : Opening
points List points used to create Opening
Résultat Opening

Draw2D() public méthode

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
Résultat void

ProfileNull() public méthode

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

Transform2DTo3D() public méthode

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
Résultat List