eVision Python API
Loading...
Searching...
No Matches
eVision.Legacy.ELine Class Reference

Represents a model of a line segment. More...

Inheritance diagram for eVision.Legacy.ELine:
Collaboration diagram for eVision.Legacy.ELine:

Public Member Functions

None __init__ (self)
 Constructs a eVision.Legacy.ELine object.
None __init__ (self, eVision.EPoint center, float length, float angle)
 Constructs a eVision.Legacy.ELine object.
None __init__ (self, eVision.EPoint center, float length)
 Constructs a eVision.Legacy.ELine object.
None __init__ (self, eVision.EPoint origin, eVision.EPoint end)
 Constructs a eVision.Legacy.ELine object.
None __init__ (self, eVision.Legacy.ELine other)
 Constructs a eVision.Legacy.ELine object.
None CopyTo (self, eVision.Legacy.ELine other)
 Copies all the data of the current eVision.Legacy.ELine object into another eVision.Legacy.ELine object and returns it.
None SetFromOriginAndEnd (self, eVision.EPoint origin, eVision.EPoint end)
 Sets the geometric parameters (center coordinates, length, and rotation angle) of a eVision.Legacy.ELine object.
None SetFromTwoPoints (self, eVision.EPoint origin, eVision.EPoint end)
 Sets the geometric parameters (center coordinates, length, and rotation angle) of a eVision.Legacy.ELine object.
eVision.EPoint GetPoint (self, float fraction)
 Returns the coordinates of a point along the line.
None Load (self, str path)
 Load the eVision.Legacy.ELine configuration.
None Load (self, eVision.ESerializer|None serializer)
 Load the eVision.Legacy.ELine configuration.
None Save (self, str path)
 Save the eVision.Legacy.ELine configuration.
None Save (self, eVision.ESerializer|None serializer)
 Save the eVision.Legacy.ELine configuration.
float Length (self)
 Length of the eVision.Legacy.ELine object.
 Length (self, float value)
 Length of the eVision.Legacy.ELine object.
eVision.EPoint Org (self)
 Origin point coordinates of the eVision.Legacy.ELine object.
eVision.EPoint End (self)
 End point coordinates of the eVision.Legacy.ELine object.
Public Member Functions inherited from eVision.Legacy.EFrame
None __init__ (self)
 Constructs a eVision.Legacy.EFrame object.
None __init__ (self, float centerX, float centerY, float angle, float scale)
 Constructs a eVision.Legacy.EFrame object.
None __init__ (self, float centerX, float centerY, float angle)
 Constructs a eVision.Legacy.EFrame object.
None __init__ (self, float centerX, float centerY)
 Constructs a eVision.Legacy.EFrame object.
None __init__ (self, eVision.EPoint center, float angle, float scale)
 Constructs a eVision.Legacy.EFrame object.
None __init__ (self, eVision.Legacy.EFrame frame)
 Constructs a eVision.Legacy.EFrame object.
eVision.EPoint LocalToGlobal (self, eVision.EPoint local)
 Transforms a geometrical element from local to global coordinates (local to world).
eVision.Legacy.ELine LocalToGlobal (self, eVision.Legacy.ELine local)
 Transforms a geometrical element from local to global coordinates (local to world).
eVision.Legacy.ECircle LocalToGlobal (self, eVision.Legacy.ECircle local)
 Transforms a geometrical element from local to global coordinates (local to world).
eVision.Legacy.EFrame LocalToGlobal (self, eVision.Legacy.EFrame local)
 Transforms a geometrical element from local to global coordinates (local to world).
eVision.EPoint GlobalToLocal (self, eVision.EPoint global_)
 Transforms a geometrical element from global to local coordinates (world to local).
eVision.Legacy.EFrame GlobalToLocal (self, eVision.Legacy.EFrame global_)
 Transforms a geometrical element from global to local coordinates (world to local).
None SetCenterXY (self, float centerX, float centerY)
 Sets the center coordinates of a eVision.Legacy.EFrame object.
eVision.EPoint MidPoint (self, eVision.EPoint Point)
 Returns the middle coordinate between this eVision.Legacy.EFrame object's center and another eVision.Legacy.EFrame object's center.
eVision.EPoint Rotate (self, float angle)
 Returns another eVision.EPoint object containing the coordinates of the rotated center point.
