Hi All,
New to the Babylon environment and running into a snag with what I’m trying to achieve
Goal:
Have a pipe that changes colors of segments that have curvatures sharper than a 45* angle, as well as be able to grow dynamically.
I can achieve this by recreating the whole pipe each time but this seems rather inefficient to me, so I’m attempting to update a Merged Mesh with a new segment of the pipe.
I’ve tried creating a completely new part of the tube then merging that into the existing tube but this appears to mess up the color of the new segment, because I need to move back the first part the path to make it look like its connected.
I’ve also tried to use the MeshBuilder with the instance of the merged mesh but I get an error that the path3d is null when it reaches the update segment in TubeBuilder.ts:
tubeBuilder.ts:135 Uncaught TypeError: Cannot read property ‘path3D’ of null
at Function.TubeBuilder.CreateTube (tubeBuilder.ts:135)
Here is a PG (https://playground.babylonjs.com/#IM7ZXJ#2) This currently runs the first example solution I mentioned and has the second commented out at lines (111-118).
Is there a better way to achieve my goal, then re creating the whole pipe with a new path?
Many thanks 
Wade
