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

represent a geometry segment line
Afficher le fichier Open project: AMEE/revit Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

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

FindIntersection() public static méthode

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
Résultat int

FindIntersection() public static méthode

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
Résultat int

GetIntervalPoint() public méthode

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
Résultat System.Drawing.PointF

Line2D() public méthode

constructor default StartPoint = (0.0, 0.0), EndPoint = (1.0, 0.0)
public Line2D ( ) : System
Résultat System

Line2D() public méthode

constructor
public Line2D ( PointF startPnt, PointF endPnt ) : System
startPnt System.Drawing.PointF StartPoint
endPnt System.Drawing.PointF EndPoint
Résultat System

Scale() public méthode

scale the segment according to the center of the segment
public Scale ( float rate ) : void
rate float rate to scale
Résultat void

Shift() public méthode

parallelly shift the line
public Shift ( float distance ) : void
distance float distance
Résultat void