Currently making a script to create a sine-wave pattern on any given surface. both “horizontally” and “vertically”. Ive come a long way and found an elegant solution for all surface types (single surface, deformed, envelope style ..) along the U and V direction.
There is however one exception: “envelope style” surfaces with the pattern along the V direction with the bug happening at the very very end of the script with the loft component. Its reacting in an obscure way and I don’t know what to try anymore. As you can see on the pictures, my script works well for “vertical” sinus waves:
Yet, nothing changes. The loft component is doing its obscure thing again. Ive tried to align all seams, to flip curves .. nothing works. Yet the data structure and curve seem as healthy as can be? Even baking the curves into Rhino and trying a manual loft wont work for that specific example.
Any ideas?
The script is attached, and has a bunch of built in user objects I created. I script clean and am happy to give all those mini scripts I made along the way!
it’s very difficult to follow what’s going on in your definition because each time there’s a cluster you need to sort-of interrupt the flow and have to re-visualize the whole thing with new inputs… that said, you have a few components that come from plugins
looking at your screenshod, a dashed spaghetti connection going into the Curve input for Loft component indicates a data-tree, which is many branches of data, which means many different Lofts to be built: the first thing I would try is flatten that
Thank you for your input and help
Yes I use clusters but I assure you its for a good cause, just hover over them for an explanation. Theyre most probably userobjects I created.
Im familiar and decently competent with data tree management, as can attest the script that leverages data trees extensively. In the example you point out, each branch represents one surface Id like to apply the pattern on, and holds all the curves to use for the loft for that singular surface. if I flatten it all my input surfaces will be mixed and the loft result will most definitely not be what Im looking for.. merging curves that dont need to be lofted together .. but thanks for taking the time to have a look
Sorry about the various plugins I use: Metahopper, Pufferfish and probably some others.
I found the solution, in the specific example of the “envelope/donut” surface, a duplicate line is created at some point. I dont understand why given I cull all duplicate points beforehand, and it only happens in this use case, but simply using lunchbox’s “sort duplicate curves” component before feeding it into the loft component seems to solve all issues.
Below is an updated universal script to have sinus wave patterns on both directions for any input (untrimmed) surface. You re welcome to use it!