C# Class Revit.SDK.Samples.Openings.CS.WireFrame

WireFrame class for generate the model lines and fit the picture box's size to display
Inheritance: ObjectSketch
Exibir arquivo Open project: AMEE/revit Class Usage Examples

Public Methods

Method Description
Draw ( Graphics g, Matrix translate ) : void

draw override method

Draw2D ( float previewWidth, float previewHeigh, Graphics graphics ) : void

draw the line contain in m_lines in 2d Preview

WireFrame ( ReadOnlyCollection line3Ds ) : System

The default constructor

Private Methods

Method Description
CalculateCanvasRegion ( float previewWidth, float previewHeigh ) : System.Drawing.PointF[]

get the display region, adjust the proportion and location

CalculateTransform ( float previewWidth, float previewHeigh ) : void

calculate the transform between canvas and geometry objects

Frame3DTo2D ( ReadOnlyCollection line3Ds ) : void

transform 3d point to 2d (if all points in the same plane)

Method Details

Draw() public method

draw override method
public Draw ( Graphics g, Matrix translate ) : void
g System.Drawing.Graphics graphics object
translate Matrix matrix use to transform points or vectors
return void

Draw2D() public method

draw the line contain in m_lines in 2d Preview
public Draw2D ( float previewWidth, float previewHeigh, Graphics graphics ) : void
previewWidth float Width of Preview
previewHeigh float Heigh of Preview
graphics System.Drawing.Graphics Graphics to draw
return void

WireFrame() public method

The default constructor
public WireFrame ( ReadOnlyCollection line3Ds ) : System
line3Ds ReadOnlyCollection a list contain all the line in WireFrame
return System