float Square (self)
 Compute the sum of the squared coordinates of the center of a eVision.Legacy.EFrame.
float Modulus (self)
 Compute the euclidean modulus of the center of a eVision.Legacy.EFrame.
float Argument (self)
 Compute the polar argument of the center of eVision.Legacy.EFrame object.
float Dot (self, eVision.EPoint Point)
 Compute the dot product of the centers of two eVision.Legacy.EFrame objects.
float Cross (self, eVision.EPoint Point)
 Compute the cross product of the centers of two eVision.Legacy.EFrame objects.
float Area (self, eVision.EPoint Point)
 Compute the oriented area of the parallelogram built on the centers of two eVision.Legacy.EFrame.
eVision.EPoint Project (self, eVision.Legacy.ELine shape)
 Compute the orthogonal projection of the center of a eVision.Legacy.EFrame on another shape.
eVision.EPoint Project (self, eVision.Legacy.ECircle shape)
 Compute the orthogonal projection of the center of a eVision.Legacy.EFrame on another shape.
float SquaredDistance (self, eVision.EPoint Point)
 Compute the squared distance between the centers of two eVision.Legacy.EFrame.
eVision.EPoint Move (self, float angle, float distance)
 Return the position by moving the center along angle by distance.
float Distance (self, eVision.EPoint point)
 Returns the distance between the addressed point and the center of eVision.Legacy.EFrame object.
float Distance (self, eVision.Legacy.ELine line, bool segmentOnly)
 Returns the distance between the addressed point and the center of eVision.Legacy.EFrame object.
float Distance (self, eVision.Legacy.ELine line)
 Returns the distance between the addressed point and the center of eVision.Legacy.EFrame object.
float Distance (self, eVision.Legacy.ECircle circle, bool arcOnly)
 Returns the distance between the addressed point and the center of eVision.Legacy.EFrame object.
float Distance (self, eVision.Legacy.ECircle circle)
 Returns the distance between the addressed point and the center of eVision.Legacy.EFrame object.
float Angle (self)
 Orientation of the frame.
 Angle (self, float value)
 Orientation of the frame.
float Scale (self)
 Horizontal sensor resolution, in pixels per unit.
 Scale (self, float value)
 Horizontal sensor resolution, in pixels per unit.
float CenterX (self)
 Abscissa of the origin point of the frame.
float CenterY (self)
 Ordinate of the origin point of the frame.
eVision.EPoint Center (self)
 Center.
 Center (self, eVision.EPoint value)
 Center.
float X (self)
 Abscissa (X coordinate) of the eVision.Legacy.EFrame object.
 X (self, float value)
 Abscissa (X coordinate) of the eVision.Legacy.EFrame object.
float Y (self)
 Ordinate (Y coordinate) of the eVision.Legacy.EFrame object.
 Y (self, float value)
 Ordinate (Y coordinate) of the eVision.Legacy.EFrame object.

Static Public Member Functions

float GetAngleBetweenLines (eVision.Legacy.ELine line1, eVision.Legacy.ELine line2)
 Computes the angle between two lines.
float GetDistanceBetweenPointAndLine (eVision.EPoint pt, eVision.Legacy.ELine line, bool limited)
 Computes the distance between a point and a line.
float GetDistanceBetweenPointAndLine (eVision.EPoint pt, eVision.Legacy.ELine line)
 Computes the distance between a point and a line.
eVision.EPoint GetProjectionOfPointOnLine (eVision.EPoint pt, eVision.Legacy.ELine line, bool limited)
 Computes the projection of a point on a line.
eVision.EPoint GetProjectionOfPointOnLine (eVision.EPoint pt, eVision.Legacy.ELine line)
 Computes the projection of a point on a line.
int GetIntersectionOfLines (eVision.Legacy.ELine line1, eVision.Legacy.ELine line2, eVision.EPoint intersection, bool limited)
 Computes the intersection between two lines.
int GetIntersectionOfLines (eVision.Legacy.ELine line1, eVision.Legacy.ELine line2, eVision.EPoint intersection)
 Computes the intersection between two lines.

Detailed Description

Represents a model of a line segment.

Remarks:

License(s): BasicTypes

Constructor & Destructor Documentation

