Grasshopper

algorithmic modeling for Rhino

Editing a grid so it will start the weave at a single height

Hello everyone!

I am working on a model with a woven structure. 

At the edges the weave starts at different heights (as shown in the picture). I want it to connect to a single edge line, that is why It is essential they start in the same height.

The woven structure goes in 2 directions so there is 4 edges that would need editing.

I feel like I would have to shift the grid in a certain way but Im not sure how to do this because the place where the weaves are at the same height is variable.

Thanks for your input in advance. 

Views: 1056

Attachments:

Replies to This Discussion

That's quite a lot of code to wade through, my friend.  The problem starts at the beginning with the offset surfaces.  I would suggest a different approach, using 'Divide Surface' just once on the original surface, then moving alternate points in opposite directions for the weave effect - in both directions.

Also, I noticed 'Cull Pattern' being used four times with long hard coded patterns (22 True/False); that approach is likely to break when parameters are changed, isn't it?  In this case, there are only eight items in each list being culled...

It appears that your intention here is to remove the first and last item in each list?  A better way to do that is using 'Shift' list twice with 'Wrap (W)' set to False:

Playing with it...  will post this for now, maybe more later.

Thanks for the tips Joseph!

Its my first project in grasshopper so that explains my unorthodox approaches.

Here is a way to get guide curves that look OK to me.  Old in blue, new in yellow.  Something weird happens in the second part of the code where "ribbons" are applied to these curves...  Haven't looked at that yet, maybe you can fix it using these yellow curves?

Attachments:

Wow amazing, this is exactly what I meant, thank you! 

The second part wasn't quite working anyway. I was trying to get a section swept over the curves. But because they also need to have a torsion (to finish on the edgecurves in the right orientation) I couldn't do it with sweep1 or sweep2. Im now looking into the heteroptera addon, because I saw it has a more advanced sweep function where an angle difference can be a boundary condition.

Anyway the project is still work in progress, but you helped me do an important step forward.

Not so fast...  For one thing, your ribbons look much better if you simply reverse the 'D' inputs to 'Repeat', as in this image - I don't know why:

For another, I realized your base surface isn't flat so thought it might be better to move the points using surface normals instead of 'Unit Z'.  This would be especially true if you wanted to use a cylinder surface, for example.  Making that change seems to have brought new issues for 'Orient' related to torsion. :(

Instead of trying to understand your complex ribbon code, I thought it would be easy to 'Orient' a rectangle at the start of all my curves and use 'Sweep1' to make the ribbons.  It was easy but the results aren't great.

Finally I decided to apply the weave to a cylinder.  For that case, your vertical ribbons behave much better than mine!  We both fail, in different ways, on horizontal ribbons around the cylinder.  I'm frustrated and embarrassed(!) and out of ideas for now.  Not as much help as I hoped to be.

You can probably find better examples of how this is done "the right way".  Personally, I try to avoid plugins and do everything in native GH, except for Anemone (looping).

Attachments:

Hey Joseph, I find it hard to delete the 4 woven curves on the edges. Any tips?

That blue group I mentioned earlier will do the job; included in the code I just posted.

Whew!  Finally got it working properly.  Not sure why I had such a hard time on this one...  Pretty sure I've done this sort of thing before but had a mental block.

Attachments:

Thanks for the help,

Today I'll try to understand how exactly you used the different objects, it will certainly be a usefull lesson.

To begin, I find it hard to understand what you used the objects in the purple square for? 

Good morning Daniel,

You did very well on your own here, for your first project.  Good job!

Instead of re-writing so much of your code as I did, the edge problem could have been fixed as I ultimately did in my version - just set all the end points back to zero.  Your approach using offset surfaces could very well be more robust than what I did.

I can still see a serious flaw in my code and might revisit it.  The sweep section rectangles are all "vertical" instead of oriented to the curve tangent at each point, as I tried and failed to do.  So take my version with a grain of salt.  You might learn some new GH techniques but trust your own judgement about accuracy and algorithms.  Have fun. 

Im not sure if just setting the endpoints to zero would fix the problem, wouldn't it create an irregular pattern at the end of the interpolated curves? Or am I not understanding you correctly?

And yes the orientation of the rectangles at the endpoints is still not optimal when there is curvature in the edgecurve.

I am also trying to let the woven curves be the centrepoint of the rectangle instead of a cornerpoint. This will get a more regular pattern near the edges of the surface. 

Purple square (group)?  You mean the 'Tree/List Viewer'?  That's a tool I wrote for examing geometry in data trees.  The 'path idx' slider selects a branch and 'list idx' selects an item in that list.  Very handy for visualizing what's going on.  You might need to hide other previews to see what it does.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service