C# Class Revit.SDK.Samples.Truss.CS.TrussGeometry

TrussGeometry class contains Geometry information of new created Truss, and contains methods used to Edit profile of truss.
显示文件 Open project: AMEE/revit Class Usage Examples

Public Methods

Method Description
AddBottomChordMovePoint ( int x, int y ) : void

add move point to line tool of bottom chord

AddBottomChordPoint ( int x, int y ) : void

add new point to line tool which used to draw bottom chord

AddTopChordMovePoint ( int x, int y ) : void

add move point to line tool of top chord

AddTopChordPoint ( int x, int y ) : void

add new point to line tool which used to draw top chord

ClearChords ( ) : void

clear points of top chord and bottom chord

ClearMovePoint ( ) : void
CreateGraphicsPath ( ) : void

Create GraphicsPath object for each curves of truss

Draw2D ( Graphics graphics, Pen pen ) : void

draw profile of truss in pictureBox

DrawSelectedLineRed ( Graphics graphics ) : void

Draw selected line (beam) by red pen

Get2DTo3DMatrix ( ) : Matrix4

calculate the matrix used to transform 2D to 3D

Get2DToTrussProfileMatrix ( ) : Matrix4

calculate the matrix used to transform 2d points (on pictureBox) to the plane of truss which use to set profile

Get3DTo2DMatrix ( ) : Matrix4

calculate the matrix used to transform 3D to 2D

GetBoundsPoints ( ) : Autodesk.Revit.DB.XYZ[]

Get max and min coordinates of all points

GetMoveToCenterMatrix ( ) : Matrix4

Get a matrix which can move points to center

GetScaleMatrix ( ) : Matrix4

calculate the matrix use to scale

GetSelectedBeam ( ExternalCommandData commandData ) : FamilyInstance

Get selected beam (truss member) by select index

GetTo2DMatrix ( ) : Matrix4

Get a matrix which can transform points to 2D

GetTrussPoints ( ) : List

Get points of the truss

RemoveProfile ( ) : void

restores truss profile to original

Reset ( ) : void

Reset index and clear line tool

SelectTrussMember ( int x, int y ) : int

Judge which truss member has been selected via location of mouse

SetProfile ( ExternalCommandData commandData ) : void

Set profile of truss

TrussGeometry ( Autodesk truss, ExternalCommandData commandData ) : System

constructor

Private Methods

Method Description
GetChordPoints ( LineTool chord, CurveArray curves, Autodesk createApp ) : void
GetTrussGeometryInfo ( ) : void

Calculate geometry info for truss

Method Details

AddBottomChordMovePoint() public method

add move point to line tool of bottom chord
public AddBottomChordMovePoint ( int x, int y ) : void
x int X coordinate
y int Y coordinate
return void

AddBottomChordPoint() public method

add new point to line tool which used to draw bottom chord
public AddBottomChordPoint ( int x, int y ) : void
x int X coordinate
y int Y coordinate
return void

AddTopChordMovePoint() public method

add move point to line tool of top chord
public AddTopChordMovePoint ( int x, int y ) : void
x int X coordinate
y int Y coordinate
return void

AddTopChordPoint() public method

add new point to line tool which used to draw top chord
public AddTopChordPoint ( int x, int y ) : void
x int X coordinate
y int Y coordinate
return void

ClearChords() public method

clear points of top chord and bottom chord
public ClearChords ( ) : void
return void

ClearMovePoint() public method

public ClearMovePoint ( ) : void
return void

CreateGraphicsPath() public method

Create GraphicsPath object for each curves of truss
public CreateGraphicsPath ( ) : void
return void

Draw2D() public method

draw profile of truss 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

DrawSelectedLineRed() public method

Draw selected line (beam) by red pen
public DrawSelectedLineRed ( Graphics graphics ) : void
graphics System.Drawing.Graphics graphics of picture box
return void

Get2DTo3DMatrix() public method

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

Get2DToTrussProfileMatrix() public method

calculate the matrix used to transform 2d points (on pictureBox) to the plane of truss which use to set profile
public Get2DToTrussProfileMatrix ( ) : 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 ( ) : Autodesk.Revit.DB.XYZ[]
return Autodesk.Revit.DB.XYZ[]

GetMoveToCenterMatrix() public method

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

GetScaleMatrix() public method

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

GetSelectedBeam() public method

Get selected beam (truss member) by select index
public GetSelectedBeam ( ExternalCommandData commandData ) : FamilyInstance
commandData ExternalCommandData object which contains reference of Revit Application
return FamilyInstance

GetTo2DMatrix() public method

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

GetTrussPoints() public method

Get points of the truss
public GetTrussPoints ( ) : List
return List

RemoveProfile() public method

restores truss profile to original
public RemoveProfile ( ) : void
return void

Reset() public method

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

SelectTrussMember() public method

Judge which truss member has been selected via location of mouse
public SelectTrussMember ( int x, int y ) : int
x int X coordinate of mouse location
y int Y coordinate of mouse location
return int

SetProfile() public method

Set profile of truss
public SetProfile ( ExternalCommandData commandData ) : void
commandData ExternalCommandData object which contains reference of Revit Application
return void

TrussGeometry() public method

constructor
public TrussGeometry ( Autodesk truss, ExternalCommandData commandData ) : System
truss Autodesk new created truss object in Revit
commandData ExternalCommandData
return System