C# Class Revit.SDK.Samples.RayTraceBounce.CS.RayTraceBounceForm

1. This form allowing entry of a coordinate location (X, Y, Z) within the model and a coordinate direction (i, j, k). 2. Launch a ray from this location in this direction to find the first intersection with a face 3. Calculate the reflection angle of the ray from the face and launch another ray to find the next intersection 4. For each ray/intersection, create a model line connecting the two points. The end result should be a series of model lines bouncing from item to item. 5. Provide a hard limit of say, 100 intersections, to prevent endless reflections within an enclosed space. 6. Write a log file of the intersection containing: the element type, id, and material of the intersected face.
Inheritance: System.Windows.Forms.Form
Afficher le fichier Open project: AMEE/revit Class Usage Examples

Méthodes publiques

Méthode Description
DeleteLines ( ) : void

Delete all unnecessary lines

FindClosestReference ( IList references ) : Autodesk.Revit.DB.ReferenceWithContext

Find the first intersection with a face

MakeLine ( Autodesk startpt, Autodesk endpt, Autodesk direction, string style ) : void

Make a line from start point to end point with the direction and style

RayTraceBounceForm ( ExternalCommandData commandData, Autodesk v ) : System

Constructor

UpdateData ( bool updateControl ) : bool

Update textbox data with member variable

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

OutputInformation ( ) : void

Output the information to log file

Private Methods

Méthode Description
InitializeComponent ( ) : void

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

buttonCancel_Click ( object sender, EventArgs e ) : void

Cancel button click event

buttonOK_Click ( object sender, EventArgs e ) : void

OK button click event

Method Details

DeleteLines() public méthode

Delete all unnecessary lines
public DeleteLines ( ) : void
Résultat void

Dispose() protected méthode

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

FindClosestReference() public méthode

Find the first intersection with a face
public FindClosestReference ( IList references ) : Autodesk.Revit.DB.ReferenceWithContext
references IList
Résultat Autodesk.Revit.DB.ReferenceWithContext

MakeLine() public méthode

Make a line from start point to end point with the direction and style
public MakeLine ( Autodesk startpt, Autodesk endpt, Autodesk direction, string style ) : void
startpt Autodesk start point
endpt Autodesk end point
direction Autodesk the direction which decide the plane
style string line style name
Résultat void

OutputInformation() protected méthode

Output the information to log file
protected OutputInformation ( ) : void
Résultat void

RayTraceBounceForm() public méthode

Constructor
public RayTraceBounceForm ( ExternalCommandData commandData, Autodesk v ) : System
commandData ExternalCommandData Revit application
v Autodesk 3D View
Résultat System

UpdateData() public méthode

Update textbox data with member variable
public UpdateData ( bool updateControl ) : bool
updateControl bool if get/set date from control
Résultat bool