◆ __init__() [1/5]

None eVision.Legacy.ELine.__init__ ( self)

Constructs a eVision.Legacy.ELine object.

◆ __init__() [2/5]

None eVision.Legacy.ELine.__init__ ( self,
eVision.EPoint center,
float length,
float angle )

Constructs a eVision.Legacy.ELine object.

Parameters
centerCenter coordinates of the line at its nominal position. The default value is (0,0).
lengthNominal length of the line. The default value is 100.
angleNominal rotation angle of the line. The default value is 0.

◆ __init__() [3/5]

None eVision.Legacy.ELine.__init__ ( self,
eVision.EPoint center,
float length )

Constructs a eVision.Legacy.ELine object.

Parameters
centerCenter coordinates of the line at its nominal position. The default value is (0,0).
lengthNominal length of the line. The default value is 100.

◆ __init__() [4/5]

None eVision.Legacy.ELine.__init__ ( self,
eVision.EPoint origin,
eVision.EPoint end )

Constructs a eVision.Legacy.ELine object.

Parameters
originOrigin point coordinates of the line.
endEnd point coordinates of the line.

◆ __init__() [5/5]

None eVision.Legacy.ELine.__init__ ( self,
eVision.Legacy.ELine other )

Constructs a eVision.Legacy.ELine object.

Parameters
otherAnother eVision.Legacy.ELine object to be copied in the new eVision.Legacy.ELine object.

Member Function Documentation

◆ CopyTo()

None eVision.Legacy.ELine.CopyTo ( self,
eVision.Legacy.ELine other )

Copies all the data of the current eVision.Legacy.ELine object into another eVision.Legacy.ELine object and returns it.

Remarks:

In the overload taking a pointer, in case of a NULL pointer, a new eVision.Legacy.ELine object will be created and returned.

Parameters
othereVision.Legacy.ELine object in which the current eVision.Legacy.ELine object data have to be copied.

Reimplemented from eVision.Legacy.EFrame.

◆ End()

eVision.EPoint eVision.Legacy.ELine.End ( self)

End point coordinates of the eVision.Legacy.ELine object.

◆ GetAngleBetweenLines()

float eVision.Legacy.ELine.GetAngleBetweenLines ( eVision.Legacy.ELine line1,
eVision.Legacy.ELine line2 )
static

Computes the angle between two lines.

Remarks:

The angle returned by this function is signed in the trigonometric sense, meaning that angle(1,2) = -angle(2,1).

Parameters
line1First line
line2Second line

◆ GetDistanceBetweenPointAndLine() [1/2]

float eVision.Legacy.ELine.GetDistanceBetweenPointAndLine ( eVision.EPoint pt,
eVision.Legacy.ELine line )
static

Computes the distance between a point and a line.

Remarks:

When the line is restricted to a segment and the orthogonal projection of the point onto the line falls outside this segment, the distance to the closest endpoint of the segment is returned instead.

Parameters
ptThe point.
lineThe line.

◆ GetDistanceBetweenPointAndLine() [2/2]

float eVision.Legacy.ELine.GetDistanceBetweenPointAndLine ( eVision.EPoint pt,
eVision.Legacy.ELine line,
bool limited )
static

Computes the distance between a point and a line.

Remarks:

When the line is restricted to a segment and the orthogonal projection of the point onto the line falls outside this segment, the distance to the closest endpoint of the segment is returned instead.

Parameters
ptThe point.
lineThe line.
limitedIndicates if the line parameter should be considered as an infinite line or as a segment.

◆ GetIntersectionOfLines() [1/2]

int eVision.Legacy.ELine.GetIntersectionOfLines ( eVision.Legacy.ELine line1,
eVision.Legacy.ELine line2,
eVision.EPoint intersection )
static

Computes the intersection between two lines.

Remarks:

The function returns the number of intersections found. It will return -1 if the two lines are overlapping.

Parameters
line1First line.
line2Second line.
intersectionFound intersection.

◆ GetIntersectionOfLines() [2/2]

int eVision.Legacy.ELine.GetIntersectionOfLines ( eVision.Legacy.ELine line1,
eVision.Legacy.ELine line2,
eVision.EPoint intersection,
bool limited )
static

Computes the intersection between two lines.

Remarks:

