Is it possible to apply different colors to different vertices in a polyline? (I am thinking along the lines of how ComputeMeshVertices works for meshes)
The Rhino.Geometry.PolylineCurve class does not have a place holder for vertex colors. But it is possible, using RhinoCommon’s user text feature, to add an array of vertex colors to the object. Then if needed, you could draw the PolylineCurve with those colors using a display conduit.
Does this help/
Could you maybe expand on this a bit? We want to draw a ployline where each segment is colored differently. I’m unable to find out how to do this based on the documentation, even when I look at the DisplayConduit class.
Are you coding in C++, C#, or Python?
I’m coding in C#.
The Rhino Developer Samples repository on GitHub has a number of RhinoCommon samples that use a DisplayConduit. You might consider either downloading or cloning the repository, and then opening SampleCs.sln and searching the code for “DisplayConduit”.
In a display conduit, you can call DisplayPipeLine.DrawLine to draw a segment of a polyline in whatever color works.
I would also like to do this.
could you help me with some examples?
I write in Python.
Thank you very much.