Skip to main content
Question

Overwriting Coordinates 0 + 1 of a line with information from attributes

  • October 10, 2023
  • 4 replies
  • 29 views

renetschi
Contributor
Forum|alt.badge.img+4

Hello everybody,

 

i have a question regarding lines:

 

i have a network of lines in 2D. The information of the z value is stored in 2 different attributes: height1 and height2. I would like to add the height1 to the coordinate0, and would like to add the height2 to the coordinate1 of the line.

 

So far i tried some ways but could not figure out how to overwrite the coordinates of the line.

 

any help would be very appreciated.

 

thanks a lot

 

rené

4 replies

nielsgerrits
VIP
Forum|alt.badge.img+64

One way to do this is to explode the lines to points, recreate the points but now with height, recreate the lines from points.


nielsgerrits
VIP
Forum|alt.badge.img+64

One way to do this is to explode the lines to points, recreate the points but now with height, recreate the lines from points.

Added workspace demonstrating this.

 


david_r
Celebrity
  • October 10, 2023

The VertexCreator has a mode "Replace point at index" to replace individual vertices. If you need to keep the X and Y and only replace the Z, you could use a CoordinateExtractor first.


renetschi
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • October 11, 2023

hey david and niels,

 

thank you so much for your quick replies and your help!

i implemented the workflow from RebuildLines3D. it worked great for all lines with just two vertices. if lines come up with curves i am struggling with this situation a bit. so i will think about a solution here.

i also tried the VertexCreator with the mode "Replace point at index" wich worked really great for me. Maybe i will continue with this option.

Again thank you so much for your help. This saved me a lot of time!

 

Best regards

 

René