fake-bpy-module 20240528__py3-none-any.whl → 20240530__py3-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 fake-bpy-module might be problematic. Click here for more details.
- bl_console_utils/autocomplete/complete_calltip/__init__.pyi +3 -3
- bl_operators/__init__.pyi +2 -0
- bl_operators/connect_to_output/__init__.pyi +325 -0
- bl_operators/image_as_planes/__init__.pyi +11 -5
- bl_operators/node_editor/__init__.pyi +6 -0
- bl_operators/node_editor/node_functions/__init__.pyi +23 -0
- bl_operators/presets/__init__.pyi +12 -12
- bl_operators/wm/__init__.pyi +24 -24
- bl_ui/__init__.pyi +12 -12
- bl_ui/anim/__init__.pyi +6 -6
- bl_ui/node_add_menu/__init__.pyi +6 -6
- bl_ui/node_add_menu_compositor/__init__.pyi +108 -108
- bl_ui/node_add_menu_geometry/__init__.pyi +288 -288
- bl_ui/node_add_menu_shader/__init__.pyi +60 -60
- bl_ui/node_add_menu_texture/__init__.pyi +54 -54
- bl_ui/properties_collection/__init__.pyi +6 -6
- bl_ui/properties_data_armature/__init__.pyi +12 -12
- bl_ui/properties_data_camera/__init__.pyi +12 -12
- bl_ui/properties_data_curves/__init__.pyi +6 -6
- bl_ui/properties_data_gpencil/__init__.pyi +12 -12
- bl_ui/properties_data_grease_pencil/__init__.pyi +18 -18
- bl_ui/properties_data_mesh/__init__.pyi +24 -24
- bl_ui/properties_data_modifier/__init__.pyi +42 -42
- bl_ui/properties_data_pointcloud/__init__.pyi +6 -6
- bl_ui/properties_freestyle/__init__.pyi +6 -6
- bl_ui/properties_grease_pencil_common/__init__.pyi +72 -72
- bl_ui/properties_mask_common/__init__.pyi +36 -36
- bl_ui/properties_material/__init__.pyi +6 -6
- bl_ui/properties_material_gpencil/__init__.pyi +12 -12
- bl_ui/properties_object/__init__.pyi +6 -6
- bl_ui/properties_output/__init__.pyi +18 -18
- bl_ui/properties_paint_common/__init__.pyi +6 -6
- bl_ui/properties_particle/__init__.pyi +12 -12
- bl_ui/properties_physics_cloth/__init__.pyi +6 -6
- bl_ui/properties_physics_fluid/__init__.pyi +6 -6
- bl_ui/properties_render/__init__.pyi +6 -6
- bl_ui/properties_texture/__init__.pyi +6 -6
- bl_ui/properties_view_layer/__init__.pyi +6 -6
- bl_ui/space_clip/__init__.pyi +186 -186
- bl_ui/space_console/__init__.pyi +30 -30
- bl_ui/space_dopesheet/__init__.pyi +84 -84
- bl_ui/space_filebrowser/__init__.pyi +78 -78
- bl_ui/space_graph/__init__.pyi +96 -96
- bl_ui/space_image/__init__.pyi +138 -138
- bl_ui/space_info/__init__.pyi +30 -30
- bl_ui/space_nla/__init__.pyi +78 -78
- bl_ui/space_node/__init__.pyi +72 -72
- bl_ui/space_outliner/__init__.pyi +72 -72
- bl_ui/space_sequencer/__init__.pyi +204 -204
- bl_ui/space_text/__init__.pyi +72 -72
- bl_ui/space_time/__init__.pyi +24 -24
- bl_ui/space_toolsystem_toolbar/__init__.pyi +4 -0
- bl_ui/space_topbar/__init__.pyi +114 -114
- bl_ui/space_userpref/__init__.pyi +36 -36
- bl_ui/space_view3d/__init__.pyi +1446 -1176
- bl_ui/space_view3d_toolbar/__init__.pyi +30 -30
- bl_ui/utils/__init__.pyi +6 -6
- bmesh/geometry/__init__.pyi +2 -2
- bmesh/ops/__init__.pyi +55 -54
- bmesh/types/__init__.pyi +171 -194
- bmesh/utils/__init__.pyi +2 -2
- bpy/app/handlers/__init__.pyi +37 -37
- bpy/app/icons/__init__.pyi +4 -4
- bpy/app/timers/__init__.pyi +6 -6
- bpy/ops/bl_pkg/__init__.pyi +4 -4
- bpy/ops/image/__init__.pyi +55 -55
- bpy/ops/node/__init__.pyi +18 -0
- bpy/ops/paint/__init__.pyi +66 -0
- bpy/ops/preferences/__init__.pyi +2 -2
- bpy/ops/sculpt/__init__.pyi +126 -0
- bpy/props/__init__.pyi +16 -14
- bpy/types/__init__.pyi +269 -54
- bpy/utils/__init__.pyi +2 -2
- bpy_extras/anim_utils/__init__.pyi +4 -4
- bpy_extras/io_utils/__init__.pyi +4 -4
- bpy_extras/mesh_utils/__init__.pyi +4 -4
- bpy_extras/object_utils/__init__.pyi +8 -8
- bpy_types/__init__.pyi +12 -12
- {fake_bpy_module-20240528.dist-info → fake_bpy_module-20240530.dist-info}/METADATA +1 -1
- {fake_bpy_module-20240528.dist-info → fake_bpy_module-20240530.dist-info}/RECORD +92 -89
- freestyle/shaders/__init__.pyi +2 -2
- freestyle/types/__init__.pyi +64 -56
- gpu/matrix/__init__.pyi +6 -6
- gpu/types/__init__.pyi +10 -8
- imbuf/__init__.pyi +2 -2
- mathutils/__init__.pyi +176 -137
- mathutils/bvhtree/__init__.pyi +4 -4
- mathutils/geometry/__init__.pyi +139 -139
- mathutils/kdtree/__init__.pyi +14 -10
- mathutils/noise/__init__.pyi +26 -26
- {fake_bpy_module-20240528.dist-info → fake_bpy_module-20240530.dist-info}/WHEEL +0 -0
- {fake_bpy_module-20240528.dist-info → fake_bpy_module-20240530.dist-info}/top_level.txt +0 -0
mathutils/bvhtree/__init__.pyi
CHANGED
|
@@ -102,16 +102,16 @@ class BVHTree:
|
|
|
102
102
|
|
|
103
103
|
def ray_cast(
|
|
104
104
|
self,
|
|
105
|
-
origin:
|
|
106
|
-
direction:
|
|
105
|
+
origin: collections.abc.Sequence[float] | mathutils.Vector,
|
|
106
|
+
direction: collections.abc.Sequence[float] | mathutils.Vector,
|
|
107
107
|
distance: float = None,
|
|
108
108
|
) -> tuple:
|
|
109
109
|
"""Cast a ray onto the mesh.
|
|
110
110
|
|
|
111
111
|
:param origin: Start location of the ray in object space.
|
|
112
|
-
:type origin:
|
|
112
|
+
:type origin: collections.abc.Sequence[float] | mathutils.Vector
|
|
113
113
|
:param direction: Direction of the ray in object space.
|
|
114
|
-
:type direction:
|
|
114
|
+
:type direction: collections.abc.Sequence[float] | mathutils.Vector
|
|
115
115
|
:param distance: Maximum distance threshold.
|
|
116
116
|
:type distance: float
|
|
117
117
|
:return: Returns a tuple
|
mathutils/geometry/__init__.pyi
CHANGED
|
@@ -11,48 +11,48 @@ GenericType1 = typing.TypeVar("GenericType1")
|
|
|
11
11
|
GenericType2 = typing.TypeVar("GenericType2")
|
|
12
12
|
|
|
13
13
|
def area_tri(
|
|
14
|
-
v1:
|
|
15
|
-
v2:
|
|
16
|
-
v3:
|
|
14
|
+
v1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
15
|
+
v2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
16
|
+
v3: collections.abc.Sequence[float] | mathutils.Vector,
|
|
17
17
|
) -> float:
|
|
18
18
|
"""Returns the area size of the 2D or 3D triangle defined.
|
|
19
19
|
|
|
20
20
|
:param v1: Point1
|
|
21
|
-
:type v1:
|
|
21
|
+
:type v1: collections.abc.Sequence[float] | mathutils.Vector
|
|
22
22
|
:param v2: Point2
|
|
23
|
-
:type v2:
|
|
23
|
+
:type v2: collections.abc.Sequence[float] | mathutils.Vector
|
|
24
24
|
:param v3: Point3
|
|
25
|
-
:type v3:
|
|
25
|
+
:type v3: collections.abc.Sequence[float] | mathutils.Vector
|
|
26
26
|
:rtype: float
|
|
27
27
|
"""
|
|
28
28
|
|
|
29
29
|
...
|
|
30
30
|
|
|
31
31
|
def barycentric_transform(
|
|
32
|
-
point:
|
|
33
|
-
tri_a1:
|
|
34
|
-
tri_a2:
|
|
35
|
-
tri_a3:
|
|
36
|
-
tri_b1:
|
|
37
|
-
tri_b2:
|
|
38
|
-
tri_b3:
|
|
32
|
+
point: collections.abc.Sequence[float] | mathutils.Vector,
|
|
33
|
+
tri_a1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
34
|
+
tri_a2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
35
|
+
tri_a3: collections.abc.Sequence[float] | mathutils.Vector,
|
|
36
|
+
tri_b1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
37
|
+
tri_b2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
38
|
+
tri_b3: collections.abc.Sequence[float] | mathutils.Vector,
|
|
39
39
|
):
|
|
40
40
|
"""Return a transformed point, the transformation is defined by 2 triangles.
|
|
41
41
|
|
|
42
42
|
:param point: The point to transform.
|
|
43
|
-
:type point:
|
|
43
|
+
:type point: collections.abc.Sequence[float] | mathutils.Vector
|
|
44
44
|
:param tri_a1: source triangle vertex.
|
|
45
|
-
:type tri_a1:
|
|
45
|
+
:type tri_a1: collections.abc.Sequence[float] | mathutils.Vector
|
|
46
46
|
:param tri_a2: source triangle vertex.
|
|
47
|
-
:type tri_a2:
|
|
47
|
+
:type tri_a2: collections.abc.Sequence[float] | mathutils.Vector
|
|
48
48
|
:param tri_a3: source triangle vertex.
|
|
49
|
-
:type tri_a3:
|
|
49
|
+
:type tri_a3: collections.abc.Sequence[float] | mathutils.Vector
|
|
50
50
|
:param tri_b1: target triangle vertex.
|
|
51
|
-
:type tri_b1:
|
|
51
|
+
:type tri_b1: collections.abc.Sequence[float] | mathutils.Vector
|
|
52
52
|
:param tri_b2: target triangle vertex.
|
|
53
|
-
:type tri_b2:
|
|
53
|
+
:type tri_b2: collections.abc.Sequence[float] | mathutils.Vector
|
|
54
54
|
:param tri_b3: target triangle vertex.
|
|
55
|
-
:type tri_b3:
|
|
55
|
+
:type tri_b3: collections.abc.Sequence[float] | mathutils.Vector
|
|
56
56
|
:return: The transformed point
|
|
57
57
|
"""
|
|
58
58
|
|
|
@@ -81,21 +81,21 @@ def box_pack_2d(boxes: list) -> tuple:
|
|
|
81
81
|
...
|
|
82
82
|
|
|
83
83
|
def closest_point_on_tri(
|
|
84
|
-
pt:
|
|
85
|
-
tri_p1:
|
|
86
|
-
tri_p2:
|
|
87
|
-
tri_p3:
|
|
84
|
+
pt: collections.abc.Sequence[float] | mathutils.Vector,
|
|
85
|
+
tri_p1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
86
|
+
tri_p2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
87
|
+
tri_p3: collections.abc.Sequence[float] | mathutils.Vector,
|
|
88
88
|
) -> mathutils.Vector:
|
|
89
89
|
"""Takes 4 vectors: one is the point and the next 3 define the triangle.
|
|
90
90
|
|
|
91
91
|
:param pt: Point
|
|
92
|
-
:type pt:
|
|
92
|
+
:type pt: collections.abc.Sequence[float] | mathutils.Vector
|
|
93
93
|
:param tri_p1: First point of the triangle
|
|
94
|
-
:type tri_p1:
|
|
94
|
+
:type tri_p1: collections.abc.Sequence[float] | mathutils.Vector
|
|
95
95
|
:param tri_p2: Second point of the triangle
|
|
96
|
-
:type tri_p2:
|
|
96
|
+
:type tri_p2: collections.abc.Sequence[float] | mathutils.Vector
|
|
97
97
|
:param tri_p3: Third point of the triangle
|
|
98
|
-
:type tri_p3:
|
|
98
|
+
:type tri_p3: collections.abc.Sequence[float] | mathutils.Vector
|
|
99
99
|
:return: The closest point of the triangle.
|
|
100
100
|
:rtype: mathutils.Vector
|
|
101
101
|
"""
|
|
@@ -145,40 +145,40 @@ def delaunay_2d_cdt(vert_coords, edges, faces, output_type, epsilon, need_ids=Tr
|
|
|
145
145
|
...
|
|
146
146
|
|
|
147
147
|
def distance_point_to_plane(
|
|
148
|
-
pt:
|
|
149
|
-
plane_co:
|
|
150
|
-
plane_no:
|
|
148
|
+
pt: collections.abc.Sequence[float] | mathutils.Vector,
|
|
149
|
+
plane_co: collections.abc.Sequence[float] | mathutils.Vector,
|
|
150
|
+
plane_no: collections.abc.Sequence[float] | mathutils.Vector,
|
|
151
151
|
) -> float:
|
|
152
152
|
"""Returns the signed distance between a point and a plane (negative when below the normal).
|
|
153
153
|
|
|
154
154
|
:param pt: Point
|
|
155
|
-
:type pt:
|
|
155
|
+
:type pt: collections.abc.Sequence[float] | mathutils.Vector
|
|
156
156
|
:param plane_co: A point on the plane
|
|
157
|
-
:type plane_co:
|
|
157
|
+
:type plane_co: collections.abc.Sequence[float] | mathutils.Vector
|
|
158
158
|
:param plane_no: The direction the plane is facing
|
|
159
|
-
:type plane_no:
|
|
159
|
+
:type plane_no: collections.abc.Sequence[float] | mathutils.Vector
|
|
160
160
|
:rtype: float
|
|
161
161
|
"""
|
|
162
162
|
|
|
163
163
|
...
|
|
164
164
|
|
|
165
165
|
def interpolate_bezier(
|
|
166
|
-
knot1:
|
|
167
|
-
handle1:
|
|
168
|
-
handle2:
|
|
169
|
-
knot2:
|
|
166
|
+
knot1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
167
|
+
handle1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
168
|
+
handle2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
169
|
+
knot2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
170
170
|
resolution: int,
|
|
171
171
|
):
|
|
172
172
|
"""Interpolate a bezier spline segment.
|
|
173
173
|
|
|
174
174
|
:param knot1: First bezier spline point.
|
|
175
|
-
:type knot1:
|
|
175
|
+
:type knot1: collections.abc.Sequence[float] | mathutils.Vector
|
|
176
176
|
:param handle1: First bezier spline handle.
|
|
177
|
-
:type handle1:
|
|
177
|
+
:type handle1: collections.abc.Sequence[float] | mathutils.Vector
|
|
178
178
|
:param handle2: Second bezier spline handle.
|
|
179
|
-
:type handle2:
|
|
179
|
+
:type handle2: collections.abc.Sequence[float] | mathutils.Vector
|
|
180
180
|
:param knot2: Second bezier spline point.
|
|
181
|
-
:type knot2:
|
|
181
|
+
:type knot2: collections.abc.Sequence[float] | mathutils.Vector
|
|
182
182
|
:param resolution: Number of points to return.
|
|
183
183
|
:type resolution: int
|
|
184
184
|
:return: The interpolated points
|
|
@@ -187,42 +187,42 @@ def interpolate_bezier(
|
|
|
187
187
|
...
|
|
188
188
|
|
|
189
189
|
def intersect_line_line(
|
|
190
|
-
v1:
|
|
191
|
-
v2:
|
|
192
|
-
v3:
|
|
193
|
-
v4:
|
|
190
|
+
v1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
191
|
+
v2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
192
|
+
v3: collections.abc.Sequence[float] | mathutils.Vector,
|
|
193
|
+
v4: collections.abc.Sequence[float] | mathutils.Vector,
|
|
194
194
|
) -> tuple[mathutils.Vector, ...]:
|
|
195
195
|
"""Returns a tuple with the points on each line respectively closest to the other.
|
|
196
196
|
|
|
197
197
|
:param v1: First point of the first line
|
|
198
|
-
:type v1:
|
|
198
|
+
:type v1: collections.abc.Sequence[float] | mathutils.Vector
|
|
199
199
|
:param v2: Second point of the first line
|
|
200
|
-
:type v2:
|
|
200
|
+
:type v2: collections.abc.Sequence[float] | mathutils.Vector
|
|
201
201
|
:param v3: First point of the second line
|
|
202
|
-
:type v3:
|
|
202
|
+
:type v3: collections.abc.Sequence[float] | mathutils.Vector
|
|
203
203
|
:param v4: Second point of the second line
|
|
204
|
-
:type v4:
|
|
204
|
+
:type v4: collections.abc.Sequence[float] | mathutils.Vector
|
|
205
205
|
:rtype: tuple[mathutils.Vector, ...]
|
|
206
206
|
"""
|
|
207
207
|
|
|
208
208
|
...
|
|
209
209
|
|
|
210
210
|
def intersect_line_line_2d(
|
|
211
|
-
lineA_p1:
|
|
212
|
-
lineA_p2:
|
|
213
|
-
lineB_p1:
|
|
214
|
-
lineB_p2:
|
|
211
|
+
lineA_p1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
212
|
+
lineA_p2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
213
|
+
lineB_p1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
214
|
+
lineB_p2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
215
215
|
) -> mathutils.Vector:
|
|
216
216
|
"""Takes 2 segments (defined by 4 vectors) and returns a vector for their point of intersection or None.
|
|
217
217
|
|
|
218
218
|
:param lineA_p1: First point of the first line
|
|
219
|
-
:type lineA_p1:
|
|
219
|
+
:type lineA_p1: collections.abc.Sequence[float] | mathutils.Vector
|
|
220
220
|
:param lineA_p2: Second point of the first line
|
|
221
|
-
:type lineA_p2:
|
|
221
|
+
:type lineA_p2: collections.abc.Sequence[float] | mathutils.Vector
|
|
222
222
|
:param lineB_p1: First point of the second line
|
|
223
|
-
:type lineB_p1:
|
|
223
|
+
:type lineB_p1: collections.abc.Sequence[float] | mathutils.Vector
|
|
224
224
|
:param lineB_p2: Second point of the second line
|
|
225
|
-
:type lineB_p2:
|
|
225
|
+
:type lineB_p2: collections.abc.Sequence[float] | mathutils.Vector
|
|
226
226
|
:return: The point of intersection or None when not found
|
|
227
227
|
:rtype: mathutils.Vector
|
|
228
228
|
"""
|
|
@@ -230,23 +230,23 @@ def intersect_line_line_2d(
|
|
|
230
230
|
...
|
|
231
231
|
|
|
232
232
|
def intersect_line_plane(
|
|
233
|
-
line_a:
|
|
234
|
-
line_b:
|
|
235
|
-
plane_co:
|
|
236
|
-
plane_no:
|
|
233
|
+
line_a: collections.abc.Sequence[float] | mathutils.Vector,
|
|
234
|
+
line_b: collections.abc.Sequence[float] | mathutils.Vector,
|
|
235
|
+
plane_co: collections.abc.Sequence[float] | mathutils.Vector,
|
|
236
|
+
plane_no: collections.abc.Sequence[float] | mathutils.Vector,
|
|
237
237
|
no_flip=False,
|
|
238
238
|
) -> mathutils.Vector:
|
|
239
239
|
"""Calculate the intersection between a line (as 2 vectors) and a plane.
|
|
240
240
|
Returns a vector for the intersection or None.
|
|
241
241
|
|
|
242
242
|
:param line_a: First point of the first line
|
|
243
|
-
:type line_a:
|
|
243
|
+
:type line_a: collections.abc.Sequence[float] | mathutils.Vector
|
|
244
244
|
:param line_b: Second point of the first line
|
|
245
|
-
:type line_b:
|
|
245
|
+
:type line_b: collections.abc.Sequence[float] | mathutils.Vector
|
|
246
246
|
:param plane_co: A point on the plane
|
|
247
|
-
:type plane_co:
|
|
247
|
+
:type plane_co: collections.abc.Sequence[float] | mathutils.Vector
|
|
248
248
|
:param plane_no: The direction the plane is facing
|
|
249
|
-
:type plane_no:
|
|
249
|
+
:type plane_no: collections.abc.Sequence[float] | mathutils.Vector
|
|
250
250
|
:return: The point of intersection or None when not found
|
|
251
251
|
:rtype: mathutils.Vector
|
|
252
252
|
"""
|
|
@@ -254,9 +254,9 @@ def intersect_line_plane(
|
|
|
254
254
|
...
|
|
255
255
|
|
|
256
256
|
def intersect_line_sphere(
|
|
257
|
-
line_a:
|
|
258
|
-
line_b:
|
|
259
|
-
sphere_co:
|
|
257
|
+
line_a: collections.abc.Sequence[float] | mathutils.Vector,
|
|
258
|
+
line_b: collections.abc.Sequence[float] | mathutils.Vector,
|
|
259
|
+
sphere_co: collections.abc.Sequence[float] | mathutils.Vector,
|
|
260
260
|
sphere_radius,
|
|
261
261
|
clip=True,
|
|
262
262
|
):
|
|
@@ -264,11 +264,11 @@ def intersect_line_sphere(
|
|
|
264
264
|
returns the intersection
|
|
265
265
|
|
|
266
266
|
:param line_a: First point of the line
|
|
267
|
-
:type line_a:
|
|
267
|
+
:type line_a: collections.abc.Sequence[float] | mathutils.Vector
|
|
268
268
|
:param line_b: Second point of the line
|
|
269
|
-
:type line_b:
|
|
269
|
+
:type line_b: collections.abc.Sequence[float] | mathutils.Vector
|
|
270
270
|
:param sphere_co: The center of the sphere
|
|
271
|
-
:type sphere_co:
|
|
271
|
+
:type sphere_co: collections.abc.Sequence[float] | mathutils.Vector
|
|
272
272
|
:param sphere_radius: Radius of the sphere
|
|
273
273
|
:return: The intersection points as a pair of vectors or None when there is no intersection
|
|
274
274
|
"""
|
|
@@ -276,9 +276,9 @@ def intersect_line_sphere(
|
|
|
276
276
|
...
|
|
277
277
|
|
|
278
278
|
def intersect_line_sphere_2d(
|
|
279
|
-
line_a:
|
|
280
|
-
line_b:
|
|
281
|
-
sphere_co:
|
|
279
|
+
line_a: collections.abc.Sequence[float] | mathutils.Vector,
|
|
280
|
+
line_b: collections.abc.Sequence[float] | mathutils.Vector,
|
|
281
|
+
sphere_co: collections.abc.Sequence[float] | mathutils.Vector,
|
|
282
282
|
sphere_radius,
|
|
283
283
|
clip=True,
|
|
284
284
|
):
|
|
@@ -286,11 +286,11 @@ def intersect_line_sphere_2d(
|
|
|
286
286
|
returns the intersection
|
|
287
287
|
|
|
288
288
|
:param line_a: First point of the line
|
|
289
|
-
:type line_a:
|
|
289
|
+
:type line_a: collections.abc.Sequence[float] | mathutils.Vector
|
|
290
290
|
:param line_b: Second point of the line
|
|
291
|
-
:type line_b:
|
|
291
|
+
:type line_b: collections.abc.Sequence[float] | mathutils.Vector
|
|
292
292
|
:param sphere_co: The center of the sphere
|
|
293
|
-
:type sphere_co:
|
|
293
|
+
:type sphere_co: collections.abc.Sequence[float] | mathutils.Vector
|
|
294
294
|
:param sphere_radius: Radius of the sphere
|
|
295
295
|
:return: The intersection points as a pair of vectors or None when there is no intersection
|
|
296
296
|
"""
|
|
@@ -298,87 +298,87 @@ def intersect_line_sphere_2d(
|
|
|
298
298
|
...
|
|
299
299
|
|
|
300
300
|
def intersect_plane_plane(
|
|
301
|
-
plane_a_co:
|
|
302
|
-
plane_a_no:
|
|
303
|
-
plane_b_co:
|
|
304
|
-
plane_b_no:
|
|
301
|
+
plane_a_co: collections.abc.Sequence[float] | mathutils.Vector,
|
|
302
|
+
plane_a_no: collections.abc.Sequence[float] | mathutils.Vector,
|
|
303
|
+
plane_b_co: collections.abc.Sequence[float] | mathutils.Vector,
|
|
304
|
+
plane_b_no: collections.abc.Sequence[float] | mathutils.Vector,
|
|
305
305
|
):
|
|
306
306
|
"""Return the intersection between two planes
|
|
307
307
|
|
|
308
308
|
:param plane_a_co: Point on the first plane
|
|
309
|
-
:type plane_a_co:
|
|
309
|
+
:type plane_a_co: collections.abc.Sequence[float] | mathutils.Vector
|
|
310
310
|
:param plane_a_no: Normal of the first plane
|
|
311
|
-
:type plane_a_no:
|
|
311
|
+
:type plane_a_no: collections.abc.Sequence[float] | mathutils.Vector
|
|
312
312
|
:param plane_b_co: Point on the second plane
|
|
313
|
-
:type plane_b_co:
|
|
313
|
+
:type plane_b_co: collections.abc.Sequence[float] | mathutils.Vector
|
|
314
314
|
:param plane_b_no: Normal of the second plane
|
|
315
|
-
:type plane_b_no:
|
|
315
|
+
:type plane_b_no: collections.abc.Sequence[float] | mathutils.Vector
|
|
316
316
|
:return: The line of the intersection represented as a point and a vector
|
|
317
317
|
"""
|
|
318
318
|
|
|
319
319
|
...
|
|
320
320
|
|
|
321
321
|
def intersect_point_line(
|
|
322
|
-
pt:
|
|
323
|
-
line_p1:
|
|
322
|
+
pt: collections.abc.Sequence[float] | mathutils.Vector,
|
|
323
|
+
line_p1: collections.abc.Sequence[float]
|
|
324
324
|
| mathutils.Vector
|
|
325
|
-
|
|
|
325
|
+
| collections.abc.Sequence[float]
|
|
326
326
|
| mathutils.Vector,
|
|
327
327
|
line_p2,
|
|
328
328
|
) -> tuple[mathutils.Vector]:
|
|
329
329
|
"""Takes a point and a line and returns a tuple with the closest point on the line and its distance from the first point of the line as a percentage of the length of the line.
|
|
330
330
|
|
|
331
331
|
:param pt: Point
|
|
332
|
-
:type pt:
|
|
332
|
+
:type pt: collections.abc.Sequence[float] | mathutils.Vector
|
|
333
333
|
:param line_p1: First point of the lineSecond point of the line
|
|
334
|
-
:type line_p1:
|
|
334
|
+
:type line_p1: collections.abc.Sequence[float] | mathutils.Vector | collections.abc.Sequence[float] | mathutils.Vector
|
|
335
335
|
:rtype: tuple[mathutils.Vector]
|
|
336
336
|
"""
|
|
337
337
|
|
|
338
338
|
...
|
|
339
339
|
|
|
340
340
|
def intersect_point_quad_2d(
|
|
341
|
-
pt:
|
|
342
|
-
quad_p1:
|
|
343
|
-
quad_p2:
|
|
344
|
-
quad_p3:
|
|
345
|
-
quad_p4:
|
|
341
|
+
pt: collections.abc.Sequence[float] | mathutils.Vector,
|
|
342
|
+
quad_p1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
343
|
+
quad_p2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
344
|
+
quad_p3: collections.abc.Sequence[float] | mathutils.Vector,
|
|
345
|
+
quad_p4: collections.abc.Sequence[float] | mathutils.Vector,
|
|
346
346
|
) -> int:
|
|
347
347
|
"""Takes 5 vectors (using only the x and y coordinates): one is the point and the next 4 define the quad,
|
|
348
348
|
only the x and y are used from the vectors. Returns 1 if the point is within the quad, otherwise 0.
|
|
349
349
|
Works only with convex quads without singular edges.
|
|
350
350
|
|
|
351
351
|
:param pt: Point
|
|
352
|
-
:type pt:
|
|
352
|
+
:type pt: collections.abc.Sequence[float] | mathutils.Vector
|
|
353
353
|
:param quad_p1: First point of the quad
|
|
354
|
-
:type quad_p1:
|
|
354
|
+
:type quad_p1: collections.abc.Sequence[float] | mathutils.Vector
|
|
355
355
|
:param quad_p2: Second point of the quad
|
|
356
|
-
:type quad_p2:
|
|
356
|
+
:type quad_p2: collections.abc.Sequence[float] | mathutils.Vector
|
|
357
357
|
:param quad_p3: Third point of the quad
|
|
358
|
-
:type quad_p3:
|
|
358
|
+
:type quad_p3: collections.abc.Sequence[float] | mathutils.Vector
|
|
359
359
|
:param quad_p4: Fourth point of the quad
|
|
360
|
-
:type quad_p4:
|
|
360
|
+
:type quad_p4: collections.abc.Sequence[float] | mathutils.Vector
|
|
361
361
|
:rtype: int
|
|
362
362
|
"""
|
|
363
363
|
|
|
364
364
|
...
|
|
365
365
|
|
|
366
366
|
def intersect_point_tri(
|
|
367
|
-
pt:
|
|
368
|
-
tri_p1:
|
|
369
|
-
tri_p2:
|
|
370
|
-
tri_p3:
|
|
367
|
+
pt: collections.abc.Sequence[float] | mathutils.Vector,
|
|
368
|
+
tri_p1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
369
|
+
tri_p2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
370
|
+
tri_p3: collections.abc.Sequence[float] | mathutils.Vector,
|
|
371
371
|
) -> mathutils.Vector:
|
|
372
372
|
"""Takes 4 vectors: one is the point and the next 3 define the triangle. Projects the point onto the triangle plane and checks if it is within the triangle.
|
|
373
373
|
|
|
374
374
|
:param pt: Point
|
|
375
|
-
:type pt:
|
|
375
|
+
:type pt: collections.abc.Sequence[float] | mathutils.Vector
|
|
376
376
|
:param tri_p1: First point of the triangle
|
|
377
|
-
:type tri_p1:
|
|
377
|
+
:type tri_p1: collections.abc.Sequence[float] | mathutils.Vector
|
|
378
378
|
:param tri_p2: Second point of the triangle
|
|
379
|
-
:type tri_p2:
|
|
379
|
+
:type tri_p2: collections.abc.Sequence[float] | mathutils.Vector
|
|
380
380
|
:param tri_p3: Third point of the triangle
|
|
381
|
-
:type tri_p3:
|
|
381
|
+
:type tri_p3: collections.abc.Sequence[float] | mathutils.Vector
|
|
382
382
|
:return: Point on the triangles plane or None if its outside the triangle
|
|
383
383
|
:rtype: mathutils.Vector
|
|
384
384
|
"""
|
|
@@ -386,46 +386,46 @@ def intersect_point_tri(
|
|
|
386
386
|
...
|
|
387
387
|
|
|
388
388
|
def intersect_point_tri_2d(
|
|
389
|
-
pt:
|
|
390
|
-
tri_p1:
|
|
391
|
-
tri_p2:
|
|
392
|
-
tri_p3:
|
|
389
|
+
pt: collections.abc.Sequence[float] | mathutils.Vector,
|
|
390
|
+
tri_p1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
391
|
+
tri_p2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
392
|
+
tri_p3: collections.abc.Sequence[float] | mathutils.Vector,
|
|
393
393
|
) -> int:
|
|
394
394
|
"""Takes 4 vectors (using only the x and y coordinates): one is the point and the next 3 define the triangle. Returns 1 if the point is within the triangle, otherwise 0.
|
|
395
395
|
|
|
396
396
|
:param pt: Point
|
|
397
|
-
:type pt:
|
|
397
|
+
:type pt: collections.abc.Sequence[float] | mathutils.Vector
|
|
398
398
|
:param tri_p1: First point of the triangle
|
|
399
|
-
:type tri_p1:
|
|
399
|
+
:type tri_p1: collections.abc.Sequence[float] | mathutils.Vector
|
|
400
400
|
:param tri_p2: Second point of the triangle
|
|
401
|
-
:type tri_p2:
|
|
401
|
+
:type tri_p2: collections.abc.Sequence[float] | mathutils.Vector
|
|
402
402
|
:param tri_p3: Third point of the triangle
|
|
403
|
-
:type tri_p3:
|
|
403
|
+
:type tri_p3: collections.abc.Sequence[float] | mathutils.Vector
|
|
404
404
|
:rtype: int
|
|
405
405
|
"""
|
|
406
406
|
|
|
407
407
|
...
|
|
408
408
|
|
|
409
409
|
def intersect_ray_tri(
|
|
410
|
-
v1:
|
|
411
|
-
v2:
|
|
412
|
-
v3:
|
|
413
|
-
ray:
|
|
414
|
-
orig:
|
|
410
|
+
v1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
411
|
+
v2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
412
|
+
v3: collections.abc.Sequence[float] | mathutils.Vector,
|
|
413
|
+
ray: collections.abc.Sequence[float] | mathutils.Vector,
|
|
414
|
+
orig: collections.abc.Sequence[float] | mathutils.Vector,
|
|
415
415
|
clip: bool = True,
|
|
416
416
|
) -> mathutils.Vector:
|
|
417
417
|
"""Returns the intersection between a ray and a triangle, if possible, returns None otherwise.
|
|
418
418
|
|
|
419
419
|
:param v1: Point1
|
|
420
|
-
:type v1:
|
|
420
|
+
:type v1: collections.abc.Sequence[float] | mathutils.Vector
|
|
421
421
|
:param v2: Point2
|
|
422
|
-
:type v2:
|
|
422
|
+
:type v2: collections.abc.Sequence[float] | mathutils.Vector
|
|
423
423
|
:param v3: Point3
|
|
424
|
-
:type v3:
|
|
424
|
+
:type v3: collections.abc.Sequence[float] | mathutils.Vector
|
|
425
425
|
:param ray: Direction of the projection
|
|
426
|
-
:type ray:
|
|
426
|
+
:type ray: collections.abc.Sequence[float] | mathutils.Vector
|
|
427
427
|
:param orig: Origin
|
|
428
|
-
:type orig:
|
|
428
|
+
:type orig: collections.abc.Sequence[float] | mathutils.Vector
|
|
429
429
|
:param clip: When False, don't restrict the intersection to the area of the triangle, use the infinite plane defined by the triangle.
|
|
430
430
|
:type clip: bool
|
|
431
431
|
:return: The point of intersection or None if no intersection is found
|
|
@@ -435,19 +435,19 @@ def intersect_ray_tri(
|
|
|
435
435
|
...
|
|
436
436
|
|
|
437
437
|
def intersect_sphere_sphere_2d(
|
|
438
|
-
p_a:
|
|
438
|
+
p_a: collections.abc.Sequence[float] | mathutils.Vector,
|
|
439
439
|
radius_a: float,
|
|
440
|
-
p_b:
|
|
440
|
+
p_b: collections.abc.Sequence[float] | mathutils.Vector,
|
|
441
441
|
radius_b: float,
|
|
442
442
|
) -> tuple[mathutils.Vector, ...]:
|
|
443
443
|
"""Returns 2 points on between intersecting circles.
|
|
444
444
|
|
|
445
445
|
:param p_a: Center of the first circle
|
|
446
|
-
:type p_a:
|
|
446
|
+
:type p_a: collections.abc.Sequence[float] | mathutils.Vector
|
|
447
447
|
:param radius_a: Radius of the first circle
|
|
448
448
|
:type radius_a: float
|
|
449
449
|
:param p_b: Center of the second circle
|
|
450
|
-
:type p_b:
|
|
450
|
+
:type p_b: collections.abc.Sequence[float] | mathutils.Vector
|
|
451
451
|
:param radius_b: Radius of the second circle
|
|
452
452
|
:type radius_b: float
|
|
453
453
|
:rtype: tuple[mathutils.Vector, ...]
|
|
@@ -500,21 +500,21 @@ def tessellate_polygon(veclist_list) -> list:
|
|
|
500
500
|
...
|
|
501
501
|
|
|
502
502
|
def volume_tetrahedron(
|
|
503
|
-
v1:
|
|
504
|
-
v2:
|
|
505
|
-
v3:
|
|
506
|
-
v4:
|
|
503
|
+
v1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
504
|
+
v2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
505
|
+
v3: collections.abc.Sequence[float] | mathutils.Vector,
|
|
506
|
+
v4: collections.abc.Sequence[float] | mathutils.Vector,
|
|
507
507
|
) -> float:
|
|
508
508
|
"""Return the volume formed by a tetrahedron (points can be in any order).
|
|
509
509
|
|
|
510
510
|
:param v1: Point1
|
|
511
|
-
:type v1:
|
|
511
|
+
:type v1: collections.abc.Sequence[float] | mathutils.Vector
|
|
512
512
|
:param v2: Point2
|
|
513
|
-
:type v2:
|
|
513
|
+
:type v2: collections.abc.Sequence[float] | mathutils.Vector
|
|
514
514
|
:param v3: Point3
|
|
515
|
-
:type v3:
|
|
515
|
+
:type v3: collections.abc.Sequence[float] | mathutils.Vector
|
|
516
516
|
:param v4: Point4
|
|
517
|
-
:type v4:
|
|
517
|
+
:type v4: collections.abc.Sequence[float] | mathutils.Vector
|
|
518
518
|
:rtype: float
|
|
519
519
|
"""
|
|
520
520
|
|
mathutils/kdtree/__init__.pyi
CHANGED
|
@@ -21,25 +21,27 @@ class KDTree:
|
|
|
21
21
|
|
|
22
22
|
def find(
|
|
23
23
|
self,
|
|
24
|
-
co:
|
|
25
|
-
filter:
|
|
24
|
+
co: collections.abc.Sequence[float] | mathutils.Vector,
|
|
25
|
+
filter: collections.abc.Callable = None,
|
|
26
26
|
) -> tuple:
|
|
27
27
|
"""Find nearest point to co.
|
|
28
28
|
|
|
29
29
|
:param co: 3d coordinates.
|
|
30
|
-
:type co:
|
|
30
|
+
:type co: collections.abc.Sequence[float] | mathutils.Vector
|
|
31
31
|
:param filter: function which takes an index and returns True for indices to include in the search.
|
|
32
|
-
:type filter:
|
|
32
|
+
:type filter: collections.abc.Callable
|
|
33
33
|
:return: Returns (`Vector`, index, distance).
|
|
34
34
|
:rtype: tuple
|
|
35
35
|
"""
|
|
36
36
|
...
|
|
37
37
|
|
|
38
|
-
def find_n(
|
|
38
|
+
def find_n(
|
|
39
|
+
self, co: collections.abc.Sequence[float] | mathutils.Vector, n: int
|
|
40
|
+
) -> list:
|
|
39
41
|
"""Find nearest n points to co.
|
|
40
42
|
|
|
41
43
|
:param co: 3d coordinates.
|
|
42
|
-
:type co:
|
|
44
|
+
:type co: collections.abc.Sequence[float] | mathutils.Vector
|
|
43
45
|
:param n: Number of points to find.
|
|
44
46
|
:type n: int
|
|
45
47
|
:return: Returns a list of tuples (`Vector`, index, distance).
|
|
@@ -48,12 +50,12 @@ class KDTree:
|
|
|
48
50
|
...
|
|
49
51
|
|
|
50
52
|
def find_range(
|
|
51
|
-
self, co:
|
|
53
|
+
self, co: collections.abc.Sequence[float] | mathutils.Vector, radius: float
|
|
52
54
|
) -> list:
|
|
53
55
|
"""Find all points within radius of co.
|
|
54
56
|
|
|
55
57
|
:param co: 3d coordinates.
|
|
56
|
-
:type co:
|
|
58
|
+
:type co: collections.abc.Sequence[float] | mathutils.Vector
|
|
57
59
|
:param radius: Distance to search for points.
|
|
58
60
|
:type radius: float
|
|
59
61
|
:return: Returns a list of tuples (`Vector`, index, distance).
|
|
@@ -61,11 +63,13 @@ class KDTree:
|
|
|
61
63
|
"""
|
|
62
64
|
...
|
|
63
65
|
|
|
64
|
-
def insert(
|
|
66
|
+
def insert(
|
|
67
|
+
self, co: collections.abc.Sequence[float] | mathutils.Vector, index: int
|
|
68
|
+
):
|
|
65
69
|
"""Insert a point into the KDTree.
|
|
66
70
|
|
|
67
71
|
:param co: Point 3d position.
|
|
68
|
-
:type co:
|
|
72
|
+
:type co: collections.abc.Sequence[float] | mathutils.Vector
|
|
69
73
|
:param index: The index of the point.
|
|
70
74
|
:type index: int
|
|
71
75
|
"""
|