C# Class Revit.SDK.Samples.NewHostedSweep.CS.ElementGeometry

This class is intent to display element's wire-frame with C# GDI. It contains a solid and a bounding box of an element. It also contains transformation (translation, rotation and scale) to transform the geometry edges.
Mostra file Open project: AMEE/revit Class Usage Examples

Public Methods

Method Description
Draw ( Graphics g ) : void

Draw all the edges of solid in Graphics.

ElementGeometry ( Solid solid, BoundingBoxXYZ box ) : System

Constructor, Construct a new object with an element's geometry Solid, and its corresponding bounding box.

InitializeTransform ( double width, double height ) : void

Initialize the transform (includes translation, scale, and rotation).

ResetEdgeStates ( ) : void

Reset all the edges' status to their original status.

Private Methods

Method Description
Update ( ) : void

Update all the edges' transform (include translation, scale, and rotation), reconstruct the edge's geometry info.

Method Details

Draw() public method

Draw all the edges of solid in Graphics.
public Draw ( Graphics g ) : void
g System.Drawing.Graphics Graphics, edges will be draw in it
return void

ElementGeometry() public method

Constructor, Construct a new object with an element's geometry Solid, and its corresponding bounding box.
public ElementGeometry ( Solid solid, BoundingBoxXYZ box ) : System
solid Solid Element's geometry Solid
box BoundingBoxXYZ Element's geometry bounding box
return System

InitializeTransform() public method

Initialize the transform (includes translation, scale, and rotation).
public InitializeTransform ( double width, double height ) : void
width double Width of the view
height double Height of the view
return void

ResetEdgeStates() public method

Reset all the edges' status to their original status.
public ResetEdgeStates ( ) : void
return void