Pipe mesh primitive

Hello, everyone. I was doing some playing around with blender, and I found this site on blendernation about creating new primitives using python. I then created a new pipe (a hollow cylinder), to speed things up to some folks (including me).
Please, let me know what you guys think.

link: ls_pipe.txt
Since I can’t host any .py files, i have uploaded it as txt, just change the extension.
One of the ways to install, you can just copy it to .blender/scripts folder inside your blender folder.

Regards,

  • Sergio Moura

why not use the cylinder mesh object and just leave the “end cap” unselected? :evilgrin:

re-inventing the wheel, eh? :smiley:

Nice little script. Could you add divisions to the hight, too?

@daredemo: This tube has an inner circle. Not only the outer faces.

Actually…
Last things first: I was not reinventing the wheel. I was just trying to do something useful in python so I dont get too rusty…

Next, about the end caps, it won’t do the trick. You would need to grab the end edges, extrude/scale inside, create some faces… It would be faster to do it with the circle… Anyway, here’s the shot of the created pipe along with the dialog:

http://www.liquidblue.com.br/blender/scripts/pipe.png

Regards,

  • Sergio

Thanks! I will add it… It will be a little tricky, but… I don’t have an engineer degree for nothing, right?

I’ll post back as soon as I have it.

@edit:
Height divisions are now a reality. =) Check the script here. The version is 0.2.
The normals are also corrected. =)
The 0.1 version can be found here.

Regards,

  • Sergio

Lovely… though I think it should say “Lay pipe” in stead of “Create pipe”… hehe… but seriously thanks… thats quite usefull.

Thank you for this update! :slight_smile:
Maybe it’s better to set the default “hight division” to 1.

ok, I will. Let me just finish the section division and I’ll make the modification.
Btw… Does anyone has a good idea for the name “section division”? It is the number of divisions between the inner radius and outer radius…

Regards,

  • Sergio

Radial divisions?

Does anyone has a good idea for the name “section division”? It is the number of divisions between the inner radius and outer radius…
Radial divisions? (EDIT: Argh, LOTRJ beat me too it) Assuming I’m right in thinking that they’re the divisions between the inner and outer tubes, anyway.
Nice script so far. I think it would probably look better if you capitalized the variable names (not the ones within the script, I mean the ones in the GUI;)) - like Inner radius, Outer radius, Divisions, etc…
Just a minor crit really though:yes: Nice work on the script itself, I see complicated maths there:)

Radial divisions is great! Thanks for the suggestion.
The 0.3 version can be obtained from the same link now.

I’ve removed some left-over debug codes and added radial divisions. The code has grown considerably.

Download 0.3

A little screenshot of a pipe generated with the 0.3 version (normals are drawn)

http://www.liquidblue.com.br/blender/scripts/pipe-0.3.png

Version history:
0.3 (latest so far)
0.2
0.1

Let me know your comments.

Regards,

  • Sergio

It’s a nice addition to the primitives now. :slight_smile:
Thank you for sharing.

Very nice and versatile script - saves some time when working with circular shapes.

The only (minor) thing I would change is to make the outer diameter the same as it is for the default cylinder/circle/etc… (radius=1BU) and the inner diameter 0.5 or something like that. But that’s just me trying to keep it consistent :wink:

Many thanks for posting this :slight_smile:
Werner