Commit Graph

239 Commits

Author SHA1 Message Date
f7945c659b Knife: remove redundant allocations 2014-09-06 18:39:59 +10:00
7971e441c1 Knife: no need to find the face-loops
Just check if verts are used in the face.
2014-09-06 11:28:06 +10:00
1dd17bed4a Knife tool: simplify hit-depth calculation 2014-08-17 12:50:48 +10:00
f2821e392b hint checks to re-alloc as unlikely
also edit comments for knife tool
2014-08-14 11:07:33 +10:00
818a036c1a Fix T39387: Knife makes duplicate verts with subsurf 2014-08-13 15:06:38 +10:00
3529913629 Math Lib: name signed versions of dist_to_plane_v3 explicitly
also add unsigned versions
2014-08-13 14:34:58 +10:00
3e90d7971a Knife tool: avoid copying vectors 2014-08-13 13:56:53 +10:00
d17643ce1e Knife tool: cleanup threshold use, avoid sqrt 2014-08-13 08:08:18 +10:00
1510d0d441 Fix T41164: Knife creates duplicate verts 2014-08-13 08:03:31 +10:00
f9b7617104 Fix T40646: Knife project fails with clipping 2014-06-17 04:07:03 +10:00
e848cb9e48 Fix for knife when in ortho camera view 2014-06-17 04:07:03 +10:00
71c11dbb02 Fix T40252: Knife snapping ignores axis-constraint 2014-05-20 13:53:52 +10:00
46bd759964 Code cleanup: rename BM_face_legal_splits -> BM_face_splits_check_legal 2014-05-13 17:48:25 +10:00
7660218202 Correct fix for knife interior use, distance needed to be in object-space 2014-05-06 09:32:06 +10:00
d2920e9876 Knife too: was using a ray-cast direction scaled down by the knife epsilon 2014-05-06 09:02:16 +10:00
cd9aed7059 Fix T38623: Knife tool completely failing on interior geometry 2014-05-06 08:35:43 +10:00
d7d2e71a03 Correct some errors in auto-cleanup 2014-04-27 22:02:59 +10:00
c67bd49e56 Code cleanup: use 'const' for arrays (editors) 2014-04-27 00:25:15 +10:00
f2f3ef8692 Fix Knife bug T39617: midpoint snap should affect intermediate points.
This reverts to the 2.69 behavior, where the snap-to-midpoint option
affected the intermediate crossed edges as well as the endpoints.
2014-04-16 14:19:36 -04:00
412826a504 Mempool: delay allocating an initial chunk, its not always used 2014-04-08 12:58:56 +10:00
a91247c2b4 Code cleanup: unreachable break/return 2014-03-19 12:47:09 +11:00
ec4e12d9a2 Code cleanup: comments and typos 2014-03-18 05:40:18 +11:00
c1be7e12ee Fix T37510 Knife missed cuts on small faces.
For very thin faces, knife sometimes missed cutting a few.
Problem was that a test for edges being totally inside a face
was being applied in inappropriate circumstances. An assumed
invariant about the knife hit structure is not true when
actually in the middle of making cuts.
Also make a 'big epsilon' a little smaller, though don't think
that was the problem in this bug.
2014-03-06 10:55:12 -05:00
13ea967cce Code cleanup: correct abs use and quiet warnings 2014-03-01 14:26:18 +11:00
a815e04f72 Fix T38834: Knife constraint is offset after moving the view 2014-02-27 13:28:25 +11:00
b3afbcab8f ListBase API: add utility api funcs for clearing and checking empty 2014-02-08 06:24:05 +11:00
fed1b8b16d Code cleanup: suffix vars to make obvious they are squared 2014-02-03 02:46:45 +11:00
c4345a808c Smallhash: add reserve option to avoid resizing when size is known 2014-02-02 17:08:26 +11:00
04a902965e BMesh optimize face splitting by taking loops rather then verts
- add BM_vert_pair_share_face
- add BM_loop_is_adjacent
- remove BM_verts_connect
2013-12-24 11:13:58 +11:00
c1c26c36f6 Style Cleanup: remove preprocessor indentation (updated wiki style guide too) 2013-12-22 14:12:19 +11:00
93b24b91a9 Knife Tool: incorrect sized vector args (harmless but misleading) 2013-12-03 09:10:03 +11:00
5da703e915 BMesh/Mesh: replace scanfill with polyfill 2013-11-30 22:13:52 +11:00
84334bde01 Fix 37571: Knife Select should be disabled when no faces are selected
also check a similar case for bisect
2013-11-26 09:44:08 +11:00
238d2f962d BMesh Refactor: BKE_bmbvh_new can now be created without an EditMesh.
This adds BM_bmesh_calc_tessellation() so we can get triangles from a
bmesh without having to have an editmesh available.
2013-11-18 18:25:47 +11:00
0d1a499366 knife tool: Remove unused 'extend' variable 2013-11-08 18:01:07 +00:00
b144f15579 knife tool: Clean up line hits when starting a new cut
Fixes intersection points of the previous cut still being drawn when
starting a new cut.
2013-11-08 18:01:05 +00:00
3143536b08 Fix knife bug exposed by valgrind.
Was reading cage coordinate from those of existing
BMVerts even for newly created verts that don't
have cage coordinates there.
2013-11-06 15:27:19 +00:00
538a6ed57a Rewrote a lot of knife tool. Now allows cut-through
to make new vertices in the middle of faces.
This also fixes knife bugs:
#36678, #35945, #35943, #35387, #35045, #35002.
2013-11-05 16:24:00 +00:00
e8c54b682a Add 'cut-through' option for Knife Project operator.
If enabled, it makes knife project act as the
cut-through (Shift-K) version of knife.
This option will soon be more useful when a better
cut-though Knife change is submitted, allowing
this to work for cuts within faces in addition
to cuts across them.
2013-11-01 11:42:11 +00:00
7267221715 remove return argument from wmOperatorType->cancel, was only ever returning OPERATOR_CANCELLED. 2013-10-30 23:08:53 +00:00
dee671276d rename BM_vert_at_index -> BM_vert_at_index_find (since this searches the mempool).
needed for other changes - coming.
2013-10-27 10:01:35 +00:00
eabf7ab335 code cleanup: utility function for getting a bool as a string. 2013-10-13 00:32:31 +00:00
e220d3228f add MEM_SIZE_OPTIMAL to avoid memory fragmentation & waste lost to slop-space. 2013-10-10 18:18:13 +00:00
ec4a7fcad1 fix for lasso selection (in non-zbuf mode) when the line intersected its self.
isect_point_poly_v2() - add argument to check overlapping areas.
2013-10-04 10:48:24 +00:00
1fa59cdf4d allow knife-project to use sub-pixel length edges. 2013-10-01 15:52:29 +00:00
f06b440d63 quiet warnings (converting pointer to boolean) 2013-09-26 10:35:41 +00:00
8bbe81db4d knife was projecting vertex locations to the screen when it wasnt needed. 2013-09-25 11:38:30 +00:00
8c7eb60ba0 fix [#36780] Knife Project broken
was regression in r59665 (fix for [#35002]).

now when checking a segment that lies on the same plane as the triangle intersects,
clip the segment by the triangle bounds so we know the points remain inside the triangle.
2013-09-25 08:23:31 +00:00
7d7adf4488 Prevent assert failure in knife.
It seems sometimes a knife edge with the same
vertex on both ends was created sometimes.
2013-09-19 13:35:43 +00:00
67fa1a57ba Fix potential crash in knife.
A crash was reported but without info to reproduce.
This is a likely crash introduced by previous fix
to allow linehits to snap to vertices.
The function to find connected linehits can't
assume all linehits have edges any more.
2013-09-19 12:47:35 +00:00