C# Класс Revit.SDK.Samples.CreateBeamSystem.CS.Line2D

represent a geometry segment line
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Clone ( ) : Line2D

creates an instance of the GeometryLine class that is identical to the current GeometryLine

FindIntersection ( Line2D line0, Line2D line1 ) : int

find the number of intersection points for two segments

FindIntersection ( Line2D line0, Line2D line1, PointF &intersectPnt ) : int

find the intersection points of two segments

GetIntervalPoint ( float rate ) : PointF

get an interval point on the line of the segment

Line2D ( ) : System

constructor default StartPoint = (0.0, 0.0), EndPoint = (1.0, 0.0)

Line2D ( PointF startPnt, PointF endPnt ) : System

constructor

Scale ( float rate ) : void

scale the segment according to the center of the segment

Shift ( float distance ) : void

parallelly shift the line

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

Метод Описание
CalculateBoundingBox ( ) : void

calculate BoundingBox according to StartPoint and EndPoint

CalculateDirection ( ) : void

calculate Direction by StartPoint and EndPoint

CalculateEndPoint ( ) : void

calculate EndPoint by StartPoint, Length and Direction

CalculateLength ( ) : void

calculate length by StartPoint and EndPoint

CalculateStartPoint ( ) : void

calculate StartPoint by EndPoint, Length and Direction

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

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

creates an instance of the GeometryLine class that is identical to the current GeometryLine
public Clone ( ) : Line2D
Результат Line2D

FindIntersection() публичный статический Метод

find the number of intersection points for two segments
public static FindIntersection ( Line2D line0, Line2D line1 ) : int
line0 Line2D first line
line1 Line2D second line
Результат int

FindIntersection() публичный статический Метод

find the intersection points of two segments
public static FindIntersection ( Line2D line0, Line2D line1, PointF &intersectPnt ) : int
line0 Line2D first line
line1 Line2D second line
intersectPnt System.Drawing.PointF 0, 1 or 2 intersection points
Результат int

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

get an interval point on the line of the segment
public GetIntervalPoint ( float rate ) : PointF
rate float rate of length from interval to StartPoint /// to length from EndPoint to interval
Результат System.Drawing.PointF

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

constructor default StartPoint = (0.0, 0.0), EndPoint = (1.0, 0.0)
public Line2D ( ) : System
Результат System

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

constructor
public Line2D ( PointF startPnt, PointF endPnt ) : System
startPnt System.Drawing.PointF StartPoint
endPnt System.Drawing.PointF EndPoint
Результат System

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

scale the segment according to the center of the segment
public Scale ( float rate ) : void
rate float rate to scale
Результат void

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

parallelly shift the line
public Shift ( float distance ) : void
distance float distance
Результат void