fake-bpy-module 20250828__py3-none-any.whl → 20260118__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 → _bl_console_utils}/autocomplete/complete_calltip/__init__.pyi +0 -13
- {bl_console_utils → _bl_console_utils}/autocomplete/complete_import/__init__.pyi +0 -5
- {bl_console_utils → _bl_console_utils}/autocomplete/complete_namespace/__init__.pyi +0 -11
- {bl_console_utils → _bl_console_utils}/autocomplete/intellisense/__init__.pyi +0 -10
- {bl_i18n_utils → _bl_i18n_utils}/__init__.pyi +1 -0
- {bl_i18n_utils → _bl_i18n_utils}/bl_extract_messages/__init__.pyi +1 -0
- {bl_i18n_utils → _bl_i18n_utils}/settings/__init__.pyi +2 -0
- _bl_i18n_utils/utils_spell_check/__init__.pyi +22 -0
- {bl_ui_utils → _bl_ui_utils}/__init__.pyi +1 -0
- _bpy_internal/__init__.pyi +3 -1
- _bpy_internal/disk_file_hash_service/__init__.pyi +19 -0
- _bpy_internal/disk_file_hash_service/backend_sqlite/__init__.pyi +48 -0
- _bpy_internal/disk_file_hash_service/hash_service/__init__.pyi +64 -0
- _bpy_internal/disk_file_hash_service/types/__init__.pyi +53 -0
- _bpy_internal/filesystem/__init__.pyi +5 -0
- _bpy_internal/filesystem/locking/__init__.pyi +28 -0
- _bpy_internal/platform/__init__.pyi +5 -0
- _bpy_types/__init__.pyi +115 -117
- {rna_info → _rna_info}/__init__.pyi +0 -1
- addon_utils/__init__.pyi +0 -13
- aud/__init__.pyi +66 -142
- bl_app_templates_system/Storyboarding/__init__.pyi +11 -0
- bl_app_templates_system/__init__.pyi +5 -0
- bl_app_templates_system/py.typed +0 -0
- bl_math/__init__.pyi +2 -12
- bl_operators/__init__.pyi +1 -0
- bl_operators/add_mesh_torus/__init__.pyi +0 -2
- bl_operators/anim/__init__.pyi +47 -24
- 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 +261 -0
- 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 -47
- bl_operators/node/__init__.pyi +277 -57
- bl_operators/object/__init__.pyi +0 -37
- 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 +1 -51
- 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 +1 -3
- bl_operators/uvcalc_lightmap/__init__.pyi +0 -2
- bl_operators/uvcalc_transform/__init__.pyi +21 -12
- 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 +3 -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 +261 -6
- bl_ui/node_add_menu_compositor/__init__.pyi +96 -80
- bl_ui/node_add_menu_geometry/__init__.pyi +266 -306
- bl_ui/node_add_menu_shader/__init__.pyi +49 -50
- bl_ui/node_add_menu_texture/__init__.pyi +16 -62
- bl_ui/properties_collection/__init__.pyi +0 -14
- bl_ui/properties_constraint/__init__.pyi +55 -209
- 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 +1 -42
- bl_ui/properties_data_metaball/__init__.pyi +0 -12
- bl_ui/properties_data_modifier/__init__.pyi +12 -19
- 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 -159
- bl_ui/properties_mask_common/__init__.pyi +0 -14
- bl_ui/properties_material/__init__.pyi +0 -32
- bl_ui/properties_material_gpencil/__init__.pyi +23 -45
- bl_ui/properties_object/__init__.pyi +35 -42
- bl_ui/properties_output/__init__.pyi +0 -40
- bl_ui/properties_paint_common/__init__.pyi +23 -19
- 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 +58 -86
- bl_ui/properties_scene/__init__.pyi +0 -34
- bl_ui/properties_strip/__init__.pyi +744 -0
- bl_ui/properties_strip_modifier/__init__.pyi +45 -0
- bl_ui/properties_texture/__init__.pyi +0 -54
- bl_ui/properties_view_layer/__init__.pyi +7 -28
- bl_ui/properties_workspace/__init__.pyi +0 -8
- bl_ui/properties_world/__init__.pyi +0 -22
- bl_ui/space_clip/__init__.pyi +82 -166
- bl_ui/space_console/__init__.pyi +0 -12
- bl_ui/space_dopesheet/__init__.pyi +67 -76
- bl_ui/space_filebrowser/__init__.pyi +0 -60
- bl_ui/space_graph/__init__.pyi +0 -66
- bl_ui/space_image/__init__.pyi +28 -162
- bl_ui/space_info/__init__.pyi +0 -12
- bl_ui/space_nla/__init__.pyi +0 -58
- bl_ui/space_node/__init__.pyi +99 -132
- bl_ui/space_outliner/__init__.pyi +0 -30
- bl_ui/space_properties/__init__.pyi +29 -6
- bl_ui/space_sequencer/__init__.pyi +159 -987
- 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 +29 -22
- bl_ui/space_toolsystem_toolbar/__init__.pyi +7 -2
- bl_ui/space_topbar/__init__.pyi +7 -52
- bl_ui/space_userpref/__init__.pyi +77 -225
- bl_ui/space_view3d/__init__.pyi +69 -551
- bl_ui/space_view3d_sidebar/__init__.pyi +127 -0
- bl_ui/space_view3d_toolbar/__init__.pyi +22 -799
- bl_ui/utils/__init__.pyi +0 -17
- blf/__init__.pyi +6 -50
- bmesh/__init__.pyi +0 -7
- bmesh/geometry/__init__.pyi +0 -3
- bmesh/ops/__init__.pyi +5 -450
- bmesh/types/__init__.pyi +298 -639
- bmesh/utils/__init__.pyi +16 -43
- bpy/app/__init__.pyi +66 -58
- bpy/app/icons/__init__.pyi +0 -6
- bpy/app/timers/__init__.pyi +0 -6
- bpy/app/translations/__init__.pyi +1 -16
- bpy/msgbus/__init__.pyi +1 -4
- bpy/ops/action/__init__.pyi +17 -186
- bpy/ops/anim/__init__.pyi +38 -279
- bpy/ops/armature/__init__.pyi +20 -191
- bpy/ops/asset/__init__.pyi +11 -97
- bpy/ops/boid/__init__.pyi +7 -38
- bpy/ops/brush/__init__.pyi +3 -104
- 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 +3 -35
- 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 +54 -149
- 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 +2 -10
- bpy/ops/export_scene/__init__.pyi +1 -155
- bpy/ops/extensions/__init__.pyi +15 -150
- bpy/ops/file/__init__.pyi +29 -216
- bpy/ops/fluid/__init__.pyi +13 -70
- bpy/ops/font/__init__.pyi +10 -134
- bpy/ops/geometry/__init__.pyi +3 -124
- bpy/ops/gizmogroup/__init__.pyi +1 -12
- bpy/ops/gpencil/__init__.pyi +5 -49
- bpy/ops/graph/__init__.pyi +20 -315
- bpy/ops/grease_pencil/__init__.pyi +62 -523
- bpy/ops/image/__init__.pyi +19 -379
- bpy/ops/import_anim/__init__.pyi +2 -16
- 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 +4 -49
- 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 +34 -932
- bpy/ops/nla/__init__.pyi +22 -183
- bpy/ops/node/__init__.pyi +420 -625
- bpy/ops/object/__init__.pyi +197 -1239
- bpy/ops/outliner/__init__.pyi +47 -327
- bpy/ops/paint/__init__.pyi +29 -282
- 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 +29 -234
- bpy/ops/poselib/__init__.pyi +19 -66
- bpy/ops/preferences/__init__.pyi +9 -177
- bpy/ops/ptcache/__init__.pyi +5 -31
- bpy/ops/render/__init__.pyi +10 -68
- bpy/ops/rigidbody/__init__.pyi +6 -56
- bpy/ops/scene/__init__.pyi +23 -168
- bpy/ops/screen/__init__.pyi +36 -202
- bpy/ops/script/__init__.pyi +1 -12
- bpy/ops/sculpt/__init__.pyi +42 -313
- bpy/ops/sculpt_curves/__init__.pyi +6 -21
- bpy/ops/sequencer/__init__.pyi +187 -644
- 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 +27 -225
- bpy/ops/text_editor/__init__.pyi +0 -5
- bpy/ops/texture/__init__.pyi +3 -18
- bpy/ops/transform/__init__.pyi +10 -382
- bpy/ops/ui/__init__.pyi +29 -154
- bpy/ops/uilist/__init__.pyi +0 -13
- bpy/ops/uv/__init__.pyi +195 -288
- bpy/ops/view2d/__init__.pyi +3 -73
- bpy/ops/view3d/__init__.pyi +37 -339
- bpy/ops/wm/__init__.pyi +129 -1317
- bpy/ops/workspace/__init__.pyi +7 -39
- bpy/ops/world/__init__.pyi +2 -10
- bpy/path/__init__.pyi +0 -34
- bpy/props/__init__.pyi +332 -203
- bpy/stub_internal/rna_enums/__init__.pyi +102 -82
- bpy/types/__init__.pyi +51712 -89245
- bpy/utils/__init__.pyi +4 -75
- bpy/utils/previews/__init__.pyi +1 -10
- bpy/utils/units/__init__.pyi +0 -12
- bpy_extras/anim_utils/__init__.pyi +24 -16
- bpy_extras/bmesh_utils/__init__.pyi +0 -1
- bpy_extras/id_map_utils/__init__.pyi +14 -6
- bpy_extras/image_utils/__init__.pyi +0 -9
- bpy_extras/io_utils/__init__.pyi +4 -23
- bpy_extras/keyconfig_utils/__init__.pyi +1 -1
- bpy_extras/mesh_utils/__init__.pyi +0 -12
- bpy_extras/node_shader_utils/__init__.pyi +0 -8
- bpy_extras/object_utils/__init__.pyi +0 -14
- bpy_extras/view3d_utils/__init__.pyi +0 -18
- {fake_bpy_module-20250828.dist-info → fake_bpy_module-20260118.dist-info}/METADATA +4 -1
- fake_bpy_module-20260118.dist-info/RECORD +385 -0
- {fake_bpy_module-20250828.dist-info → fake_bpy_module-20260118.dist-info}/top_level.txt +15 -14
- 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 +1 -10
- gpu/platform/__init__.pyi +0 -5
- gpu/shader/__init__.pyi +22 -6
- gpu/state/__init__.pyi +59 -38
- gpu/texture/__init__.pyi +0 -2
- gpu/types/__init__.pyi +84 -152
- gpu_extras/batch/__init__.pyi +0 -4
- gpu_extras/presets/__init__.pyi +6 -8
- idprop/types/__init__.pyi +6 -6
- imbuf/__init__.pyi +2 -9
- imbuf/types/__init__.pyi +5 -25
- keyingsets_builtins/__init__.pyi +1 -45
- mathutils/__init__.pyi +106 -2168
- mathutils/bvhtree/__init__.pyi +3 -25
- mathutils/geometry/__init__.pyi +41 -133
- mathutils/interpolate/__init__.pyi +3 -4
- mathutils/kdtree/__init__.pyi +0 -11
- mathutils/noise/__init__.pyi +0 -62
- fake_bpy_module-20250828.dist-info/RECORD +0 -370
- {animsys_refactor → _animsys_refactor}/__init__.pyi +0 -0
- {animsys_refactor → _animsys_refactor}/py.typed +0 -0
- {bl_console_utils → _bl_console_utils}/__init__.pyi +0 -0
- {bl_console_utils → _bl_console_utils}/autocomplete/__init__.pyi +0 -0
- {bl_console_utils → _bl_console_utils}/py.typed +0 -0
- {bl_i18n_utils → _bl_i18n_utils}/merge_po/__init__.pyi +0 -0
- {bl_i18n_utils → _bl_i18n_utils}/py.typed +0 -0
- {bl_i18n_utils → _bl_i18n_utils}/utils/__init__.pyi +0 -0
- {bl_i18n_utils → _bl_i18n_utils}/utils_cli/__init__.pyi +0 -0
- {bl_i18n_utils → _bl_i18n_utils}/utils_languages_menu/__init__.pyi +0 -0
- {bl_i18n_utils → _bl_i18n_utils}/utils_rtl/__init__.pyi +0 -0
- {bl_previews_utils → _bl_previews_utils}/__init__.pyi +0 -0
- {bl_previews_utils → _bl_previews_utils}/bl_previews_render/__init__.pyi +0 -0
- {bl_previews_utils → _bl_previews_utils}/py.typed +0 -0
- {bl_rna_utils → _bl_rna_utils}/__init__.pyi +0 -0
- {bl_rna_utils → _bl_rna_utils}/data_path/__init__.pyi +0 -0
- {bl_rna_utils → _bl_rna_utils}/py.typed +0 -0
- {bl_text_utils → _bl_text_utils}/__init__.pyi +0 -0
- {bl_text_utils → _bl_text_utils}/external_editor/__init__.pyi +0 -0
- {bl_text_utils → _bl_text_utils}/py.typed +0 -0
- {bl_ui_utils → _bl_ui_utils}/layout/__init__.pyi +0 -0
- {bl_ui_utils → _bl_ui_utils}/py.typed +0 -0
- /_bpy_internal/{freedesktop → platform/freedesktop}/__init__.pyi +0 -0
- {bpy_restrict_state → _bpy_restrict_state}/__init__.pyi +0 -0
- {bpy_restrict_state → _bpy_restrict_state}/py.typed +0 -0
- {console_python → _console_python}/__init__.pyi +0 -0
- {console_python → _console_python}/py.typed +0 -0
- {console_shell → _console_shell}/__init__.pyi +0 -0
- {console_shell → _console_shell}/py.typed +0 -0
- {graphviz_export → _graphviz_export}/__init__.pyi +0 -0
- {graphviz_export → _graphviz_export}/py.typed +0 -0
- {keyingsets_utils → _keyingsets_utils}/__init__.pyi +0 -0
- {keyingsets_utils → _keyingsets_utils}/py.typed +0 -0
- {rna_info → _rna_info}/py.typed +0 -0
- {rna_xml → _rna_xml}/__init__.pyi +0 -0
- {rna_xml → _rna_xml}/py.typed +0 -0
- {fake_bpy_module-20250828.dist-info → fake_bpy_module-20260118.dist-info}/WHEEL +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,18 +53,14 @@ 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(
|
|
74
62
|
self,
|
|
75
|
-
origin,
|
|
63
|
+
origin: collections.abc.Sequence[float] | mathutils.Vector,
|
|
76
64
|
distance: float = 1.84467e19,
|
|
77
65
|
/,
|
|
78
66
|
) -> tuple[
|
|
@@ -80,12 +68,10 @@ class BVHTree:
|
|
|
80
68
|
]:
|
|
81
69
|
"""Find the nearest element (typically face index) to a point.
|
|
82
70
|
|
|
83
|
-
:param origin:
|
|
71
|
+
:param origin: Find nearest element to this point.
|
|
84
72
|
:param distance: Maximum distance threshold.
|
|
85
|
-
:type distance: float
|
|
86
73
|
:return: Returns a tuple: (position, normal, index, distance),
|
|
87
74
|
Values will all be None if no hit is found.
|
|
88
|
-
:rtype: tuple[mathutils.Vector | None, mathutils.Vector | None, int | None, float | None]
|
|
89
75
|
"""
|
|
90
76
|
|
|
91
77
|
def find_nearest_range(
|
|
@@ -98,9 +84,7 @@ class BVHTree:
|
|
|
98
84
|
|
|
99
85
|
:param origin:
|
|
100
86
|
:param distance: Maximum distance threshold.
|
|
101
|
-
:type distance: float
|
|
102
87
|
:return: Returns a list of tuples (position, normal, index, distance)
|
|
103
|
-
:rtype: list[tuple[mathutils.Vector, mathutils.Vector, int, float]]
|
|
104
88
|
"""
|
|
105
89
|
|
|
106
90
|
def overlap(
|
|
@@ -111,9 +95,7 @@ class BVHTree:
|
|
|
111
95
|
"""Find overlapping indices between 2 trees.
|
|
112
96
|
|
|
113
97
|
:param other_tree: Other tree to perform overlap test on.
|
|
114
|
-
:type other_tree: typing_extensions.Self
|
|
115
98
|
:return: Returns a list of unique index pairs, the first index referencing this tree, the second referencing the other_tree.
|
|
116
|
-
:rtype: list[tuple[int, int]]
|
|
117
99
|
"""
|
|
118
100
|
|
|
119
101
|
def ray_cast(
|
|
@@ -128,14 +110,10 @@ class BVHTree:
|
|
|
128
110
|
"""Cast a ray onto the mesh.
|
|
129
111
|
|
|
130
112
|
:param origin: Start location of the ray in object space.
|
|
131
|
-
:type origin: collections.abc.Sequence[float] | mathutils.Vector
|
|
132
113
|
:param direction: Direction of the ray in object space.
|
|
133
|
-
:type direction: collections.abc.Sequence[float] | mathutils.Vector
|
|
134
114
|
:param distance: Maximum distance threshold.
|
|
135
|
-
:type distance: float
|
|
136
115
|
:return: Returns a tuple: (position, normal, index, distance),
|
|
137
116
|
Values will all be None if no hit is found.
|
|
138
|
-
:rtype: tuple[mathutils.Vector | None, mathutils.Vector | None, int | None, float | None]
|
|
139
117
|
"""
|
|
140
118
|
|
|
141
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,26 +74,20 @@ 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(
|
|
105
84
|
points: collections.abc.Sequence[collections.abc.Sequence[float]],
|
|
85
|
+
/,
|
|
106
86
|
) -> list[int]:
|
|
107
87
|
"""Returns a list of indices into the list given
|
|
108
88
|
|
|
109
89
|
:param points: Sequence of 2D points.
|
|
110
|
-
:type points: collections.abc.Sequence[collections.abc.Sequence[float]]
|
|
111
90
|
:return: a list of indices
|
|
112
|
-
:rtype: list[int]
|
|
113
91
|
"""
|
|
114
92
|
|
|
115
93
|
def delaunay_2d_cdt(
|
|
@@ -144,19 +122,12 @@ def delaunay_2d_cdt(
|
|
|
144
122
|
of the orig arrays, which may save some time.
|
|
145
123
|
|
|
146
124
|
:param vert_coords: Vertex coordinates (2d)
|
|
147
|
-
:type vert_coords: collections.abc.Sequence[collections.abc.Sequence[float] | mathutils.Vector]
|
|
148
125
|
:param edges: Edges, as pairs of indices in vert_coords
|
|
149
|
-
:type edges: collections.abc.Sequence[collections.abc.Sequence[int, int]]
|
|
150
126
|
:param faces: Faces, each sublist is a face, as indices in vert_coords (CCW oriented).
|
|
151
|
-
:type faces: collections.abc.Sequence[collections.abc.Sequence[int]]
|
|
152
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.
|
|
153
|
-
:type output_type: int
|
|
154
128
|
:param epsilon: For nearness tests; should not be zero
|
|
155
|
-
:type epsilon: float
|
|
156
129
|
:param need_ids: are the orig output arrays needed?
|
|
157
|
-
:type need_ids: bool
|
|
158
130
|
:return: Output tuple, (vert_coords, edges, faces, orig_verts, orig_edges, orig_faces)
|
|
159
|
-
:rtype: tuple[list[mathutils.Vector], list[tuple[int, int]], list[list[int]], list[list[int]], list[list[int]], list[list[int]]]
|
|
160
131
|
"""
|
|
161
132
|
|
|
162
133
|
def distance_point_to_plane(
|
|
@@ -168,12 +139,8 @@ def distance_point_to_plane(
|
|
|
168
139
|
"""Returns the signed distance between a point and a plane (negative when below the normal).
|
|
169
140
|
|
|
170
141
|
:param pt: Point
|
|
171
|
-
:type pt: collections.abc.Sequence[float] | mathutils.Vector
|
|
172
142
|
:param plane_co: A point on the plane
|
|
173
|
-
:type plane_co: collections.abc.Sequence[float] | mathutils.Vector
|
|
174
143
|
:param plane_no: The direction the plane is facing
|
|
175
|
-
:type plane_no: collections.abc.Sequence[float] | mathutils.Vector
|
|
176
|
-
:rtype: float
|
|
177
144
|
"""
|
|
178
145
|
|
|
179
146
|
def interpolate_bezier(
|
|
@@ -187,17 +154,11 @@ def interpolate_bezier(
|
|
|
187
154
|
"""Interpolate a bezier spline segment.
|
|
188
155
|
|
|
189
156
|
:param knot1: First bezier spline point.
|
|
190
|
-
:type knot1: collections.abc.Sequence[float] | mathutils.Vector
|
|
191
157
|
:param handle1: First bezier spline handle.
|
|
192
|
-
:type handle1: collections.abc.Sequence[float] | mathutils.Vector
|
|
193
158
|
:param handle2: Second bezier spline handle.
|
|
194
|
-
:type handle2: collections.abc.Sequence[float] | mathutils.Vector
|
|
195
159
|
:param knot2: Second bezier spline point.
|
|
196
|
-
:type knot2: collections.abc.Sequence[float] | mathutils.Vector
|
|
197
160
|
:param resolution: Number of points to return.
|
|
198
|
-
:type resolution: int
|
|
199
161
|
:return: The interpolated points.
|
|
200
|
-
:rtype: list[mathutils.Vector]
|
|
201
162
|
"""
|
|
202
163
|
|
|
203
164
|
def intersect_line_line(
|
|
@@ -210,15 +171,10 @@ def intersect_line_line(
|
|
|
210
171
|
"""Returns a tuple with the points on each line respectively closest to the other.
|
|
211
172
|
|
|
212
173
|
:param v1: First point of the first line
|
|
213
|
-
:type v1: collections.abc.Sequence[float] | mathutils.Vector
|
|
214
174
|
:param v2: Second point of the first line
|
|
215
|
-
:type v2: collections.abc.Sequence[float] | mathutils.Vector
|
|
216
175
|
:param v3: First point of the second line
|
|
217
|
-
:type v3: collections.abc.Sequence[float] | mathutils.Vector
|
|
218
176
|
:param v4: Second point of the second line
|
|
219
|
-
:type v4: collections.abc.Sequence[float] | mathutils.Vector
|
|
220
177
|
:return: The intersection on each line or None when the lines are co-linear.
|
|
221
|
-
:rtype: None | tuple[mathutils.Vector, mathutils.Vector]
|
|
222
178
|
"""
|
|
223
179
|
|
|
224
180
|
def intersect_line_line_2d(
|
|
@@ -231,15 +187,10 @@ def intersect_line_line_2d(
|
|
|
231
187
|
"""Takes 2 segments (defined by 4 vectors) and returns a vector for their point of intersection or None.
|
|
232
188
|
|
|
233
189
|
:param lineA_p1: First point of the first line
|
|
234
|
-
:type lineA_p1: collections.abc.Sequence[float] | mathutils.Vector
|
|
235
190
|
:param lineA_p2: Second point of the first line
|
|
236
|
-
:type lineA_p2: collections.abc.Sequence[float] | mathutils.Vector
|
|
237
191
|
:param lineB_p1: First point of the second line
|
|
238
|
-
:type lineB_p1: collections.abc.Sequence[float] | mathutils.Vector
|
|
239
192
|
:param lineB_p2: Second point of the second line
|
|
240
|
-
:type lineB_p2: collections.abc.Sequence[float] | mathutils.Vector
|
|
241
193
|
:return: The point of intersection or None when not found
|
|
242
|
-
:rtype: None | mathutils.Vector
|
|
243
194
|
"""
|
|
244
195
|
|
|
245
196
|
def intersect_line_plane(
|
|
@@ -254,17 +205,11 @@ def intersect_line_plane(
|
|
|
254
205
|
Returns a vector for the intersection or None.
|
|
255
206
|
|
|
256
207
|
:param line_a: First point of the first line
|
|
257
|
-
:type line_a: collections.abc.Sequence[float] | mathutils.Vector
|
|
258
208
|
:param line_b: Second point of the first line
|
|
259
|
-
:type line_b: collections.abc.Sequence[float] | mathutils.Vector
|
|
260
209
|
:param plane_co: A point on the plane
|
|
261
|
-
:type plane_co: collections.abc.Sequence[float] | mathutils.Vector
|
|
262
210
|
:param plane_no: The direction the plane is facing
|
|
263
|
-
:type plane_no: collections.abc.Sequence[float] | mathutils.Vector
|
|
264
211
|
:param no_flip: Not implemented
|
|
265
|
-
:type no_flip: bool
|
|
266
212
|
:return: The point of intersection or None when not found
|
|
267
|
-
:rtype: None | mathutils.Vector
|
|
268
213
|
"""
|
|
269
214
|
|
|
270
215
|
def intersect_line_sphere(
|
|
@@ -279,17 +224,11 @@ def intersect_line_sphere(
|
|
|
279
224
|
returns the intersection
|
|
280
225
|
|
|
281
226
|
:param line_a: First point of the line
|
|
282
|
-
:type line_a: collections.abc.Sequence[float] | mathutils.Vector
|
|
283
227
|
:param line_b: Second point of the line
|
|
284
|
-
:type line_b: collections.abc.Sequence[float] | mathutils.Vector
|
|
285
228
|
:param sphere_co: The center of the sphere
|
|
286
|
-
:type sphere_co: collections.abc.Sequence[float] | mathutils.Vector
|
|
287
229
|
:param sphere_radius: Radius of the sphere
|
|
288
|
-
:
|
|
289
|
-
:param clip: When False, dont restrict the intersection to the area of the sphere.
|
|
290
|
-
:type clip: bool
|
|
230
|
+
:param clip: When False, dont restrict the intersection to the line segment.
|
|
291
231
|
:return: The intersection points as a pair of vectors or None when there is no intersection
|
|
292
|
-
:rtype: tuple[mathutils.Vector | None, mathutils.Vector | None]
|
|
293
232
|
"""
|
|
294
233
|
|
|
295
234
|
def intersect_line_sphere_2d(
|
|
@@ -304,17 +243,11 @@ def intersect_line_sphere_2d(
|
|
|
304
243
|
returns the intersection
|
|
305
244
|
|
|
306
245
|
:param line_a: First point of the line
|
|
307
|
-
:type line_a: collections.abc.Sequence[float] | mathutils.Vector
|
|
308
246
|
:param line_b: Second point of the line
|
|
309
|
-
:type line_b: collections.abc.Sequence[float] | mathutils.Vector
|
|
310
247
|
:param sphere_co: The center of the sphere
|
|
311
|
-
:type sphere_co: collections.abc.Sequence[float] | mathutils.Vector
|
|
312
248
|
:param sphere_radius: Radius of the sphere
|
|
313
|
-
:
|
|
314
|
-
:param clip: When False, dont restrict the intersection to the area of the sphere.
|
|
315
|
-
:type clip: bool
|
|
249
|
+
:param clip: When False, dont restrict the intersection to the line segment.
|
|
316
250
|
:return: The intersection points as a pair of vectors or None when there is no intersection
|
|
317
|
-
:rtype: tuple[mathutils.Vector | None, mathutils.Vector | None]
|
|
318
251
|
"""
|
|
319
252
|
|
|
320
253
|
def intersect_plane_plane(
|
|
@@ -327,30 +260,36 @@ def intersect_plane_plane(
|
|
|
327
260
|
"""Return the intersection between two planes
|
|
328
261
|
|
|
329
262
|
:param plane_a_co: Point on the first plane
|
|
330
|
-
:type plane_a_co: collections.abc.Sequence[float] | mathutils.Vector
|
|
331
263
|
:param plane_a_no: Normal of the first plane
|
|
332
|
-
:type plane_a_no: collections.abc.Sequence[float] | mathutils.Vector
|
|
333
264
|
:param plane_b_co: Point on the second plane
|
|
334
|
-
:type plane_b_co: collections.abc.Sequence[float] | mathutils.Vector
|
|
335
265
|
:param plane_b_no: Normal of the second plane
|
|
336
|
-
:type plane_b_no: collections.abc.Sequence[float] | mathutils.Vector
|
|
337
266
|
:return: The line of the intersection represented as a point and a vector or None if the intersection cant be calculated
|
|
338
|
-
:rtype: tuple[None, None] | tuple[mathutils.Vector, mathutils.Vector]
|
|
339
267
|
"""
|
|
340
268
|
|
|
341
269
|
def intersect_point_line(
|
|
342
270
|
pt: collections.abc.Sequence[float] | mathutils.Vector,
|
|
343
271
|
line_p1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
344
|
-
line_p2,
|
|
272
|
+
line_p2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
273
|
+
/,
|
|
274
|
+
) -> tuple[mathutils.Vector, float]:
|
|
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.
|
|
276
|
+
|
|
277
|
+
:param pt: Point
|
|
278
|
+
:param line_p1: First point of the line
|
|
279
|
+
:param line_p2: Second point of the line
|
|
280
|
+
"""
|
|
281
|
+
|
|
282
|
+
def intersect_point_line_segment(
|
|
283
|
+
pt: collections.abc.Sequence[float] | mathutils.Vector,
|
|
284
|
+
seg_p1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
285
|
+
seg_p2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
345
286
|
/,
|
|
346
287
|
) -> tuple[mathutils.Vector, float]:
|
|
347
|
-
"""Takes a point and a
|
|
288
|
+
"""Takes a point and a segment and returns the closest point on the segment and the distance to the segment.
|
|
348
289
|
|
|
349
290
|
:param pt: Point
|
|
350
|
-
:
|
|
351
|
-
:param
|
|
352
|
-
:type line_p1: collections.abc.Sequence[float] | mathutils.Vector
|
|
353
|
-
:rtype: tuple[mathutils.Vector, float]
|
|
291
|
+
:param seg_p1: First point of the segment
|
|
292
|
+
:param seg_p2: Second point of the segment
|
|
354
293
|
"""
|
|
355
294
|
|
|
356
295
|
def intersect_point_quad_2d(
|
|
@@ -366,16 +305,10 @@ def intersect_point_quad_2d(
|
|
|
366
305
|
Works only with convex quads without singular edges.
|
|
367
306
|
|
|
368
307
|
:param pt: Point
|
|
369
|
-
:type pt: collections.abc.Sequence[float] | mathutils.Vector
|
|
370
308
|
:param quad_p1: First point of the quad
|
|
371
|
-
:type quad_p1: collections.abc.Sequence[float] | mathutils.Vector
|
|
372
309
|
:param quad_p2: Second point of the quad
|
|
373
|
-
:type quad_p2: collections.abc.Sequence[float] | mathutils.Vector
|
|
374
310
|
:param quad_p3: Third point of the quad
|
|
375
|
-
:type quad_p3: collections.abc.Sequence[float] | mathutils.Vector
|
|
376
311
|
:param quad_p4: Fourth point of the quad
|
|
377
|
-
:type quad_p4: collections.abc.Sequence[float] | mathutils.Vector
|
|
378
|
-
:rtype: int
|
|
379
312
|
"""
|
|
380
313
|
|
|
381
314
|
def intersect_point_tri(
|
|
@@ -388,15 +321,10 @@ def intersect_point_tri(
|
|
|
388
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.
|
|
389
322
|
|
|
390
323
|
:param pt: Point
|
|
391
|
-
:type pt: collections.abc.Sequence[float] | mathutils.Vector
|
|
392
324
|
:param tri_p1: First point of the triangle
|
|
393
|
-
:type tri_p1: collections.abc.Sequence[float] | mathutils.Vector
|
|
394
325
|
:param tri_p2: Second point of the triangle
|
|
395
|
-
:type tri_p2: collections.abc.Sequence[float] | mathutils.Vector
|
|
396
326
|
:param tri_p3: Third point of the triangle
|
|
397
|
-
:type tri_p3: collections.abc.Sequence[float] | mathutils.Vector
|
|
398
327
|
:return: Point on the triangles plane or None if its outside the triangle
|
|
399
|
-
:rtype: None | mathutils.Vector
|
|
400
328
|
"""
|
|
401
329
|
|
|
402
330
|
def intersect_point_tri_2d(
|
|
@@ -409,14 +337,9 @@ def intersect_point_tri_2d(
|
|
|
409
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.
|
|
410
338
|
|
|
411
339
|
:param pt: Point
|
|
412
|
-
:type pt: collections.abc.Sequence[float] | mathutils.Vector
|
|
413
340
|
:param tri_p1: First point of the triangle
|
|
414
|
-
:type tri_p1: collections.abc.Sequence[float] | mathutils.Vector
|
|
415
341
|
:param tri_p2: Second point of the triangle
|
|
416
|
-
:type tri_p2: collections.abc.Sequence[float] | mathutils.Vector
|
|
417
342
|
:param tri_p3: Third point of the triangle
|
|
418
|
-
:type tri_p3: collections.abc.Sequence[float] | mathutils.Vector
|
|
419
|
-
:rtype: int
|
|
420
343
|
"""
|
|
421
344
|
|
|
422
345
|
def intersect_ray_tri(
|
|
@@ -431,19 +354,12 @@ def intersect_ray_tri(
|
|
|
431
354
|
"""Returns the intersection between a ray and a triangle, if possible, returns None otherwise.
|
|
432
355
|
|
|
433
356
|
:param v1: Point1
|
|
434
|
-
:type v1: collections.abc.Sequence[float] | mathutils.Vector
|
|
435
357
|
:param v2: Point2
|
|
436
|
-
:type v2: collections.abc.Sequence[float] | mathutils.Vector
|
|
437
358
|
:param v3: Point3
|
|
438
|
-
:type v3: collections.abc.Sequence[float] | mathutils.Vector
|
|
439
359
|
:param ray: Direction of the projection
|
|
440
|
-
:type ray: collections.abc.Sequence[float] | mathutils.Vector
|
|
441
360
|
:param orig: Origin
|
|
442
|
-
:type orig: collections.abc.Sequence[float] | mathutils.Vector
|
|
443
361
|
:param clip: When False, dont restrict the intersection to the area of the triangle, use the infinite plane defined by the triangle.
|
|
444
|
-
:type clip: bool
|
|
445
362
|
:return: The point of intersection or None if no intersection is found
|
|
446
|
-
:rtype: None | mathutils.Vector
|
|
447
363
|
"""
|
|
448
364
|
|
|
449
365
|
def intersect_sphere_sphere_2d(
|
|
@@ -453,32 +369,33 @@ def intersect_sphere_sphere_2d(
|
|
|
453
369
|
radius_b: float,
|
|
454
370
|
/,
|
|
455
371
|
) -> tuple[None, None] | tuple[mathutils.Vector, mathutils.Vector]:
|
|
456
|
-
"""Returns 2 points
|
|
372
|
+
"""Returns 2 points between intersecting circles.
|
|
457
373
|
|
|
458
374
|
:param p_a: Center of the first circle
|
|
459
|
-
:type p_a: collections.abc.Sequence[float] | mathutils.Vector
|
|
460
375
|
:param radius_a: Radius of the first circle
|
|
461
|
-
:type radius_a: float
|
|
462
376
|
:param p_b: Center of the second circle
|
|
463
|
-
:type p_b: collections.abc.Sequence[float] | mathutils.Vector
|
|
464
377
|
:param radius_b: Radius of the second circle
|
|
465
|
-
:
|
|
466
|
-
:return: 2 points on between intersecting circles or None when there is no intersection.
|
|
467
|
-
:rtype: tuple[None, None] | tuple[mathutils.Vector, mathutils.Vector]
|
|
378
|
+
:return: 2 points between intersecting circles or None when there is no intersection.
|
|
468
379
|
"""
|
|
469
380
|
|
|
470
381
|
def intersect_tri_tri_2d(
|
|
471
|
-
tri_a1,
|
|
472
|
-
tri_a2,
|
|
473
|
-
tri_a3,
|
|
474
|
-
tri_b1,
|
|
475
|
-
tri_b2,
|
|
476
|
-
tri_b3,
|
|
382
|
+
tri_a1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
383
|
+
tri_a2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
384
|
+
tri_a3: collections.abc.Sequence[float] | mathutils.Vector,
|
|
385
|
+
tri_b1: collections.abc.Sequence[float] | mathutils.Vector,
|
|
386
|
+
tri_b2: collections.abc.Sequence[float] | mathutils.Vector,
|
|
387
|
+
tri_b3: collections.abc.Sequence[float] | mathutils.Vector,
|
|
477
388
|
/,
|
|
478
389
|
) -> bool:
|
|
479
390
|
"""Check if two 2D triangles intersect.
|
|
480
391
|
|
|
481
|
-
:
|
|
392
|
+
:param tri_a1: First vertex of the first triangle.
|
|
393
|
+
:param tri_a2: Second vertex of the first triangle.
|
|
394
|
+
:param tri_a3: Third vertex of the first triangle.
|
|
395
|
+
:param tri_b1: First vertex of the second triangle.
|
|
396
|
+
:param tri_b2: Second vertex of the second triangle.
|
|
397
|
+
:param tri_b3: Third vertex of the second triangle.
|
|
398
|
+
:return: True if the triangles intersect.
|
|
482
399
|
"""
|
|
483
400
|
|
|
484
401
|
def normal(
|
|
@@ -487,8 +404,6 @@ def normal(
|
|
|
487
404
|
"""Returns the normal of a 3D polygon.
|
|
488
405
|
|
|
489
406
|
:param vectors: 3 or more vectors to calculate normals.
|
|
490
|
-
:type vectors: collections.abc.Sequence[collections.abc.Sequence[float]]
|
|
491
|
-
:rtype: mathutils.Vector
|
|
492
407
|
"""
|
|
493
408
|
|
|
494
409
|
def points_in_planes(
|
|
@@ -500,23 +415,21 @@ def points_in_planes(
|
|
|
500
415
|
"""Returns a list of points inside all planes given and a list of index values for the planes used.
|
|
501
416
|
|
|
502
417
|
:param planes: List of planes (4D vectors).
|
|
503
|
-
:
|
|
504
|
-
:param epsilon_coplanar: Epsilon value for interpreting plane pairs as co-plannar.
|
|
505
|
-
:type epsilon_coplanar: float
|
|
418
|
+
:param epsilon_coplanar: Epsilon value for interpreting plane pairs as co-planar.
|
|
506
419
|
:param epsilon_isect: Epsilon value for intersection.
|
|
507
|
-
:
|
|
508
|
-
:return: Two lists, once containing the 3D coordinates inside the planes, another containing the plane indices used.
|
|
509
|
-
:rtype: tuple[list[mathutils.Vector], list[int]]
|
|
420
|
+
:return: Two lists, one containing the 3D coordinates inside the planes, another containing the plane indices used.
|
|
510
421
|
"""
|
|
511
422
|
|
|
512
423
|
def tessellate_polygon(
|
|
513
|
-
polylines
|
|
424
|
+
polylines: collections.abc.Sequence[
|
|
425
|
+
collections.abc.Sequence[collections.abc.Sequence[float]]
|
|
426
|
+
],
|
|
514
427
|
/,
|
|
515
428
|
) -> list[tuple[int, int, int]]:
|
|
516
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).
|
|
517
430
|
|
|
518
431
|
:param polylines: Polygons where each polygon is a sequence of 2D or 3D points.
|
|
519
|
-
:
|
|
432
|
+
:return: A list of triangles.
|
|
520
433
|
"""
|
|
521
434
|
|
|
522
435
|
def volume_tetrahedron(
|
|
@@ -529,12 +442,7 @@ def volume_tetrahedron(
|
|
|
529
442
|
"""Return the volume formed by a tetrahedron (points can be in any order).
|
|
530
443
|
|
|
531
444
|
:param v1: Point1
|
|
532
|
-
:type v1: collections.abc.Sequence[float] | mathutils.Vector
|
|
533
445
|
:param v2: Point2
|
|
534
|
-
:type v2: collections.abc.Sequence[float] | mathutils.Vector
|
|
535
446
|
:param v3: Point3
|
|
536
|
-
:type v3: collections.abc.Sequence[float] | mathutils.Vector
|
|
537
447
|
:param v4: Point4
|
|
538
|
-
:type v4: collections.abc.Sequence[float] | mathutils.Vector
|
|
539
|
-
:rtype: float
|
|
540
448
|
"""
|
|
@@ -10,13 +10,12 @@ import numpy.typing as npt
|
|
|
10
10
|
|
|
11
11
|
def poly_3d_calc(
|
|
12
12
|
veclist: collections.abc.Sequence[collections.abc.Sequence[float]],
|
|
13
|
-
pt,
|
|
13
|
+
pt: collections.abc.Sequence[float],
|
|
14
14
|
/,
|
|
15
15
|
) -> list[float]:
|
|
16
16
|
"""Calculate barycentric weights for a point on a polygon.
|
|
17
17
|
|
|
18
18
|
:param veclist: Sequence of 3D positions.
|
|
19
|
-
:
|
|
20
|
-
:
|
|
21
|
-
:rtype: list[float]
|
|
19
|
+
:param pt: 2D or 3D position.
|
|
20
|
+
:return: list of per-vector weights.
|
|
22
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:
|