Commit Graph

60 Commits

Author SHA1 Message Date
ce47231cdb Math Lib: Add isect_point_tri_v3
Add to Python via mathutils.geometry
2014-07-21 16:58:17 +10:00
00b29156e0 Defines: replace ELEM3-16 with ELEM(...), that can take varargs 2014-07-20 01:33:40 +10:00
e73d0f57a3 Code cleanup: use 'const' for arrays (python) 2014-04-27 00:25:15 +10:00
e9a64e2770 Fix T39392: Python bindings for geometry.box_pack_2d() return invalid total height 2014-03-24 17:39:54 +01:00
61ff3dfdda Code Cleanup: spelling 2014-01-13 15:31:57 +11:00
cdeb3c3922 Fix for incorrect use of abs() in intersect_sphere_sphere_2d 2014-01-09 03:15:59 +11:00
4b30b22ecf Fix for recent kdtree py module with MSVC
also remove submodule includes from mathutils.h
2014-01-07 00:53:52 +11:00
eb4090dadf Fix missing check if isect_plane_plane_v3 fails to find an intersection. 2013-12-29 12:51:27 +11:00
c35fb528c5 Fix intersect_line_plane bug causing crash on Motion trail and other
similar potential bugs in mathutils_geometry

marking no_flip as TODO
2013-12-11 10:28:30 -02:00
2ef3f6159c Fix T37715: Incorrect docstring 2013-12-10 00:02:37 +11:00
4da651c8f0 Fix T37472: crash when packing UV islands. 2013-11-19 11:20:57 +11:00
1576565932 minor changes needed for building standalone mathutils. 2013-09-14 00:30:56 +00:00
2f6c748bb9 fix [#36020] SmartUV Project is messy on a cube
was using very simple/stupid check to rotate us islands, replace with box_fit_2d() function.

missed docstring last commit.
2013-09-11 07:10:15 +00:00
d2d1025e4a add mathutils.geometry.box_fit_2d() to wrap BLI_convexhull_aabb_fit_points_2d() 2013-09-11 06:56:51 +00:00
92d94ccb08 misc minor changes
- make cmake osx use of -ftemplate-depth match scons.
- use array size within sizeof(), more compact.
- replace AT with __func__ where the function is unique enough.
- BLI_box_pack_2D -> 2d to match other functions.
- rename new mesh normal calculation to mesh.calc_normals_split()
2013-09-10 19:23:39 +00:00
5dbe17cc12 add 2d convex hull utility function, BLI_convexhull_2d(), and python api mathutils.geometry.convex_hull_2d()
uses Andrew's monotone chain 2D convex hull algorithm.
2013-09-10 07:52:10 +00:00
8e46cf637c tweak mempool loop comparisons when we know there is no chance for skipping past the last value.
also correct typo.
2013-08-31 02:12:31 +00:00
11c988ba00 Simplify line/plane intersection, add line_plane_factor_v3().
Remove no_flip option for isect_line_plane_v3(), its quite specific and only used for ED_view3d_win_to_3d().
2013-08-31 02:06:23 +00:00
09ff49755f math api edits - replace point-normal form for a plane with dist_to_plane_v3()
also correct python mathutils api, was missing vector checks.
2013-08-23 14:37:22 +00:00
7db1d6556d code cleanup: add break statements in switch ()'s, (even at the last case). 2013-07-21 08:16:37 +00:00
418011907c remove nan copyrights from code added since blender become opensource (copy paste errors), also remove BKE_script.h 2013-07-02 10:14:59 +00:00
5018ea5e29 real fix for [#35097], (curve cap flipping).
previous commit was incorrect, the face flipping depended on the orientation of the curve.

fix by passing the bevel direction to the fill function so we can have a reliable front/back.

This also gives some speedup for all curve filling since we can avoid calculating the normal since its already known.
2013-04-26 21:04:12 +00:00
c667f1ff10 utility function volume_tetrahedron(), for mathutils and BLI math. 2013-04-21 13:24:45 +00:00
eb66c45301 correct pyapi function intersect_line_sphere_2d() using 3d vecs when only 2d are needed. 2013-04-14 11:57:35 +00:00
f44b7868c5 add mathutils function to intersect 2 circles. Converted to C from a python script by Alex Fraser. 2013-01-28 11:52:17 +00:00
b2c66e268f replace MIN/MAX 3,4 with inline functions 2012-12-21 05:07:26 +00:00
adf7bfa8bb ifdef out dynstr so mathutils can be compiled as an external module again. 2012-12-08 01:16:59 +00:00
c56a911cd9 style cleanup: comments 2012-10-20 20:20:02 +00:00
25c96bc9f3 code cleanup: remove unused macros, commet some which may be useful later - or good to keep for completeness. quieted some warnings and add flags -Wmissing-include-dirs and -Wno-div-by-zero to cmake/gcc 2012-09-20 01:02:39 +00:00
7aeaeaf378 fix bug in mathutils.geometry.intersect_point_line() where 4D vectors were treated as 2D.
also change behavior to return a 2d vector when all args are 2D.
2012-08-28 11:27:46 +00:00
78ae6ac2a5 utility function to get the points inside a list of planes. 2012-06-27 09:51:22 +00:00
5caeeec1fe Corrected documentation for intersect_point_quad_2d to match exactly how
it works in C side: only convex quads without singularities gives predictable
results.
2012-06-06 08:08:54 +00:00
3ef11693f5 Style cleanup: displist module 2012-05-07 06:58:03 +00:00
4c5502bfd6 code cleanup: function naming for BLI functions. 2012-05-05 00:23:55 +00:00
112162e09e code cleanup: header cleanup 2012-04-30 14:24:11 +00:00
f88cfd9168 Code and style cleanup in own modules in BKE and also mball module
- Make sure functions are named in way BKE_<object>_<action> (same way as RNA callbacks)
- Make functions which are used by mball.c only static and remove their prototypes
  from public header file.

Further cleanup is coming.
2012-04-28 16:49:00 +00:00
d5023f0e91 correction to py docs from mgschwan on IRC. 2012-04-22 08:36:39 +00:00
11d12d945e style cleanup: python api 2012-03-26 06:55:09 +00:00
303cecf139 spelling cleanup: tesselate -> tessellate (last of these found) 2012-03-20 22:56:26 +00:00
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
70d3d1aca6 style cleanup: py/capi 2012-03-16 21:39:56 +00:00
3590076193 style cleanup - comment formatting 2012-03-03 20:36:09 +00:00
67effc8aef use docstrings for mathutils getset's, also some formatting edits, no functional changes. 2011-12-25 11:36:26 +00:00
f3ac865cc0 picky formatting of mathutils 2011-12-24 13:26:30 +00:00
9c9099a805 formatting edits in py api, no functional changes 2011-12-18 08:50:06 +00:00
ad96dacbc5 style edit only - move parenthesis onto second line of function definition (in keeping with most of blenders code)
also split some long lines in own code.
2011-12-17 00:52:36 +00:00
3b9b6051d9 rename mathutils constructors to match other parts of the bpy/api (no functional changes) 2011-11-24 04:45:36 +00:00
e5f40a1aac - pyapi mathutils.geometry.intersect_plane_plane
- isect_plane_plane_v3 uses better method
- minor refactor - arg name changes & some args as const.
2011-11-20 05:56:21 +00:00
ba7fbf6ae7 formatting edits & doc correction, no functional changes. 2011-11-16 03:56:34 +00:00
c993ee678a new math utility function isect_plane_plane_v3 2011-11-13 16:28:52 +00:00