Adding_empty_branches_to match_data structure

Hi

I am trying to add an empty branch on DATA2 in order to match the desired data structure ( same as DATA1)

20190318_ADDING_EMPTY_BRANCHES_TO MATCH_DATA STRUCTURE.gh (99.7 KB)

I also wonder how to avoid the last 2 branches to be “cross refernced” , the desired strucutre is that on the right with branches {0} to {11}

I don’t know how to handle it. Could anyone help me ?

thanks

Ivan

this is not logic but you can try this: Manage curve collection

Hi Khaled and thanks for yuo prompt answer

what i need is to create data matching structure shown below

I don’t want to add any curve on branch 10} i just need to have an empty branch {10} out component CrvCp
if You know how to create such a structure that would most likely solve my problem

thanks in advance

like this ?

yup , exactly like that :slight_smile: , how can i make it ?

if i cross reference i don’t obtain the empty branch 10

HI Khaled ,

I cannot manage list collection manually , this doesn’t solve my problem.
As is said i need to find a way to do it with data managing components being DATA1 and DATA 2 the result of a script. ( in the example they were internialized just for brevity ).

thanks

Not sure if this is what you want. It uses the Split Tree component (I think it is native. If not, it may be from TreeSloth).

Have a try treesloth plugin’s Add Unmatchedcomponent.


20190318_ADDING_EMPTY_BRANCHES_TO MATCH_DATA STRUCTURE_re.gh (96.9 KB)

1 Like

Thanks Kim ,

this exactly what im trying to do…i was trying to make a cluster but i do not longer need it :wink:

many thanks :wink:

Many thanks for this path mapper idea, but the question is:
I have a data structure like this

I want to let it parametrically detect the missing list numbers through a script and add it without manually typing inside the path mapper the number after manually checking what is missing.

Is it possible ?

Hi there,

could you please share your last example as gh file? As for your first example - if I understood correctly your challenge - the solution below worked as you desire.

Best regards,

Pavel

Thanks for your consideration.

Please find the gh file below.

I’d be grateful if you could share your file too. Thanks!

Surfaces - add empty branches.gh (34.1 KB)

Here is a Python option:
Surfaces - add empty branches_v2.gh (56.6 KB)

from Grasshopper.Kernel.Data import GH_Path as Path

ep = x.Path(x.BranchCount-1)[1]
pths = [Path(0,i) for i in range(0,ep+1)]
for i in pths:
    if i not in x.Paths:
        x.Add("",i)

a = x
1 Like

Hi M.4andour,

please find attached file, I´ve inserted my idea right into it.

I hope the results correspond to your desires.

Best regards,

Pavel
Surfaces - add empty branches.gh (39.4 KB)

1 Like

Thanks a lot for your kind help!

Thanks a lot for your kind consideration!