Closed niosus closed 2 years ago
Here's an issue mentioning a workaround: https://github.com/K3D-tools/K3D-jupyter/issues/173
Splitting the points with NaN-s allows to draw multiple disconnected https://en.wikipedia.org/wiki/Polygonal_chain (which k3d.line
normally is).
This way, the chains can be of different length (not, e.g. all 2-point segments).
Thanks! That is very helpful and I can use it as is. I will keep this open in case there is a push to make this an explicit interface and now a workaround though.
@niosus Thanks for kind words.
In next release we will introduce k3d.lines: https://github.com/K3D-tools/K3D-jupyter/blob/devel/examples/lines.ipynb
So this is object where you can pass list of vertices + list of indices that will contain pair of index in vertices array that should be connected (or triple to draw triangle outline). Probably that will meet with your expectations better than workaround that @tgandor mentioned.
Please download new version of k3d@2.13.0:
It should be there :)
Before speaking of any issues, I just wanted to say thanks for the amazing library! It is really helpful to have a tool like this :+1:
I'm using the library to work with LiDAR point clouds and to match these point clouds. Whenever point clouds are matched I would like to be able to show lines, each of which connects 2 3D points. For now, the only way I see for this is to create a
Line
, subsequently adding it to thePlot
object.Ideally, I would love to be able to create a "lines" drawable that would generate a set of lines from an array of points. I believe that for now, if I provide an array of points to the
k3d.line
it will draw a single line through all the points.Alternatively, what would help me is to be able to stop the rendeing of the plot while adding objects to it. For now whever I do
plot += line
the scene is redrawn. I'd like to be able to batch-add multiple lines with a single redraw afterwards.Am I just missing some already existing functionality?