In CreateLineSystem if I have 100 points, how can I Separate lines with IDs,

Hi everyone

I want to know how can I separate each line with the same point IDs , I mean I want to make a line with the points that have same ID .
this is my code :
https://playground.babylonjs.com/#FRJX06#14

I need to find a way to do it for 1000 points, But I don’t know how can separate them.

Hi @Arash_Bagheri
Please don’t create multiple topics for the same issue.
https://forum.babylonjs.com/t/how-to-separate-the-line/12854

Why don’t you use @nasimiasl solution by injecting a NaN value when the ID changes?

Hi @aWeirdo
sorry for making another topic, because I did not get any useful way.
the line array in my PG was just a sample array, and I need a Practical way when I wanted to use json file, I can’t change the json file to NaN , and as I said I need to find a way for more than 1000 points.

Agree with @aWeirdo about multiple postings.

Is something along these lines more like what you are after? https://playground.babylonjs.com/#FRJX06#15

Note use of CreateLineSystem rather than CreateLines.

1 Like

Hi. For what purpose you mix metadata of line and points data? You need
linesystem: [
Line:{
Points: [
[0,0,0],
[1,1,1],
Etc…
],
Metadata: {
Metafield: meta
}
},
Line: {…}
]

1 Like

Hi @JohnK
Thank you so much. it’s great.
Sorry about multiple posting .
I tried to Deleted the previous topic, but I couldn’t .

I deleted the extra topic

2 Likes

tnx a lot