C# Class Revit.SDK.Samples.SlabShapeEditing.CS.SlabProfile

SlabProfile class contains Geometry information of Slab, and contains methods used to edit slab's Shape.
显示文件 Open project: AMEE/revit Class Usage Examples

Public Methods

Method Description
AddCrease ( PointF point1, PointF point2 ) : SlabShapeCrease

Add Crease on specific location

AddVertex ( PointF point ) : SlabShapeVertex

Add vertex on specific location

CanCreateVertex ( PointF pointF ) : bool

judge whether point can use to create vertex on slab

ClearRotateMatrix ( ) : void

make rotate matrix null

Draw2D ( Graphics graphics, Pen pen ) : void

draw profile of Slab in pictureBox

DrawCurve ( Graphics graphics, Pen pen, List points ) : void

draw specific points in pictureBox

Get2DTo3DMatrix ( ) : Matrix4

calculate the matrix used to transform 2D to 3D

Get3DTo2DMatrix ( ) : Matrix4

calculate the matrix used to transform 3D to 2D

GetBoundsPoints ( ) : System.Drawing.PointF[]

Get max and min coordinates of all points

GetFloorEdges ( ) : EdgeArray

Get all points of the Slab

GetMoveToCenterMatrix ( ) : Matrix4

Get a matrix which can move points to center of itself

GetScaleMatrix ( ) : Matrix4

calculate the matrix use to scale

GetSlabProfileInfo ( ) : void

Calculate geometry info for Slab

GetTo2DMatrix ( ) : Matrix4

Get a matrix which can transform points to 2D

ResetSlabShape ( ) : void

Reset index and clear line tool

RotateFloor ( double xAngle, double yAngle ) : void

rotate slab with specific angle

SlabProfile ( Autodesk floor, ExternalCommandData commandData ) : System

constructor

Private Methods

Method Description
GetMoveToCenterOfPictureBox ( ) : Matrix4

Get a matrix which can move points to center of picture box

Method Details

AddCrease() public method

Add Crease on specific location
public AddCrease ( PointF point1, PointF point2 ) : SlabShapeCrease
point1 System.Drawing.PointF first point of location where Crease add on
point2 System.Drawing.PointF second point of location where Crease add on
return SlabShapeCrease

AddVertex() public method

Add vertex on specific location
public AddVertex ( PointF point ) : SlabShapeVertex
point System.Drawing.PointF location where vertex add on
return SlabShapeVertex

CanCreateVertex() public method

judge whether point can use to create vertex on slab
public CanCreateVertex ( PointF pointF ) : bool
pointF System.Drawing.PointF
return bool

ClearRotateMatrix() public method

make rotate matrix null
public ClearRotateMatrix ( ) : void
return void

Draw2D() public method

draw profile of Slab in pictureBox
public Draw2D ( Graphics graphics, Pen pen ) : void
graphics System.Drawing.Graphics form graphic
pen System.Drawing.Pen pen used to draw line in pictureBox
return void

DrawCurve() public method

draw specific points in pictureBox
public DrawCurve ( Graphics graphics, Pen pen, List points ) : void
graphics System.Drawing.Graphics form graphic
pen System.Drawing.Pen pen used to draw line in pictureBox
points List points which need to be drawn
return void

Get2DTo3DMatrix() public method

calculate the matrix used to transform 2D to 3D
public Get2DTo3DMatrix ( ) : Matrix4
return Matrix4

Get3DTo2DMatrix() public method

calculate the matrix used to transform 3D to 2D
public Get3DTo2DMatrix ( ) : Matrix4
return Matrix4

GetBoundsPoints() public method

Get max and min coordinates of all points
public GetBoundsPoints ( ) : System.Drawing.PointF[]
return System.Drawing.PointF[]

GetFloorEdges() public method

Get all points of the Slab
public GetFloorEdges ( ) : EdgeArray
return EdgeArray

GetMoveToCenterMatrix() public method

Get a matrix which can move points to center of itself
public GetMoveToCenterMatrix ( ) : Matrix4
return Matrix4

GetScaleMatrix() public method

calculate the matrix use to scale
public GetScaleMatrix ( ) : Matrix4
return Matrix4

GetSlabProfileInfo() public method

Calculate geometry info for Slab
public GetSlabProfileInfo ( ) : void
return void

GetTo2DMatrix() public method

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

ResetSlabShape() public method

Reset index and clear line tool
public ResetSlabShape ( ) : void
return void

RotateFloor() public method

rotate slab with specific angle
public RotateFloor ( double xAngle, double yAngle ) : void
xAngle double rotate angle in X direction
yAngle double rotate angle in Y direction
return void

SlabProfile() public method

constructor
public SlabProfile ( Autodesk floor, ExternalCommandData commandData ) : System
floor Autodesk Floor object in Revit
commandData ExternalCommandData contains reference of Revit Application
return System