The function returns the number of intersections found. It will return -1 if the two lines are overlapping.

Parameters
line1First line.
line2Second line.
intersectionFound intersection.
limitedIndicates if the line parameters should be considered as infinite lines or as a segments.

◆ GetPoint()

eVision.EPoint eVision.Legacy.ELine.GetPoint ( self,
float fraction )

Returns the coordinates of a point along the line.

Parameters
fractionPoint location expressed as a fraction of the line length (range [-1, +1]).

◆ GetProjectionOfPointOnLine() [1/2]

eVision.EPoint eVision.Legacy.ELine.GetProjectionOfPointOnLine ( eVision.EPoint pt,
eVision.Legacy.ELine line )
static

Computes the projection of a point on a line.

Remarks:

When the line is restricted to a segment and the orthogonal projection of the point onto the line falls outside this segment, the closest endpoint of the segment is returned instead.

Parameters
ptThe point.
lineThe line.

◆ GetProjectionOfPointOnLine() [2/2]

eVision.EPoint eVision.Legacy.ELine.GetProjectionOfPointOnLine ( eVision.EPoint pt,
eVision.Legacy.ELine line,
bool limited )
static

Computes the projection of a point on a line.

Remarks:

When the line is restricted to a segment and the orthogonal projection of the point onto the line falls outside this segment, the closest endpoint of the segment is returned instead.

Parameters
ptThe point.
lineThe line.
limitedIndicates if the line parameter should be considered as an infinite line or as a segment.

◆ Length() [1/2]

float eVision.Legacy.ELine.Length ( self)

Length of the eVision.Legacy.ELine object.

Remarks:

By default, the length of the line is 100, which means 100 pixels when the field of view is not calibrated, and 100 physical units in case of a calibrated field of view.

◆ Length() [2/2]

eVision.Legacy.ELine.Length ( self,
float value )

Length of the eVision.Legacy.ELine object.

Remarks:

By default, the length of the line is 100, which means 100 pixels when the field of view is not calibrated, and 100 physical units in case of a calibrated field of view.

◆ Load() [1/2]

None eVision.Legacy.ELine.Load ( self,
eVision.ESerializer | None serializer )

Load the eVision.Legacy.ELine configuration.

The given eVision.ESerializer must have been created for reading.

Parameters
serializerThe serializer.

Reimplemented from eVision.Legacy.EFrame.

◆ Load() [2/2]

None eVision.Legacy.ELine.Load ( self,
str path )

Load the eVision.Legacy.ELine configuration.

The given eVision.ESerializer must have been created for reading.

Parameters
pathThe file path.

Reimplemented from eVision.Legacy.EFrame.

◆ Org()

eVision.EPoint eVision.Legacy.ELine.Org ( self)

Origin point coordinates of the eVision.Legacy.ELine object.

◆ Save() [1/2]

None eVision.Legacy.ELine.Save ( self,
eVision.ESerializer | None serializer )

Save the eVision.Legacy.ELine configuration.

The given eVision.ESerializer must have been created for writing.

Parameters
serializerThe serializer.

Reimplemented from eVision.Legacy.EFrame.

◆ Save() [2/2]

None eVision.Legacy.ELine.Save ( self,
str path )

Save the eVision.Legacy.ELine configuration.

The given eVision.ESerializer must have been created for writing.

Parameters
pathThe file path.

Reimplemented from eVision.Legacy.EFrame.

◆ SetFromOriginAndEnd()

None eVision.Legacy.ELine.SetFromOriginAndEnd ( self,
eVision.EPoint origin,
eVision.EPoint end )

Sets the geometric parameters (center coordinates, length, and rotation angle) of a eVision.Legacy.ELine object.

Parameters
originOrigin point coordinates of the line.
endEnd point coordinates of the line.

◆ SetFromTwoPoints()

None eVision.Legacy.ELine.SetFromTwoPoints ( self,
eVision.EPoint origin,
eVision.EPoint end )

Sets the geometric parameters (center coordinates, length, and rotation angle) of a eVision.Legacy.ELine object.

Deprecated

Use eVision.Legacy.ELine.SetFromOriginAndEnd.

Deprecated in version 25.10. Scheduled to be removed in version 27.6.

Parameters
originOrigin point coordinates of the line.
endEnd point coordinates of the line.