Edge fillet and other bmesh tools



  • inset outline v 0.0.6
  • face inset fillet v 0.0.8
  • edge fillet v 0.2.2
  • arch tool v 0.1.5
  • vertex align v 0.1.6
  • vertex slide v 0.1.6
  • lathe tool v 0.1.0
  • arbitrary rotate v 0.1.2
  • edge slide v 0.1.1
  • split solidify v 0.1.1
  • mirror arbitrary v 0.0.6
  • project arbitrary v 0.0.4

    Warning addons above no longer compatible with Blender 2.62 revision 44275 or higher.

Bmesh 2.65a

  • edge fillet v 0.3.7
  • sire outline v 0.2.6
  • edge slide v 0.2.0
  • face inset fillet v 0.2.0
  • extrude along path or loop v 0.2.6
  • pen tool v 0.2.8
  • edge extend v 0.1.1
  • display tool v 0.1.7 (aka) Ruler 3d

Blender 2.73

1 Like







that’s pretty cool, I see myself using it!

Extrude along edge path



the fillet one looks great, the other works on meshes with a curve guide…?
waiting to see how you did them :wink:

mmm, i’d use a nice chamfer feature…

Thx for replies.
First one works in Blender 2.58 however it is far from being ready.
The second one works in blender 2.49 b it just has to be converted.

Hi.
Can you select only some corners to round?

Good work.

@ bleber

Yes however like i said it is far from being ready.

I see both being very useful. Can’t wait to try them out. :slight_smile:

First version of extrude along edge path working in blender 2.58.



The two scripts are very usefull, I personally know them from other softwares and was waiting for them for too long, they are truly a miracle, as they fill the gap! With these the poly modeling in blender will be amazingly easy! You are amazing coder, keep up the good work! I will patientl wait for the first version of these scripts to test them!

How about selective fillet zmj100, of a single vertex. by clicking the vertex, holding some key, and dragging the cursor to establish the fillet size. I will be working on my own implementation of this if you don’t. I would use this on profiles only, not filled geometry.



or

@ zeffii
Look at the gui at the first post.
You can select only one vertex and adjust fillet size with distance slider and subdivision with sides slider and it does not use curves, it uses regular edges.

nice ones, i like them, maybe make the input intuitive (like entering the number of sides by scroll).

as the functionality have minor properties to modify can you merge the two addon into one??

thanks for this useful addon :slight_smile:

zmj100, the GUI and accompanying 3dview suggested to me that the operator was taking all vertices at once, not selective. But, if it’s selective that’s really cool. I might still write my own version with scroll to adjust the segments. Wrote most of the code already in the Basic Calliper script :slight_smile:

I have decided to post the code as it is right now, it is not what i had working in blender 2.49.

To anybody who wants to help
I need help creating edges between those rounded corners, between first vertex of the path and first corner and last vertex of the path and last corner.



# -*- coding: utf-8 -*-

# ***** BEGIN GPL LICENSE BLOCK *****
#
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENCE BLOCK *****

# ------ ------
bl_info = {
    'name': 'fillet',
    'author': '',
    'version': (0, 0, 1),
    'blender': (2, 5, 8),
    'api': 36812,
    'location': '',
    'description': '',
    'warning': '',
    'wiki_url': '',
    'tracker_url': '',
    'category': 'Mesh' }

# ------ ------
import bpy
from bpy.props import FloatProperty, IntProperty
from mathutils import Vector, Matrix
from math import degrees, radians, cos

# ------ ------
def edit_mode_out():      # edit mode out
    bpy.ops.object.mode_set(mode = 'OBJECT')

def edit_mode_in():      # edit mode in
    bpy.ops.object.mode_set(mode = 'EDIT')

def get_adj_v_(me):      # get vert adj to sel vert
    for e in me.edges:
        try:             f_buf.dict_0[e.key[0]].append(e.key[1])
        except KeyError: f_buf.dict_0[e.key[0]] = [e.key[1]]
        try:             f_buf.dict_0[e.key[1]].append(e.key[0])
        except KeyError: f_buf.dict_0[e.key[1]] = [e.key[0]]

# ------ ------ ------ ------

def list_clear_(l):
    l[:] = []
    return l

# ------ ------ ------ ------

class f_buf():

    me_data = []
    dict_0 = {}

