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

base class of ProfileFloor and ProfileWall contains 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_docCreator Autodesk.Revit.Creation.Document
m_points List>
m_to2DMatrix Matrix4

Public Methods

Method Description
CreatePathReinforcement ( List points, bool flip ) : PathReinforcement

abstract method to create PathReinforcement

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

Protected Methods

Method Description
Profile ( ExternalCommandData commandData ) : System

constructor

Method Details

CreatePathReinforcement() public abstract method

abstract method to create PathReinforcement
public abstract CreatePathReinforcement ( List points, bool flip ) : PathReinforcement
points List points used to create PathReinforcement
flip bool used to specify whether new PathReinforcement is Filp
return PathReinforcement

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 used to draw line in pictureBox
matrix4 Matrix4 Matrix used to transform 3d to 2d /// and make picture in right scale
return void

GetFaceBounds() public method

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

GetFaceNormal() public method

Get normal of face
public GetFaceNormal ( List face ) : Vector4
face List edges in a face
return Vector4

GetFaces() public method

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

GetNeedPoints() public abstract method

Get points in first face
public abstract GetNeedPoints ( List faces ) : List>
faces List edges in all faces
return List>

GetTo2DMatrix() public abstract method

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

Profile() protected method

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

ToCenterMatrix() public method

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

Property Details

m_appCreator protected_oe property

used to create new instances of utility objects.
protected Autodesk.Revit.Creation.Application m_appCreator
return Autodesk.Revit.Creation.Application

m_commandData protected_oe property

object which contains reference to Revit Application
protected ExternalCommandData,Autodesk.Revit.UI m_commandData
return Autodesk.Revit.UI.ExternalCommandData

m_docCreator protected_oe property

used to create new instances of elements
protected Autodesk.Revit.Creation.Document m_docCreator
return Autodesk.Revit.Creation.Document

m_points protected_oe property

store all the points on the needed face
protected List> m_points
return List>

m_to2DMatrix protected_oe property

store the Matrix used to transform 3D points to 2D
protected Matrix4 m_to2DMatrix
return Matrix4