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