4
$\begingroup$

I'm trying to draw an object that has a lot of tubes of different heights. Those tubes are all exactly the same, with a hole on one side at the bottom. The holes of all the tubes should be exactly the same, and only the height of the tube change from one to another.

Tube looks about like that: A poorly drawn version of the tube

Now, the question, since all the tubes are the same, I'd like to have them linked, so that if, in the future, I'm modifying something on one, it affects the others. But, if I do Alt+D and try to scale the tube, the hole at the bottom gets elongated, which is something I don't want.

So, is there a way to "fix" the size of the hole, and having the scale change the height of the tube, without deforming the hole.

EDIT: To make it a bit clearer, a very important point is that I want a linked-copy of the tubes. I want that if I change something in the tube, for example the shape of the hole, this change affects all the tubes. The only difference that the tubes will have will be their height (above the hole).

$\endgroup$
  • $\begingroup$ I think you just need to grab the top vertices in edit mode, and move it up or down. The holes won't be affected, and all the other tubes will follow the change because you copied it with ALT + D. $\endgroup$ – gladys Sep 1 '15 at 10:33
  • $\begingroup$ But then all my tubes will have the same height, which is not what I want. I want the tubes of different height, but linked so that if I change something to the hole for example, it is passed to all the other tubes. $\endgroup$ – Gimly Sep 1 '15 at 10:35
  • $\begingroup$ the holes do they stay at the same place at the bottom? $\endgroup$ – gladys Sep 1 '15 at 10:42
  • $\begingroup$ Exactly, same place, same size $\endgroup$ – Gimly Sep 1 '15 at 11:38
6
$\begingroup$

I created the dynamic length pipe with two objects. The first object is one unit long, only large enough to house the hole at the end. The second object it just the tube, easy to change the length, via scaling or inputting dimensions.

dynamic length pipe objects

The way I link the two pieces, is with a Child of Constraint (scroll down to the bottom of answer).
Normal parenting would influence the scale, but with a child of constraint (CoC) each of the transform operations and channels are selectable.

Add a CoC to the hole object with the Target set to the main pipe. Uncheck all the Scale boxes. child of constraint settings

Blend File

You will move the tube from only the large main section. However when you duplicate it, you will need to duplicate both objects.


animated gif

$\endgroup$
  • $\begingroup$ Very nice, and completely answers my question. Not sure it's exactly what I need, as quollism's answer below seems also an interesting approach with the array modifier, since I need a lot of the same objects repeated. Thanks, I'll test both. $\endgroup$ – Gimly Sep 1 '15 at 20:34
3
$\begingroup$

You could use shape keys for this.

In object mode go to the properties panel, then go to data object data and open the shapekeys tab.

  • Click on the "+" button, to get the basis key.
  • Click on the "+" button again to add another shapekey (key1).

Go to edit mode select the top vertices and move them to the maximum height your tube can get (for example 50) so G 50.

Then go back to object mode. The object jumps to the base object. Under the tab shapekeys Key1 selected, slide the value slider. You can copy the object with SHIFT + D, and change the height with the valueslider.

enter image description here

$\endgroup$
  • $\begingroup$ Just tried, and it doesn't behave as I want. Issue is, I want to do a linked copy, with ALT + D and not a normal copy. Doing a linked copy and using your method still changes the height of all the copies. I want a linked copy because I want that, if I change something on one of the tube (except the height), it is copied to all the copies of this tube. $\endgroup$ – Gimly Sep 1 '15 at 12:13
2
$\begingroup$

Short answer: no. Scaling and instancing do not work that way.

To achieve what you want, use different objects with an Array modifier that has a Start Cap object set. The Start Cap is instanced to whatever object is using it - if you change the shape of the hole in the Start Cap object, the change will propagate to all the other objects.

This way you can control the length of each cylinder using the Count parameter in the array modifier - it's not exactly scaling, but the flatter you make the slice of cylinder (box in my example), the finer the control you get.

Array modifier and Start Cap in action

If you want to instance the mesh across the different objects as well as the Start Cap, you can go to the Data tab (looks like an inverse triangle) and set the mesh datablock to be the same for all your objects too. (This is glitching out for me however.)

$\endgroup$
  • $\begingroup$ Actually, I need to make a grid of 5x4 of my tubes, with a relatively logical placement repetition and evolution of sizes, maybe I can manage to do all of them with the array modifier. $\endgroup$ – Gimly Sep 1 '15 at 14:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.