func createLineMesh(generatedNode: SCNNode?, points3d: [simd_float3], color: Color, radius: CGFloat = 0.08, name: String) {
guard let generatedNode = generatedNode, !points3d.isEmpty else { return }
if let existingNode = generatedNode.childNode(withName: name, recursively: false) {
existingNode.removeFromParentNode()
}
let pathPoint = points3d.map{ PathPoint(Vector($0), texcoord: nil, color: color, isCurved: true)}
let path = Path.curve(pathPoint)
let mesh = Mesh.stroke(path, width: radius, detail: 4)
let node = SCNNode(geometry: SCNGeometry(mesh))
node.name = name
generatedNode.addChildNode(node)
}
I am using this to create mesh from path
Can we update PathPoint in mesh to modify curve without recreating whole mesh ?