def f_(me, adj, n):

    me_t = f_buf.me_data
    list_0 = [v.index for v in me_t.vertices if v.select]      # selected vertices
    list_1 = []      # list of vert indices of arcs
    dict_1 = {}      # dict of v index as key and index of first and last vert of arc as value

    for vi in list_0:
        p = me_t.vertices[vi].co

        if len(f_buf.dict_0[vi]) != 2:
            pass
        else:
            p1 = me_t.vertices[f_buf.dict_0[vi][0]].co
            p2 = me_t.vertices[f_buf.dict_0[vi][1]].co
            vec1 = p - p1
            vec2 = p - p2

            ang = vec1.angle(vec2)

            if ang == radians(180):
                dict_1[vi] = vi
            else:
                h = adj * (1 / cos(ang / 2))

                p3 = p - (vec1.normalized() * adj)
                p4 = p - (vec2.normalized() * adj)
                rp = p - ((p - ((p3 + p4) * 0.5)).normalized() * h)

                vec3 = rp - p3
                vec4 = rp - p4

                rot_ang = vec3.angle(vec4)
                axis = vec1.cross(vec2)

                for i in range(n + 1):
                    new_angle = rot_ang * i / n
                    mtrx = Matrix.Rotation(new_angle, 3, axis)

                    tmp = p4 - rp
                    tmp1 = tmp * mtrx
                    tmp2 = tmp1 + rp

                    me.vertices.add(1)
                    me.vertices[-1].co = tmp2

                    list_1.append(me.vertices[-1].index)
                    dict_1[vi] = [list_1[0], list_1[-1]]

                # ------ make edges between points of arc ------
                n1 = len(list_1)
                for j in range(n1 - 1):
                    a = list_1[j]
                    b = list_1[(j + 1) % n1]

                    me.edges.add(1)
                    me.edges[-1].vertices = [a, b]
                list_clear_(list_1)

'''
    # ------ make edges between arcs ------
    for k in list_0:
        a = dict_1[k]
        kn = f_buf.dict_0[k]
        if kn[0] in list_0:
            b = dict_1[kn[0]]
            me.edges.add(1)
            me.edges[-1].vertices = [a[1], b[0]]
        elif kn[1] in list_0:
            b = dict_1[kn[1]]
            me.edges.add(1)
            me.edges[-1].vertices = [a[0], b[1]]
        else:
            me.edges.add(2)
            me.edges[-1].vertices = [a[0], kn[1]]
            me.edges[-2].vertices = [a[1], kn[0]]
'''


# ------ panel 0 ------
class f_p0(bpy.types.Panel):

    bl_space_type = 'VIEW_3D'
    bl_region_type = 'TOOLS'
    #bl_idname = 'f_p0_id'
    bl_label = 'Fillet'
    bl_context = 'mesh_edit'

    def draw(self, context):
        layout = self.layout
        
        layout.operator('f.op0_id', text = 'Fillet')

# ------ operator 0 ------
class f_op0(bpy.types.Operator):

    bl_idname = 'f.op0_id'
    bl_label = 'fillet'
    bl_options = {'REGISTER', 'UNDO'}

    adj = FloatProperty( default = 0.4, min = -100.0, max = 100.0, step = 10, precision = 3 )
    n = IntProperty( name = '', default = 4, min = 1, max = 100, step = 1 )

    def draw(self, context):
        layout = self.layout
        
        layout.label('distance')
        layout.prop(self, 'adj')
        layout.label('number of sides')
        layout.prop(self, 'n')

    def execute(self, context):

        n = self.n
        adj = self.adj

        edit_mode_out()
        ob_act = context.active_object
        me = ob_act.data
        # -- -- -- --
        f_buf.dict_0.clear()
        get_adj_v_(me)

        f_buf.me_data = me.copy()
        # -- -- -- --
        edit_mode_in()

        
        #bpy.ops.mesh.delete(type = 'EDGE')

        edit_mode_out()
        # -- -- -- --
        f_(me, adj, n)
        # -- -- -- --
        edit_mode_in()
        bpy.data.meshes.remove(f_buf.me_data)
        return {'FINISHED'}

# ------ ------
class_list = [ f_p0,
               f_op0 ]

# ------ register ------
def register():
    for c in class_list:
        bpy.utils.register_class(c)

# ------ unregister ------
def unregister():
    for c in class_list:
        bpy.utils.unregister_class(c)

# ------ ------
if __name__ == "__main__":
    register()


I have decided to post what i have got so far, because some people are asking for a link. This is just a part of what i had working in blender 2.49.

Some of the things that worked in blender 2.49 do not work in blender 2.58
so i have to rewrite parts of the code and that complicates everything



made using
extrude along edge path
fillet
split solidify
extrude, inset, and scale face islands