fake-bpy-module-latest 20260113__py3-none-any.whl → 20260114__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.
- _bl_console_utils/autocomplete/complete_calltip/__init__.pyi +0 -13
- _bl_console_utils/autocomplete/complete_import/__init__.pyi +0 -5
- _bl_console_utils/autocomplete/complete_namespace/__init__.pyi +0 -11
- _bl_console_utils/autocomplete/intellisense/__init__.pyi +0 -10
- _bpy_types/__init__.pyi +1 -122
- _rna_info/__init__.pyi +0 -1
- addon_utils/__init__.pyi +0 -13
- aud/__init__.pyi +0 -146
- bl_math/__init__.pyi +0 -12
- bl_operators/add_mesh_torus/__init__.pyi +0 -2
- bl_operators/anim/__init__.pyi +0 -26
- bl_operators/assets/__init__.pyi +0 -6
- bl_operators/bone_selection_sets/__init__.pyi +0 -28
- bl_operators/clip/__init__.pyi +0 -20
- bl_operators/connect_to_output/__init__.pyi +0 -2
- bl_operators/console/__init__.pyi +0 -10
- bl_operators/constraint/__init__.pyi +0 -8
- bl_operators/copy_global_transform/__init__.pyi +0 -10
- bl_operators/file/__init__.pyi +0 -6
- bl_operators/freestyle/__init__.pyi +0 -8
- bl_operators/geometry_nodes/__init__.pyi +0 -8
- bl_operators/grease_pencil/__init__.pyi +0 -2
- bl_operators/image/__init__.pyi +0 -10
- bl_operators/image_as_planes/__init__.pyi +0 -4
- bl_operators/mesh/__init__.pyi +0 -4
- bl_operators/node/__init__.pyi +0 -44
- bl_operators/object/__init__.pyi +0 -30
- bl_operators/object_align/__init__.pyi +0 -2
- bl_operators/object_quick_effects/__init__.pyi +0 -8
- bl_operators/object_randomize_transform/__init__.pyi +0 -2
- bl_operators/presets/__init__.pyi +0 -50
- bl_operators/rigidbody/__init__.pyi +0 -6
- bl_operators/screen_play_rendered_anim/__init__.pyi +0 -2
- bl_operators/sequencer/__init__.pyi +0 -16
- bl_operators/spreadsheet/__init__.pyi +0 -2
- bl_operators/userpref/__init__.pyi +0 -50
- bl_operators/uvcalc_follow_active/__init__.pyi +0 -2
- bl_operators/uvcalc_lightmap/__init__.pyi +0 -2
- bl_operators/uvcalc_transform/__init__.pyi +0 -4
- bl_operators/vertexpaint_dirt/__init__.pyi +0 -2
- bl_operators/view3d/__init__.pyi +0 -16
- bl_operators/wm/__init__.pyi +0 -92
- bl_operators/world/__init__.pyi +0 -2
- bl_ui/__init__.pyi +0 -4
- bl_ui/anim/__init__.pyi +0 -2
- bl_ui/asset_shelf/__init__.pyi +0 -2
- bl_ui/generic_ui_list/__init__.pyi +1 -17
- bl_ui/node_add_menu/__init__.pyi +0 -10
- bl_ui/node_add_menu_compositor/__init__.pyi +0 -38
- bl_ui/node_add_menu_geometry/__init__.pyi +0 -112
- bl_ui/node_add_menu_shader/__init__.pyi +0 -20
- bl_ui/node_add_menu_texture/__init__.pyi +0 -16
- bl_ui/properties_collection/__init__.pyi +0 -14
- bl_ui/properties_constraint/__init__.pyi +0 -154
- bl_ui/properties_data_armature/__init__.pyi +0 -36
- bl_ui/properties_data_bone/__init__.pyi +0 -20
- bl_ui/properties_data_camera/__init__.pyi +0 -30
- bl_ui/properties_data_curve/__init__.pyi +0 -30
- bl_ui/properties_data_curves/__init__.pyi +0 -16
- bl_ui/properties_data_empty/__init__.pyi +0 -4
- bl_ui/properties_data_grease_pencil/__init__.pyi +0 -40
- bl_ui/properties_data_lattice/__init__.pyi +0 -8
- bl_ui/properties_data_light/__init__.pyi +0 -20
- bl_ui/properties_data_lightprobe/__init__.pyi +0 -28
- bl_ui/properties_data_mesh/__init__.pyi +0 -42
- bl_ui/properties_data_metaball/__init__.pyi +0 -12
- bl_ui/properties_data_modifier/__init__.pyi +0 -18
- bl_ui/properties_data_pointcloud/__init__.pyi +0 -12
- bl_ui/properties_data_shaderfx/__init__.pyi +0 -2
- bl_ui/properties_data_speaker/__init__.pyi +0 -12
- bl_ui/properties_data_volume/__init__.pyi +0 -18
- bl_ui/properties_freestyle/__init__.pyi +0 -50
- bl_ui/properties_grease_pencil_common/__init__.pyi +0 -14
- bl_ui/properties_mask_common/__init__.pyi +0 -14
- bl_ui/properties_material/__init__.pyi +0 -32
- bl_ui/properties_material_gpencil/__init__.pyi +0 -22
- bl_ui/properties_object/__init__.pyi +0 -44
- bl_ui/properties_output/__init__.pyi +0 -40
- bl_ui/properties_paint_common/__init__.pyi +0 -4
- bl_ui/properties_particle/__init__.pyi +0 -106
- bl_ui/properties_physics_cloth/__init__.pyi +0 -28
- bl_ui/properties_physics_common/__init__.pyi +0 -2
- bl_ui/properties_physics_dynamicpaint/__init__.pyi +0 -44
- bl_ui/properties_physics_field/__init__.pyi +0 -20
- bl_ui/properties_physics_fluid/__init__.pyi +0 -56
- bl_ui/properties_physics_geometry_nodes/__init__.pyi +0 -2
- bl_ui/properties_physics_rigidbody/__init__.pyi +0 -16
- bl_ui/properties_physics_rigidbody_constraint/__init__.pyi +0 -26
- bl_ui/properties_physics_softbody/__init__.pyi +0 -30
- bl_ui/properties_render/__init__.pyi +0 -90
- bl_ui/properties_scene/__init__.pyi +0 -34
- bl_ui/properties_strip/__init__.pyi +0 -42
- bl_ui/properties_strip_modifier/__init__.pyi +0 -2
- bl_ui/properties_texture/__init__.pyi +0 -54
- bl_ui/properties_view_layer/__init__.pyi +0 -28
- bl_ui/properties_workspace/__init__.pyi +0 -8
- bl_ui/properties_world/__init__.pyi +0 -22
- bl_ui/space_clip/__init__.pyi +0 -150
- bl_ui/space_console/__init__.pyi +0 -12
- bl_ui/space_dopesheet/__init__.pyi +0 -64
- bl_ui/space_filebrowser/__init__.pyi +0 -60
- bl_ui/space_graph/__init__.pyi +0 -44
- bl_ui/space_image/__init__.pyi +0 -142
- bl_ui/space_info/__init__.pyi +0 -12
- bl_ui/space_nla/__init__.pyi +0 -36
- bl_ui/space_node/__init__.pyi +0 -66
- bl_ui/space_outliner/__init__.pyi +0 -30
- bl_ui/space_properties/__init__.pyi +0 -8
- bl_ui/space_sequencer/__init__.pyi +0 -136
- bl_ui/space_spreadsheet/__init__.pyi +0 -6
- bl_ui/space_statusbar/__init__.pyi +0 -2
- bl_ui/space_text/__init__.pyi +0 -32
- bl_ui/space_time/__init__.pyi +0 -12
- bl_ui/space_topbar/__init__.pyi +0 -52
- bl_ui/space_userpref/__init__.pyi +0 -186
- bl_ui/space_view3d/__init__.pyi +0 -536
- bl_ui/space_view3d_sidebar/__init__.pyi +0 -8
- bl_ui/space_view3d_toolbar/__init__.pyi +0 -162
- blf/__init__.pyi +0 -47
- bmesh/__init__.pyi +0 -7
- bmesh/geometry/__init__.pyi +0 -3
- bmesh/ops/__init__.pyi +0 -451
- bmesh/types/__init__.pyi +65 -427
- bmesh/utils/__init__.pyi +0 -44
- bpy/app/__init__.pyi +0 -5
- bpy/app/icons/__init__.pyi +0 -6
- bpy/app/timers/__init__.pyi +0 -6
- bpy/app/translations/__init__.pyi +0 -15
- bpy/msgbus/__init__.pyi +1 -4
- bpy/ops/action/__init__.pyi +15 -165
- bpy/ops/anim/__init__.pyi +27 -274
- bpy/ops/armature/__init__.pyi +17 -191
- bpy/ops/asset/__init__.pyi +11 -97
- bpy/ops/boid/__init__.pyi +7 -38
- bpy/ops/brush/__init__.pyi +3 -72
- bpy/ops/buttons/__init__.pyi +4 -71
- bpy/ops/cachefile/__init__.pyi +2 -63
- bpy/ops/camera/__init__.pyi +0 -11
- bpy/ops/clip/__init__.pyi +43 -427
- bpy/ops/cloth/__init__.pyi +0 -5
- bpy/ops/collection/__init__.pyi +2 -34
- bpy/ops/console/__init__.pyi +10 -88
- bpy/ops/constraint/__init__.pyi +3 -80
- bpy/ops/curve/__init__.pyi +23 -254
- bpy/ops/curves/__init__.pyi +15 -164
- bpy/ops/cycles/__init__.pyi +1 -14
- bpy/ops/dpaint/__init__.pyi +3 -21
- bpy/ops/ed/__init__.pyi +10 -82
- bpy/ops/export_anim/__init__.pyi +0 -11
- bpy/ops/export_scene/__init__.pyi +0 -154
- bpy/ops/extensions/__init__.pyi +15 -150
- bpy/ops/file/__init__.pyi +27 -217
- bpy/ops/fluid/__init__.pyi +13 -70
- bpy/ops/font/__init__.pyi +10 -134
- bpy/ops/geometry/__init__.pyi +3 -41
- bpy/ops/gizmogroup/__init__.pyi +1 -12
- bpy/ops/gpencil/__init__.pyi +5 -38
- bpy/ops/graph/__init__.pyi +18 -316
- bpy/ops/grease_pencil/__init__.pyi +27 -522
- bpy/ops/image/__init__.pyi +19 -379
- bpy/ops/import_anim/__init__.pyi +0 -14
- bpy/ops/import_curve/__init__.pyi +0 -6
- bpy/ops/import_scene/__init__.pyi +0 -50
- bpy/ops/info/__init__.pyi +4 -35
- bpy/ops/lattice/__init__.pyi +3 -33
- bpy/ops/marker/__init__.pyi +2 -50
- bpy/ops/mask/__init__.pyi +17 -176
- bpy/ops/material/__init__.pyi +3 -15
- bpy/ops/mball/__init__.pyi +1 -30
- bpy/ops/mesh/__init__.pyi +30 -913
- bpy/ops/nla/__init__.pyi +19 -183
- bpy/ops/node/__init__.pyi +53 -745
- bpy/ops/object/__init__.pyi +75 -1285
- bpy/ops/outliner/__init__.pyi +47 -327
- bpy/ops/paint/__init__.pyi +14 -279
- bpy/ops/paintcurve/__init__.pyi +4 -36
- bpy/ops/palette/__init__.pyi +3 -27
- bpy/ops/particle/__init__.pyi +20 -160
- bpy/ops/pointcloud/__init__.pyi +3 -35
- bpy/ops/pose/__init__.pyi +25 -230
- bpy/ops/poselib/__init__.pyi +4 -47
- bpy/ops/preferences/__init__.pyi +9 -177
- bpy/ops/ptcache/__init__.pyi +5 -31
- bpy/ops/render/__init__.pyi +3 -70
- bpy/ops/rigidbody/__init__.pyi +6 -56
- bpy/ops/scene/__init__.pyi +22 -167
- bpy/ops/screen/__init__.pyi +19 -214
- bpy/ops/script/__init__.pyi +1 -12
- bpy/ops/sculpt/__init__.pyi +7 -271
- bpy/ops/sculpt_curves/__init__.pyi +1 -20
- bpy/ops/sequencer/__init__.pyi +36 -672
- bpy/ops/sound/__init__.pyi +3 -109
- bpy/ops/spreadsheet/__init__.pyi +5 -32
- bpy/ops/surface/__init__.pyi +0 -48
- bpy/ops/text/__init__.pyi +25 -226
- bpy/ops/text_editor/__init__.pyi +0 -5
- bpy/ops/texture/__init__.pyi +3 -18
- bpy/ops/transform/__init__.pyi +2 -381
- bpy/ops/ui/__init__.pyi +21 -158
- bpy/ops/uilist/__init__.pyi +0 -13
- bpy/ops/uv/__init__.pyi +9 -316
- bpy/ops/view2d/__init__.pyi +3 -73
- bpy/ops/view3d/__init__.pyi +37 -339
- bpy/ops/wm/__init__.pyi +25 -1308
- bpy/ops/workspace/__init__.pyi +7 -39
- bpy/ops/world/__init__.pyi +2 -10
- bpy/path/__init__.pyi +0 -34
- bpy/props/__init__.pyi +12 -148
- bpy/types/__init__.pyi +9867 -55713
- bpy/utils/__init__.pyi +2 -73
- bpy/utils/previews/__init__.pyi +0 -9
- bpy/utils/units/__init__.pyi +0 -12
- bpy_extras/anim_utils/__init__.pyi +0 -8
- bpy_extras/bmesh_utils/__init__.pyi +0 -1
- bpy_extras/id_map_utils/__init__.pyi +4 -5
- bpy_extras/image_utils/__init__.pyi +0 -9
- bpy_extras/io_utils/__init__.pyi +2 -22
- bpy_extras/mesh_utils/__init__.pyi +0 -12
- bpy_extras/object_utils/__init__.pyi +0 -14
- bpy_extras/view3d_utils/__init__.pyi +0 -18
- {fake_bpy_module_latest-20260113.dist-info → fake_bpy_module_latest-20260114.dist-info}/METADATA +2 -1
- fake_bpy_module_latest-20260114.dist-info/RECORD +382 -0
- freestyle/chainingiterators/__init__.pyi +0 -22
- freestyle/functions/__init__.pyi +0 -139
- freestyle/predicates/__init__.pyi +0 -51
- freestyle/shaders/__init__.pyi +0 -65
- freestyle/types/__init__.pyi +139 -777
- freestyle/utils/ContextFunctions/__init__.pyi +0 -23
- freestyle/utils/__init__.pyi +0 -6
- gpu/capabilities/__init__.pyi +0 -21
- gpu/matrix/__init__.pyi +0 -9
- gpu/platform/__init__.pyi +0 -5
- gpu/shader/__init__.pyi +0 -5
- gpu/state/__init__.pyi +0 -29
- gpu/texture/__init__.pyi +0 -2
- gpu/types/__init__.pyi +10 -149
- gpu_extras/batch/__init__.pyi +0 -4
- gpu_extras/presets/__init__.pyi +0 -9
- idprop/types/__init__.pyi +0 -4
- imbuf/__init__.pyi +0 -7
- imbuf/types/__init__.pyi +5 -25
- keyingsets_builtins/__init__.pyi +0 -44
- mathutils/__init__.pyi +46 -2160
- mathutils/bvhtree/__init__.pyi +1 -24
- mathutils/geometry/__init__.pyi +0 -129
- mathutils/interpolate/__init__.pyi +0 -3
- mathutils/kdtree/__init__.pyi +0 -11
- mathutils/noise/__init__.pyi +0 -62
- fake_bpy_module_latest-20260113.dist-info/RECORD +0 -382
- {fake_bpy_module_latest-20260113.dist-info → fake_bpy_module_latest-20260114.dist-info}/WHEEL +0 -0
- {fake_bpy_module_latest-20260113.dist-info → fake_bpy_module_latest-20260114.dist-info}/top_level.txt +0 -0
mathutils/bvhtree/__init__.pyi
CHANGED
|
@@ -7,7 +7,6 @@ import typing
|
|
|
7
7
|
import collections.abc
|
|
8
8
|
import typing_extensions
|
|
9
9
|
import numpy.typing as npt
|
|
10
|
-
import _bpy_types
|
|
11
10
|
import bmesh.types
|
|
12
11
|
import bpy.types
|
|
13
12
|
import mathutils
|
|
@@ -18,15 +17,13 @@ class BVHTree:
|
|
|
18
17
|
"""BVH tree based on `BMesh` data.
|
|
19
18
|
|
|
20
19
|
:param bmesh: BMesh data.
|
|
21
|
-
:type bmesh: bmesh.types.BMesh
|
|
22
20
|
:param epsilon: Increase the threshold for detecting overlap and raycast hits.
|
|
23
|
-
:type epsilon: float
|
|
24
21
|
"""
|
|
25
22
|
|
|
26
23
|
@classmethod
|
|
27
24
|
def FromObject(
|
|
28
25
|
cls,
|
|
29
|
-
object:
|
|
26
|
+
object: bpy.types.Object,
|
|
30
27
|
depsgraph: bpy.types.Depsgraph,
|
|
31
28
|
*,
|
|
32
29
|
deform: bool = True,
|
|
@@ -37,16 +34,11 @@ class BVHTree:
|
|
|
37
34
|
"""BVH tree based on `Object` data.
|
|
38
35
|
|
|
39
36
|
:param object: Object data.
|
|
40
|
-
:type object: _bpy_types.Object
|
|
41
37
|
:param depsgraph: Depsgraph to use for evaluating the mesh.
|
|
42
|
-
:type depsgraph: bpy.types.Depsgraph
|
|
43
38
|
:param deform: Use mesh with deformations.
|
|
44
|
-
:type deform: bool
|
|
45
39
|
:param render:
|
|
46
40
|
:param cage: Use modifiers cage.
|
|
47
|
-
:type cage: bool
|
|
48
41
|
:param epsilon: Increase the threshold for detecting overlap and raycast hits.
|
|
49
|
-
:type epsilon: float
|
|
50
42
|
"""
|
|
51
43
|
|
|
52
44
|
@classmethod
|
|
@@ -61,13 +53,9 @@ class BVHTree:
|
|
|
61
53
|
"""BVH tree constructed geometry passed in as arguments.
|
|
62
54
|
|
|
63
55
|
:param vertices: float triplets each representing (x, y, z)
|
|
64
|
-
:type vertices: collections.abc.Sequence[collections.abc.Sequence[float]]
|
|
65
56
|
:param polygons: Sequence of polygons, each containing indices to the vertices argument.
|
|
66
|
-
:type polygons: collections.abc.Sequence[collections.abc.Sequence[int]]
|
|
67
57
|
:param all_triangles: Use when all polygons are triangles for more efficient conversion.
|
|
68
|
-
:type all_triangles: bool
|
|
69
58
|
:param epsilon: Increase the threshold for detecting overlap and raycast hits.
|
|
70
|
-
:type epsilon: float
|
|
71
59
|
"""
|
|
72
60
|
|
|
73
61
|
def find_nearest(
|
|
@@ -81,12 +69,9 @@ class BVHTree:
|
|
|
81
69
|
"""Find the nearest element (typically face index) to a point.
|
|
82
70
|
|
|
83
71
|
:param origin: Find nearest element to this point.
|
|
84
|
-
:type origin: collections.abc.Sequence[float] | mathutils.Vector
|
|
85
72
|
:param distance: Maximum distance threshold.
|
|
86
|
-
:type distance: float
|
|
87
73
|
:return: Returns a tuple: (position, normal, index, distance),
|
|
88
74
|
Values will all be None if no hit is found.
|
|
89
|
-
:rtype: tuple[mathutils.Vector | None, mathutils.Vector | None, int | None, float | None]
|
|
90
75
|
"""
|
|
91
76
|
|
|
92
77
|
def find_nearest_range(
|
|
@@ -99,9 +84,7 @@ class BVHTree:
|
|
|
99
84
|
|
|
100
85
|
:param origin:
|
|
101
86
|
:param distance: Maximum distance threshold.
|
|
102
|
-
:type distance: float
|
|
103
87
|
:return: Returns a list of tuples (position, normal, index, distance)
|
|
104
|
-
:rtype: list[tuple[mathutils.Vector, mathutils.Vector, int, float]]
|
|
105
88
|
"""
|
|
106
89
|
|
|
107
90
|
def overlap(
|
|
@@ -112,9 +95,7 @@ class BVHTree:
|
|
|
112
95
|
"""Find overlapping indices between 2 trees.
|
|
113
96
|
|
|
114
97
|
:param other_tree: Other tree to perform overlap test on.
|
|
115
|
-
:type other_tree: typing_extensions.Self
|
|
116
98
|
:return: Returns a list of unique index pairs, the first index referencing this tree, the second referencing the other_tree.
|
|
117
|
-
:rtype: list[tuple[int, int]]
|
|
118
99
|
"""
|
|
119
100
|
|
|
120
101
|
def ray_cast(
|
|
@@ -129,14 +110,10 @@ class BVHTree:
|
|
|
129
110
|
"""Cast a ray onto the mesh.
|
|
130
111
|
|
|
131
112
|
:param origin: Start location of the ray in object space.
|
|
132
|
-
:type origin: collections.abc.Sequence[float] | mathutils.Vector
|
|
133
113
|
:param direction: Direction of the ray in object space.
|
|
134
|
-
:type direction: collections.abc.Sequence[float] | mathutils.Vector
|
|
135
114
|
:param distance: Maximum distance threshold.
|
|
136
|
-
:type distance: float
|
|
137
115
|
:return: Returns a tuple: (position, normal, index, distance),
|
|
138
116
|
Values will all be None if no hit is found.
|
|
139
|
-
:rtype: tuple[mathutils.Vector | None, mathutils.Vector | None, int | None, float | None]
|
|
140
117
|
"""
|
|
141
118
|
|
|
142
119
|
def __init__(self, size) -> None:
|
mathutils/geometry/__init__.pyi
CHANGED
|
@@ -18,12 +18,8 @@ def area_tri(
|
|
|
18
18
|
"""Returns the area size of the 2D or 3D triangle defined.
|
|
19
19
|
|
|
20
20
|
:param v1: Point1
|
|
21
|
-
:type v1: collections.abc.Sequence[float] | mathutils.Vector
|
|
22
21
|
:param v2: Point2
|
|
23
|
-
:type v2: collections.abc.Sequence[float] | mathutils.Vector
|
|
24
22
|
:param v3: Point3
|
|
25
|
-
:type v3: collections.abc.Sequence[float] | mathutils.Vector
|
|
26
|
-
:rtype: float
|
|
27
23
|
"""
|
|
28
24
|
|
|
29
25
|
def barycentric_transform(
|
|
@@ -39,21 +35,13 @@ def barycentric_transform(
|
|
|
39
35
|
"""Return a transformed point, the transformation is defined by 2 triangles.
|
|
40
36
|
|
|
41
37
|
:param point: The point to transform.
|
|
42
|
-
:type point: collections.abc.Sequence[float] | mathutils.Vector
|
|
43
38
|
:param tri_a1: source triangle vertex.
|
|
44
|
-
:type tri_a1: collections.abc.Sequence[float] | mathutils.Vector
|
|
45
39
|
:param tri_a2: source triangle vertex.
|
|
46
|
-
:type tri_a2: collections.abc.Sequence[float] | mathutils.Vector
|
|
47
40
|
:param tri_a3: source triangle vertex.
|
|
48
|
-
:type tri_a3: collections.abc.Sequence[float] | mathutils.Vector
|
|
49
41
|
:param tri_b1: target triangle vertex.
|
|
50
|
-
:type tri_b1: collections.abc.Sequence[float] | mathutils.Vector
|
|
51
42
|
:param tri_b2: target triangle vertex.
|
|
52
|
-
:type tri_b2: collections.abc.Sequence[float] | mathutils.Vector
|
|
53
43
|
:param tri_b3: target triangle vertex.
|
|
54
|
-
:type tri_b3: collections.abc.Sequence[float] | mathutils.Vector
|
|
55
44
|
:return: The transformed point
|
|
56
|
-
:rtype: mathutils.Vector
|
|
57
45
|
"""
|
|
58
46
|
|
|
59
47
|
def box_fit_2d(
|
|
@@ -63,9 +51,7 @@ def box_fit_2d(
|
|
|
63
51
|
"""Returns an angle that best fits the points to an axis aligned rectangle
|
|
64
52
|
|
|
65
53
|
:param points: Sequence of 2D points.
|
|
66
|
-
:type points: collections.abc.Sequence[collections.abc.Sequence[float]]
|
|
67
54
|
:return: angle
|
|
68
|
-
:rtype: float
|
|
69
55
|
"""
|
|
70
56
|
|
|
71
57
|
def box_pack_2d(
|
|
@@ -75,9 +61,7 @@ def box_pack_2d(
|
|
|
75
61
|
"""Returns a tuple with the width and height of the packed bounding box.
|
|
76
62
|
|
|
77
63
|
: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.
|
|
78
|
-
:type boxes: list[list[float]]
|
|
79
64
|
:return: The width and height of the packed bounding box.
|
|
80
|
-
:rtype: tuple[float, float]
|
|
81
65
|
"""
|
|
82
66
|
|
|
83
67
|
def closest_point_on_tri(
|
|
@@ -90,15 +74,10 @@ def closest_point_on_tri(
|
|
|
90
74
|
"""Takes 4 vectors: one is the point and the next 3 define the triangle.
|
|
91
75
|
|
|
92
76
|
:param pt: Point
|
|
93
|
-
:type pt: collections.abc.Sequence[float] | mathutils.Vector
|
|
94
77
|
:param tri_p1: First point of the triangle
|
|
95
|
-
:type tri_p1: collections.abc.Sequence[float] | mathutils.Vector
|
|
96
78
|
:param tri_p2: Second point of the triangle
|
|
97
|
-
:type tri_p2: collections.abc.Sequence[float] | mathutils.Vector
|
|
98
79
|
:param tri_p3: Third point of the triangle
|
|
99
|
-
:type tri_p3: collections.abc.Sequence[float] | mathutils.Vector
|
|
100
80
|
:return: The closest point of the triangle.
|
|
101
|
-
:rtype: mathutils.Vector
|
|
102
81
|
"""
|
|
103
82
|
|
|
104
83
|
def convex_hull_2d(
|
|
@@ -108,9 +87,7 @@ def convex_hull_2d(
|
|
|
108
87
|
"""Returns a list of indices into the list given
|
|
109
88
|
|
|
110
89
|
:param points: Sequence of 2D points.
|
|
111
|
-
:type points: collections.abc.Sequence[collections.abc.Sequence[float]]
|
|
112
90
|
:return: a list of indices
|
|
113
|
-
:rtype: list[int]
|
|
114
91
|
"""
|
|
115
92
|
|
|
116
93
|
def delaunay_2d_cdt(
|
|
@@ -145,19 +122,12 @@ def delaunay_2d_cdt(
|
|
|
145
122
|
of the orig arrays, which may save some time.
|
|
146
123
|
|
|
147
124
|
:param vert_coords: Vertex coordinates (2d)
|
|
148
|
-
:type vert_coords: collections.abc.Sequence[collections.abc.Sequence[float] | mathutils.Vector]
|
|
149
125
|
:param edges: Edges, as pairs of indices in vert_coords
|
|
150
|
-
:type edges: collections.abc.Sequence[collections.abc.Sequence[int, int]]
|
|
151
126
|
:param faces: Faces, each sublist is a face, as indices in vert_coords (CCW oriented).
|
|
152
|
-
:type faces: collections.abc.Sequence[collections.abc.Sequence[int]]
|
|
153
127
|
: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.
|
|
154
|
-
:type output_type: int
|
|
155
128
|
:param epsilon: For nearness tests; should not be zero
|
|
156
|
-
:type epsilon: float
|
|
157
129
|
:param need_ids: are the orig output arrays needed?
|
|
158
|
-
:type need_ids: bool
|
|
159
130
|
:return: Output tuple, (vert_coords, edges, faces, orig_verts, orig_edges, orig_faces)
|
|
160
|
-
:rtype: tuple[list[mathutils.Vector], list[tuple[int, int]], list[list[int]], list[list[int]], list[list[int]], list[list[int]]]
|
|
161
131
|
"""
|
|
162
132
|
|
|
163
133
|
def distance_point_to_plane(
|
|
@@ -169,12 +139,8 @@ def distance_point_to_plane(
|
|
|
169
139
|
"""Returns the signed distance between a point and a plane (negative when below the normal).
|
|
170
140
|
|
|
171
141
|
:param pt: Point
|
|
172
|
-
:type pt: collections.abc.Sequence[float] | mathutils.Vector
|
|
173
142
|
:param plane_co: A point on the plane
|
|
174
|
-
:type plane_co: collections.abc.Sequence[float] | mathutils.Vector
|
|
175
143
|
:param plane_no: The direction the plane is facing
|
|
176
|
-
:type plane_no: collections.abc.Sequence[float] | mathutils.Vector
|
|
177
|
-
:rtype: float
|
|
178
144
|
"""
|
|
179
145
|
|
|
180
146
|
def interpolate_bezier(
|
|
@@ -188,17 +154,11 @@ def interpolate_bezier(
|
|
|
188
154
|
"""Interpolate a bezier spline segment.
|
|
189
155
|
|
|
190
156
|
:param knot1: First bezier spline point.
|
|
191
|
-
:type knot1: collections.abc.Sequence[float] | mathutils.Vector
|
|
192
157
|
:param handle1: First bezier spline handle.
|
|
193
|
-
:type handle1: collections.abc.Sequence[float] | mathutils.Vector
|
|
194
158
|
:param handle2: Second bezier spline handle.
|
|
195
|
-
:type handle2: collections.abc.Sequence[float] | mathutils.Vector
|
|
196
159
|
:param knot2: Second bezier spline point.
|
|
197
|
-
:type knot2: collections.abc.Sequence[float] | mathutils.Vector
|
|
198
160
|
:param resolution: Number of points to return.
|
|
199
|
-
:type resolution: int
|
|
200
161
|
:return: The interpolated points.
|
|
201
|
-
:rtype: list[mathutils.Vector]
|
|
202
162
|
"""
|
|
203
163
|
|
|
204
164
|
def intersect_line_line(
|
|
@@ -211,15 +171,10 @@ def intersect_line_line(
|
|
|
211
171
|
"""Returns a tuple with the points on each line respectively closest to the other.
|
|
212
172
|
|
|
213
173
|
:param v1: First point of the first line
|
|
214
|
-
:type v1: collections.abc.Sequence[float] | mathutils.Vector
|
|
215
174
|
:param v2: Second point of the first line
|
|
216
|
-
:type v2: collections.abc.Sequence[float] | mathutils.Vector
|
|
217
175
|
:param v3: First point of the second line
|
|
218
|
-
:type v3: collections.abc.Sequence[float] | mathutils.Vector
|
|
219
176
|
:param v4: Second point of the second line
|
|
220
|
-
:type v4: collections.abc.Sequence[float] | mathutils.Vector
|
|
221
177
|
:return: The intersection on each line or None when the lines are co-linear.
|
|
222
|
-
:rtype: None | tuple[mathutils.Vector, mathutils.Vector]
|
|
223
178
|
"""
|
|
224
179
|
|
|
225
180
|
def intersect_line_line_2d(
|
|
@@ -232,15 +187,10 @@ def intersect_line_line_2d(
|
|
|
232
187
|
"""Takes 2 segments (defined by 4 vectors) and returns a vector for their point of intersection or None.
|
|
233
188
|
|
|
234
189
|
:param lineA_p1: First point of the first line
|
|
235
|
-
:type lineA_p1: collections.abc.Sequence[float] | mathutils.Vector
|
|
236
190
|
:param lineA_p2: Second point of the first line
|
|
237
|
-
:type lineA_p2: collections.abc.Sequence[float] | mathutils.Vector
|
|
238
191
|
:param lineB_p1: First point of the second line
|
|
239
|
-
:type lineB_p1: collections.abc.Sequence[float] | mathutils.Vector
|
|
240
192
|
:param lineB_p2: Second point of the second line
|
|
241
|
-
:type lineB_p2: collections.abc.Sequence[float] | mathutils.Vector
|
|
242
193
|
:return: The point of intersection or None when not found
|
|
243
|
-
:rtype: None | mathutils.Vector
|
|
244
194
|
"""
|
|
245
195
|
|
|
246
196
|
def intersect_line_plane(
|
|
@@ -255,17 +205,11 @@ def intersect_line_plane(
|
|
|
255
205
|
Returns a vector for the intersection or None.
|
|
256
206
|
|
|
257
207
|
:param line_a: First point of the first line
|
|
258
|
-
:type line_a: collections.abc.Sequence[float] | mathutils.Vector
|
|
259
208
|
:param line_b: Second point of the first line
|
|
260
|
-
:type line_b: collections.abc.Sequence[float] | mathutils.Vector
|
|
261
209
|
:param plane_co: A point on the plane
|
|
262
|
-
:type plane_co: collections.abc.Sequence[float] | mathutils.Vector
|
|
263
210
|
:param plane_no: The direction the plane is facing
|
|
264
|
-
:type plane_no: collections.abc.Sequence[float] | mathutils.Vector
|
|
265
211
|
:param no_flip: Not implemented
|
|
266
|
-
:type no_flip: bool
|
|
267
212
|
:return: The point of intersection or None when not found
|
|
268
|
-
:rtype: None | mathutils.Vector
|
|
269
213
|
"""
|
|
270
214
|
|
|
271
215
|
def intersect_line_sphere(
|
|
@@ -280,17 +224,11 @@ def intersect_line_sphere(
|
|
|
280
224
|
returns the intersection
|
|
281
225
|
|
|
282
226
|
:param line_a: First point of the line
|
|
283
|
-
:type line_a: collections.abc.Sequence[float] | mathutils.Vector
|
|
284
227
|
:param line_b: Second point of the line
|
|
285
|
-
:type line_b: collections.abc.Sequence[float] | mathutils.Vector
|
|
286
228
|
:param sphere_co: The center of the sphere
|
|
287
|
-
:type sphere_co: collections.abc.Sequence[float] | mathutils.Vector
|
|
288
229
|
:param sphere_radius: Radius of the sphere
|
|
289
|
-
:type sphere_radius: float
|
|
290
230
|
:param clip: When False, dont restrict the intersection to the line segment.
|
|
291
|
-
:type clip: bool
|
|
292
231
|
:return: The intersection points as a pair of vectors or None when there is no intersection
|
|
293
|
-
:rtype: tuple[mathutils.Vector | None, mathutils.Vector | None]
|
|
294
232
|
"""
|
|
295
233
|
|
|
296
234
|
def intersect_line_sphere_2d(
|
|
@@ -305,17 +243,11 @@ def intersect_line_sphere_2d(
|
|
|
305
243
|
returns the intersection
|
|
306
244
|
|
|
307
245
|
:param line_a: First point of the line
|
|
308
|
-
:type line_a: collections.abc.Sequence[float] | mathutils.Vector
|
|
309
246
|
:param line_b: Second point of the line
|
|
310
|
-
:type line_b: collections.abc.Sequence[float] | mathutils.Vector
|
|
311
247
|
:param sphere_co: The center of the sphere
|
|
312
|
-
:type sphere_co: collections.abc.Sequence[float] | mathutils.Vector
|
|
313
248
|
:param sphere_radius: Radius of the sphere
|
|
314
|
-
:type sphere_radius: float
|
|
315
249
|
:param clip: When False, dont restrict the intersection to the line segment.
|
|
316
|
-
:type clip: bool
|
|
317
250
|
:return: The intersection points as a pair of vectors or None when there is no intersection
|
|
318
|
-
:rtype: tuple[mathutils.Vector | None, mathutils.Vector | None]
|
|
319
251
|
"""
|
|
320
252
|
|
|
321
253
|
def intersect_plane_plane(
|
|
@@ -328,15 +260,10 @@ def intersect_plane_plane(
|
|
|
328
260
|
"""Return the intersection between two planes
|
|
329
261
|
|
|
330
262
|
:param plane_a_co: Point on the first plane
|
|
331
|
-
:type plane_a_co: collections.abc.Sequence[float] | mathutils.Vector
|
|
332
263
|
:param plane_a_no: Normal of the first plane
|
|
333
|
-
:type plane_a_no: collections.abc.Sequence[float] | mathutils.Vector
|
|
334
264
|
:param plane_b_co: Point on the second plane
|
|
335
|
-
:type plane_b_co: collections.abc.Sequence[float] | mathutils.Vector
|
|
336
265
|
:param plane_b_no: Normal of the second plane
|
|
337
|
-
:type plane_b_no: collections.abc.Sequence[float] | mathutils.Vector
|
|
338
266
|
:return: The line of the intersection represented as a point and a vector or None if the intersection cant be calculated
|
|
339
|
-
:rtype: tuple[None, None] | tuple[mathutils.Vector, mathutils.Vector]
|
|
340
267
|
"""
|
|
341
268
|
|
|
342
269
|
def intersect_point_line(
|
|
@@ -348,12 +275,8 @@ def intersect_point_line(
|
|
|
348
275
|
"""Takes a point and a line and returns 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.
|
|
349
276
|
|
|
350
277
|
:param pt: Point
|
|
351
|
-
:type pt: collections.abc.Sequence[float] | mathutils.Vector
|
|
352
278
|
:param line_p1: First point of the line
|
|
353
|
-
:type line_p1: collections.abc.Sequence[float] | mathutils.Vector
|
|
354
279
|
:param line_p2: Second point of the line
|
|
355
|
-
:type line_p2: collections.abc.Sequence[float] | mathutils.Vector
|
|
356
|
-
:rtype: tuple[mathutils.Vector, float]
|
|
357
280
|
"""
|
|
358
281
|
|
|
359
282
|
def intersect_point_line_segment(
|
|
@@ -365,12 +288,8 @@ def intersect_point_line_segment(
|
|
|
365
288
|
"""Takes a point and a segment and returns the closest point on the segment and the distance to the segment.
|
|
366
289
|
|
|
367
290
|
:param pt: Point
|
|
368
|
-
:type pt: collections.abc.Sequence[float] | mathutils.Vector
|
|
369
291
|
:param seg_p1: First point of the segment
|
|
370
|
-
:type seg_p1: collections.abc.Sequence[float] | mathutils.Vector
|
|
371
292
|
:param seg_p2: Second point of the segment
|
|
372
|
-
:type seg_p2: collections.abc.Sequence[float] | mathutils.Vector
|
|
373
|
-
:rtype: tuple[mathutils.Vector, float]
|
|
374
293
|
"""
|
|
375
294
|
|
|
376
295
|
def intersect_point_quad_2d(
|
|
@@ -386,16 +305,10 @@ def intersect_point_quad_2d(
|
|
|
386
305
|
Works only with convex quads without singular edges.
|
|
387
306
|
|
|
388
307
|
:param pt: Point
|
|
389
|
-
:type pt: collections.abc.Sequence[float] | mathutils.Vector
|
|
390
308
|
:param quad_p1: First point of the quad
|
|
391
|
-
:type quad_p1: collections.abc.Sequence[float] | mathutils.Vector
|
|
392
309
|
:param quad_p2: Second point of the quad
|
|
393
|
-
:type quad_p2: collections.abc.Sequence[float] | mathutils.Vector
|
|
394
310
|
:param quad_p3: Third point of the quad
|
|
395
|
-
:type quad_p3: collections.abc.Sequence[float] | mathutils.Vector
|
|
396
311
|
:param quad_p4: Fourth point of the quad
|
|
397
|
-
:type quad_p4: collections.abc.Sequence[float] | mathutils.Vector
|
|
398
|
-
:rtype: int
|
|
399
312
|
"""
|
|
400
313
|
|
|
401
314
|
def intersect_point_tri(
|
|
@@ -408,15 +321,10 @@ def intersect_point_tri(
|
|
|
408
321
|
"""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.
|
|
409
322
|
|
|
410
323
|
:param pt: Point
|
|
411
|
-
:type pt: collections.abc.Sequence[float] | mathutils.Vector
|
|
412
324
|
:param tri_p1: First point of the triangle
|
|
413
|
-
:type tri_p1: collections.abc.Sequence[float] | mathutils.Vector
|
|
414
325
|
:param tri_p2: Second point of the triangle
|
|
415
|
-
:type tri_p2: collections.abc.Sequence[float] | mathutils.Vector
|
|
416
326
|
:param tri_p3: Third point of the triangle
|
|
417
|
-
:type tri_p3: collections.abc.Sequence[float] | mathutils.Vector
|
|
418
327
|
:return: Point on the triangles plane or None if its outside the triangle
|
|
419
|
-
:rtype: None | mathutils.Vector
|
|
420
328
|
"""
|
|
421
329
|
|
|
422
330
|
def intersect_point_tri_2d(
|
|
@@ -429,14 +337,9 @@ def intersect_point_tri_2d(
|
|
|
429
337
|
"""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.
|
|
430
338
|
|
|
431
339
|
:param pt: Point
|
|
432
|
-
:type pt: collections.abc.Sequence[float] | mathutils.Vector
|
|
433
340
|
:param tri_p1: First point of the triangle
|
|
434
|
-
:type tri_p1: collections.abc.Sequence[float] | mathutils.Vector
|
|
435
341
|
:param tri_p2: Second point of the triangle
|
|
436
|
-
:type tri_p2: collections.abc.Sequence[float] | mathutils.Vector
|
|
437
342
|
:param tri_p3: Third point of the triangle
|
|
438
|
-
:type tri_p3: collections.abc.Sequence[float] | mathutils.Vector
|
|
439
|
-
:rtype: int
|
|
440
343
|
"""
|
|
441
344
|
|
|
442
345
|
def intersect_ray_tri(
|
|
@@ -451,19 +354,12 @@ def intersect_ray_tri(
|
|
|
451
354
|
"""Returns the intersection between a ray and a triangle, if possible, returns None otherwise.
|
|
452
355
|
|
|
453
356
|
:param v1: Point1
|
|
454
|
-
:type v1: collections.abc.Sequence[float] | mathutils.Vector
|
|
455
357
|
:param v2: Point2
|
|
456
|
-
:type v2: collections.abc.Sequence[float] | mathutils.Vector
|
|
457
358
|
:param v3: Point3
|
|
458
|
-
:type v3: collections.abc.Sequence[float] | mathutils.Vector
|
|
459
359
|
:param ray: Direction of the projection
|
|
460
|
-
:type ray: collections.abc.Sequence[float] | mathutils.Vector
|
|
461
360
|
:param orig: Origin
|
|
462
|
-
:type orig: collections.abc.Sequence[float] | mathutils.Vector
|
|
463
361
|
:param clip: When False, dont restrict the intersection to the area of the triangle, use the infinite plane defined by the triangle.
|
|
464
|
-
:type clip: bool
|
|
465
362
|
:return: The point of intersection or None if no intersection is found
|
|
466
|
-
:rtype: None | mathutils.Vector
|
|
467
363
|
"""
|
|
468
364
|
|
|
469
365
|
def intersect_sphere_sphere_2d(
|
|
@@ -476,15 +372,10 @@ def intersect_sphere_sphere_2d(
|
|
|
476
372
|
"""Returns 2 points between intersecting circles.
|
|
477
373
|
|
|
478
374
|
:param p_a: Center of the first circle
|
|
479
|
-
:type p_a: collections.abc.Sequence[float] | mathutils.Vector
|
|
480
375
|
:param radius_a: Radius of the first circle
|
|
481
|
-
:type radius_a: float
|
|
482
376
|
:param p_b: Center of the second circle
|
|
483
|
-
:type p_b: collections.abc.Sequence[float] | mathutils.Vector
|
|
484
377
|
:param radius_b: Radius of the second circle
|
|
485
|
-
:type radius_b: float
|
|
486
378
|
:return: 2 points between intersecting circles or None when there is no intersection.
|
|
487
|
-
:rtype: tuple[None, None] | tuple[mathutils.Vector, mathutils.Vector]
|
|
488
379
|
"""
|
|
489
380
|
|
|
490
381
|
def intersect_tri_tri_2d(
|
|
@@ -499,19 +390,12 @@ def intersect_tri_tri_2d(
|
|
|
499
390
|
"""Check if two 2D triangles intersect.
|
|
500
391
|
|
|
501
392
|
:param tri_a1: First vertex of the first triangle.
|
|
502
|
-
:type tri_a1: collections.abc.Sequence[float] | mathutils.Vector
|
|
503
393
|
:param tri_a2: Second vertex of the first triangle.
|
|
504
|
-
:type tri_a2: collections.abc.Sequence[float] | mathutils.Vector
|
|
505
394
|
:param tri_a3: Third vertex of the first triangle.
|
|
506
|
-
:type tri_a3: collections.abc.Sequence[float] | mathutils.Vector
|
|
507
395
|
:param tri_b1: First vertex of the second triangle.
|
|
508
|
-
:type tri_b1: collections.abc.Sequence[float] | mathutils.Vector
|
|
509
396
|
:param tri_b2: Second vertex of the second triangle.
|
|
510
|
-
:type tri_b2: collections.abc.Sequence[float] | mathutils.Vector
|
|
511
397
|
:param tri_b3: Third vertex of the second triangle.
|
|
512
|
-
:type tri_b3: collections.abc.Sequence[float] | mathutils.Vector
|
|
513
398
|
:return: True if the triangles intersect.
|
|
514
|
-
:rtype: bool
|
|
515
399
|
"""
|
|
516
400
|
|
|
517
401
|
def normal(
|
|
@@ -520,8 +404,6 @@ def normal(
|
|
|
520
404
|
"""Returns the normal of a 3D polygon.
|
|
521
405
|
|
|
522
406
|
:param vectors: 3 or more vectors to calculate normals.
|
|
523
|
-
:type vectors: collections.abc.Sequence[collections.abc.Sequence[float]]
|
|
524
|
-
:rtype: mathutils.Vector
|
|
525
407
|
"""
|
|
526
408
|
|
|
527
409
|
def points_in_planes(
|
|
@@ -533,13 +415,9 @@ def points_in_planes(
|
|
|
533
415
|
"""Returns a list of points inside all planes given and a list of index values for the planes used.
|
|
534
416
|
|
|
535
417
|
:param planes: List of planes (4D vectors).
|
|
536
|
-
:type planes: list[collections.abc.Sequence[float] | mathutils.Vector]
|
|
537
418
|
:param epsilon_coplanar: Epsilon value for interpreting plane pairs as co-planar.
|
|
538
|
-
:type epsilon_coplanar: float
|
|
539
419
|
:param epsilon_isect: Epsilon value for intersection.
|
|
540
|
-
:type epsilon_isect: float
|
|
541
420
|
:return: Two lists, one containing the 3D coordinates inside the planes, another containing the plane indices used.
|
|
542
|
-
:rtype: tuple[list[mathutils.Vector], list[int]]
|
|
543
421
|
"""
|
|
544
422
|
|
|
545
423
|
def tessellate_polygon(
|
|
@@ -551,9 +429,7 @@ def tessellate_polygon(
|
|
|
551
429
|
"""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).
|
|
552
430
|
|
|
553
431
|
:param polylines: Polygons where each polygon is a sequence of 2D or 3D points.
|
|
554
|
-
:type polylines: collections.abc.Sequence[collections.abc.Sequence[collections.abc.Sequence[float]]]
|
|
555
432
|
:return: A list of triangles.
|
|
556
|
-
:rtype: list[tuple[int, int, int]]
|
|
557
433
|
"""
|
|
558
434
|
|
|
559
435
|
def volume_tetrahedron(
|
|
@@ -566,12 +442,7 @@ def volume_tetrahedron(
|
|
|
566
442
|
"""Return the volume formed by a tetrahedron (points can be in any order).
|
|
567
443
|
|
|
568
444
|
:param v1: Point1
|
|
569
|
-
:type v1: collections.abc.Sequence[float] | mathutils.Vector
|
|
570
445
|
:param v2: Point2
|
|
571
|
-
:type v2: collections.abc.Sequence[float] | mathutils.Vector
|
|
572
446
|
:param v3: Point3
|
|
573
|
-
:type v3: collections.abc.Sequence[float] | mathutils.Vector
|
|
574
447
|
:param v4: Point4
|
|
575
|
-
:type v4: collections.abc.Sequence[float] | mathutils.Vector
|
|
576
|
-
:rtype: float
|
|
577
448
|
"""
|
|
@@ -16,9 +16,6 @@ def poly_3d_calc(
|
|
|
16
16
|
"""Calculate barycentric weights for a point on a polygon.
|
|
17
17
|
|
|
18
18
|
:param veclist: Sequence of 3D positions.
|
|
19
|
-
:type veclist: collections.abc.Sequence[collections.abc.Sequence[float]]
|
|
20
19
|
:param pt: 2D or 3D position.
|
|
21
|
-
:type pt: collections.abc.Sequence[float]
|
|
22
20
|
:return: list of per-vector weights.
|
|
23
|
-
:rtype: list[float]
|
|
24
21
|
"""
|
mathutils/kdtree/__init__.pyi
CHANGED
|
@@ -26,11 +26,8 @@ class KDTree:
|
|
|
26
26
|
"""Find nearest point to co.
|
|
27
27
|
|
|
28
28
|
:param co: 3D coordinates.
|
|
29
|
-
:type co: collections.abc.Sequence[float]
|
|
30
29
|
:param filter: function which takes an index and returns True for indices to include in the search.
|
|
31
|
-
:type filter: collections.abc.Callable[int, bool] | None
|
|
32
30
|
:return: Returns (position, index, distance).
|
|
33
|
-
:rtype: tuple[mathutils.Vector, int, float]
|
|
34
31
|
"""
|
|
35
32
|
|
|
36
33
|
def find_n(
|
|
@@ -39,11 +36,8 @@ class KDTree:
|
|
|
39
36
|
"""Find nearest n points to co.
|
|
40
37
|
|
|
41
38
|
:param co: 3D coordinates.
|
|
42
|
-
:type co: collections.abc.Sequence[float]
|
|
43
39
|
:param n: Number of points to find.
|
|
44
|
-
:type n: int
|
|
45
40
|
:return: Returns a list of tuples (position, index, distance).
|
|
46
|
-
:rtype: list[tuple[mathutils.Vector, int, float]]
|
|
47
41
|
"""
|
|
48
42
|
|
|
49
43
|
def find_range(
|
|
@@ -52,20 +46,15 @@ class KDTree:
|
|
|
52
46
|
"""Find all points within radius of co.
|
|
53
47
|
|
|
54
48
|
:param co: 3D coordinates.
|
|
55
|
-
:type co: collections.abc.Sequence[float]
|
|
56
49
|
:param radius: Distance to search for points.
|
|
57
|
-
:type radius: float
|
|
58
50
|
:return: Returns a list of tuples (position, index, distance).
|
|
59
|
-
:rtype: list[tuple[mathutils.Vector, int, float]]
|
|
60
51
|
"""
|
|
61
52
|
|
|
62
53
|
def insert(self, co: collections.abc.Sequence[float], index: int) -> None:
|
|
63
54
|
"""Insert a point into the KDTree.
|
|
64
55
|
|
|
65
56
|
:param co: Point 3d position.
|
|
66
|
-
:type co: collections.abc.Sequence[float]
|
|
67
57
|
:param index: The index of the point.
|
|
68
|
-
:type index: int
|
|
69
58
|
"""
|
|
70
59
|
|
|
71
60
|
def __init__(self, size) -> None:
|