Grasshopper

algorithmic modeling for Rhino

Hi guys, im really new to grasshopper! ive got problem when i shatter a curve. when i shatter the curve and divide them equally, the division fucked up. its clear that theres problem with the shatter command; it splits more curve then the intended spliting divisions. is there a method to make sure that the curve is shattered (splitted) with the specific number of curve which intersects it? the grasshopper image and files are as attached for a clearer picture.

Thanks in advance!!!!

Best
Guan

Views: 1699

Attachments:

Replies to This Discussion

You should take a look at the division section under the curves tab. You can use Divide Curve to split a curve into n equal segments
hi, its not that i want to divide the curve into equal segments , i want them to be shattered by these intersecting curves. I've got the wrong idea, hope you got what i mean! thanks!
Hi Guan

I have edited the code to fix your problem hopefully.. The reason the shatter was not working was that not only did the crv need to be grafted so there was one per branch but the output of the parameters on the second set of crvs need to be fliped from number of crvs per branch(your case 2) with path number matching number of Iso Crvs to.... Number of crvs per branch being iso crv count and number of paths being number of crv being used. This I did with a Path Mapper.. Which you can find more info about in this tread

http://www.grasshopper3d.com/forum/topics/path-mapper-component-what

Hope this helps

Matthelp(2) MG-Re-edit.ghx
Matt!

Thank you so much for your help!!! Couldnt be much more appreciated!! I kinda understand how this path mapper works but not fully. I dont understand what is a path at the first place. when i connect a panel to the tA/tB output of the curve intersection component, it has 0,0,0,0 or 0,0,0,1 so on and too they have several set of number which consists of 2 numbers. i have no idea what they are. Can you please tell me what they are and what purpose are they used for. anyways i understand how the path mapper works from the link you sent me until the third part in which you swap paths and items!

Thank you in advance!!!!

Guan
Evening Guan

Firstly to fix the confusion about the numbers coming from the tA/tB output of the intersection component... From what i can understand you have pluged in a panel component to one if these output lets say the tB one. At the top right of this panel will be a number something like {0;0;0;0} This is the first path containing 4 branches. Below this on the left had side you will see a integer number starting a 0 and counting down which is item number in that branch. next to each in your case is 2 digit number that repesents the distance along the 'wavy' crv that the intersection happens in the first crv in the list, and the second line is the same but the second crv in the list. This whole layout will repeat it self until all infomation is displayed.....

Ok now that makes sense how to explain an easier way to check paths/braches/items if you do not need to see the acutal output from the component be it numbers curves surfaces etc. In place of pluging in a Panel to the tB as we have just done plug in a Paramater Viewer that can be found at Params > Special > Param Viewer or just by double clicking on the canverse and typeing it. Along the top it will tell you how many paths are in your tree at that current time. Then below this it will list Each path by name .e {0,0,0,1} then Number of items in each tree branch path in our case 2.

For your code to work this need to be re-writtern with the path mapper so there where only 2 Paths with the first path containing all the first items from the tree and the second path containg all the second items from the tree.

Hope this all makes sense.

Matt
thanks matt , i got it, you have to keep on matching the paths so that they are coherent for the whole system to work. ahah, i have another question. i hope you can help me. say if i have a bunch of points, I want to select the middle point from this list of points, but I don't want to use list item to list the middle point with a specific integer as this list of points will increase and decrease in number and therefore the list item will not be the right one. i could'nt think of a way to extract this middle point from a set of point list, even if the number of the list changes , the point extracted will still be the middle one. any idea??

Thank you in advance!xxx

Guan
its okay matt, ive found the way myself, i hook the list length and i change the expression to divide by 2 and it works perfectly fine. seems i got the hang of gh. anyways thanks for all you help before matt!!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service