I’m trying to selected each line in my code with the help of mouse pointer, but I couldn’t find what is my mistake to select them. this is my PG:
Is it possible to help me to find a way to select each line?
You should push numbers as coordinates in the line array, not strings:
visibility does not work for line meshes, you should use the alpha property of the colors instead to change the opacity (see PG).
Hi @Evgeni_Popov, Thank you so much, you are wonderful, but is it possible to select each line separately?
I need to select them separately to show each line details.
In this case you will have to create different line systems, one for each line.
sorry for taking your precious time, I have changed lineSystem to createCylinder method to build lines, but the problem is the points and also the degrees, i want to know is it possible to locate each cylinder between every two points of lines? I mean by default the points located on the center of cylinder, but how can modify them to locate the X,Y and Z at the top of the cylinder, and how can I rotate them to create the line with the help of cylinders:
Thank you so much
but I want something to select each line separately, the tube is like createLineSystem, and I can’t select each tube separately.
You can use tubes to have the correct orientation for the lines:
thank you so much , I am so sorry for my many questions.
but the ID is not always change every 3 points, I try to do this but I got an error,
I mean for example if I add another point for “ID” = “0” then the tubes is like this:
and how can I eliminate extra line?
You can reuse the
lines.filter(...) code you used previously:
I cannot thank you enough for helping me. many thanks for your assistance.
I have just another question, why when I wanted to get the location of each tube , I can’t get the actual location, the location for all of them are 0,0,0.
Because the mesh itself is at (0,0,0):
As the name of the mesh is the FID of your structure, you can get the x/y/z of the first vertex of the tube path by doing:
const entry = lines.filter((entry) => entry.FID === selectedMesh.name);
labelPos.text = entry.X + ", " + entry.Y + ", " + entry.Z;
it’s great. I have learnt so much, thanks to you. Thanks a lot