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

window form contains one picture box to show the profile of wall (or slab), and four command buttons and a check box. User can draw PathReinforcement on picture box.
Inheritance: System.Windows.Forms.Form
Mostrar archivo Open project: AMEE/revit Class Usage Examples

Public Methods

Method Description
NewPathReinforcementForm ( ) : System

constructor

NewPathReinforcementForm ( Profile profile ) : System

constructor

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

Private Methods

Method Description
ButtonClean_Click ( object sender, EventArgs e ) : void

clean all the points of the PathReinforcement when click "Clean" Button

ButtonPreview_Click ( object sender, EventArgs e ) : void

draw all the curves of PathReinforcement when click "Preview" Button

CancelButton_Click ( object sender, EventArgs e ) : void

close the form

Compute3DTo2DMatrix ( ) : Matrix4

calculate the matrix used to transform 3D to 2D

ComputeScaleMatrix ( Size size ) : Matrix4

calculate the matrix use to scale

CreateButton_Click ( object sender, EventArgs e ) : void

create PathReinforcement in Revit

DrawPoints ( Graphics graphics, Pen pen, Matrix4 matrix4, List points ) : void

draw points in the List on the form

DrawPreview ( Graphics graphics ) : void

draw preview of Path Reinforcement on the form

FlipCheckBox_CheckedChanged ( object sender, EventArgs e ) : void

redraw curve of PathReinforcement when "flip" changed

GetGeometry ( PathReinforcement pathRein ) : List>

Get geometry of the pathReinforcement

InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

NewPathReinforcementForm_KeyPress ( object sender, KeyPressEventArgs e ) : void

stop drawing path when click "Escape" button

PictureBox_MouseDown ( object sender, MouseEventArgs e ) : void

store mouse location when mouse down

PictureBox_MouseMove ( object sender, MouseEventArgs e ) : void

draw the line to where mouse moved

PictureBox_Paint ( object sender, PaintEventArgs e ) : void

draw the curve of slab (or wall) and path of PathReinforcement

Transform2DTo3D ( Point ps ) : List

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

TransformPoints ( Point pts ) : void

use matrix to transform point

Method Details

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

NewPathReinforcementForm() public method

constructor
public NewPathReinforcementForm ( ) : System
return System

NewPathReinforcementForm() public method

constructor
public NewPathReinforcementForm ( Profile profile ) : System
profile Profile ProfileWall or ProfileFloor
return System