Moving surface patches according to neighbours position? maybe ^^

Hello people!

i have a bunch of surfaces. their center points are all on one xy plane. just roated
if you look at them from the top they are all fitting together (if you would project the surfaces to the xy plane they would all be squares - i hope you understand what I mean ^^ :rofl: )

SO now the interesting part:

I would like to move them on the z axis so the make one smooth shell if that makes sense.

taking the the two edges of surface 1 and 2 that go together. take the midpoint and move surface 2 down by that much ->

-> then we get this. and now doing the same with surface 3 and the NEW SURFACE 2

doing this for the whole row. once you get to the next row -> surface 11 what then?? not sure how to best procide?

-> ok 11 is still simple. but what to do with surface 12? does it make sense too do as in this image?

does somebody have a brilliant idea? i can’t seem to figure one out

happy for any ideas

oh here is the GH so far. not much there yet :rofl:
moving surface patches acording to (41.5 KB)

Is the surface the squares make a single or double curvature surface?

If the case is a double curve, i dont think you can do it with planar squares, atleast my quick head imagination of it doesn’t allow the planar squares to form a closed double curved surface. There would always be a gap.

For single curvature, i am afraid i can’t think of answer at the moment.

it would make up a double curvature
but i wouldn’t care about the gap. i am aware of this but this shouldn’t be an issue in my case :smiley:

Not that i can solve the issue, but i believe others will ask the same.

What side of square 11 should relate to square 1?
Would 11 relate with side A to the yellow line, would 11 relate with B to the orange line or perhaps another relation

1 Like

that’s what i am not sure about ^^
I am trying out to figure out the “best” way to do this (if possible at all)
i just wrote what seemed to make sense to me. but like i said. if anybody has suggestions i am more than happy hearing them :rofl:

That’s rather easy BUT:

  1. In order to achieve fast times do a tree in u/v instead of a tree with one item per branch. Plus it could be preferable a common orientation of all the parts (otherwise more time could be spend for matching).
  2. Starting from … er … say item {0}[0] define a plane say using p0, p1, p3 and reverse the x dir. That’s the planeTo. Define a plane on the next item {0}[1] using p1,p0,p2. That’s the planeFrom. Replace the xDir of To with xDir of From. Then do a plane to plane transformation (for the next item). Continue until the end of time

Well i believe if you can imagine it, it is possible. Its “just” a matter of figuring it out.

If i have the correct assumption of your intention.
I would likely

  1. create the section curves for my surface
  2. create the surface using the section curves.
  3. Divide the surface with U and V
  4. Place plane at the points, using the normal vector achieved from evaluate surface
  5. create a grid of lines following the Z-axis
  6. Intersect the planes from step 4. with a quad-pair of lines from step 5.
  7. Use the intersection points as corner points for the surface.
    Now the squares should appear square when viewed from a top view, be in corner connection to each other and placed correctly according to each other.
    I may have missed some steps, but the general logic of it should work.
    I hope i could be of some use and best of luck.

sorry but I don’t think I understand what you mean :sweat_smile::disappointed_relieved:

ok thanks for the tipp. will give it a try now

Just provide a tree where U branches contain V items AND take care for the same orientation of all the items (the surfaces).

Im not quite sure he knows about branches

I am still learning yes :smiley: :joy:

but I am asuming you mean to put each row in one branch?

? mybe yes no? ^^

Yes. After making sure that the orientation of the pieces is the same … post here ONLY the tree (as Rhino file don;t bother with a GH def).

surfaces for movement.3dm (490.3 KB)

you mean like this? :grinning:

Rhino 6 eh? I don’t work with that (too many issues). But I’ll do a primitive demo using a tree via partition (not the general case … where voids could be present, or unequal branches … but anyway).

That said solving a case like this with code is very easy … but what could be your benefit from a similar solution?

They are not likely to go away unless you tell us about them…

ah i like rhino 6. bit iffy at the beginning but by now i think they ironed out a bunch of bugs :slight_smile:

still not sure how it helps me if i partition the list? ok now i have 10 rows with each 10 surfaces? what now?
move them together like i mentioned all the way at the top? ok then I have stripts that go together halfway decent, but how will each branch go with the next branch?

Don’t ask me. Find some minutes to do (in 3 modes) what you said that you want … but I can’t see any result that makes any sense.

PS: wanna more LOL? Just vary the partition size (since no check is included for any adjacent conditions [AND orientation] … only the tree structure tells the C# what to do. Thus if bananas in > bananas out). (139.9 KB)

And this … is more(?) elaborated (but still useless): (141.8 KB)

sorry for responding so late.
just took a look. the v1a i think is not useless ( the per tree part). actually it does pretty much what i wanted at the beginning?
a quick question though. what does the script actually do? since my proposal was just moving them on the z axis. what you haven’t done (i think :rofl: )
since when you look at it from the top you can see the surfaces are no longer a patch:

also when i bake the original and new surfaces they are now longer the exact same. very similar but not the same? where does that come from? :slight_smile:

thanks for improving v1. very much appriciated

Well … define the item {0}[0] as the current surface. That very first item is stored as it is. Then you get the next {0}[1] and you find the planes for the Plane to Plane Transformation. These are defined from the normalized surface corners (obviously using 3 of them). Then the next is transformed in order to “touch” the current. Then the next becomes current and the loop goes on. N controls the steps.

Depending on the mode (3 available): a current is

  1. never re-defined (linear mode) or
  2. re-defined from the first item [0] per pranch, or
  3. re-defined as in 2 and transformed with respect the item [0] of the previous branch. This means that a “lateral touch” occurs … but (obvioulsy) this is not possible for the next items (they just touch each other as they do in mode 2).

Obviously surfaces would never touch when viewed from top.

All these are very easy to do with code … the only thing MIA is: why? he, he.

This case looks to me just another trip into the rabbit hole: many entries, not a single exit.