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

Base class of ProfileFloor and ProfileWall contain the profile information and can make matrix to transform point to 2D plane
Mostra file Open project: AMEE/revit Class Usage Examples

Protected Properties

Property Type Description
m_appCreator Autodesk.Revit.Creation.Application
m_commandData Autodesk.Revit.UI.ExternalCommandData
m_dataProfile Autodesk.Revit.DB.Element
m_docCreator Autodesk.Revit.Creation.Document
m_face List

Public Methods

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

Draw profile of wall or floor in 2D

DrawOpening ( List points, ToolType type ) : void

Abstract method to create Opening

GetFaceBounds ( ) : System.Drawing.PointF[]

Get Face Bounds

GetFaces ( Autodesk elem ) : List>

Get edges of element's profile

Profile ( Autodesk elem, ExternalCommandData commandData ) : System

Constructor

To2DMatrix ( ) : Matrix4

Get a matrix which can transform points to 2D

ToCenterMatrix ( ) : Matrix4

Get a matrix which can move points to origin

WallMatrix ( ) : Matrix4

Wall matrix

Private Methods

Method Description
GetFaceNormal ( List face ) : Vector4

Get Face Normal

GetNeedFace ( List faces ) : List

Get First Face

GetWallFace ( List faces ) : List

Get wall face

Method Details

Draw2D() public method

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 use to draw line in pictureBox
matrix4 Matrix4 matrix used to transform points between 3d and 2d.
return void

DrawOpening() public abstract method

Abstract method to create Opening
public abstract DrawOpening ( List points, ToolType type ) : void
points List
type ToolType
return void

GetFaceBounds() public method

Get Face Bounds
public GetFaceBounds ( ) : System.Drawing.PointF[]
return System.Drawing.PointF[]

GetFaces() public method

Get edges of element's profile
public GetFaces ( Autodesk elem ) : List>
elem Autodesk Selected element
return List>

Profile() public method

Constructor
public Profile ( Autodesk elem, ExternalCommandData commandData ) : System
elem Autodesk Selected element
commandData ExternalCommandData ExternalCommandData
return System

To2DMatrix() public method

Get a matrix which can transform points to 2D
public To2DMatrix ( ) : Matrix4
return Matrix4

ToCenterMatrix() public method

Get a matrix which can move points to origin
public ToCenterMatrix ( ) : Matrix4
return Matrix4

WallMatrix() public method

Wall matrix
public WallMatrix ( ) : Matrix4
return Matrix4

Property Details

m_appCreator protected_oe property

Application creator
protected Autodesk.Revit.Creation.Application m_appCreator
return Autodesk.Revit.Creation.Application

m_commandData protected_oe property

command data
protected ExternalCommandData,Autodesk.Revit.UI m_commandData
return Autodesk.Revit.UI.ExternalCommandData

m_dataProfile protected_oe property

Wall or Floor element
protected Element,Autodesk.Revit.DB m_dataProfile
return Autodesk.Revit.DB.Element

m_docCreator protected_oe property

Document creator
protected Autodesk.Revit.Creation.Document m_docCreator
return Autodesk.Revit.Creation.Document

m_face protected_oe property

geometry object [face]
protected List m_face
return List