4
4
import itertools
5
5
import math
6
6
7
- from ansys .api .edb .v1 import edb_defs_pb2 , point_data_pb2 , polygon_data_pb2_grpc
7
+ from ansys .api .edb .v1 import edb_defs_pb2 , point_data_pb2 , polygon_data_pb2 , polygon_data_pb2_grpc
8
8
9
9
from ansys .edb .core import session
10
10
from ansys .edb .core .geometry .arc_data import ArcData
@@ -27,6 +27,16 @@ class ExtentType(Enum):
27
27
BOUNDING_BOX = edb_defs_pb2 .BOUNDING_BOX
28
28
29
29
30
+ class IntersectionType (Enum ):
31
+ """Provides an enum representing intersection types for geometries."""
32
+
33
+ NO_INTERSECTION = polygon_data_pb2 .NO_INTERSECTION
34
+ THIS_INSIDE_OTHER = polygon_data_pb2 .THIS_INSIDE_OTHER
35
+ OTHER_INSIDE_THIS = polygon_data_pb2 .OTHER_INSIDE_THIS
36
+ COMMON_INTERSECTION = polygon_data_pb2 .COMMON_INTERSECTION
37
+ UNDEFINED_INTERSECTION = polygon_data_pb2 .UNDEFINED_INTERSECTION
38
+
39
+
30
40
class PolygonData :
31
41
"""Represents a polygon data object."""
32
42
@@ -434,11 +444,12 @@ def intersection_type(self, other, tol=1e-9):
434
444
435
445
Returns
436
446
-------
437
- bool
438
- ``True`` when successful, ``False`` when failed.
447
+ IntersectionType
439
448
"""
440
- return self .__stub .GetIntersectionType (
441
- messages .polygon_data_pair_with_tolerance_message (self , other , tol )
449
+ return IntersectionType (
450
+ self .__stub .GetIntersectionType (
451
+ messages .polygon_data_pair_with_tolerance_message (self , other , tol )
452
+ )
442
453
)
443
454
444
455
def circle_intersect (self , center , radius ):
0 commit comments