MultiPipe2 || SubD based implementation of Rhino's "MultiPipe" Tool for MoI

Next
 From:  Gabriel
12116.1 
Hey all,
building upon my first try on a "MultiPipe" implementation, I was looking for a way to implement the "true Catmull-Clark Subdivision (SubD) control cage" in MoI through pure Javascript, but found an easier way at the end.
The script is called MultiPipe2. You select a bunch of curves (a wireframe, a truss, whatever), run the command, and it comes back as one smooth, solid pipe frame with rounded joints wherever the struts meet.

How it works, in plain terms:
MoI already has a SubD importer built in. MultiPipe2 builds a simple, blocky "cage" out of your curves — basically a low-poly stand-in for the pipe frame, with a square ring running along each strut and a rough joint where struts meet. It writes that cage to a temp file, hands it to MoI's own SubD import, and MoI smooths it into a proper round solid. The temp file gets deleted right after, so nothing is left behind — it's just a translation step your document never sees.

It's roughly the same idea as Rhino's own MultiPipe command (been in Rhino since v7) — pick curves, get a smooth SubD pipe network out. Different engine under the hood since it's built for MoI, but same basic concept if you've used Rhino's version before.

A few things it does on top of the basics: it grows the joint automatically at tight angles so it doesn't fold through itself, it'll warn you about duplicate or crossing curves instead of silently ignoring them, and there's an optional "Round joints" mode that fixes pinching at heavily-grown or high-degree nodes (turns them into a clean "miter point" instead of a "dimple").

for the latest release see this post below:
Links

PS: Once again probing the capabilities of my MCP server - now it became my personal "J.A.R.V.I.S" ;)

Cheers,
Gabriel

EDITED: 26 Sep by GABRIEL

Image Attachments:
Size: 923.3 KB, Downloaded: 51 times, Dimensions: 1915x1034px
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Matadem
12116.2 
Nice! this is perfect for a project I am working on!
I made some samples e few months ago in Nvil3d...but by doing everything needed in Moi is so much faster :D
I wasted allot of time in Blender, Nvil and plasticity....just to do this in mere seconds....hopefully we'd see a v3 version :D

I think what Moi still needs is a distort option...

EDITED: 23 Sep by MATADEM

Image Attachments:
Size: 53.8 KB, Downloaded: 38 times, Dimensions: 1216x368px
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
12116.3 
Not the same but... if you want pipes take squares ;)

---
Pilou
Is beautiful that please without concept!
My Moi French Site
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  MO (MO_TE)
12116.4 In reply to 12116.1 
Hi Gabriel,
Thanks for sharing it, I played with it a bit and had some fun making cages! :)
I like how it manages to connect different pipes very well.

I have some suggestions that might be useful to mention for improving your command.

1- Your command supports one radius for all pipes. Also, It only uses the low poly cage for the sub-D importer.
I think having an option to output just the subD cage would be useful, so it's possible to modify and connect multiple pipes with different radii. and then do the last part (sub-D import) manually or via a script.
Or even to make the preview faster, having an option to skip the sub-D import and show the raw cage on the viewport.

2- I tried it with >100 curves, some in very tight angles, as expected it failed on some of them. The command ui filled with info about the coordinates of failed curves ("The joint at (x,y,z) could not be built"), almost breaked the ui. I think it'd be much easier to track the bad curves to display them on the viewport rather than displaying the coordinates. Selecting/highlighting the problematic curves is a simple solution for that.

3- This one is not that important, but a "Back" button might be useful when doing some trial and error to get the best result without canceling and running the command again and again.

Thanks
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Gabriel
12116.5 In reply to 12116.4 
Hey MO!
Thanks for trying this out and for your feedback :)
I'll what I can do.

Cheers,
Gabriel
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Gabriel
12116.6 In reply to 12116.5 
@MO (MO_TE)

Hello again MO,
and thanks a lot for the detailed feedback. All three points made it into MultiPipe2, and they led to a few other additions along the way. Here's what's in the latest version, 1.1.7:

