QuickPipe

Thanks I got it and it works very well. Though I had to really search thru all my tabs in the toolshelf to find it but that is my fault.

Very useful tool… excellent for making easily pipes that go parallel to the object edges or curves of surfaces (if you draw, before, some loops on them). Thanks…

Have anyone tried this in Blender 2.76 ? doesn’t seem to make any button in the tool shelf.

You have to go to edit mode, select some edges and search ( spacebar ?) for quickpipe.

Can drawing pipes be possible? maybe a modal operator that generates a curve after drawing greasepencil stroke. an event type where you hit enter and it generates the curve(make sure it’s return {‘FINISHED’} so you have control over how to setup your pipe algorithm as part of the script. PM me if you’d like to work with me on this feature. Nice add-on btw.

Looks great! This will be very useful.

this is wonderful.

Why do I get a twisted pipe one the R hand side if I try to pipe-ify all the front edges of a cube? Forgive me if it’s a silly question, there wasn’t really a manpage with this script…


What I did: install QuickPipe in Addons. Make a cube. Edit Mode. Select Edges. Selected edges in order, CW from left. Hit Space Bar, pick QuickPipe. And I get this twisted pipe consistently on the RHS. Is it not possible to make a closed path?

When I don’t close the loop, but make say an inverted U (left edge, top edge, right edge as seen from my pov), I see that the bottoms of the “legs” each side are larger in diameter than the tops, i.e. the tube diameter is not consistent. Is this some kind of elbow-creation feature, or a bug, or…? See below, bell-bottom pipes in Ortho view…


A more complex shape in Ortho view from underneath shows taper in pipe segments


And now I am done nitpicking and have to say this is a Freakin Awesome Addon, too much fun:


I was just about to post a request for help on this exact method! (also inspired by Tor Frick and his use of Modo’s quick-pipe tool).

I will try this add-on on the shape below -

Attachments


Thanks for the script! It’s awesome.

1 Like

Hello.
I like this addon. I updated it for 2.8. https://github.com/mifth/mifthtools/blob/master/blender/addons/2.8/quick_pipe/quick_pipe.py
Ctrl - 0.1 precision
Ctrl+Shift - 0.01 precision

To use it:
Type at Search Panel “Quick Pipe”

5 Likes

Thanks Mifth , works fine with Blender 2.8 Beta :grinning:

1 Like

Thanks for updating, such a great script…

1 Like

I love it! I do hope that it gets added as either a button or something in the Edge menu. The suggestion above for making it default to 0.707 on the Mean Radius would be amazing if somehow it could be implemented. Maybe a slider so that you could dial in the right amount based on the original curve?

1 Like

yeah, it would be great. Edge menu or Mesh menu…

I added a button in Context, Edges, Vertices menu

import bpy
import bmesh
import math
import mathutils as mathu

from bpy.props import (
    IntProperty,
    FloatProperty
)

bl_info = {
    "name": "Quick Pipe",
    "author": "floatvoid (Jeremy Mitchell), Pavel Geraskin",
    "version": (1, 0),
    "blender": (2, 80, 0),
    "location": "View3D > Edit Mode",
    "description": "Quickly converts an edge selection to an extruded curve.",
    "warning": "",
    "wiki_url": "",
    "category": "View3D"}


class jmPipeTool(bpy.types.Operator):
    bl_idname = "object.quickpipe"
    bl_label = "Quick Pipe"
    bl_options = {'REGISTER', 'UNDO'}

    first_mouse_x: IntProperty()
    first_value: FloatProperty()

    def modal(self, context, event):
        if event.type in {'RIGHTMOUSE', 'ESC', 'LEFTMOUSE'}:
            return {'FINISHED'}

        if event.type == 'MOUSEMOVE':
            delta = (self.first_mouse_x - event.mouse_x)

            if event.ctrl:
                delta *= 0.1

                if event.shift:
                    delta *= 0.1

            context.object.data.bevel_depth = abs((self.first_value + delta) * 0.01)
        elif event.type == 'WHEELUPMOUSE':
            bpy.context.object.data.bevel_resolution += 1
        elif event.type == 'WHEELDOWNMOUSE':
            if bpy.context.object.data.bevel_resolution > 0:
                bpy.context.object.data.bevel_resolution -= 1

        return {'RUNNING_MODAL'}

    def invoke(self, context, event):
        if context.object:

            if (context.object.type == 'MESH'):
                self.first_mouse_x = event.mouse_x

                bpy.ops.mesh.duplicate_move()
                bpy.ops.mesh.separate(type='SELECTED')
                bpy.ops.object.editmode_toggle()

                #  pipe = context.view_layer.objects[-1]
                pipe = context.selected_objects[-1]
                bpy.ops.object.select_all(action='DESELECT')
                pipe.select_set(state=True)
                context.view_layer.objects.active = pipe
                bpy.ops.object.convert(target='CURVE')

                pipe.data.fill_mode = 'FULL'
                pipe.data.splines[0].use_smooth = True
                pipe.data.bevel_resolution = 1
                pipe.data.bevel_depth = 0.1

            elif (context.object.type == 'CURVE'):
                self.report({'WARNING'}, "Need Edit Mode!")
                return {'CANCELLED'}

            self.first_value = pipe.data.bevel_depth

            context.window_manager.modal_handler_add(self)
            return {'RUNNING_MODAL'}
        else:
            self.report({'WARNING'}, "No active object, could not finish")
            return {'CANCELLED'}


# class VIEW3D_PT_tools_jmPipeTool(bpy.types.Panel):

#     bl_label = "Quick Pipe"
#     bl_space_type = 'VIEW_3D'
#     bl_region_type = 'TOOLS'
#     bl_category = 'Tools'
#     bl_context = "mesh_edit"
#     bl_options = {'DEFAULT_CLOSED'}

#     def draw(self, context):
#         layout = self.layout

#         row = layout.row()
#         row.operator("object.quickpipe")

def menu_func(self, context):
    layout = self.layout
    layout.operator_context = "INVOKE_DEFAULT"
    self.layout.operator(jmPipeTool.bl_idname, text="Quick Pipe")

classes = (
    jmPipeTool,
)


# Register
def register():
    for cls in classes:
        bpy.utils.register_class(cls)
    #  update_panel(None, bpy.context)
    bpy.types.VIEW3D_MT_edit_mesh_context_menu.append(menu_func)  # Mesh Context Menu
    bpy.types.VIEW3D_MT_edit_mesh_vertices.append(menu_func)  # Vertices Menu(CTRL+V)
    bpy.types.VIEW3D_MT_edit_mesh_edges.append(menu_func)  # Edge Menu(CTRL+E)


def unregister():
    for cls in classes:
        bpy.utils.unregister_class(cls)

    bpy.types.VIEW3D_MT_edit_mesh_context_menu.remove(menu_func)
    bpy.types.VIEW3D_MT_edit_mesh_vertices.remove(menu_func)
    bpy.types.VIEW3D_MT_edit_mesh_edges.remove(menu_func)

if __name__ == "__main__":
    register()

4 Likes

I love this community so much. Thank you guys for all of your hard work on this, and for adding this to the menus!!

2 Likes

Wow! Thanks a lot. I updated my repo with your things.

But I commented vertices for my version. I hope you don’t mind.

2 Likes

No problem at all.

1 Like