[Bf-committers] draw loop
Sat, 13 Sep 2003 11:28:02 -0400
No complaints. It just needs some basic improvements. Like drawing a
on a plane should make a circle. But no biggie. This is cool anyway..
On Wednesday, September 10, 2003, at 06:00 AM,
> I've been made a knife "subdivide tool", where you draw a mouse trail
> on the
> screen and the edges are subdivided IFF the verts are selected ans it
> intersected by the mouse trail. Very useful for adding extra geometry
> to a
> model. It's working except for 1 minor flaw, and one anoying behavior
> (blender's fault not mine!)
> The flaw is, I need to disable gestures while the trail is drawn. My
> thought was to make a G.flag value that bypassed calls to gesture().
> dosn't seem to quite work, maybe I missed one... I'll look more
> later, but
> any hints are appreciated.
> The anoyance is that when turning corners, it creates 4 tris. If the
> diagonal between the subdivided edges were also subdivided (like both
> edges in a quad divided in 4), this could be filled with 3 quads
> instead. I
> was looking at the code in subdivideflag() and had it working for 1 of
> the 4
> cases (edges 1 and 4 have new verts) but I wasn't sure if my method
> safe. Can I rely on the edges being in sequential order, so that
> edge1 is
> always next to edge2? Or do I need a new method before moving on to
> other 3 cases?
> Then, of course, I need to get the uv mapping right.
> Patch for my knife subdivide tool (against Tuhopuu2) is here:
> http://www.soylent-green.com/KnifeSubT2_rev2.patch if you want to try
> it out.
> Rev1 fails because of int math roundoff error. Had to do the math in
> (Usage: Select verts, hit K, LMB drag line, hit K).