C# Класс 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.
Наследование: System.Windows.Forms.Form
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Clean up any resources being used.

OutputInformation ( ) : void

Output the information to log file

Приватные методы

Метод Описание
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

Описание методов

DeleteLines() публичный Метод

Delete all unnecessary lines
public DeleteLines ( ) : void
Результат void

Dispose() защищенный Метод

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
Результат void

FindClosestReference() публичный Метод

Find the first intersection with a face
public FindClosestReference ( IList references ) : Autodesk.Revit.DB.ReferenceWithContext
references IList
Результат Autodesk.Revit.DB.ReferenceWithContext

MakeLine() публичный Метод

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
Результат void

OutputInformation() защищенный Метод

Output the information to log file
protected OutputInformation ( ) : void
Результат void

RayTraceBounceForm() публичный Метод

Constructor
public RayTraceBounceForm ( ExternalCommandData commandData, Autodesk v ) : System
commandData ExternalCommandData Revit application
v Autodesk 3D View
Результат System

UpdateData() публичный Метод

Update textbox data with member variable
public UpdateData ( bool updateControl ) : bool
updateControl bool if get/set date from control
Результат bool