Jump to content

Recommended Posts

Posted (edited)

i'm trying to connect each point with the next one and then the centroid

what am i doing wrong? seems simple enough (maybe there is a node for that) ideally i want to make also edge loops after like concetric circles

connect_to_center.hip

Edited by philpappas

Share this post


Link to post
Share on other sites

Hi philpappas. In your vex, you use i to iterate over the points. At the same time, you use i as an prim_num argument in addvertex here.

int  addvertex(int geohandle, int prim_num, int point_num)

So this might be a problem. Also it seems, that you may want the polyline, instead of the poly? I am not exactly sure, how the result should look like, but I attach a node solution for inspiration. I might help you with the vex too, but please clarify your intention. 

 

connect_to_center - v1.hiplc

connect_to_center - v1.PNG

  • Like 1

Share this post


Link to post
Share on other sites

Hi,

it works for me if you replace "i" in addvertex by "prim0" (even if type is "poly").

  • Like 1

Share this post


Link to post
Share on other sites
6 hours ago, ikoon said:

Also it seems, that you may want the polyline, instead of the poly

no i wanted "poly" and it worked great when i swapped i for prim0 in each addvertex function! thanks!! your method is interesting no vex, i'll have a look

Share this post


Link to post
Share on other sites
23 minutes ago, ikoon said:

"node" method

great, now i'm not so sure this was the right method all along because i wanted to enumerate the prims as you see in the attached image. kind of a reversed matrix (thats how i'd do it in grasshopper)

i should probably construct the prims using the radial lines one by one and attach an attribute for each layer(?) ...i can think of ways but maybe i am over complicating it

current.JPG

wish.JPG

Share this post


Link to post
Share on other sites

I am really not sure, if this is the best solution. I also feel like overcomplicating it :) 

BTW I have hardcoded 10 iterations. You can change that.

image.thumb.png.0521d6d756f15e4b45b87aade54b5d7a.png

connect_to_center - v2.hiplc

Share this post


Link to post
Share on other sites

As Mark Twain said: “I didn’t have time to write a short letter, so I wrote a long one instead.” :)

Share this post


Link to post
Share on other sites
Posted (edited)
38 minutes ago, ikoon said:

As Mark Twain said: “I didn’t have time to write a short letter, so I wrote a long one instead.” :)

hahah nice! i'll take a sip of coffee and read this one

Edited by philpappas

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×