fake-bpy-module 20241102__py3-none-any.whl → 20241111__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.
- addon_utils/__init__.pyi +28 -13
- bl_console_utils/autocomplete/complete_calltip/__init__.pyi +1 -2
- bl_console_utils/autocomplete/complete_import/__init__.pyi +3 -6
- bl_console_utils/autocomplete/complete_namespace/__init__.pyi +1 -2
- bl_console_utils/autocomplete/intellisense/__init__.pyi +2 -6
- bl_operators/image_as_planes/__init__.pyi +12 -39
- bl_operators/uvcalc_transform/__init__.pyi +4 -42
- bl_operators/wm/__init__.pyi +8 -0
- bl_ui/generic_ui_list/__init__.pyi +2 -1
- bl_ui/properties_grease_pencil_common/__init__.pyi +0 -7
- bl_ui/space_userpref/__init__.pyi +2 -2
- blf/__init__.pyi +3 -5
- bmesh/ops/__init__.pyi +53 -110
- bmesh/types/__init__.pyi +22 -33
- bmesh/utils/__init__.pyi +6 -16
- bpy/app/icons/__init__.pyi +5 -11
- bpy/app/translations/__init__.pyi +7 -14
- bpy/msgbus/__init__.pyi +7 -8
- bpy/ops/curves/__init__.pyi +16 -0
- bpy/ops/nla/__init__.pyi +1 -1
- bpy/ops/sequencer/__init__.pyi +3 -0
- bpy/path/__init__.pyi +6 -16
- bpy/props/__init__.pyi +122 -135
- bpy/types/__init__.pyi +368 -606
- bpy/utils/__init__.pyi +30 -29
- bpy/utils/previews/__init__.pyi +1 -2
- bpy/utils/units/__init__.pyi +1 -2
- bpy_extras/anim_utils/__init__.pyi +8 -12
- bpy_extras/bmesh_utils/__init__.pyi +1 -2
- bpy_extras/image_utils/__init__.pyi +2 -5
- bpy_extras/io_utils/__init__.pyi +8 -14
- bpy_extras/mesh_utils/__init__.pyi +14 -29
- bpy_extras/object_utils/__init__.pyi +1 -1
- bpy_extras/view3d_utils/__init__.pyi +3 -10
- {fake_bpy_module-20241102.dist-info → fake_bpy_module-20241111.dist-info}/METADATA +1 -1
- {fake_bpy_module-20241102.dist-info → fake_bpy_module-20241111.dist-info}/RECORD +57 -57
- freestyle/chainingiterators/__init__.pyi +2 -7
- freestyle/functions/__init__.pyi +4 -16
- freestyle/types/__init__.pyi +29 -63
- freestyle/utils/ContextFunctions/__init__.pyi +2 -2
- freestyle/utils/__init__.pyi +1 -2
- gpu/__init__.pyi +19 -5
- gpu/matrix/__init__.pyi +2 -2
- gpu/state/__init__.pyi +16 -8
- gpu/types/__init__.pyi +14 -29
- gpu_extras/batch/__init__.pyi +9 -9
- gpu_extras/presets/__init__.pyi +4 -11
- idprop/types/__init__.pyi +1 -2
- imbuf/__init__.pyi +2 -4
- mathutils/__init__.pyi +30 -95
- mathutils/bvhtree/__init__.pyi +14 -18
- mathutils/geometry/__init__.pyi +39 -52
- mathutils/interpolate/__init__.pyi +2 -2
- mathutils/kdtree/__init__.pyi +13 -28
- rna_info/__init__.pyi +1 -2
- {fake_bpy_module-20241102.dist-info → fake_bpy_module-20241111.dist-info}/WHEEL +0 -0
- {fake_bpy_module-20241102.dist-info → fake_bpy_module-20241111.dist-info}/top_level.txt +0 -0
mathutils/bvhtree/__init__.pyi
CHANGED
|
@@ -53,43 +53,41 @@ class BVHTree:
|
|
|
53
53
|
"""BVH tree constructed geometry passed in as arguments.
|
|
54
54
|
|
|
55
55
|
:param vertices: float triplets each representing (x, y, z)
|
|
56
|
-
:param polygons: Sequence of
|
|
56
|
+
:param polygons: Sequence of polygons, each containing indices to the vertices argument.
|
|
57
57
|
:param all_triangles: Use when all polygons are triangles for more efficient conversion.
|
|
58
58
|
:type all_triangles: bool
|
|
59
59
|
:param epsilon: Increase the threshold for detecting overlap and raycast hits.
|
|
60
60
|
:type epsilon: float
|
|
61
61
|
"""
|
|
62
62
|
|
|
63
|
-
def find_nearest(self, origin, distance: float = 1.84467e19)
|
|
63
|
+
def find_nearest(self, origin, distance: float = 1.84467e19):
|
|
64
64
|
"""Find the nearest element (typically face index) to a point.
|
|
65
65
|
|
|
66
66
|
:param origin:
|
|
67
67
|
:param distance: Maximum distance threshold.
|
|
68
68
|
:type distance: float
|
|
69
|
-
:return: Returns a tuple
|
|
70
|
-
(`Vector` location, `Vector` normal, int index, float distance),
|
|
69
|
+
:return: Returns a tuple: (position, normal, index, distance),
|
|
71
70
|
Values will all be None if no hit is found.
|
|
72
|
-
:rtype: tuple
|
|
73
71
|
"""
|
|
74
72
|
|
|
75
|
-
def find_nearest_range(
|
|
73
|
+
def find_nearest_range(
|
|
74
|
+
self, origin, distance: float = 1.84467e19
|
|
75
|
+
) -> int | mathutils.Vector:
|
|
76
76
|
"""Find the nearest elements (typically face index) to a point in the distance range.
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
:rtype: list
|
|
78
|
+
:param origin:
|
|
79
|
+
:param distance: Maximum distance threshold.
|
|
80
|
+
:type distance: float
|
|
81
|
+
:return: Returns a list of tuples (position, normal, index, distance)
|
|
82
|
+
:rtype: int | mathutils.Vector
|
|
84
83
|
"""
|
|
85
84
|
|
|
86
|
-
def overlap(self, other_tree: typing_extensions.Self)
|
|
85
|
+
def overlap(self, other_tree: typing_extensions.Self):
|
|
87
86
|
"""Find overlapping indices between 2 trees.
|
|
88
87
|
|
|
89
88
|
:param other_tree: Other tree to perform overlap test on.
|
|
90
89
|
:type other_tree: typing_extensions.Self
|
|
91
90
|
:return: Returns a list of unique index pairs, the first index referencing this tree, the second referencing the other_tree.
|
|
92
|
-
:rtype: list
|
|
93
91
|
"""
|
|
94
92
|
|
|
95
93
|
def ray_cast(
|
|
@@ -97,7 +95,7 @@ class BVHTree:
|
|
|
97
95
|
origin: collections.abc.Sequence[float] | mathutils.Vector,
|
|
98
96
|
direction: collections.abc.Sequence[float] | mathutils.Vector,
|
|
99
97
|
distance: float = sys.float_info.max,
|
|
100
|
-
)
|
|
98
|
+
):
|
|
101
99
|
"""Cast a ray onto the mesh.
|
|
102
100
|
|
|
103
101
|
:param origin: Start location of the ray in object space.
|
|
@@ -106,10 +104,8 @@ class BVHTree:
|
|
|
106
104
|
:type direction: collections.abc.Sequence[float] | mathutils.Vector
|
|
107
105
|
:param distance: Maximum distance threshold.
|
|
108
106
|
:type distance: float
|
|
109
|
-
:return: Returns a tuple
|
|
110
|
-
(`Vector` location, `Vector` normal, int index, float distance),
|
|
107
|
+
:return: Returns a tuple: (position, normal, index, distance),
|
|
111
108
|
Values will all be None if no hit is found.
|
|
112
|
-
:rtype: tuple
|
|
113
109
|
"""
|
|
114
110
|
|
|
115
111
|
def __init__(self, size):
|
mathutils/geometry/__init__.pyi
CHANGED
|
@@ -32,7 +32,7 @@ def barycentric_transform(
|
|
|
32
32
|
tri_b1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
33
33
|
tri_b2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
34
34
|
tri_b3: collections.abc.Sequence[float] | mathutils.Vector,
|
|
35
|
-
):
|
|
35
|
+
) -> mathutils.Vector:
|
|
36
36
|
"""Return a transformed point, the transformation is defined by 2 triangles.
|
|
37
37
|
|
|
38
38
|
:param point: The point to transform.
|
|
@@ -50,24 +50,23 @@ def barycentric_transform(
|
|
|
50
50
|
:param tri_b3: target triangle vertex.
|
|
51
51
|
:type tri_b3: collections.abc.Sequence[float] | mathutils.Vector
|
|
52
52
|
:return: The transformed point
|
|
53
|
+
:rtype: mathutils.Vector
|
|
53
54
|
"""
|
|
54
55
|
|
|
55
|
-
def box_fit_2d(points
|
|
56
|
+
def box_fit_2d(points) -> float:
|
|
56
57
|
"""Returns an angle that best fits the points to an axis aligned rectangle
|
|
57
58
|
|
|
58
|
-
:param points:
|
|
59
|
-
:type points: list
|
|
59
|
+
:param points: Sequence of 2D points.
|
|
60
60
|
:return: angle
|
|
61
61
|
:rtype: float
|
|
62
62
|
"""
|
|
63
63
|
|
|
64
|
-
def box_pack_2d(boxes:
|
|
64
|
+
def box_pack_2d(boxes: float):
|
|
65
65
|
"""Returns a tuple with the width and height of the packed bounding box.
|
|
66
66
|
|
|
67
|
-
:param boxes: list of boxes, each box is a list where the first 4 items are [
|
|
68
|
-
:type boxes:
|
|
69
|
-
:return:
|
|
70
|
-
:rtype: tuple
|
|
67
|
+
:param boxes: list of boxes, each box is a list where the first 4 items are [X, Y, width, height, ...] other items are ignored. The X & Y values in this list are modified to set the packed positions.
|
|
68
|
+
:type boxes: float
|
|
69
|
+
:return: The width and height of the packed bounding box.
|
|
71
70
|
"""
|
|
72
71
|
|
|
73
72
|
def closest_point_on_tri(
|
|
@@ -90,16 +89,16 @@ def closest_point_on_tri(
|
|
|
90
89
|
:rtype: mathutils.Vector
|
|
91
90
|
"""
|
|
92
91
|
|
|
93
|
-
def convex_hull_2d(points
|
|
92
|
+
def convex_hull_2d(points):
|
|
94
93
|
"""Returns a list of indices into the list given
|
|
95
94
|
|
|
96
|
-
:param points:
|
|
97
|
-
:type points: list
|
|
95
|
+
:param points: Sequence of 2D points.
|
|
98
96
|
:return: a list of indices
|
|
99
|
-
:rtype: list[int]
|
|
100
97
|
"""
|
|
101
98
|
|
|
102
|
-
def delaunay_2d_cdt(
|
|
99
|
+
def delaunay_2d_cdt(
|
|
100
|
+
vert_coords, edges, faces, output_type: int, epsilon: float, need_ids=True
|
|
101
|
+
):
|
|
103
102
|
"""Computes the Constrained Delaunay Triangulation of a set of vertices,
|
|
104
103
|
with edges and faces that must appear in the triangulation.
|
|
105
104
|
Some triangles may be eaten away, or combined with other triangles,
|
|
@@ -112,20 +111,16 @@ def delaunay_2d_cdt(vert_coords, edges, faces, output_type, epsilon, need_ids=Tr
|
|
|
112
111
|
with the edges implied by each of the faces (n of them for an n-gon).
|
|
113
112
|
If the need_ids argument is supplied, and False, then the code skips the preparation
|
|
114
113
|
of the orig arrays, which may save some time.
|
|
115
|
-
:arg vert_coords: Vertex coordinates (2d)
|
|
116
|
-
:type vert_coords: list of `mathutils.Vector`
|
|
117
|
-
:arg edges: Edges, as pairs of indices in vert_coords
|
|
118
|
-
:type edges: list of (int, int)
|
|
119
|
-
:arg faces: Faces, each sublist is a face, as indices in vert_coords (CCW oriented)
|
|
120
|
-
:type faces: list of list of int
|
|
121
|
-
:arg output_type: What output looks like. 0 => triangles with convex hull. 1 => triangles inside constraints. 2 => the input constraints, intersected. 3 => like 2 but detect holes and omit them from output. 4 => like 2 but with extra edges to make valid BMesh faces. 5 => like 4 but detect holes and omit them from output.
|
|
122
|
-
:type output_type: intn :arg epsilon: For nearness tests; should not be zero
|
|
123
|
-
:type epsilon: float
|
|
124
|
-
:arg need_ids: are the orig output arrays needed?
|
|
125
|
-
:type need_args: bool
|
|
126
|
-
:return: Output tuple, (vert_coords, edges, faces, orig_verts, orig_edges, orig_faces)
|
|
127
|
-
:rtype: (list of mathutils.Vector, list of (int, int), list of list of int, list of list of int, list of list of int, list of list of int)
|
|
128
114
|
|
|
115
|
+
:param vert_coords: Vertex coordinates (2d)
|
|
116
|
+
:param edges: Edges, as pairs of indices in vert_coords
|
|
117
|
+
:param faces: Faces, each sublist is a face, as indices in vert_coords (CCW oriented)
|
|
118
|
+
:param output_type: What output looks like. 0 => triangles with convex hull. 1 => triangles inside constraints. 2 => the input constraints, intersected. 3 => like 2 but detect holes and omit them from output. 4 => like 2 but with extra edges to make valid BMesh faces. 5 => like 4 but detect holes and omit them from output.
|
|
119
|
+
:type output_type: int
|
|
120
|
+
:param epsilon: For nearness tests; should not be zero
|
|
121
|
+
:type epsilon: float
|
|
122
|
+
:param need_ids: are the orig output arrays needed?
|
|
123
|
+
:return: Output tuple, (vert_coords, edges, faces, orig_verts, orig_edges, orig_faces)
|
|
129
124
|
"""
|
|
130
125
|
|
|
131
126
|
def distance_point_to_plane(
|
|
@@ -163,7 +158,7 @@ def interpolate_bezier(
|
|
|
163
158
|
:type knot2: collections.abc.Sequence[float] | mathutils.Vector
|
|
164
159
|
:param resolution: Number of points to return.
|
|
165
160
|
:type resolution: int
|
|
166
|
-
:return: The interpolated points
|
|
161
|
+
:return: The interpolated points.
|
|
167
162
|
"""
|
|
168
163
|
|
|
169
164
|
def intersect_line_line(
|
|
@@ -171,7 +166,7 @@ def intersect_line_line(
|
|
|
171
166
|
v2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
172
167
|
v3: collections.abc.Sequence[float] | mathutils.Vector,
|
|
173
168
|
v4: collections.abc.Sequence[float] | mathutils.Vector,
|
|
174
|
-
)
|
|
169
|
+
):
|
|
175
170
|
"""Returns a tuple with the points on each line respectively closest to the other.
|
|
176
171
|
|
|
177
172
|
:param v1: First point of the first line
|
|
@@ -182,7 +177,7 @@ def intersect_line_line(
|
|
|
182
177
|
:type v3: collections.abc.Sequence[float] | mathutils.Vector
|
|
183
178
|
:param v4: Second point of the second line
|
|
184
179
|
:type v4: collections.abc.Sequence[float] | mathutils.Vector
|
|
185
|
-
:
|
|
180
|
+
:return: The intersection on each line or None when the lines are co-linear.
|
|
186
181
|
"""
|
|
187
182
|
|
|
188
183
|
def intersect_line_line_2d(
|
|
@@ -190,7 +185,7 @@ def intersect_line_line_2d(
|
|
|
190
185
|
lineA_p2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
191
186
|
lineB_p1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
192
187
|
lineB_p2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
193
|
-
)
|
|
188
|
+
):
|
|
194
189
|
"""Takes 2 segments (defined by 4 vectors) and returns a vector for their point of intersection or None.
|
|
195
190
|
|
|
196
191
|
:param lineA_p1: First point of the first line
|
|
@@ -202,7 +197,6 @@ def intersect_line_line_2d(
|
|
|
202
197
|
:param lineB_p2: Second point of the second line
|
|
203
198
|
:type lineB_p2: collections.abc.Sequence[float] | mathutils.Vector
|
|
204
199
|
:return: The point of intersection or None when not found
|
|
205
|
-
:rtype: mathutils.Vector
|
|
206
200
|
"""
|
|
207
201
|
|
|
208
202
|
def intersect_line_plane(
|
|
@@ -211,7 +205,7 @@ def intersect_line_plane(
|
|
|
211
205
|
plane_co: collections.abc.Sequence[float] | mathutils.Vector,
|
|
212
206
|
plane_no: collections.abc.Sequence[float] | mathutils.Vector,
|
|
213
207
|
no_flip=False,
|
|
214
|
-
)
|
|
208
|
+
):
|
|
215
209
|
"""Calculate the intersection between a line (as 2 vectors) and a plane.
|
|
216
210
|
Returns a vector for the intersection or None.
|
|
217
211
|
|
|
@@ -224,7 +218,6 @@ def intersect_line_plane(
|
|
|
224
218
|
:param plane_no: The direction the plane is facing
|
|
225
219
|
:type plane_no: collections.abc.Sequence[float] | mathutils.Vector
|
|
226
220
|
:return: The point of intersection or None when not found
|
|
227
|
-
:rtype: mathutils.Vector
|
|
228
221
|
"""
|
|
229
222
|
|
|
230
223
|
def intersect_line_sphere(
|
|
@@ -285,21 +278,20 @@ def intersect_plane_plane(
|
|
|
285
278
|
:type plane_b_co: collections.abc.Sequence[float] | mathutils.Vector
|
|
286
279
|
:param plane_b_no: Normal of the second plane
|
|
287
280
|
:type plane_b_no: collections.abc.Sequence[float] | mathutils.Vector
|
|
288
|
-
:return: The line of the intersection represented as a point and a vector
|
|
281
|
+
:return: The line of the intersection represented as a point and a vector or None if the intersection can't be calculated
|
|
289
282
|
"""
|
|
290
283
|
|
|
291
284
|
def intersect_point_line(
|
|
292
285
|
pt: collections.abc.Sequence[float] | mathutils.Vector,
|
|
293
286
|
line_p1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
294
287
|
line_p2,
|
|
295
|
-
)
|
|
288
|
+
):
|
|
296
289
|
"""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.
|
|
297
290
|
|
|
298
291
|
:param pt: Point
|
|
299
292
|
:type pt: collections.abc.Sequence[float] | mathutils.Vector
|
|
300
293
|
:param line_p1: First point of the lineSecond point of the line
|
|
301
294
|
:type line_p1: collections.abc.Sequence[float] | mathutils.Vector
|
|
302
|
-
:rtype: tuple[mathutils.Vector]
|
|
303
295
|
"""
|
|
304
296
|
|
|
305
297
|
def intersect_point_quad_2d(
|
|
@@ -331,7 +323,7 @@ def intersect_point_tri(
|
|
|
331
323
|
tri_p1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
332
324
|
tri_p2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
333
325
|
tri_p3: collections.abc.Sequence[float] | mathutils.Vector,
|
|
334
|
-
)
|
|
326
|
+
):
|
|
335
327
|
"""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.
|
|
336
328
|
|
|
337
329
|
:param pt: Point
|
|
@@ -343,7 +335,6 @@ def intersect_point_tri(
|
|
|
343
335
|
:param tri_p3: Third point of the triangle
|
|
344
336
|
:type tri_p3: collections.abc.Sequence[float] | mathutils.Vector
|
|
345
337
|
:return: Point on the triangles plane or None if its outside the triangle
|
|
346
|
-
:rtype: mathutils.Vector
|
|
347
338
|
"""
|
|
348
339
|
|
|
349
340
|
def intersect_point_tri_2d(
|
|
@@ -372,7 +363,7 @@ def intersect_ray_tri(
|
|
|
372
363
|
ray: collections.abc.Sequence[float] | mathutils.Vector,
|
|
373
364
|
orig: collections.abc.Sequence[float] | mathutils.Vector,
|
|
374
365
|
clip: bool = True,
|
|
375
|
-
)
|
|
366
|
+
):
|
|
376
367
|
"""Returns the intersection between a ray and a triangle, if possible, returns None otherwise.
|
|
377
368
|
|
|
378
369
|
:param v1: Point1
|
|
@@ -388,7 +379,6 @@ def intersect_ray_tri(
|
|
|
388
379
|
:param clip: When False, don't restrict the intersection to the area of the triangle, use the infinite plane defined by the triangle.
|
|
389
380
|
:type clip: bool
|
|
390
381
|
:return: The point of intersection or None if no intersection is found
|
|
391
|
-
:rtype: mathutils.Vector
|
|
392
382
|
"""
|
|
393
383
|
|
|
394
384
|
def intersect_sphere_sphere_2d(
|
|
@@ -396,7 +386,7 @@ def intersect_sphere_sphere_2d(
|
|
|
396
386
|
radius_a: float,
|
|
397
387
|
p_b: collections.abc.Sequence[float] | mathutils.Vector,
|
|
398
388
|
radius_b: float,
|
|
399
|
-
)
|
|
389
|
+
):
|
|
400
390
|
"""Returns 2 points on between intersecting circles.
|
|
401
391
|
|
|
402
392
|
:param p_a: Center of the first circle
|
|
@@ -407,7 +397,7 @@ def intersect_sphere_sphere_2d(
|
|
|
407
397
|
:type p_b: collections.abc.Sequence[float] | mathutils.Vector
|
|
408
398
|
:param radius_b: Radius of the second circle
|
|
409
399
|
:type radius_b: float
|
|
410
|
-
:
|
|
400
|
+
:return: 2 points on between intersecting circles or None when there is no intersection.
|
|
411
401
|
"""
|
|
412
402
|
|
|
413
403
|
def intersect_tri_tri_2d(tri_a1, tri_a2, tri_a3, tri_b1, tri_b2, tri_b3) -> bool:
|
|
@@ -419,31 +409,28 @@ def intersect_tri_tri_2d(tri_a1, tri_a2, tri_a3, tri_b1, tri_b2, tri_b3) -> bool
|
|
|
419
409
|
def normal(vectors) -> mathutils.Vector:
|
|
420
410
|
"""Returns the normal of a 3D polygon.
|
|
421
411
|
|
|
422
|
-
:param vectors:
|
|
412
|
+
:param vectors: 3 or more vectors to calculate normals.
|
|
423
413
|
:rtype: mathutils.Vector
|
|
424
414
|
"""
|
|
425
415
|
|
|
426
416
|
def points_in_planes(
|
|
427
|
-
planes:
|
|
428
|
-
epsilon_coplanar: float = 0.0001,
|
|
429
|
-
epsilon_isect: float = 1e-06,
|
|
417
|
+
planes, epsilon_coplanar: float = 0.0001, epsilon_isect: float = 1e-06
|
|
430
418
|
):
|
|
431
419
|
"""Returns a list of points inside all planes given and a list of index values for the planes used.
|
|
432
420
|
|
|
433
421
|
:param planes: List of planes (4D vectors).
|
|
434
|
-
:type planes: list[mathutils.Vector]
|
|
435
422
|
:param epsilon_coplanar: Epsilon value for interpreting plane pairs as co-plannar.
|
|
436
423
|
:type epsilon_coplanar: float
|
|
437
424
|
:param epsilon_isect: Epsilon value for intersection.
|
|
438
425
|
:type epsilon_isect: float
|
|
439
|
-
:return:
|
|
426
|
+
:return: Two lists, once containing the 3D coordinates inside the planes, another containing the plane indices used.
|
|
440
427
|
"""
|
|
441
428
|
|
|
442
|
-
def tessellate_polygon(
|
|
429
|
+
def tessellate_polygon(polylines) -> int:
|
|
443
430
|
"""Takes a list of polylines (each point a pair or triplet of numbers) and returns the point indices for a polyline filled with triangles. Does not handle degenerate geometry (such as zero-length lines due to consecutive identical points).
|
|
444
431
|
|
|
445
|
-
:param
|
|
446
|
-
:rtype:
|
|
432
|
+
:param polylines: Polygons where each polygon is a sequence of 2D or 3D points.
|
|
433
|
+
:rtype: int
|
|
447
434
|
"""
|
|
448
435
|
|
|
449
436
|
def volume_tetrahedron(
|
|
@@ -10,6 +10,6 @@ import typing_extensions
|
|
|
10
10
|
def poly_3d_calc(veclist, pt):
|
|
11
11
|
"""Calculate barycentric weights for a point on a polygon.
|
|
12
12
|
|
|
13
|
-
:param veclist:
|
|
14
|
-
:param pt:
|
|
13
|
+
:param veclist: Sequence of 3D positions.
|
|
14
|
+
:param pt: 2D or 3D position. :type pt: Sequence[float] :return: list of per-vector weights.
|
|
15
15
|
"""
|
mathutils/kdtree/__init__.pyi
CHANGED
|
@@ -8,7 +8,6 @@ Generic 3-dimensional kd-tree to perform spatial searches.
|
|
|
8
8
|
import typing
|
|
9
9
|
import collections.abc
|
|
10
10
|
import typing_extensions
|
|
11
|
-
import mathutils
|
|
12
11
|
|
|
13
12
|
class KDTree:
|
|
14
13
|
"""KdTree(size) -> new kd-tree initialized to hold size items."""
|
|
@@ -16,54 +15,40 @@ class KDTree:
|
|
|
16
15
|
def balance(self):
|
|
17
16
|
"""Balance the tree."""
|
|
18
17
|
|
|
19
|
-
def find(
|
|
20
|
-
self,
|
|
21
|
-
co: collections.abc.Sequence[float] | mathutils.Vector,
|
|
22
|
-
filter: collections.abc.Callable | None = None,
|
|
23
|
-
) -> tuple:
|
|
18
|
+
def find(self, co, filter: collections.abc.Callable | None = None) -> int:
|
|
24
19
|
"""Find nearest point to co.
|
|
25
20
|
|
|
26
|
-
:param co:
|
|
27
|
-
:type co: collections.abc.Sequence[float] | mathutils.Vector
|
|
21
|
+
:param co: 3D coordinates.
|
|
28
22
|
:param filter: function which takes an index and returns True for indices to include in the search.
|
|
29
23
|
:type filter: collections.abc.Callable | None
|
|
30
|
-
:return: Returns (
|
|
31
|
-
:rtype:
|
|
24
|
+
:return: Returns (position, index, distance).
|
|
25
|
+
:rtype: int
|
|
32
26
|
"""
|
|
33
27
|
|
|
34
|
-
def find_n(
|
|
35
|
-
self, co: collections.abc.Sequence[float] | mathutils.Vector, n: int
|
|
36
|
-
) -> list:
|
|
28
|
+
def find_n(self, co, n: int) -> int:
|
|
37
29
|
"""Find nearest n points to co.
|
|
38
30
|
|
|
39
|
-
:param co:
|
|
40
|
-
:type co: collections.abc.Sequence[float] | mathutils.Vector
|
|
31
|
+
:param co: 3D coordinates.
|
|
41
32
|
:param n: Number of points to find.
|
|
42
33
|
:type n: int
|
|
43
|
-
:return: Returns a list of tuples (
|
|
44
|
-
:rtype:
|
|
34
|
+
:return: Returns a list of tuples (position, index, distance).
|
|
35
|
+
:rtype: int
|
|
45
36
|
"""
|
|
46
37
|
|
|
47
|
-
def find_range(
|
|
48
|
-
self, co: collections.abc.Sequence[float] | mathutils.Vector, radius: float
|
|
49
|
-
) -> list:
|
|
38
|
+
def find_range(self, co, radius: float) -> int:
|
|
50
39
|
"""Find all points within radius of co.
|
|
51
40
|
|
|
52
|
-
:param co:
|
|
53
|
-
:type co: collections.abc.Sequence[float] | mathutils.Vector
|
|
41
|
+
:param co: 3D coordinates.
|
|
54
42
|
:param radius: Distance to search for points.
|
|
55
43
|
:type radius: float
|
|
56
|
-
:return: Returns a list of tuples (
|
|
57
|
-
:rtype:
|
|
44
|
+
:return: Returns a list of tuples (position, index, distance).
|
|
45
|
+
:rtype: int
|
|
58
46
|
"""
|
|
59
47
|
|
|
60
|
-
def insert(
|
|
61
|
-
self, co: collections.abc.Sequence[float] | mathutils.Vector, index: int
|
|
62
|
-
):
|
|
48
|
+
def insert(self, co, index: int):
|
|
63
49
|
"""Insert a point into the KDTree.
|
|
64
50
|
|
|
65
51
|
:param co: Point 3d position.
|
|
66
|
-
:type co: collections.abc.Sequence[float] | mathutils.Vector
|
|
67
52
|
:param index: The index of the point.
|
|
68
53
|
:type index: int
|
|
69
54
|
"""
|
rna_info/__init__.pyi
CHANGED
|
@@ -66,7 +66,7 @@ class InfoPropertyRNA:
|
|
|
66
66
|
class_fmt="{:s}",
|
|
67
67
|
mathutils_fmt="{:s}",
|
|
68
68
|
collection_id="Collection",
|
|
69
|
-
enum_descr_override
|
|
69
|
+
enum_descr_override=None,
|
|
70
70
|
):
|
|
71
71
|
"""
|
|
72
72
|
|
|
@@ -77,7 +77,6 @@ class InfoPropertyRNA:
|
|
|
77
77
|
:param collection_id:
|
|
78
78
|
:param enum_descr_override: Optionally override items for enum.
|
|
79
79
|
Otherwise expand the literal items.
|
|
80
|
-
:type enum_descr_override: str | None
|
|
81
80
|
"""
|
|
82
81
|
|
|
83
82
|
class InfoStructRNA:
|
|
File without changes
|
|
File without changes
|