open-space-toolkit-mathematics 2.0.3__py38-none-any.whl → 2.0.4__py38-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of open-space-toolkit-mathematics might be problematic. Click here for more details.
- {open_space_toolkit_mathematics-2.0.3.dist-info → open_space_toolkit_mathematics-2.0.4.dist-info}/METADATA +1 -1
- {open_space_toolkit_mathematics-2.0.3.dist-info → open_space_toolkit_mathematics-2.0.4.dist-info}/RECORD +8 -8
- ostk/mathematics/OpenSpaceToolkitMathematicsPy.cpython-38-x86_64-linux-gnu.so +0 -0
- ostk/mathematics/test/geometry/d3/object/test_composite.py +226 -107
- ostk/mathematics/test/geometry/d3/object/test_point.py +0 -3
- {open_space_toolkit_mathematics-2.0.3.dist-info → open_space_toolkit_mathematics-2.0.4.dist-info}/WHEEL +0 -0
- {open_space_toolkit_mathematics-2.0.3.dist-info → open_space_toolkit_mathematics-2.0.4.dist-info}/top_level.txt +0 -0
- {open_space_toolkit_mathematics-2.0.3.dist-info → open_space_toolkit_mathematics-2.0.4.dist-info}/zip-safe +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
ostk/__init__.py,sha256=epnVn2PwdQkUDZ1msqBRO5nEZIOUBIq-IfK3IlNPijE,21
|
|
2
|
-
ostk/mathematics/OpenSpaceToolkitMathematicsPy.cpython-38-x86_64-linux-gnu.so,sha256=
|
|
2
|
+
ostk/mathematics/OpenSpaceToolkitMathematicsPy.cpython-38-x86_64-linux-gnu.so,sha256=9DoUM3lrno828lkhGHAO0xSjZcvmwbgZ7MqSWyHP41Y,1484472
|
|
3
3
|
ostk/mathematics/__init__.py,sha256=U81I6jh2hIPyuT4dtZjNcLi-CQ8yXIvtFn32tVK1YCY,92
|
|
4
4
|
ostk/mathematics/libopen-space-toolkit-mathematics.so.2,sha256=pqy9-fu6_kOobH5sEvdIA2PmIvBXCxyocb2dews5ntg,112619928
|
|
5
5
|
ostk/mathematics/test/__init__.py,sha256=epnVn2PwdQkUDZ1msqBRO5nEZIOUBIq-IfK3IlNPijE,21
|
|
@@ -30,11 +30,11 @@ ostk/mathematics/test/geometry/d3/test_intersection.py,sha256=7QrduhVXyTHG0lGLEH
|
|
|
30
30
|
ostk/mathematics/test/geometry/d3/test_object.py,sha256=7QrduhVXyTHG0lGLEHNgv4olvFrR6TR0MNgu9acmRd4,61
|
|
31
31
|
ostk/mathematics/test/geometry/d3/test_transformation.py,sha256=7QrduhVXyTHG0lGLEHNgv4olvFrR6TR0MNgu9acmRd4,61
|
|
32
32
|
ostk/mathematics/test/geometry/d3/object/__init__.py,sha256=epnVn2PwdQkUDZ1msqBRO5nEZIOUBIq-IfK3IlNPijE,21
|
|
33
|
-
ostk/mathematics/test/geometry/d3/object/test_composite.py,sha256=
|
|
33
|
+
ostk/mathematics/test/geometry/d3/object/test_composite.py,sha256=03wi6k35a2lwyM29q5STjqX4CHL1IofYm2hBzERQlzU,7710
|
|
34
34
|
ostk/mathematics/test/geometry/d3/object/test_cuboid.py,sha256=xJp6ImRnkNw_k6Tt8RaSXlsGnSqM-SlQSBfbm7SwJuA,470
|
|
35
35
|
ostk/mathematics/test/geometry/d3/object/test_line.py,sha256=d-CvDjXeH1WQcleCU2yt4FdHLhWgy45NGzn3mEwy6xE,1690
|
|
36
36
|
ostk/mathematics/test/geometry/d3/object/test_linestring.py,sha256=pocs-AGFbjfRAzfpYOfQ-vivRZ7KdGxS86m8MjHmPSQ,5916
|
|
37
|
-
ostk/mathematics/test/geometry/d3/object/test_point.py,sha256
|
|
37
|
+
ostk/mathematics/test/geometry/d3/object/test_point.py,sha256=-5Cjy3Pru3UWbMO7vBDNiJYfUkqVVxxZtDgsMYYaosc,6611
|
|
38
38
|
ostk/mathematics/test/geometry/d3/object/test_point_set.py,sha256=p5A1gM9UfB_-GgEavN-7Z8IgFc4qp1nAnHRYKTecvS0,3506
|
|
39
39
|
ostk/mathematics/test/geometry/d3/object/test_polygon.py,sha256=7ZjucWMsNzppN3pptxHgGgOtOGv1grseT7VnctgOJP4,4262
|
|
40
40
|
ostk/mathematics/test/geometry/d3/object/test_segment.py,sha256=HWg-BCJoa74EgWlvUPd85v_qR2p9THi0ejhtG0EQNEA,4027
|
|
@@ -48,8 +48,8 @@ ostk/mathematics/test/object/__init__.py,sha256=epnVn2PwdQkUDZ1msqBRO5nEZIOUBIq-
|
|
|
48
48
|
ostk/mathematics/test/object/test_interval.py,sha256=yZT4eo5kM4iBE1GBoOxlESaUl5QL3xdsZwrG-6fA7ME,17941
|
|
49
49
|
ostk/mathematics/test/object/test_vector.py,sha256=5MG3s8vhgoGKAIc5GzswlZObyIrJDIPNtsEd5wNORPU,76
|
|
50
50
|
ostk/mathematics/test/solver/test_numerical_solver.py,sha256=fY7e6imxsj6PU_LXV9YcjNvddfegrqDjw9TmHUPA-kQ,5667
|
|
51
|
-
open_space_toolkit_mathematics-2.0.
|
|
52
|
-
open_space_toolkit_mathematics-2.0.
|
|
53
|
-
open_space_toolkit_mathematics-2.0.
|
|
54
|
-
open_space_toolkit_mathematics-2.0.
|
|
55
|
-
open_space_toolkit_mathematics-2.0.
|
|
51
|
+
open_space_toolkit_mathematics-2.0.4.dist-info/METADATA,sha256=by-U9v5nHzjZf4pW4Z6R67TvejD6d63iWvQMrkndx3c,1806
|
|
52
|
+
open_space_toolkit_mathematics-2.0.4.dist-info/WHEEL,sha256=LNQH4F1F9_Ua4GgazGQDFGQhQ8B1tSrkPIuEzIRv9nc,93
|
|
53
|
+
open_space_toolkit_mathematics-2.0.4.dist-info/top_level.txt,sha256=zOR18699uDYnafgarhL8WU_LmTZY_5NVqutv-flp_x4,5
|
|
54
|
+
open_space_toolkit_mathematics-2.0.4.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
55
|
+
open_space_toolkit_mathematics-2.0.4.dist-info/RECORD,,
|
|
Binary file
|
|
@@ -2,142 +2,261 @@
|
|
|
2
2
|
|
|
3
3
|
import pytest
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import numpy as np
|
|
6
6
|
|
|
7
|
+
from ostk.mathematics.geometry import Angle
|
|
8
|
+
from ostk.mathematics.geometry.d2.object import Point as Point2d
|
|
9
|
+
from ostk.mathematics.geometry.d2.object import Polygon as Polygon2d
|
|
10
|
+
from ostk.mathematics.geometry.d3 import Object as Object
|
|
11
|
+
from ostk.mathematics.geometry.d3.object import Composite as Composite
|
|
12
|
+
from ostk.mathematics.geometry.d3.object import Point
|
|
13
|
+
from ostk.mathematics.geometry.d3.object import PointSet
|
|
14
|
+
from ostk.mathematics.geometry.d3.object import Line
|
|
15
|
+
from ostk.mathematics.geometry.d3.object import Ray
|
|
16
|
+
from ostk.mathematics.geometry.d3.object import Segment
|
|
17
|
+
from ostk.mathematics.geometry.d3.object import LineString
|
|
18
|
+
from ostk.mathematics.geometry.d3.object import Polygon
|
|
19
|
+
from ostk.mathematics.geometry.d3.object import Plane
|
|
20
|
+
from ostk.mathematics.geometry.d3.object import Sphere
|
|
21
|
+
from ostk.mathematics.geometry.d3.object import Ellipsoid
|
|
22
|
+
from ostk.mathematics.geometry.d3.object import Pyramid
|
|
23
|
+
from ostk.mathematics.geometry.d3.object import Cone
|
|
7
24
|
|
|
8
|
-
Point2d = mathematics.geometry.d2.object.Point
|
|
9
|
-
Polygon2d = mathematics.geometry.d2.object.Polygon
|
|
10
|
-
Object = mathematics.geometry.d3.Object
|
|
11
|
-
Composite = mathematics.geometry.d3.object.Composite
|
|
12
|
-
Point3d = mathematics.geometry.d3.object.Point
|
|
13
|
-
Segment = mathematics.geometry.d3.object.Segment
|
|
14
|
-
Polygon3d = mathematics.geometry.d3.object.Polygon
|
|
15
25
|
|
|
26
|
+
@pytest.fixture
|
|
27
|
+
def point() -> Point:
|
|
28
|
+
return Point(1.0, 2.0, 1.0)
|
|
16
29
|
|
|
17
|
-
def test_geometry_d3_object_composite_constructor():
|
|
18
|
-
point_1: Point3d = Point3d(1.0, 2.0, 1.0)
|
|
19
|
-
point_2: Point3d = Point3d(1.0, 1.0, 1.0)
|
|
20
30
|
|
|
21
|
-
|
|
31
|
+
@pytest.fixture
|
|
32
|
+
def point_set(point: Point) -> PointSet:
|
|
33
|
+
return PointSet([point])
|
|
22
34
|
|
|
23
|
-
composite_1 = Composite(segment)
|
|
24
|
-
|
|
25
|
-
assert composite_1 is not None
|
|
26
|
-
assert isinstance(composite_1, Composite)
|
|
27
|
-
assert composite_1.is_defined()
|
|
28
|
-
|
|
29
|
-
point_3: Point2d = Point2d(-1.0, 1.0)
|
|
30
|
-
point_4: Point2d = Point2d(1.0, 1.0)
|
|
31
|
-
point_5: Point2d = Point2d(1.0, -1.0)
|
|
32
|
-
point_6: Point2d = Point2d(-1.0, -1.0)
|
|
33
|
-
point_7: Point3d = Point3d(1.0, 1.0, 1.0)
|
|
34
|
-
vector_1 = (1.0, 0.0, 0.0)
|
|
35
|
-
vector_2 = (0.0, 1.0, 0.0)
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
@pytest.fixture
|
|
37
|
+
def direction() -> np.ndarray:
|
|
38
|
+
return np.array([1.0, 0.0, 0.0])
|
|
39
39
|
|
|
40
|
-
composite_2: Composite = Composite(polygon3d)
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
@pytest.fixture
|
|
42
|
+
def line(point: Point, direction: np.ndarray) -> Line:
|
|
43
|
+
return Line(point, direction)
|
|
45
44
|
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
@pytest.fixture
|
|
47
|
+
def ray(point: Point, direction: np.ndarray) -> Ray:
|
|
48
|
+
return Ray(point, direction)
|
|
49
49
|
|
|
50
|
-
assert composite is not None
|
|
51
|
-
assert isinstance(composite, Composite)
|
|
52
|
-
assert isinstance(composite, Object)
|
|
53
|
-
assert composite.is_defined()
|
|
54
|
-
assert composite.is_empty()
|
|
55
50
|
|
|
51
|
+
@pytest.fixture
|
|
52
|
+
def segment():
|
|
53
|
+
point_1: Point = Point(1.0, 2.0, 1.0)
|
|
54
|
+
point_2: Point = Point(1.0, 1.0, 1.0)
|
|
55
|
+
return Segment(point_1, point_2)
|
|
56
56
|
|
|
57
|
-
def test_geometry_d3_object_composite_comparators():
|
|
58
|
-
point_1: Point3d = Point3d(1.0, 2.0, 1.0)
|
|
59
|
-
point_2: Point3d = Point3d(1.0, 1.0, 1.0)
|
|
60
|
-
point_3: Point3d = Point3d(1.0, 4.0, 1.0)
|
|
61
57
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
@pytest.fixture
|
|
59
|
+
def line_string() -> LineString:
|
|
60
|
+
point_1: Point = Point(1.0, 2.0, 1.0)
|
|
61
|
+
point_2: Point = Point(1.0, 1.0, 1.0)
|
|
62
|
+
return LineString([point_1, point_2])
|
|
65
63
|
|
|
66
|
-
composite_1 = Composite(segment_1)
|
|
67
|
-
composite_2 = Composite(segment_2)
|
|
68
|
-
composite_3 = Composite(segment_3)
|
|
69
64
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
65
|
+
@pytest.fixture
|
|
66
|
+
def polygon2d() -> Polygon2d:
|
|
67
|
+
point_1: Point2d = Point2d(-1.0, 1.0)
|
|
68
|
+
point_2: Point2d = Point2d(1.0, 1.0)
|
|
69
|
+
point_3: Point2d = Point2d(1.0, -1.0)
|
|
70
|
+
point_4: Point2d = Point2d(-1.0, -1.0)
|
|
71
|
+
return Polygon2d([point_1, point_2, point_3, point_4])
|
|
73
72
|
|
|
74
73
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
@pytest.fixture
|
|
75
|
+
def polygon(point: Point, polygon2d: Polygon2d) -> Polygon:
|
|
76
|
+
vector_1 = (1.0, 0.0, 0.0)
|
|
77
|
+
vector_2 = (0.0, 1.0, 0.0)
|
|
78
|
+
return Polygon(polygon2d, point, vector_1, vector_2)
|
|
79
79
|
|
|
80
|
-
segment_1: Segment = Segment(point_1, point_2)
|
|
81
|
-
segment_2: Segment = Segment(point_1, point_3)
|
|
82
80
|
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
@pytest.fixture
|
|
82
|
+
def plane(point: Point, direction: np.ndarray) -> Plane:
|
|
83
|
+
return Plane(point, direction)
|
|
85
84
|
|
|
86
|
-
composite_3 = composite_1 + composite_2
|
|
87
85
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
assert composite_3.get_object_count() == 2
|
|
86
|
+
@pytest.fixture
|
|
87
|
+
def sphere(point: Point) -> Sphere:
|
|
88
|
+
return Sphere(point, 1.0)
|
|
92
89
|
|
|
93
|
-
with pytest.raises(RuntimeError):
|
|
94
|
-
composite = Composite.undefined() + composite_1
|
|
95
90
|
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
@pytest.fixture
|
|
92
|
+
def ellipsoid(point: Point) -> Ellipsoid:
|
|
93
|
+
return Ellipsoid(point, 1.0, 1.0, 1.0)
|
|
98
94
|
|
|
99
|
-
composite_3 += composite_1
|
|
100
95
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
96
|
+
@pytest.fixture
|
|
97
|
+
def pyramid(polygon: Polygon, point: Point) -> Pyramid:
|
|
98
|
+
return Pyramid(polygon, point)
|
|
104
99
|
|
|
105
|
-
with pytest.raises(RuntimeError):
|
|
106
|
-
composite_3 += Composite.undefined()
|
|
107
100
|
|
|
101
|
+
@pytest.fixture
|
|
102
|
+
def cone(point: Point, direction: np.ndarray) -> Cone:
|
|
103
|
+
return Cone(point, direction, Angle.degrees(5.0))
|
|
108
104
|
|
|
109
|
-
def test_geometry_d3_object_composite_access_object_at():
|
|
110
|
-
point_1: Point3d = Point3d(1.0, 2.0, 1.0)
|
|
111
|
-
point_2: Point3d = Point3d(1.0, 1.0, 1.0)
|
|
112
105
|
|
|
113
|
-
|
|
106
|
+
@pytest.fixture
|
|
107
|
+
def composite_with_polygon(segment: Segment, polygon: Polygon) -> Composite:
|
|
114
108
|
composite_1 = Composite(segment)
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
109
|
+
return composite_1 + Composite(polygon)
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
class Test3DComposite:
|
|
113
|
+
@pytest.mark.parametrize(
|
|
114
|
+
"geometry_name",
|
|
115
|
+
[
|
|
116
|
+
("point"),
|
|
117
|
+
("point_set"),
|
|
118
|
+
("line"),
|
|
119
|
+
("ray"),
|
|
120
|
+
("segment"),
|
|
121
|
+
("line_string"),
|
|
122
|
+
("polygon"),
|
|
123
|
+
("plane"),
|
|
124
|
+
("sphere"),
|
|
125
|
+
("ellipsoid"),
|
|
126
|
+
("pyramid"),
|
|
127
|
+
("cone"),
|
|
128
|
+
],
|
|
129
|
+
)
|
|
130
|
+
def test_geometry_d3_object_composite_constructor(self, geometry_name: str, request):
|
|
131
|
+
geometry = request.getfixturevalue(geometry_name)
|
|
132
|
+
composite: Composite = Composite(geometry)
|
|
133
|
+
|
|
134
|
+
assert composite is not None
|
|
135
|
+
assert isinstance(composite, Composite)
|
|
136
|
+
assert composite.is_defined()
|
|
137
|
+
|
|
138
|
+
def test_geometry_d3_object_composite_empty(self):
|
|
139
|
+
composite: Composite = Composite.empty()
|
|
140
|
+
|
|
141
|
+
assert composite is not None
|
|
142
|
+
assert isinstance(composite, Composite)
|
|
143
|
+
assert isinstance(composite, Object)
|
|
144
|
+
assert composite.is_defined()
|
|
145
|
+
assert composite.is_empty()
|
|
146
|
+
|
|
147
|
+
def test_geometry_d3_object_composite_comparators(self):
|
|
148
|
+
point_1: Point = Point(1.0, 2.0, 1.0)
|
|
149
|
+
point_2: Point = Point(1.0, 1.0, 1.0)
|
|
150
|
+
point_3: Point = Point(1.0, 4.0, 1.0)
|
|
151
|
+
|
|
152
|
+
segment_1: Segment = Segment(point_1, point_2)
|
|
153
|
+
segment_2: Segment = Segment(point_1, point_3)
|
|
154
|
+
segment_3: Segment = Segment(point_2, point_1)
|
|
155
|
+
|
|
156
|
+
composite_1 = Composite(segment_1)
|
|
157
|
+
composite_2 = Composite(segment_2)
|
|
158
|
+
composite_3 = Composite(segment_3)
|
|
159
|
+
|
|
160
|
+
assert composite_1 == composite_3
|
|
161
|
+
assert composite_1 != composite_2
|
|
162
|
+
assert composite_2 != composite_3
|
|
163
|
+
|
|
164
|
+
def tes_geometry_d3_object_composite_addition_operator(self):
|
|
165
|
+
point_1: Point = Point(1.0, 2.0, 1.0)
|
|
166
|
+
point_2: Point = Point(1.0, 1.0, 1.0)
|
|
167
|
+
point_3: Point = Point(1.0, 4.0, 1.0)
|
|
168
|
+
|
|
169
|
+
segment_1: Segment = Segment(point_1, point_2)
|
|
170
|
+
segment_2: Segment = Segment(point_1, point_3)
|
|
171
|
+
|
|
172
|
+
composite_1 = Composite(segment_1)
|
|
173
|
+
composite_2 = Composite(segment_2)
|
|
174
|
+
|
|
175
|
+
composite_3 = composite_1 + composite_2
|
|
176
|
+
|
|
177
|
+
assert composite_3 is not None
|
|
178
|
+
assert isinstance(composite_3, Composite)
|
|
179
|
+
assert composite_3.is_defined()
|
|
180
|
+
assert composite_3.get_object_count() == 2
|
|
181
|
+
|
|
182
|
+
with pytest.raises(RuntimeError):
|
|
183
|
+
composite = Composite.undefined() + composite_1
|
|
184
|
+
|
|
185
|
+
with pytest.raises(RuntimeError):
|
|
186
|
+
composite = composite_1 + Composite.undefined()
|
|
187
|
+
|
|
188
|
+
composite_3 += composite_1
|
|
189
|
+
|
|
190
|
+
assert isinstance(composite_3, Composite)
|
|
191
|
+
assert composite_3.is_defined()
|
|
192
|
+
assert composite_3.get_object_count() == 3
|
|
193
|
+
|
|
194
|
+
with pytest.raises(RuntimeError):
|
|
195
|
+
composite_3 += Composite.undefined()
|
|
196
|
+
|
|
197
|
+
def test_geometry_d3_object_composite_access_object_at(
|
|
198
|
+
self,
|
|
199
|
+
composite_with_polygon: Composite,
|
|
200
|
+
):
|
|
201
|
+
object: Object = composite_with_polygon.access_object_at(0)
|
|
202
|
+
|
|
203
|
+
assert object is not None
|
|
204
|
+
assert isinstance(object, Object)
|
|
205
|
+
assert isinstance(object, Segment)
|
|
206
|
+
|
|
207
|
+
object_2: Object = composite_with_polygon.access_object_at(1)
|
|
208
|
+
|
|
209
|
+
assert object_2 is not None
|
|
210
|
+
assert isinstance(object_2, Object)
|
|
211
|
+
assert isinstance(object_2, Polygon)
|
|
212
|
+
|
|
213
|
+
with pytest.raises(RuntimeError):
|
|
214
|
+
composite_with_polygon.access_object_at(2)
|
|
215
|
+
|
|
216
|
+
@pytest.mark.parametrize(
|
|
217
|
+
"geometry_name",
|
|
218
|
+
[
|
|
219
|
+
("point"),
|
|
220
|
+
("point_set"),
|
|
221
|
+
("line"),
|
|
222
|
+
("ray"),
|
|
223
|
+
("segment"),
|
|
224
|
+
("line_string"),
|
|
225
|
+
("polygon"),
|
|
226
|
+
("plane"),
|
|
227
|
+
("sphere"),
|
|
228
|
+
("ellipsoid"),
|
|
229
|
+
("pyramid"),
|
|
230
|
+
("cone"),
|
|
231
|
+
],
|
|
232
|
+
)
|
|
233
|
+
def test_geometry_d3_object_composite_is(self, geometry_name: str, request):
|
|
234
|
+
geometry = request.getfixturevalue(geometry_name)
|
|
235
|
+
composite: Composite = Composite(geometry)
|
|
236
|
+
|
|
237
|
+
assert composite.is_defined()
|
|
238
|
+
assert getattr(composite, f"is_{geometry_name}")()
|
|
239
|
+
|
|
240
|
+
@pytest.mark.parametrize(
|
|
241
|
+
"geometry_name",
|
|
242
|
+
[
|
|
243
|
+
("point"),
|
|
244
|
+
("point_set"),
|
|
245
|
+
("line"),
|
|
246
|
+
("ray"),
|
|
247
|
+
("segment"),
|
|
248
|
+
("line_string"),
|
|
249
|
+
("polygon"),
|
|
250
|
+
("plane"),
|
|
251
|
+
("sphere"),
|
|
252
|
+
("ellipsoid"),
|
|
253
|
+
("pyramid"),
|
|
254
|
+
("cone"),
|
|
255
|
+
],
|
|
256
|
+
)
|
|
257
|
+
def test_geometry_d3_object_composite_as(self, geometry_name: str, request):
|
|
258
|
+
geometry = request.getfixturevalue(geometry_name)
|
|
259
|
+
composite: Composite = Composite(geometry)
|
|
260
|
+
|
|
261
|
+
assert composite.is_defined()
|
|
262
|
+
assert getattr(composite, f"as_{geometry_name}")().is_defined()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|