From 9a170f93d301faede7967f4a4a11517bf0fdd81b Mon Sep 17 00:00:00 2001 From: songsenand Date: Fri, 16 Feb 2024 07:31:39 +0800 Subject: [PATCH] fix(import): add Line_2 BREAKING CHANGE: --- tdcgal/plane/objects.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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)