1. Cage output and different radii
- The new Output option has four choices: Pipe frame (the smooth SubD result, as before), Cage curves, Cage surfaces and Cage solid.
- Cage surfaces is the one for your workflow. It gives you the raw low-poly cage as editable surfaces, so you can change it, connect pipes of different radii, and then run ImportSubD yourself, manually or from a script.
- Cage curves skips the SubD import completely, so it's very fast. On a 300-strut frame it takes about a third of a second, compared with about 17 seconds for the full pipe frame.
- Cage solid: the cage joined into one faceted solid per frame. It's closed when Cap is on.
- Different radii are also supported directly now. Each curve takes its radius from its MoI style. If your selection spans several styles, the panel shows one Radius field per style, labelled with the style's name. Joints where different radii meet are built automatically. Limited to a max. of 8 styles, the script will tell you that it can't proceed if you select more.

2. Failed joints
- The panel no longer fills up with coordinates. When joints can't be built, the summary gives one line with the number of failed joints and dropped frames.
- The curves at the failed joints are left selected and everything else is deselected, so you can see them in the viewport right away.
- A failed joint no longer stops the whole run. Only the frames containing it are left out, and every other frame is still built.

3. Back button
- The summary step now has Back, which takes you back to the options with your values still there. You can adjust and rebuild without cancelling and restarting.

Also new since your post:
- Live Preview: while the options are open, the viewport shows the result and updates after every change. On large frames it falls back to cage curves to stay responsive, and it tells you when it does that.
- Pick radius: each Radius field has a Pick button. Move the pointer over the viewport and a guide circle shows the radius on the nearest curve; click to set it.

Previous features left untouched:
- Round joints / All nodes: these options add an extra ring beside tight-angle joints, and optionally at every node. That keeps the joints round instead of pinched, and where the geometry allows, it gives a clean miter point.
- Automatic joint growth at tight angles: the summary tells you how many nodes grew and by how much.

Links
- GitHub repository: scripts-for-moi on GitHub
- Latest release (direct zip): MultiPipe2-1.1.7.zip
- Manual: MultiPipe2 manual

To update, copy the three files over your old ones and restart MoI, since MoI caches command scripts. Thanks again for testing it on a large, tricky scene. That's exactly the kind of feedback that makes the tool better, so please let me know how the new version works for you.
I've mentioned you in the README and the help file :)
There is a little demo video demonstrating all the new features.

Cheers,
Gabriel

EDITED: 26 Sep by GABRIEL

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
12116.7 In reply to 12116.6 
Hi Gabriel, info here on how to disable script file caching:
http://moi3d.com/forum/index.php?webtag=MOI&msg=6727.2

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Gabriel
12116.8 In reply to 12116.7 
Hi Michael,
thank you so much, great that it can be done :-)

Gabriel

EDITED: 27 Sep 1:37 by GABRIEL

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  MO (MO_TE)
12116.9 In reply to 12116.6 
Hi Gabriel,

Thanks a lot for all your work. It works great!
The live preview and auto-fallback to cage curves make it way more responsive than before—almost instant.

The "Failed joints" selection works correctly in "Cage Curves," "Cage Surfaces," and "Cage Solid" modes, and it displays the problematic curves perfectly.

"Radius per style" is a very nice and smart feature. The pick button works well in simpler scenes, but in more complex cases, the point picker is a bit confusing when trying to select the correct point. However, I'm using the input field and can work with that. :)

Attached image is a test with 200 curves generated with the "Delaunay" node. I exported the low-poly cage solid into Blender. There were some parts that passed through each other, which I fixed with a smooth modifier; I also made the links and nodes a little puffier with a cloth simulation. It could have been done manually, but Blender made it simpler.

Great job, Gabriel! :)

Thanks
Attachments:

Image Attachments:
Size: 84.4 KB, Downloaded: 2 times, Dimensions: 1310x391px
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All