Grasshopper

algorithmic modeling for Rhino

Strange OFFSET(not solved) and DUP(solved) functions

Hi,

 

On the bottom of that discution you can find some screen shots about offset functions strange issues with offsets going the way they want and changing their sense depending on their position...

 

 

About the duplicate function :

 

My Duplicate function seems to behave weirdly.


As you can see on the screenshot below, it's grafting half of the values, and the first ones aren't even in a good order. Also the value 0 and 6 are the same while there should not be any repetition.

 

 

 

When I flatten the duplicate input, it works correctly as you can see below.

 

Now some little details : If I flatten Merge's A input only, it works as well, but if I flatten just the B input, is screws up.

 

Maybe someone knows about a bug on the duplicate function ? Or is it just me that didn't get it well ?

 

Thanks

 

 

Views: 538

Replies to This Discussion

Hi Choco,

 

I'm on it, I know why it happens, but it's not an easy fix. The problem is that your data tree contains two branches with varying length {0;0} and {0;0;0}.

 

It handles {0;0} first, and it creates an output tree of {0;0;0} (it adds the extra zero). This then conflicts with the other branch, which makes the component think it is outputting lists instead of items, and it grafts the output from {0;0}.

 

All in all, quite a tricky problem. But it should go away if you use {0;0} and {0;1} as branch paths. These images show more clearly how the data is recombined:

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Hehe, I was sure it was that ! But since I'm a new comer to GH I thought I may have done something wrong.


Thanks for your reply !

by the way, I noticed another tricky thing, so you may be the one that will be able to answer me, since you look to be in charge of a lot of things here :

 

 

 

When I do offset some GH stuff near the general X axis, I always get some crazy results...

 

Here are two sets of curves I oriented and offset the same way, they all have the same base plane, but as you can see, the ones on the top right are just rebelling !

 

Do you know what it comes from ? Or how to solve this ?


Thanks

 

EDIT :

 

I'd also like to add some detail : You see the first curve group that offsets correctly ? If I move it up and down the general X axis, the result will change and go a little more right or wrong depending...so I fed the P value off the offset function with the frames that you can see at the origin of every curve, and it changed nothing.

 

Here before I move, it seems good...

 

And here after movement...the two bottom curves are still good because they seem to be in the good zone near the X or I dunno what...and the rest gets wild.

up !
up!

I have encountered the same problem in a different setting:

 

I have a set of curves to offset, and the distances of the offsets vary for each curve. The data structure issue comes up when some distances are 0 and some are non-zero. Say if the input curves have path {0},{1},{2}, etc., the output curves with 0 offsets maintain this structure, and the ones with non-zero offsets have {0;0}, {1;0}, {2;0} and so on. 

 

However of course the desired result is to have the exactly same structure for all conditions so I can keep the result useful.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service