File size: 1,318 Bytes
985c397
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# SPDX-License-Identifier: LGPL-2.1-or-later

from __future__ import annotations

from Base.Metadata import export
from typing import overload
from Part.Geom2d import Curve2d

@export(
    PythonName="Part.Geom2d.Line2dSegment",
    Twin="Geom2dLineSegment",
    TwinPointer="Geom2dLineSegment",
    Include="Mod/Part/App/Geometry2d.h",
    FatherInclude="Mod/Part/App/Geom2d/Curve2dPy.h",
    Constructor=True,
)
class Line2dSegment(Curve2d):
    """
    Describes a line segment in 2D space.

    To create a line there are several ways:
    Part.Geom2d.Line2dSegment()
        Creates a default line

    Part.Geom2d.Line2dSegment(Line)
        Creates a copy of the given line

    Part.Geom2d.Line2dSegment(Point1,Point2)
        Creates a line that goes through two given points.
    """

    StartPoint: object = ...
    """Returns the start point of this line segment."""

    EndPoint: object = ...
    """Returns the end point of this line segment."""

    @overload
    def __init__(self) -> None: ...
    @overload
    def __init__(self, Line: "Line2dSegment") -> None: ...
    @overload
    def __init__(self, Point1: object, Point2: object) -> None: ...
    def setParameterRange(self) -> None:
        """
        Set the parameter range of the underlying line segment geometry.
        """
        ...