Hello lovely grasshopper community,
Currently working on a patterning tool that is part of a much larger waffle slicing/unwrapping tool. I reached the stage where the Data Tree Paths have become difficult for me to optimize or navigate.
The picture explains the issues I am trying to resolve. The main issue is flattening the tree later than earlier that caused me to lose the history of the original Tree Path that became difficult to re-write.
The steps:
1- The original data tree that has Invalid Curves. The invalid curves are the really small offsets that will not be patterned. I kept them invalid and didn’t clean the data tree to not mess up the order. Not cleaning the tree or flattening > partitioning made the order stay perfectly to create the inner surfaces for patterning.
2.Flattening >partitioning> then solving for intersection between the Inner offset. As you see, sometimes they do intersect, which was resolved.
3.Cleaned offset curves/surfaces.
4. Weaved curves in the correct order between the outer and inner curve. This step is technically not necessary and isn’t part of my issue. My issue is mainly focused on how I can automate the process of replacing the branches in number (1), with the new curves that have been fixed in the 4th cleaned data tree ?
I want to maintain the order as they are being moved and oriented back into the original form that was cut. This way I can imagine the patterning on a 3 dimensional form after It was sliced, flattened and patterned.
The process has to be automated as the form, the offset ratio, and number of slices will always change.
260131_Patterning Tool Question.gh (15.3 KB)
your .gh is not the one on the screenshot -good, it´s simpler.
but it does not do anything without inputdata
internalise the input(curves)
Sadly yes, I thought I can only post the part of script where I am facing difficulty if anyone was able to help with that. Cant post the entire script due to confidentiality issues with the project.
could you put a data container in front of your published 260131_Patterning Tool Question.gh and internalize SOME data that show the problem you are facing?
1 Like
I did not know that you could Internalize Data in Grasshopper but thank you for teaching me something new.
Attached is the cleaned script with the Internalized Data. @Jakob_v_Schirmeister @René_Corella
Grasshopper Question - Internalized Data 02.gh (1.6 MB)
1 Like
i would prefer to not split the tree in the first place:
Grasshopper Question - Internalized Data 02.gh (1.6 MB)
1 Like
but if you insist.. if you do have reasons to split and …
still you should not flatten the tree. that is destroying information you still need.
Grasshopper_Question_Internalized_Data_02_jvs02.gh (1.6 MB)
1 Like
Thanks @iskanderani.m!
(I accidentally deleted my other reply…with my phone??)
Anyway, please check the script and see the summary below:
Grasshopper Question - Internalized Data 02.gh (1.6 MB)
Also, please notify if I’ve understood the goal correclty 
warmup:
100% valid, and I’d prefer that too. You certainly don’t have to, as much as it’s 100% valid to do so, especially if you have empty-branch ptsd (as is my case haha), and also maybe just for fun, to make sure Mohanned keeps all things tidy.
Woohoo!
SUMMARY
-
Check for invalids and keep what matters:
-
Find intersecting offset sets:
Until you ‘must’? 
-
Split intersecting offsets and keep what matters:
-
Reform boundary surfaces: