Point/point cloud with transparency

Hi,

I’d like to draw point or point cloud objects with colours and transparency individually set for each point. I managed to set individual colours by setting ON_PointCloud::m_C in the case of point cloud. But, transparency set in the same way as the colour is effective only when it is the drawn as “square with white centre” set from “display options”. Is it expected behaviour? I’d like to draw points as solid round dots and with transparency. Is there any way to do that? And is there any way to set how to draw points for individual objects? I assume setting it by CDisplayPipelineAttributes effects to all point or point cloud objects in the document.

Thanks!

Hi,@takahashi-kazu
Try CDisplayPipelineAttributes these properties, where ERhinoPointStyle

// Points specific attributes...
public:
  bool                m_bShowPoints;
  int                 m_nPointSize;
  ERhinoPointStyle    m_ePointStyle;

Everybody’s on vacation. I pretend I know something. :grinning:
-Easy

Hi @Easy,

Thanks a lot for your response, while you’re on vacation too I assume. I guess the properties are effective to all point objects in a document, but I’d like to set them for each object individually.

Hi,@Takahashi-Kazu
Like this?

If it was in a DisplayConduit, I would do this:

		int count = points.Count();
		int alpha = i * (255 / count);
		ON_Color _color(255, 0, 0,alpha);
		dp.DrawPoint(points[i], 4, RPS_ROUND_DOT, _color);

Hi @Easy,

Thanks!! it seems what I wanted. I haven’t used DisplayConduit before, but I try.

If you want to set the point color in the RhinoDoc.
This should help you
https://discourse.mcneel.com/t/how-to-color-point-in-c-sdk/114860

Is there any way to do the same for PointCloud objects – to set colour and transparency for each point?

afaik no. PointCloud is a compacted data structure which doesn’t allow much per-point customization.

@stevebaer - is this something you can help with?

– Dale

Point clouds do not currently support transparency.

@stevebaer,

Thanks for the info. Then, point could shown with transparency when “square with white centre” in display options is selected is not an expected behaviour? It would be appreciated if you could consider supporting it in the future release.