addon to divide/split triangle in N equal parts

hiI need an addon to divide a triangle in N equal parts with the same angle… I was thinking something like this: (clic or download in order to see in full size)


please tell me how much $$ and time do you need to do this

thanks

Diego Quevedo

Attachments


Hi,
can you specify the range of N?
Also, how is the ‘Quad/Tri’ example different than the first one?
What is purpose of this script? Will it be used to single faces or whole meshes?

HI THANKS FOR asking

the biggest N that I used was 50 but in really special conditions… traditional the big is 10 ± is important this range?

Quad/Tri activate= only add the vertex in the oposite edge or border, I draw the cuts in ghost lines … but that don’t be added

I make origami diagrams with blender and this is a really traditional step and is a kick to my brain in order to do with accuracy

I’m going to use in single faces… if you see the first step is select the face… :smiley:

thanks again… diego

I spent some time with Patmo141 on IRC today to look how this can be solved mathimatically / geometrically, and it doesn’t seem that hard to do the basic mode and the quad/tris mode (IN THEORY!).

However, putting this into code is a different story. Patmo came up with Quaternion rotation + line/line intersection to find the verts on the opposing edge, and his code actually works in blender on a single triangle (the mesh needs to be just this one tri).

I tried another way, utilizing bmesh.ops and bmesh.utils a lot, 'cause they come with custom data interpolation (and more, e.g. multires handling) for free. I couldn’t manage to calculate the factors for the verts on the opposing edge yet, which seems to be a math deficiency on this side of the screen (it’s definately doable using Law of Sines and Law of Cosines). So that doesn’t work yet, but my modal operator to visualize (or later aid the vertex picking) does work with even edge splits:

With some more help by patmo, I’m sure we could do the 1-3 vert fan splitting for n sections, and of course also the Tris/Quad mode (just leave out the final connect_vert_pair step). The inters-mode appears really tough however, and isn’t that well defined (how is it supposed to work if n is even?). And not sure how to solve this in code, would probably do all cuts like in non-inters mode and try to figure out which verts/edges to dissolve (benefit: custom data intact; drawback: possibly difficult to determine the right elements to dissolve, or my not be reliable for 2-3 vert fan cut).

With a better explanation how it’s supposed to work, one could also go patmo’s way and calculate all vertex locations in object space, remove the original triangle and create the new verts, edges and faces from the calculated data (benefit: probably easier to determine the right intersections; drawback: no custom data support or difficult to implement).

Guess you see all the implications and that it’s quite some work, so I wonder if you really need the automatic inters-mode. And how much you’d be willing to invest (fixed price, can’t say how many hours of work).

hi

addon is ready… thanks to ziel :smiley:

best

Diego