diff --git a/tdcgal/plane/objects.py b/tdcgal/plane/objects.py index 6083f9f..6133dbd 100644 --- a/tdcgal/plane/objects.py +++ b/tdcgal/plane/objects.py @@ -4,7 +4,7 @@ from sympy import symbols, solve from loguru import logger -from ..cgal_bindings.plane import Point_2, Segment_2, squared_distance +from ..cgal_bindings.plane import Point_2, Segment_2, Line_2, squared_distance def point_maker(pre_point): @@ -73,11 +73,9 @@ class Segment2D(Shape2D, Segment_2): def target(self): return self._target() - # 与线段共线的直线 - def supporting_line(self) -> Line: - return self.supporting_line() -"""class Line(Shape2D): +# 直线类 +class Line(Shape2D, Line_2): def __init__(self, point1, point2, **kwargs): super(Line, self).__init__(**kwargs) self.point1 = point_maker(point1) @@ -222,7 +220,7 @@ class Segment2D(Shape2D, Segment_2): raise ValueError("Invalid input for Line") """""" - +""" class Rectangle(Shape2D): def __init__(self, point1, point2, **kwargs): super(Rectangle, self).__init__(**kwargs)