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

base class of ProfileFloor, ProfileWall and ProfileNull. contains the profile information and can calculate matrix to transform point to 2D plane
Afficher le fichier Open project: AMEE/revit Class Usage Examples

Protected Properties

Свойство Type Description
m_appCreator Autodesk.Revit.Creation.Application
m_commandData Autodesk.Revit.UI.ExternalCommandData
m_docCreator Autodesk.Revit.Creation.Document
m_moveToCenterMatrix Matrix4
m_points List>
m_restoreMatrix Matrix4
m_scaleMatrix Matrix4
m_sizePictureBox System.Drawing.Size
m_to2DMatrix Matrix4
m_transformMatrix Matrix4

Méthodes publiques

Méthode Description
Compute3DTo2DMatrix ( ) : Matrix4

calculate the matrix used to transform 3D to 2D

ComputeScaleMatrix ( Size size ) : Matrix4

calculate the matrix use to scale

CreateOpening ( List points ) : Opening

abstract method to create Opening

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

draw profile of wall or floor in 2D

GetFaceBounds ( ) : System.Drawing.PointF[]

Get the bound of a face

GetFaceNormal ( List face ) : Vector4

Get normal of face

GetFaces ( Autodesk elem ) : List>

Get edges of element's profile

GetNeedPoints ( List faces ) : List>

Get points in first face

GetTo2DMatrix ( ) : Matrix4

Get a matrix which can transform points to 2D

ToCenterMatrix ( ) : Matrix4

Get a matrix which can move points to center

Transform2DTo3D ( Point ps ) : List

transform the point on Form to 3d world coordinate of revit

Méthodes protégées

Méthode Description
Profile ( ExternalCommandData commandData ) : System

constructor

Private Methods

Méthode Description
TransformPoints ( Point pts ) : void

use matrix to transform point

Method Details

Compute3DTo2DMatrix() public méthode

calculate the matrix used to transform 3D to 2D
public Compute3DTo2DMatrix ( ) : Matrix4
Résultat Matrix4

ComputeScaleMatrix() public méthode

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

CreateOpening() public abstract méthode

abstract method to create Opening
public abstract CreateOpening ( List points ) : Opening
points List points used to create Opening
Résultat Opening

Draw2D() public méthode

draw profile of wall or floor in 2D
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

GetFaceBounds() public méthode

Get the bound of a face
public GetFaceBounds ( ) : System.Drawing.PointF[]
Résultat System.Drawing.PointF[]

GetFaceNormal() public méthode

Get normal of face
public GetFaceNormal ( List face ) : Vector4
face List edges in a face
Résultat Vector4

GetFaces() public méthode

Get edges of element's profile
public GetFaces ( Autodesk elem ) : List>
elem Autodesk selected element
Résultat List>

GetNeedPoints() public méthode

Get points in first face
public GetNeedPoints ( List faces ) : List>
faces List edges in all faces
Résultat List>

GetTo2DMatrix() public méthode

Get a matrix which can transform points to 2D
public GetTo2DMatrix ( ) : Matrix4
Résultat Matrix4

Profile() protected méthode

constructor
protected Profile ( ExternalCommandData commandData ) : System
commandData ExternalCommandData object which contains reference to Revit Application
Résultat System

ToCenterMatrix() public méthode

Get a matrix which can move points to center
public ToCenterMatrix ( ) : Matrix4
Résultat Matrix4

Transform2DTo3D() public méthode

transform the point on Form to 3d world coordinate of revit
public Transform2DTo3D ( Point ps ) : List
ps System.Drawing.Point contain the points to be transformed
Résultat List

Property Details

m_appCreator protected_oe property

protected Autodesk.Revit.Creation.Application m_appCreator
Résultat Autodesk.Revit.Creation.Application

m_commandData protected_oe property

protected ExternalCommandData,Autodesk.Revit.UI m_commandData
Résultat Autodesk.Revit.UI.ExternalCommandData

m_docCreator protected_oe property

protected Autodesk.Revit.Creation.Document m_docCreator
Résultat Autodesk.Revit.Creation.Document

m_moveToCenterMatrix protected_oe property

protected Matrix4,Revit.SDK.Samples.ShaftHolePuncher.CS m_moveToCenterMatrix
Résultat Matrix4

m_points protected_oe property

protected List> m_points
Résultat List>

m_restoreMatrix protected_oe property

protected Matrix4,Revit.SDK.Samples.ShaftHolePuncher.CS m_restoreMatrix
Résultat Matrix4

m_scaleMatrix protected_oe property

protected Matrix4,Revit.SDK.Samples.ShaftHolePuncher.CS m_scaleMatrix
Résultat Matrix4

m_sizePictureBox protected_oe property

protected Size,System.Drawing m_sizePictureBox
Résultat System.Drawing.Size

m_to2DMatrix protected_oe property

protected Matrix4,Revit.SDK.Samples.ShaftHolePuncher.CS m_to2DMatrix
Résultat Matrix4

m_transformMatrix protected_oe property

protected Matrix4,Revit.SDK.Samples.ShaftHolePuncher.CS m_transformMatrix
Résultat Matrix4