C# Class Revit.SDK.Samples.CreateBeamSystem.CS.Line2D

represent a geometry segment line
Datei anzeigen Open project: AMEE/revit Class Usage Examples

Public Methods

Method Description
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

Private Methods

Method Description
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

Method Details

Clone() public method

creates an instance of the GeometryLine class that is identical to the current GeometryLine
public Clone ( ) : Line2D
return Line2D

FindIntersection() public static method

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
return int

FindIntersection() public static method

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
return int

GetIntervalPoint() public method

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
return System.Drawing.PointF

Line2D() public method

constructor default StartPoint = (0.0, 0.0), EndPoint = (1.0, 0.0)
public Line2D ( ) : System
return System

Line2D() public method

constructor
public Line2D ( PointF startPnt, PointF endPnt ) : System
startPnt System.Drawing.PointF StartPoint
endPnt System.Drawing.PointF EndPoint
return System

Scale() public method

scale the segment according to the center of the segment
public Scale ( float rate ) : void
rate float rate to scale
return void

Shift() public method

parallelly shift the line
public Shift ( float distance ) : void
distance float distance
return void